private function _info()
 {
     global $Conf;
     $n = count($this->rank);
     if (!$this->info_printed && (!count($this->papersel) || $n >= count($this->papersel) || time() - $this->starttime <= 4)) {
         return;
     }
     $pct = round($n / count($this->papersel) * 100);
     if (!$this->info_printed) {
         if ($this->header_title) {
             $Conf->header($this->header_title, $this->header_id, actionBar());
         }
         echo "<div id='foldrankcalculation' class='foldc'><div class='fn info'>Calculating ranks; this can take a while.  <span id='rankpercentage'>{$pct}</span>% of ranks assigned<span id='rankdeletedpref'></span>.</div></div>";
         $this->info_printed = true;
     }
     if ($n < count($this->papersel)) {
         echo "<script>document.getElementById('rankpercentage').innerHTML = '{$pct}'";
         if ($this->deletedpref > 0) {
             echo ";document.getElementById('rankdeletedpref').innerHTML = ', ", round(($this->totalpref - $this->deletedpref) / $this->totalpref * 100), "% of preferences remain'";
         }
         echo "</script>\n";
     } else {
         echo "<script>document.getElementById('foldrankcalculation').className = 'foldo'</script>\n";
     }
     flush();
 }
示例#2
0
function document_error($status, $msg)
{
    global $Conf;
    header("HTTP/1.1 {$status}");
    $Conf->header("Download", null, actionBar());
    $msg && Conf::msg_error($msg);
    $Conf->footer();
    exit;
}
示例#3
0
 static function check_http_auth()
 {
     global $Conf, $Opt, $Me;
     assert(isset($Opt["httpAuthLogin"]));
     // if user signed out of HTTP authentication, send a reauth request
     if (isset($_SESSION["reauth"])) {
         unset($_SESSION["reauth"]);
         header("HTTP/1.0 401 Unauthorized");
         if (is_string($Opt["httpAuthLogin"])) {
             header("WWW-Authenticate: " . $Opt["httpAuthLogin"]);
         } else {
             header("WWW-Authenticate: Basic realm=\"HotCRP\"");
         }
         exit;
     }
     // if user is still valid, OK
     if ($Me->has_database_account()) {
         return;
     }
     // check HTTP auth
     if (!isset($_SERVER["REMOTE_USER"]) || !$_SERVER["REMOTE_USER"]) {
         $Conf->header("Error", "home", actionBar());
         Conf::msg_error("This site is using HTTP authentication to manage its users, but you have not provided authentication data. This usually indicates a server configuration error.");
         $Conf->footer();
         exit;
     }
     $_REQUEST["email"] = $_SERVER["REMOTE_USER"];
     if (validate_email($_REQUEST["email"])) {
         $_REQUEST["preferredEmail"] = $_REQUEST["email"];
     } else {
         if (isset($Opt["defaultEmailDomain"]) && validate_email($_REQUEST["email"] . "@" . $Opt["defaultEmailDomain"])) {
             $_REQUEST["preferredEmail"] = $_REQUEST["email"] . "@" . $Opt["defaultEmailDomain"];
         }
     }
     $_REQUEST["action"] = "login";
     if (!self::check_login()) {
         $Conf->footer();
         exit;
     }
 }
    } else {
        SettingGroup::crosscheck($sv, $Group);
        $sv->report();
    }
}
if (isset($_REQUEST["update"]) && check_post()) {
    do_setting_update($Sv);
}
if (isset($_REQUEST["cancel"]) && check_post()) {
    redirectSelf();
}
if (!$Sv->warnings_reported) {
    SettingGroup::crosscheck($Sv, $Group);
    $Sv->report();
}
$Conf->header("Settings &nbsp;&#x2215;&nbsp; <strong>" . SettingGroup::$all[$Group]->description . "</strong>", "settings", actionBar());
$Conf->echoScript("");
// clear out other script references
echo $Conf->make_script_file("scripts/settings.js"), "\n";
echo Ht::form(hoturl_post("settings", "group={$Group}"), array("id" => "settingsform"));
echo '<div class="leftmenu_menucontainer"><div class="leftmenu_list">';
foreach (SettingGroup::all() as $g) {
    if ($g->name === $Group) {
        echo '<div class="leftmenu_item_on">', $g->description, '</div>';
    } else {
        echo '<div class="leftmenu_item">', '<a href="', hoturl("settings", "group={$g->name}"), '">', $g->description, '</a></div>';
    }
}
echo "</div></div>\n", '<div class="leftmenu_content_container"><div class="leftmenu_content">', '<div class="leftmenu_body">';
Ht::stash_script("jQuery(\".leftmenu_item\").click(divclick)");
function doActionArea($top)
        $Conf->qe("delete from PaperConflict where contactId={$reviewer} and (" . substr($del, 4) . ")");
    }
    $Conf->update_rev_tokens_setting(false);
    if ($Conf->setting("pcrev_assigntime") == $Now) {
        $Conf->confirmMsg("Assignments saved! You may want to <a href=\"" . hoturl("mail", "template=newpcrev") . "\">send mail about the new assignments</a>.");
    }
    redirectSelf(["kind" => $qreq->kind]);
}
if ($qreq->update && $reviewer > 0 && check_post()) {
    saveAssignments($qreq, $reviewer);
} else {
    if ($qreq->update) {
        Conf::msg_error("You need to select a reviewer.");
    }
}
$Conf->header("Assignments &nbsp;&#x2215;&nbsp; <strong>Manual</strong>", "assignpc", actionBar());
echo '<div class="psmode">', '<div class="papmode"><a href="', hoturl("autoassign"), '">Automatic</a></div>', '<div class="papmodex"><a href="', hoturl("manualassign"), '">Manual</a></div>', '<div class="papmode"><a href="', hoturl("bulkassign"), '">Bulk update</a></div>', '</div><hr class="c" />';
// Help list
echo "<div class='helpside'><div class='helpinside'>\nAssignment methods:\n<ul><li><a href='", hoturl("autoassign"), "'>Automatic</a></li>\n <li><a href='", hoturl("manualassign"), "' class='q'><strong>Manual by PC member</strong></a></li>\n <li><a href='", hoturl("assign"), "'>Manual by paper</a></li>\n <li><a href='", hoturl("bulkassign"), "'>Bulk update</a></li>\n</ul>\n<hr class='hr' />\n";
if ($qreq->kind == "a") {
    echo "Types of PC review:\n<dl><dt>" . review_type_icon(REVIEW_PRIMARY) . " Primary</dt><dd>Mandatory, may not be delegated</dd>\n  <dt>" . review_type_icon(REVIEW_SECONDARY) . " Secondary</dt><dd>Mandatory, may be delegated to external reviewers</dd>\n  <dt>" . review_type_icon(REVIEW_PC) . " Optional</dt><dd>May be declined</dd></dl>\n<hr class='hr' />\n";
}
echo "<dl><dt>Potential conflicts</dt><dd>Matches between PC member collaborators and paper authors, or between PC member and paper authors or collaborators</dd>\n";
if ($qreq->kind == "a") {
    echo "<dt>Preference</dt><dd><a href='", hoturl("reviewprefs"), "'>Review preference</a></dd>\n  <dt>Topic score</dt><dd>+4 per high interest paper topic, &minus;2 per low interest paper topic</dd>\n  <dt>Desirability</dt><dd>High values mean many PC members want to review the paper</dd>\n";
}
echo "</dl>\nClick a heading to sort.\n</div></div>";
if ($reviewer > 0) {
    echo "<h2 style='margin-top:1em'>Assignments for ", $Me->name_html_for($pcm[$reviewer]), $pcm[$reviewer]->affiliation ? " (" . htmlspecialchars($pcm[$reviewer]->affiliation) . ")" : "", "</h2>\n";
} else {
    echo "<h2 style='margin-top:1em'>Assignments by PC member</h2>\n";
示例#6
0
    $Graphs["procrastination"] = "Procrastination";
    $Graphs["formula"] = "Formula";
}
if (!count($Graphs)) {
    $Me->escape();
}
reset($Graphs);
$GraphSynonym = array("reviewerlameness" => "procrastination");
if ($Graph && isset($GraphSynonym[$Graph])) {
    $Graph = $GraphSynonym[$Graph];
}
if (!$Graph || !isset($Graphs[$Graph])) {
    redirectSelf(array("g" => key($Graphs)));
}
// Header and body
$Conf->header("Graphs", "graphbody", actionBar());
$Conf->echoScript("");
echo $Conf->make_script_file("scripts/d3.min.js", true);
echo $Conf->make_script_file("scripts/graph.js");
function echo_graph()
{
    echo '<div id="hotgraph" style="position:relative;max-width:960px;margin-bottom:4em"></div>', "\n";
}
// Procrastination report
if ($Graph == "procrastination") {
    echo "<h2>Procrastination</h2>\n";
    echo_graph();
    $rt = new ReviewTimes($Me);
    $Conf->echoScript('jQuery(function () { hotcrp_graphs.procrastination("#hotgraph",' . json_encode($rt->json()) . '); })');
}
// Formula experiment
示例#7
0
}
if (($count = cvtint(@$_REQUEST["n"], -1)) <= 0) {
    $count = $DEFAULT_COUNT;
}
$count = min($count, $MAX_COUNT);
if (($offset = cvtint(@$_REQUEST["offset"], -1)) < 0 || $offset >= $count) {
    $offset = 0;
}
if ($offset == 0 || $page == 1) {
    $start = ($page - 1) * $count;
    $offset = 0;
} else {
    $start = ($page - 2) * $count + $offset;
}
$nlinks = 4;
$Conf->header("Log", "actionlog", actionBar());
$wheres = array();
$Eclass["q"] = $Eclass["pap"] = $Eclass["acct"] = $Eclass["n"] = $Eclass["date"] = "";
$_REQUEST["q"] = trim(defval($_REQUEST, "q", ""));
$_REQUEST["pap"] = trim(defval($_REQUEST, "pap", ""));
$_REQUEST["acct"] = trim(defval($_REQUEST, "acct", ""));
$_REQUEST["n"] = trim(defval($_REQUEST, "n", "{$DEFAULT_COUNT}"));
$_REQUEST["date"] = trim(defval($_REQUEST, "date", "now"));
if ($_REQUEST["pap"]) {
    $Search = new PaperSearch($Me, array("t" => "all", "q" => $_REQUEST["pap"], "allow_deleted" => true));
    if (count($Search->warnings)) {
        $Conf->warnMsg(join("<br />\n", $Search->warnings));
    }
    $pl = $Search->paperList();
    if (count($pl)) {
        $where = array();
            } else {
                if (!$MiniMe->check_password($_REQUEST["password"])) {
                    $MergeError = "That password is incorrect.";
                } else {
                    if ($MiniMe->contactId == $Me->contactId) {
                        $Conf->confirmMsg("Accounts successfully merged.");
                        go(hoturl("index"));
                    } else {
                        crpmerge($MiniMe);
                    }
                }
            }
        }
    }
}
$Conf->header("Merge accounts", "mergeaccounts", actionBar());
if ($MergeError) {
    Conf::msg_error($MergeError);
} else {
    $Conf->infoMsg("You may have multiple accounts registered with the " . Conf::$gShortName . " conference; perhaps " . "multiple people asked you to review a paper using " . "different email addresses. " . "If you have been informed of multiple accounts, " . "enter the email address and the password " . "of the secondary account. This will merge all the information from " . "that account into this one. ");
}
echo "<form method='post' action=\"", hoturl_post("mergeaccounts"), "\" accept-charset='UTF-8'>\n";
// Try to prevent glasses interactions from screwing up merges
echo Ht::hidden("actas", $Me->contactId);
?>

