} else { $pubs = $allHash; } while ($row = $dbClass->next_record($pubs)) { $gecos = uid2gecos($row["Id"]); if (eregi("log1", $cClass)) { $cr = "class='log2r' style='color:#cc0000'"; $cClass = "class='log2'"; } else { $cr = "class='log1r' style='color:#cc0000'"; $cClass = "class='log1'"; } $field = nl2html($row["Field"]); $authors = nl2html(@$row["Authors"]); $title = nl2html(@$row["Title"]); $journal = nl2html(@$row["PublIn"]); $location = trim(@$row["Location"]); $status = strtr($row["Status"], "a-z", "A-Z"); $pp_id = x($location ? "a href='" . $location . "'" : "", $row[Year] . "-" . $row[Report]); switch ($row["Status"]) { case "ok": $t->tro($cClass); $t->td($cClass); # act1 $t->td($cClass, pp_button(NOR_PP_MODE_EDIT)); $t->td($cClass, ($authClass->isAdmin() ? pp_button(NOR_PP_MODE_DELETE) : "") . " "); $t->td($cClass . " nowrap", $pp_id); $t->td($cClass, $field); if ($authClass->isAdmin()) { $t->td($cClass, $gecos); }
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>"); }
if ($row["Status"] == "registered") { echo "<p>Are you sure you want to delete the <i>registered</i> preprint "; } else { echo "<p>Are you sure you want to release the preprint "; } 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);