Location: PHPKode > scripts > qAdmin > jonathan-fielding-qAdmin-04ccc6a/template/menu.php
<?php
	if(isset($_SESSION['authlevel'])){
		$result = $database_connection->dataquery("SELECT * FROM tblPages WHERE authority <= " . $_SESSION['authlevel'] . ' ORDER BY menu_order ASC');
	}
	else{
		$result = $database_connection->dataquery("SELECT * FROM tblPages WHERE authority = 0");
	}
	
	
	//If data returned, return to calling function
	
		echo '<ul>';
		if(mysql_num_rows($result) == 1){
			while($row = mysql_fetch_array($result))
			{
				if($row['menu_order'] == -1){
					//ignore
				}
				else if($row['file'] == $page){
					echo '<li><strong>' . $row['name'] . '</strong></li>';
				}
				else
				{
					echo '<li><a href="index.php?page='. $row['file'] .'">' . $row['name'] . '</a></li>';
				}
			}
		}
		else{
			echo '<li>Homepage</li>';
			echo '<li>test</li>';
			echo '<li>test</li>';
		}
		echo '</ul>';
		echo '<div style="clear:both;"></div>';	
	
?>
Return current item: qAdmin