<table class='form'>

<tr>
  <td class='caption'>Email</td>
  <td class='entry'><input type='text' name='email' size='50'
示例#9
0
    if (count($tokeninfo)) {
        $Conf->infoMsg(join("<br />\n", $tokeninfo));
    }
    redirectSelf();
}
if (isset($_REQUEST["token"]) && check_post() && !$Me->is_empty()) {
    change_review_tokens();
}
if (isset($_REQUEST["cleartokens"])) {
    $Me->change_review_token(false, false);
}
if ($Me->privChair) {
    require_once "adminhome.php";
}
$title = $Me->is_empty() || isset($_REQUEST["signin"]) ? "Sign in" : "Home";
$Conf->header($title, "home", actionBar());
$xsep = " <span class='barsep'>·</span> ";
if ($Me->privChair) {
    echo "<div id='clock_drift_container'></div>";
}
// Sidebar
echo "<div class='homeside'>";
echo "<noscript><div class='homeinside'>", "<strong>HotCRP requires Javascript.</strong> ", "Many features will work without Javascript, but not all.<br />", "<a style='font-size:smaller' href='http://read.seas.harvard.edu/~kohler/hotcrp/'>Report bad compatibility problems</a></div></noscript>";
// Conference management and information sidebar
echo '<div class="homeinside">';
if ($Me->is_manager()) {
    $links = array();
    if ($Me->privChair) {
        $links[] = '<a href="' . hoturl("settings") . '">Settings</a>';
        $links[] = '<a href="' . hoturl("users", "t=all") . '">Users</a>';
    }
示例#10
0
        if (isset($_REQUEST["setvote"])) {
            $Conf->confirmMsg("Votes saved.");
        } else {
            $Conf->confirmMsg("Ranking saved.  To view it, <a href='" . hoturl("search", "q=order:" . urlencode($tag)) . "'>search for &ldquo;order:{$tag}&rdquo;</a>.");
        }
    }
}
if ((isset($_REQUEST["setvote"]) || isset($_REQUEST["setrank"])) && $Me->is_reviewer() && check_post()) {
    setTagIndexes();
}
$pastDeadline = !$Conf->time_review(null, $Me->isPC, true);
if (!$Conf->time_review_open() && !$Me->privChair) {
    Conf::msg_error("The site is not open for review.");
    go(hoturl("index"));
}
$Conf->header("Offline reviewing", "offline", actionBar());
if ($Me->is_reviewer()) {
    if (!$Conf->time_review_open()) {
        $Conf->infoMsg("The site is not open for review.");
    }
    $Conf->infoMsg("Use this page to download a blank review form, or to upload review forms you’ve already filled out.");
    if (!$Me->can_clickthrough("review")) {
        PaperTable::echo_review_clickthrough();
    }
} else {
    $Conf->infoMsg("You aren’t registered as a reviewer or PC member for this conference, but for your information, you may download the review form anyway.");
}
echo "<table id='offlineform'>";
// Review forms
echo "<tr><td><h3>Download forms</h3>\n<div>";
if ($Me->is_reviewer()) {
        $Conf->echoScript("fold('mail',null)");
    }
}
function complete_assignment($callback)
{
    global $Me;
    $assignset = new AssignmentSet($Me, false);
    $assignset->parse($_POST["file"], get($_POST, "filename"), assignment_defaults(), $callback);
    $SSel = SearchSelection::make(make_qreq(), $Me);
    $assignset->restrict_papers($SSel->selection());
    return $assignset->execute(true);
}
if (isset($_REQUEST["saveassignment"]) && check_post() && (isset($_REQUEST["cancel"]) || isset($_POST["file"]) && get($_POST, "assignment_size_estimate") < 1000 && complete_assignment(null))) {
    /*redirectSelf()*/
}
$Conf->header("Assignments &nbsp;&#x2215;&nbsp; <strong>Bulk update</strong>", "bulkassign", actionBar());
echo '<div class="psmode">', '<div class="papmode"><a href="', hoturl("autoassign"), '">Automatic</a></div>', '<div class="papmode"><a href="', hoturl("manualassign"), '">Manual</a></div>', '<div class="papmodex"><a href="', hoturl("bulkassign"), '">Bulk update</a></div>', '</div><hr class="c" />';
// Help list
echo "<div class='helpside'><div class='helpinside'>\nAssignment methods:\n<ul><li><a href='", hoturl("autoassign"), "'>Automatic</a></li>\n <li><a href='", hoturl("manualassign"), "'>Manual by PC member</a></li>\n <li><a href='", hoturl("assign"), "'>Manual by paper</a></li>\n <li><a href='", hoturl("bulkassign"), "' class='q'><strong>Bulk update</strong></a></li>\n</ul>\n<hr class='hr' />\nTypes of PC review:\n<dl><dt>" . review_type_icon(REVIEW_PRIMARY) . " Primary</dt><dd>Mandatory, may not be delegated</dd>\n  <dt>" . review_type_icon(REVIEW_SECONDARY) . " Secondary</dt><dd>Mandatory, may be delegated to external reviewers</dd>\n  <dt>" . review_type_icon(REVIEW_PC) . " Optional</dt><dd>May be declined</dd></dl>\n</div></div>";
// upload review form action
if (isset($_POST["bulkentry"]) && trim($_POST["bulkentry"]) === "Enter assignments") {
    unset($_POST["bulkentry"]);
}
if (isset($_GET["upload"]) && check_post() && (isset($_POST["bulkentry"]) && $_POST["bulkentry"] || fileUploaded($_FILES["bulk"]))) {
    flush();
    while (@ob_end_flush()) {
        /* do nothing */
    }
    if (fileUploaded($_FILES["bulk"])) {
        $text = file_get_contents($_FILES["bulk"]["tmp_name"]);
        $filename = $_FILES["bulk"]["name"];
示例#12
0
        }
    }
}
if (isset($_REQUEST["scoresort"]) && ($_REQUEST["scoresort"] == "A" || $_REQUEST["scoresort"] == "V" || $_REQUEST["scoresort"] == "D")) {
    $Conf->save_session("scoresort", $_REQUEST["scoresort"]);
}
if ($_REQUEST["t"] == "pc") {
    $title = "Program committee";
} else {
    if (str_starts_with($_REQUEST["t"], "#")) {
        $title = "#" . substr($_REQUEST["t"], 1) . " program committee";
    } else {
        $title = "Users";
    }
}
$Conf->header($title, "accounts", actionBar());
$pl = new ContactList($Me, true);
$pl_text = $pl->table_html($_REQUEST["t"], hoturl("users", ["t" => $_REQUEST["t"]]), $tOpt[$_REQUEST["t"]], 'uldisplay.$');
// form
echo "<div class='g'></div>\n";
if (count($tOpt) > 1) {
    echo "<table id='contactsform' class='tablinks1'>\n<tr><td><div class='tlx'><div class='tld1'>";
    echo Ht::form_div(hoturl("users"), array("method" => "get"));
    if (isset($_REQUEST["sort"])) {
        echo Ht::hidden("sort", $_REQUEST["sort"]);
    }
    echo Ht::select("t", $tOpt, $_REQUEST["t"], array("id" => "contactsform1_d")), " &nbsp;", Ht::submit("Go"), "</div></form>";
    echo "</div><div class='tld2'>";
    // Display options
    echo Ht::form_div(hoturl("users"), array("method" => "get"));
    foreach (array("t", "sort") as $x) {
示例#13
0
    if ($type > 2) {
        echo '<hr class="c" />', "</div>\n";
    }
}
function textinput($name, $value, $size, $id = false, $password = false)
{
    return '<input type="' . ($password ? "password" : "text") . '" name="' . $name . '" ' . ($id ? "id=\"{$id}\" " : "") . 'size="' . $size . '" value="' . $value . '" />';
}
function create_modes($hlbulk)
{
    echo '<div class="psmode">', '<div class="', $hlbulk ? "papmode" : "papmodex", '">', Ht::js_link("New account", "fold('bulk',true,9)"), '</div><div class="', $hlbulk ? "papmodex" : "papmode", '">', Ht::js_link("Bulk update", "fold('bulk',false,9)"), '</div></div><hr class="c" style="margin-bottom:24px" />', "\n";
}
if ($newProfile) {
    $Conf->header("User update", "account", actionBar("account"));
} else {
    $Conf->header($Me->email == $Acct->email ? "Profile" : "Account profile", "account", actionBar("account", $Acct));
}
$useRequest = !$Acct->has_database_account() && isset($_REQUEST["watchcomment"]);
if ($UserStatus->nerrors) {
    $need_highlight = $useRequest = true;
}
if (!$UserStatus->nerrors && @$Conf->session("freshlogin") === "redirect") {
    $Conf->save_session("freshlogin", null);
    $ispc = $Acct->is_pclike();
    $msgs = array();
    $amsg = "";
    if (!$Me->firstName && !$Me->lastName) {
        $msgs[] = "enter your name" . ($Me->affiliation ? "" : " and affiliation");
    } else {
        if (!$Me->affiliation) {
            $msgs[] = "enter your affiliation";
        $scoreselector["-" . $f->id] = "low {$f->name_html} scores";
    }
}
if ($scoreselector["+overAllMerit"] === "") {
    unset($scoreselector["+overAllMerit"], $scoreselector["-overAllMerit"]);
}
$scoreselector["x"] = "(no score preference)";
// download proposed assignment
if (isset($Qreq->saveassignment) && isset($Qreq->download) && isset($Qreq->assignment)) {
    $assignset = new AssignmentSet($Me, true);
    $assignset->parse($Qreq->assignment);
    $x = $assignset->unparse_csv();
    downloadCSV($x->data, $x->header, "assignments", ["selection" => true, "sort" => SORT_NATURAL]);
}
$Error = array();
$Conf->header("Assignments &nbsp;&#x2215;&nbsp; <strong>Automatic</strong>", "autoassign", actionBar());
echo '<div class="psmode">', '<div class="papmodex"><a href="', hoturl("autoassign"), '">Automatic</a></div>', '<div class="papmode"><a href="', hoturl("manualassign"), '">Manual</a></div>', '<div class="papmode"><a href="', hoturl("bulkassign"), '">Bulk update</a></div>', '</div><hr class="c" />';
class AutoassignerInterface
{
    private $atype;
    private $atype_review;
    private $reviewtype;
    private $discordertag;
    private $autoassigner;
    private $start_at;
    private $live;
    public $ok = false;
    public function check()
    {
        global $Error, $Qreq;
        $atypes = array("rev" => "r", "revadd" => "r", "revpc" => "r", "lead" => true, "shepherd" => true, "prefconflict" => true, "clear" => true, "discorder" => true);
    exit;
}
// set options to view
if (isset($_REQUEST["redisplay"])) {
    $pfd = " ";
    foreach ($_REQUEST as $k => $v) {
        if (substr($k, 0, 4) == "show" && $v) {
            $pfd .= substr($k, 4) . " ";
        }
    }
    $Conf->save_session("pfdisplay", $pfd);
    redirectSelf();
}
$pldisplay = displayOptionsSet("pfdisplay");
// Header and body
$Conf->header("Review preferences", "revpref", actionBar());
$Conf->infoMsg($Conf->message_html("revprefdescription"));
// search
$search = new PaperSearch($Me, array("t" => "rable", "urlbase" => hoturl_site_relative_raw("reviewprefs", "reviewer={$reviewer}"), "q" => defval($_REQUEST, "q", "")), $reviewer);
$pl = new PaperList($search, ["sort" => true, "list" => true, "row_id_pattern" => "p#", "foldtype" => "pf", "reviewer" => $reviewer_contact], make_qreq());
$pl_text = $pl->table_html("editReviewPreference", array("class" => "pltable_full", "table_id" => "foldpl", "attributes" => array("data-fold-session" => "pfdisplay.\$"), "footer_extra" => "<div id='plactr'>" . Ht::submit("update", "Save changes", array("class" => "hb")) . "</div>", "list_properties" => ["revprefs" => true]));
// DISPLAY OPTIONS
echo "<table id='searchform' class='tablinks1'>\n<tr><td>";
// <div class='tlx'><div class='tld1'>";
$showing_au = !$Conf->subBlindAlways() && strpos($pldisplay, " au ") !== false;
$showing_anonau = (!$Conf->subBlindNever() || $Me->privChair) && strpos($pldisplay, " anonau ") !== false;
echo Ht::form_div(hoturl("reviewprefs"), array("method" => "get", "id" => "redisplayform", "class" => $showing_au || $showing_anonau && $Conf->subBlindAlways() ? "fold10o" : "fold10c")), "<table>";
if ($Me->privChair) {
    echo "<tr><td class='lxcaption'><strong>Preferences:</strong> &nbsp;</td><td class='lentry'>";
    $prefcount = array();
    $result = $Conf->qe("select contactId, count(preference) from PaperReviewPreference where preference!=0 group by contactId");
示例#16
0
HelpTopic::register("ranking", "Ranking", "PC members can rank papers using tags.");
HelpTopic::register("formulas", "Formulas", "Create and display formulas in search orders.");
if (!isset($_REQUEST["t"]) && preg_match(',\\A/(\\w+)\\z,i', Navigation::path())) {
    $_REQUEST["t"] = substr(Navigation::path(), 1);
}
$topic = defval($_REQUEST, "t", "topics");
if ($topic == "syntax") {
    $topic = "keywords";
}
if (!isset(HelpTopic::$list[$topic])) {
    $topic = "topics";
}
if ($topic === "topics") {
    $Conf->header("Help", "help", actionBar());
} else {
    $Conf->header("Help &nbsp;&#x2215;&nbsp; <strong>" . HelpTopic::$list[$topic]->name . "</strong>", "help", actionBar());
}
function _alternateRow($caption, $entry, $next = null)
{
    global $rowidx;
    if ($caption) {
        $below = "";
        if (is_array($caption)) {
            list($caption, $below) = $caption;
        }
        if (!preg_match('/<a/', $caption)) {
            $anchor = strtolower(preg_replace('/\\W+/', "_", $caption));
            $caption = '<a class="qq" name="' . $anchor . '" href="#' . $anchor . '">' . $caption . '</a>';
        }
        echo '<tr><td class="sentry nw" colspan="2">', '<h4 class="helppage">', $caption, '</h4>', $below, '</td></tr>', "\n";
        $rowidx = null;
示例#17
0
    $_REQUEST["subject"] = $null_mailer->expand($template["subject"]);
    $_REQUEST["emailBody"] = $null_mailer->expand($template["body"]);
}
// Set recipients list, now that template is loaded
$recip = new MailRecipients($Me, @$_REQUEST["recipients"], $papersel, @$_REQUEST["newrev_since"]);
// Warn if no papers match
if (isset($papersel) && count($papersel) == 0 && !isset($_REQUEST["loadtmpl"]) && !isset($_REQUEST["psearch"]) && $recip->need_papers()) {
    Conf::msg_error("No papers match that search.");
    unset($papersel);
    unset($_REQUEST["check"]);
    unset($_REQUEST["send"]);
}
if (isset($_REQUEST["monreq"])) {
    $Conf->header("Monitor external reviews", "mail", actionBar());
} else {
    $Conf->header("Mail", "mail", actionBar());
}
$subjectPrefix = "[" . Conf::$gShortName . "] ";
class MailSender
{
    private $recip;
    private $sending;
    private $started = false;
    private $group;
    private $groupable = false;
    private $mcount = 0;
    private $mrecipients = array();
    private $mpapers = array();
    private $cbcount = 0;
    private $mailid_text = "";
    function __construct($recip, $sending)
<?php

// deadlines.php -- HotCRP deadline reporting page
// HotCRP is Copyright (c) 2006-2016 Eddie Kohler and Regents of the UC
// Distributed under an MIT-like license; see LICENSE
require_once "src/initweb.php";
// *** NB If you change this script, also change the logic in index.php ***
// *** that hides the link when there are no deadlines to show.         ***
$dl = $Me->my_deadlines();
if (get($_REQUEST, "ajax")) {
    $dl->ok = true;
    $Conf->ajaxExit($dl);
}
// header and script
$Conf->header("Deadlines", "deadlines", actionBar());
echo "<p>These deadlines determine when various conference\nsubmission and review functions can be accessed.";
if ($Me->privChair) {
    echo " As PC chair, you can also <a href='", hoturl("settings"), "'>change the deadlines</a>.";
}
echo "</p>\n\n<dl>\n";
function printDeadline($time, $phrase, $description)
{
    global $Conf;
    echo "<dt><strong>", $phrase, "</strong>: ", $Conf->printableTime($time, "span"), "</dt>\n", "<dd>", $description, $description ? "<br />" : "", "</dd>";
}
// If you change these, also change Contact::has_reportable_deadline().
if (get($dl->sub, "reg")) {
    printDeadline($dl->sub->reg, "Paper registration deadline", "You can register new papers until this deadline.");
}
if (get($dl->sub, "update")) {
    printDeadline($dl->sub->update, "Paper update deadline", "You can upload new versions of your paper and change other paper information until this deadline.");