Location: PHPKode > projects > PHP-Comics > php-comics/inc/sitefunctions.php
<?php
abstract class Site
{
	public static function showsidemenu()
	{
		$display = '
		<div class="sidemenu">
			'.$_SESSION['FullName'].'
			<a href="index.php">Index</a>';
		if($_SESSION['Admin']==1)
		{
			$display .= '<a href="settings.php">Settings</a>
			<a href="admin_settings.php">Admin Settings</a>';		
		}
		$result = DB::Query("SELECT b.Name, f.Path,bm.Time FROM Bookmark bm, Book b, Folder f WHERE bm.Book = b.ID and b.Folder = f.ID AND bm.UID = $_SESSION[UID] AND Time = (SELECT MAX(Time) FROM Bookmark bm WHERE bm.UID = $_SESSION[UID] LIMIT 1)");
		$row = @mysql_fetch_array($result);
		$display .=	'<a href="book.php?path='.rawurlencode($row['Path']).'&book='.rawurlencode($row['Name']).'">Bookmark</a>
			<a href="statistics.php">Statistics</a>
			<a href="suggestions.php">Suggestions</a>
			<a href="logout.php">Logout</a>
		</div>';
		return $display;
	}	
}

?>
Return current item: PHP-Comics