<div id="header"> <div id="header-logo"> process site </div> <div id="header-items"> </div> </div> <div id="leftmenu"> <?php $menu = new XhtmlMenu(); $menu->setCss('nav_menu', 'nav_menu_current'); $menu->add('Home', '/'); if ($session->id) { $menu->add('Uploads', 'uploads/show'); $menu->add('Work queue', 'queue/overview'); $menu->add('Upload file', 'uploads/new'); $menu->add('Add to queue', 'queue/add'); } if ($session->isSuperAdmin) { $menu->add('Process queue', 'queue/process'); $menu->add('Admin', '/coredev/admin'); } if ($session->id) { $menu->add('Logout', '?logout'); } echo $menu->render(); ?> </div> <div id="middle">
$form->addSubmit('Save'); $form->setHandler('editWikiSubmit'); echo $form->render(); echo t('Last edited') . ' '; if ($wiki->time_edited) { echo formatTime($wiki->time_edited) . ' ' . t('by') . ' ' . User::get($wiki->edited_by)->name; } else { echo t('never'); } echo '</div>'; break; case 'history': // child = article name echo '<h2>History for wiki ' . $this->child . '</h2>'; $wiki = Wiki::getByName($this->child); $menu = new XhtmlMenu(); $menu->setCss('wiki_menu'); $menu->add(t('Article'), 'u/wiki/show/' . $this->child); $menu->add(t('Edit'), 'u/wiki/edit/' . $this->child); $menu->add(t('History'), 'u/wiki/history/' . $this->child); echo '<div class="wiki">'; echo $menu->render(); if ($wiki->id) { echo t('Current version') . ':<br/>'; echo '<b><a href="#" onclick="return toggle_el(\'layer_history_current\')">' . t('Edited') . ' ' . formatTime($wiki->time_edited) . ' ' . t('by') . ' ' . User::get($wiki->edited_by)->name . ' (' . strlen($wiki->text) . ' ' . t('characters') . ')</a></b><br/>'; echo '<div id="layer_history_current" class="revision_entry">'; echo nl2br(htmlentities($wiki->text, ENT_COMPAT, 'UTF-8')); echo '</div>'; echo 'History of article ' . $wiki->name . '<br/><br/>'; $tot_cnt = Revision::getCount(WIKI, $wiki->id); $list = Revision::getAll(WIKI, $wiki->id);