function displayMainPageAccountDetails() { $html_out = '<li><a href="#sign-up">Sign up</a></li><li><a href="#login">Login</a></li>'; $html_in = '%s<li><a href="./profile.php">' . displayCurrentUserName() . '</a></li><li><a href="./profile.php">My Account</a></li><li><a href="./includes/accounts/exec-logout.php">Logout</a>'; $html_admin = '<li><a href="./admin.php">Admin</a></li>'; $cookies = new Cookies(); $user = $cookies->user_from_cookie(); if ($user) { if ($user->data["permission"] > 1) { $fmter = $html_admin; } else { $fmter = ""; } } return $user === 0 ? $html_out : sprintf($html_in, $fmter); }
// }) }) </script> </head> <body> <!-- Header --> <header id="header"> <h1><a href="index.php"><?php echo getSetting("sitename"); ?> </a></h1> <nav id="nav"> <ul> <li><a href="profile.php"><?php echo displayCurrentUserName(); ?> </a></li> <li><a href="profile.php">My Account</a></li> <li class="special"> <a href="#" class="skel-layers-include icon fa-shopping-cart" data-action="toggleLayer" data-args="menuPanel"></a> <div id="menuPanel-content"> <table class="alt"> <thead> <tr> <th>Item Name</th> <th>Quantity</th> <th>Price</th> </tr> </thead> <tbody>