define("PP_PENDING", "manage" . $my . " pending preprints"); define("PP_ALL", "manage all" . $my . " preprints"); /* * draw tabs */ $links = array(); if ($pendingHash = getPendingPreprints()) { $links[PP_PENDING] = $_SERVER["PHP_SELF"] . "?show=" . urlencode(PP_PENDING); } if ($allHash = getAllPreprints()) { if ($dbClass->num_rows($pendingHash) != $dbClass->num_rows($allHash)) { $links[PP_ALL] = $_SERVER["PHP_SELF"] . "?show=" . urlencode(PP_ALL); } } $tabs = new tabs(); $tabs->show($links); $t = new table("cellpadding='5'", "</center>"); if ($authClass->isAdmin() && $tabs->active == PP_ALL) { // provide the "year selection" option for ($i = $nor_pp_year0; $i <= $year; $i++) { $sel[] = x("option" . ($i == $nor_pp_period ? " selected='selected'" : ""), $i); } $t->tr("", "colspan='9'", x("form action='" . $links[$tabs->active] . "' method='post'", x("b", "Managing preprints for the year ") . x("select name='nor_pp_period' onchange='submit()'", join("\n", $sel)))); } $l = nbsp("Action legend:"); $t->tro(); foreach (array(NOR_PP_MODE_ACCEPT, NOR_PP_MODE_EDIT, NOR_PP_MODE_DELETE) as $a) { if ($a == NOR_PP_MODE_ACCEPT && !$authClass->isAdmin()) { continue; } $t->th("", $l);