

<?php require_once "globals.php"?>
<?php

echo "<html><head></head><body background='./images/computer/sidestrip.png'>";

include_once("sitestyle.css");

$query = "SELECT * from links WHERE level = '1'";
$result = mysql_query($query);
if (!$result) echo mysql_error();
else {
	 while ($table = mysql_fetch_array($result)) {
	 	   if (($table["sublinkid"]==$_GET["sublinkid"])&&($_GET["do"]=="open_tree")){
		   	  echo "<a class=nice href='links.php?do=close_tree&sublinkid=" . $table["sublinkid"] . "'><div align=right><b>" . $table["link"] . "</b></div></a><br>";
	 	   }
		   else {
		   		echo "<a class=nice href='" . $table["url"] . "' onMouseOver=\"window.status='$table[link]'; return true\" onMouseOut=\"window.status=' '\"><div align=\"right\"><b>" . $table["link"] . "</b></div></a><br>";
		   }


		   if (($table["sublinkid"] == $_GET["sublinkid"]) && ($_GET["do"]=="open_tree")){
		   	  $query2 = "SELECT * FROM links WHERE level = '2' AND sublinkid = '" . $table["sublinkid"] . "'";
		   	  $result2 = mysql_query($query2);
		   if (!$result2) echo mysql_error();
		   else {
		   		echo "<hr color=\"#FFFFFF\">";
		   		while ($table2 = mysql_fetch_array($result2)) {

					  echo "<a class=nicesub href=\"$table2[url]\" onMouseOver=\"window.status='$table2[link]'; return true\" onMouseOut=\"window.status=' '\"><div align=\"right\"><b>$table2[link]</b></div></a><br>";

			    }
				echo "<hr color=\"#FFFFFF\">";
		   }}
	 }
}

echo "</body></html>";
?>
<?php require_once "footer.php"?>


