<?php // -*-html-*- ?>
<!-- $Id: navbar.tmpl,v 1.4 2005/02/27 18:36:29 rurban Exp $ -->
<!-- The top navigation/search bar -->
<form action="<?= WikiURL(_("TitleSearch"))?>" target="_top"
      method="get" accept-charset="<?=$charset?>" id="searchform" name="searchform">
<input type="hidden" name="auto_redirect" value="1" />
<?php if (! USE_PATH_INFO) { ?>
  <input type="hidden" name="pagename" value="<?=_("TitleSearch")?>" />
<?php } ?>
<div id="navbuttons">
<table width="100%" cellpadding="0" cellspacing="0" border="0">
<tr valign="middle"><td align="left">
<?= WikiLink(_("RecentChanges"), "button") ?>
<?php if (!empty($revision)) { ?>
<?=$SEP?><?= Button("RelatedChanges", _("RelatedChanges")) ?>
<?=$SEP?><?= Button("LikePages", _("LikePages")) ?>
<?=$SEP?><?= Button("BackLinks", _("BackLinks")) ?>
<?php } ?>
</td>
<td align="right" width="150">
   <div id="search">
    <?php if (!empty($user) && $user->isSignedIn()) { ?>
     <?= WikiLink(_("UserPreferences"),'button',_("Preferences")) ?><?=$SEP?>
<?php } ?>
<?php if (!empty($user)) { ?>
<?php
      /* Today's calendar page for the user, if the Calender subpage is defined. */
      $UserCalPageTitle = $user->getId() . SUBPAGE_SEPARATOR . _("Calendar");
      $dbi = $request->getDbh();
      if ($dbi->isWikiPage($UserCalPageTitle)) {
        $UserCalPageTodayTitle = $UserCalPageTitle . SUBPAGE_SEPARATOR . strftime("%Y-%m-%d", time());
        //$UserCalPageTodayUrl = WikiURL($UserCalPageTodayTitle);
?>
<?= WikiLink($UserCalPageTodayTitle, "button", _("Today")) ?><?=$SEP?>
<?php } ?>
<?php if (!empty($user) && $user->isAdmin()) { ?>
<?= WikiLink(_("PhpWikiAdministration"), "button", _("Admin")) ?><?=$SEP?>
<?php } ?>
<?php } ?>
<nobr><?= WikiLink(_("FindPage"), "button") ?><input type="text" id="livesearch" name="s" size="12" 
   maxlength="256" 
   onfocus="if (this.value == '<?=_("Search")?>') {this.value = '';}"
   onmouseout="window.status=''; return true;" 
   onmouseover="window.status='<?=_("Search")?>'; return true;"
<?php if (ENABLE_LIVESEARCH) { ?>
   title="<?=_("LiveSearch")?>" 
   onKeypress="liveSearchStart()"
   onblur="setTimeout('closeResults()',2000); if (this.value == '') {this.value = '<?=_("Search")?>';}" />
   </div></nobr><br /><div align="left" id="LSResult"></div>
<?php } else { ?>
   title="<?=_("TitleSearch")?>" /></nobr>
   </div>
<?php } ?>
</td></tr></table></div>
</form>

