|
|
include("dbconn.php");
if (isset($_GET["addlink"]))
{
include("mylinks.php");
echo "
";
?>
Please ensure that our links are on your site first before completing this form. Thank you.
}
else
{
echo"";
$results = mysql_query("SELECT * FROM linkscategory ORDER BY title ASC");
$numrows = mysql_numrows($results);
if (isset($_GET["category"]) || $numrows < 2)
{
if (isset($_GET["category"]))
{
echo " ";
$category = $_GET["category"];
$results = mysql_query("SELECT * FROM links WHERE category=".$category." ORDER BY priority ASC");
$results2 = mysql_query("SELECT title FROM linkscategory WHERE id=".$category);
$categoryName = mysql_result($results2, 0, "title");
echo "
";
}
else
{
include("mylinks.php");
echo "
";
$results = mysql_query("SELECT * FROM links ORDER BY priority ASC");
}
$numrows = mysql_numrows($results);
for ($i=0;$i<$numrows;$i++)
{
$id = mysql_result($results, $i, "id");
$title = mysql_result($results, $i, "title");
$descr = mysql_result($results, $i, "descr");
$url = mysql_result($results, $i, "url");
if ($url == "HTML")
{
$results2 = mysql_query("SELECT html FROM linkshtml WHERE id=".$id);
$html = mysql_result($results2, 0, "html");
echo $html."
";
}
else
{
echo "";
if (file_exists("images/links/".$id.".jpg")) echo " ";
if (file_exists("images/links/".$id.".gif")) echo " ";
echo $title." ".$descr."
";
}
}
}
else
{
include("mylinks.php");
echo "
";
$results = mysql_query("SELECT * FROM linkscategory ORDER BY title ASC");
$numrows = mysql_numrows($results);
for ($i=0;$i<$numrows;$i++)
{
$id = mysql_result($results, $i, "id");
$title = mysql_result($results, $i, "title");
echo "".$title." ";
}
}
?>
Add Your Banner / Link
}
?>
|
|
|
|