function mainmenu($parent, $level) { // Complex mysql statement that selects one category or sub category using an increasing loop number. // It sorts the table data such that the category is outputted first followed by its sub categorys and so on. $result = mysql_query("SELECT a.id, a.label, a.link, Deriv1.Count FROM `categories` a LEFT OUTER JOIN \n (SELECT parent, COUNT(*) AS Count FROM `categories` GROUP BY parent) Deriv1 ON a.id = Deriv1.parent WHERE a.parent='{$parent}'"); echo "<ul>"; while ($row = mysql_fetch_assoc($result)) { // This echoes the HTML to the client and the output from the mysql is placed in the innerHTML of the file. if ($row['Count'] > 0) { echo "<li><a href='" . $row['link'] . "'>" . $row['label'] . "</a>"; mainmenu($row['id'], $level + 1); echo "</li>"; } elseif ($row['Count'] == 0) { echo "<li><a href='" . $row['link'] . "'>" . $row['label'] . "</a></li>"; } else { } } echo "</ul>"; }
</a> <div id="main"> <?php include 'products.php'; ?> <?php include 'loginmenu.tpl'; ?> <div id="mainmenu"> <?php mainmenu("home"); ?> <br><br> <?php include 'stat.php'; ?> </div> <?php include 'content_home.tpl'; ?> <script> document.loginForm.universe.focus(); </script>
$out .= loginout(); break; case "loginform": $out .= loginform(); break; case "mainmenu": $out .= mainmenu(0); break; case "mainmenu1": $out .= mainmenu(0, 1); break; case "mainmenu2": $out .= mainmenu(0, 2); break; case "mainmenu3": $out .= mainmenu(0, 3); break; case "subtitle": $out .= $set['subtitle']; break; case "title": $out .= '<a href="' . $set['homepath'] . '">' . $set['title'] . '</a>'; break; case "selected": $out .= $selected['name']; break; case "sitemap": $out .= sitemap(0); break; case "submenu": $out .= submenu(0);
</a> <div id="main"> <?php include 'products.php'; ?> <?php include 'loginmenu.tpl'; ?> <div id="mainmenu"> <?php mainmenu("reg"); ?> </div> <?php include 'content_register.tpl'; ?> <script> <?php require_once "uni.php"; if (key_exists("linkuni", $_GET)) { echo "registerForm.universe.value = \"" . $UniList[$_GET['linkuni']]['uniurl'] . "\";\n"; } if (key_exists("errorCode", $_GET)) { echo "document.registerForm.character.value = '" . $_GET['character'] . "';\n";
?> </a> <div id="main"> <?php include 'products.php'; ?> <?php include 'loginmenu.tpl'; ?> <div id="mainmenu"> <?php mainmenu("about"); ?> </div> <?php include 'content_about.tpl'; ?> <script> document.loginForm.universe.focus(); </script> </body> </html>
<meta http-equiv="Content-Type" content="text/html;charset=utf-8"> <link rel="shortcut icon" href="lib/style/images/favicon.ico" > <link href="lib/style/style.css" rel="stylesheet" type="text/css" /> <link href="http://fonts.googleapis.com/css?family=Ubuntu:500|Open+Sans|Open+Sans+Condensed:300" rel="stylesheet" type="text/css"> <script src='lib/productdisplay.js' type='text/javascript'></script> </head> <body> <div id="header"> <div id="logo"> <h1><a href="#"> Content Management System </a></h1> </div> <div id="menu"> <ul><li><a href='index.php'>Home</a></li> <!-- PHP function called within this page --> <?php mainmenu(0, 1); ?> <div id="searchbar"><input type="text" name="searchvalue" placeholder="Search"> </div> <!-- Special div used to display products within the users basket --> <li id="basketlink"><div id="basket">Current Items <br><br> </div><a href='#'>Your Basket</a></li></ul> </div> </div> <div id="content" class="visible"> <!-- Div to be populated later by Javascript functions --> <div id="products"></div> <!-- NOT WORKING --> <!-- <div id="checkout"> <div id="userForm"> <h3>Basket Checkout</h3>
?> </a> <div id="main"> <?php include 'products.php'; ?> <?php include 'loginmenu.tpl'; ?> <div id="mainmenu"> <?php mainmenu("install"); ?> </div> <?php include 'content_install.tpl'; ?> <script> document.loginForm.universe.focus(); </script> </body> </html>
?> </a> <div id="main"> <?php include 'products.php'; ?> <?php include 'loginmenu.tpl'; ?> <div id="mainmenu"> <?php mainmenu("rules"); ?> </div> <?php include 'content_rules.tpl'; ?> <script> document.loginForm.universe.focus(); </script> </body> </html>
<body> <a href="#pustekuchen" style="display:none;"><?php echo loca("LOGIN_LINK"); ?> </a> <div id="main"> <?php include 'loginmenu.tpl'; ?> <div id="mainmenu"> <?php mainmenu("unis"); ?> </div> <?php include 'content_unis.tpl'; ?> <script> document.loginForm.universe.focus(); </script> </body> </html>