aboutsummaryrefslogtreecommitdiff
path: root/public/navbar.php
diff options
context:
space:
mode:
Diffstat (limited to 'public/navbar.php')
-rw-r--r--public/navbar.php22
1 files changed, 14 insertions, 8 deletions
diff --git a/public/navbar.php b/public/navbar.php
index 03f9ca3..4b4001d 100644
--- a/public/navbar.php
+++ b/public/navbar.php
@@ -6,14 +6,20 @@
<span class="label">winkel</span>
</a>
<a href="/products.php" class="nolinkstyle nav-item"><span>producten</span></a>
- <a href="/login.php" class="nolinkstyle nav-item"><span>login</span></a>
- <a href="/cart.php" class="nolinkstyle nav-item">
- <?php
- echo "<span>mand";
- if ($logged_in) echo " (".$cart_count.")";
- echo "</span>";
- ?>
- </a>
+ <?php do {
+ if ($logged_in) break;
+ echo <<<"EOF"
+ <a href="/login.php" class="nolinkstyle nav-item"><span>login</span></a>
+ EOF;
+ } while (false); ?>
+ <?php do {
+ if (!$logged_in) break;
+ echo <<<"EOF"
+ <a href="/cart.php" class="nolinkstyle nav-item">
+ <span>mand ($cart_count)</span>
+ </a>
+ EOF;
+ } while (false); ?>
<?php do {
if (($user_privileges & PRIVILEGE_ADMIN) == 0) break;
echo <<<"EOF"