function show_preprint($rowId, $action, $showcancelButton = True) { global $dbClass; $res = $dbClass->query("SELECT * FROM publications WHERE RowId='" . $rowId . "'"); $row = $dbClass->next_record($res); $c = "class='align_right'"; $t = new table("cellpadding='2'", "<form action='loader.php?rowId=" . $rowId . "&action=" . $action . "' method='POST'>"); if ($showcancelButton) { $missing = x("", "?"); } else { $missing = False; } $field = nl2html($GLOBALS["NOR_fields"][$row["Field"]]); $authors = nl2html($row["Authors"], $missing); $title = nl2html($row["Title"], $missing); $location = nl2html($row["Location"], $missing); $journal = nl2html($row["PublIn"], $missing); $t->tro(); $t->th($c, "Preprint :"); $t->td("", pp_preprintID($row["Year"], $row["Report"])); $t->trc(); $t->tro(); $t->th($c, "Field :"); $t->td("", $field); $t->trc(); $t->tro(); $t->th($c, "Authors :"); $t->td("", $authors); $t->trc(); if ($location) { $t->tro(); $t->th($c, "Location :"); $t->td("", $location); $t->trc(); } if ($journal) { $t->tro(); $t->th($c, "Published in :"); $t->td("", $journal); $t->trc(); } $t->tro(); $t->th($c, "Entered by :"); $t->td("", uid2gecos($row["Id"])); $t->trc(); $buttons[] = "<input type='submit' value='continue' name='button'>"; if ($showcancelButton) { $buttons[] = "<input type='submit' value='cancel' name='button'>" . "<input type='hidden' name='load' value='show_preprints.php'>"; } else { $buttons[] = "<input type='submit' value='update information for this preprint' name='button'>" . "<input type='hidden' name='load' value='edit_preprints.php'>" . "<input type='hidden' name='nor_pp_mode' value='" . NOR_PP_MODE_EDIT . "'>"; } $t->tro(); $t->td(); $t->td("", join(" ", $buttons)); $t->trc(); if (!$showcancelButton) { $t->tr("", "colspan='3'", x("i", "<br>When you have published this preprint in a Public Archive<br>" . "(i.e. you know the URL to the abstract)<br>please return and complete the form.<br><br>" . "If you want to publish _only_ at Nordita you can upload your paper now.<br>" . "Note, you can correct eventual typos at any time, and you may also cancel the preprint reservation.")); } $t->close("</form>"); }
$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 . "&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(); $t->close("</form>"); $t = new table("class='filled' align='center' width='100%'", "<div id='preprints' class='pp_list'>"); $t->tro(); $t->th("width='60'", "<span class='only_online'>Serial</span>"); $t->th("", "Title and author(s)"); $t->th("", "Published in"); $t->trc(); if ($group != "all") { $queryG = " AND Field=" . $dbClass->quote($group); } else { $queryG = ""; } if ($author) { $queryA = " AND Authors LIKE '" . $dbClass->quote("%" . $author . "%") . "'"; } else { $queryA = ""; } $dbClass->query("SELECT * FROM publications WHERE " . ($selectPP ? "RowId = '" . $selectPP . "'" : "Status='ok' AND Year>='" . $yFirst . "' AND Year<='" . $yLast . "' " . $queryG . " " . $queryA) . " ORDER BY Year,Report DESC"); while ($pr = $dbClass->next_record()) {
$t->td($s, $pp_id); $t->td($s); $t->td($s, "[free]"); $t->td($s); $t->td($s); $t->td($s); $t->trc(); } break; } } $t->close("</div> <br>"); if (False && @$counter) { $t = new table("width='100%'", "<br><br><div id='preprints' class='pp_list'>"); $t->tro(); $t->th("colspan=2", "Legend"); $t->trc(); if (@$counter["reserved"]) { $t->tro(); $t->td("class='reserved' align='right'", "Reserved preprint numbers (bold red)"); $t->td("class='reserved' align='left'", "These preprints should be completed and registered as soon as possible"); $t->trc(); } if (@$counter["registered"]) { $t->tro(); $t->td("class='registered' align='right'", "Registered preprints (red on grey)"); $t->td("class='registered' align='left'", "These preprints are waiting for acceptance, possibly they are not completed"); $t->trc(); } if (@$counter["unused"]) { $t->tro();
public static function showMailsSent() { if (!empty(self::$sentMails)) { $t = new table("cellpadding='5' cellspacing='0' bgcolor='yellow' " . core_getConfig("errorWidth", "width=70%")); $t->tro(); $t->th("colspan=3", "Important message"); $t->trc(); $many = count(self::$sentMails) > 1; $t->tr("", "colspan=3", "We have sent the following e-mail" . ($many ? "s" : "") . " (see below) with an important information.<br>" . "Please make sure that " . ($many ? "these e-mails are" : "this e-mail is") . " not considered as spam by the mail filter and that<br>" . ($many ? "they reach" : "it reaches") . " the address you indicated.<br>"); $t->tro(); $t->th("", " "); $t->th("", $t->x("i", "To:")); $t->th("", $t->x("i", "Subject:")); $t->trc(); foreach (self::$sentMails as $to => $v) { if (!$v || (int) $to) { continue; } foreach ($v as $k => $subject) { $t->tro(); $t->td(); $t->td("", $to); $t->td("", $subject); $t->trc(); $to = ""; } } $t->close(); } }
} echo "\nnumber {$row['Year']}-{$row['Report']}?</p>\n<form action='" . $_SERVER["PHP_SELF"] . "'>\n <input type='hidden' name='nor_pp_mode' value='{$nor_pp_mode}'>\n <input type='hidden' name='nor_pp_period' value='{$nor_pp_period}'>\n <input type='hidden' name='rowId' value='{$rowId}'>\n <p><input type='submit' name='confirmed' value='yes'>\n <input type='submit' name='confirmed' value='no'></p>\n</form>\n"; } } } break; case NOR_PP_MODE_EDIT: nor_pp_require_row_owner($rowId, $AUTH_login); startPage("Edit Preprints" . ($authClass->isAdmin() ? " (Admin)" : "")); $res = $dbClass->query("SELECT * FROM publications WHERE RowId={$rowId}"); $row = mysql_fetch_array($res); $default_field = nl2html($row["Field"]); $t = new table("class='framed'", "<center>" . "<form action='update_preprint.php' enctype='multipart/form-data' method='post'>\n" . "<input type='hidden' name='pp_id' value='" . pp_preprintID($row["Year"], $row["Report"]) . "'>\n" . "<input type='hidden' name='nor_pp_period' value='{$nor_pp_period}'>\n" . "<input type='hidden' name='nor_pp_mode' value='{$nor_pp_mode}'>\n"); getEditDialog(); $t->tro("align='left'"); $t->th("", "entry owner"); $t->td("", make_user_selection($row["Id"])); $t->trc(); $t->tr("", "", "<input name='button' type='submit' value='continue'> " . "<input name='button' type='submit' value='cancel'>", " "); $t->close("</form></center>"); break; case NOR_PP_MODE_REGISTER: nor_pp_require_row_owner($rowId, $AUTH_login); startPage("Preprint registered in database"); $dbClass->query("UPDATE publications SET Status='registered',Tm='" . time() . "' WHERE RowId='{$rowId}'"); $res = $dbClass->query("SELECT * FROM publications WHERE RowId={$rowId}"); $row = mysql_fetch_array($res); mail2secretary("Registered"); echo "<p>Your preprint has been registered, and is waiting for acceptance</p>\n"; echo "<p><a href='show_preprints.php'>Return to preprints</a>.</p>"; show_preprint($rowId, "show_preprints.php");
function showMailsSent() { global $apps_listOfEmails; if ($apps_listOfEmails) { $t = new table("cellpadding='5' cellspacing='0' bgcolor='yellow' " . core_getConfig('errorWidth', 'width=70%')); $t->tro(); $t->th('colspan=3', 'Important message'); $t->trc(); $many = count($apps_listOfEmails) > 1; $t->tr('', 'colspan=3', 'We have sent the following e-mail' . ($many ? 's' : '') . ' (see below) with an important information.<br>' . 'Please make sure that ' . ($many ? 'these e-mails are' : 'this e-mail is') . ' not considered as spam by the mail filter and that<br>' . ($many ? 'they reach' : 'it reaches') . ' the address you indicated.<br>'); $t->tro(); $t->th('', ' '); $t->th('', $t->x('i', "To:")); $t->th('', $t->x('i', "Subject:")); $t->trc(); foreach ($apps_listOfEmails as $to => $v) { if (!$v || (int) $to) { continue; } foreach ($v as $k => $subject) { $t->tro(); $t->td(); $t->td('', $to); $t->td('', $subject); $t->trc(); $to = ''; } } $t->close(); } }