<?php
$curuserprefs = $user->getPreferences();
$dbh = $request->getDbh();
$username = $user->UserName();
?>

   <li class="submenu"><?php echo Button(array(), _("Home Page"), __("HomePage")) ?></li>
   <li class="submenu"><?php echo Button(array(), _("Recent Changes"), __("RecentChanges")) ?></li>
   <li class="submenu"><?php echo Button(array(), _("Special Pages"), __("SpecialPages")) ?></li>
   <li class="submenu"><?php echo Button(array(), _("Search"), __("FindPage")) ?></li>
   <?php if ($curuserprefs->get('randomPageMenuItem')) { ?>
     <li class="submenu"><?php echo Button(array(), _("Random Page"), __("RandomPage")) ?></li>
   <?php } ?>
   <?php if ($curuserprefs->get('likePagesMenuItem')) { ?>
     <li class="submenu"><?php echo Button(array('action'=>__("LikePages")), _("Like Pages"), $page->getName()) ?></li>
   <?php } ?>
   <?php if (!empty($user) && $user->isSignedIn()) { ?>
     <li class="submenu"><?php echo Button(array(), _("Upload File"), __("UpLoad")) ?></li>
   <?php } ?>
   <?php if (!empty($user) && $user->isAdmin()) { ?>
     <li class="submenu"><?php echo Button(array(), _("Wiki Admin"), __("PhpWikiAdministration")) ?></li>
   <?php } ?>
   <?php if (!empty($user) && $user->isSignedIn()) { ?>
     <?php if ($dbh->isWikiPage($username)) { ?>
       <li class="submenu"><?php echo Button(array(), _("My User Page"), $username) ?></li>
     <?php } ?>
     <li class="submenu"><?php echo Button(array(), _("User Preferences"), __("UserPreferences")) ?></li>
   <?php } ?>
