Example #1
0
$title = array($NOR_fields[$group]);
if ($period != "all") {
    $title[] = $period;
}
if (TRUE) {
    $title[] = "preprints";
}
if ($author != "") {
    $title[] = "with author '" . $author . "'";
}
startPage(join(" ", $title));
$t = new table("width='95%'", "<form action='index.php' method='get'>");
$t->tro();
$t->td("align='left'", getSelection());
if ($authClass->authenticated()) {
    if (getAllPreprints()) {
        $t->td("", core_getLink("manage preprints", "show_preprints.php"));
    }
    if ($authClass->isAdmin()) {
        $t->td("", core_getLink("manage users", "edit_users.php"));
    }
    if ($authClass->isAdmin()) {
        $t->td("", core_getLink("see access log", "listLog.php"));
    }
    if (True) {
        $t->td("", core_getLink(PP_RESERVE, "edit_preprints.php?nor_pp_period=" . $nor_pp_period . "&amp;nor_pp_mode=" . NOR_PP_MODE_RESERVE));
    }
} else {
    $t->td("", "<div class='only_online'>" . pp_getLink("how to submit preprint", "howto.php", $modal = True) . "</div>");
}
$t->trc();
Example #2
0
$year = $date["year"];
core_declare_input("nor_pp_period", $year);
/*
 * show the legend (edit, delete buttons)
 */
$my = $authClass->isAdmin() ? "" : " my";
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&nbsp;") . x("select name='nor_pp_period' onchange='submit()'", join("\n", $sel))));
}
$l = nbsp("Action legend:");