예제 #1
1
 function list_actions(Contact $user, $qreq, PaperList $pl, &$actions)
 {
     if (!$user->isPC || Navigation::page() === "reviewprefs") {
         return;
     }
     // tagtype cell
     $tagopt = array("a" => "Add", "d" => "Remove", "s" => "Define", "xxxa" => null, "ao" => "Add to order", "aos" => "Add to gapless order", "so" => "Define order", "sos" => "Define gapless order", "sor" => "Define random order");
     $tagextra = array("id" => "placttagtype");
     if ($user->privChair) {
         $tagopt["xxxb"] = null;
         $tagopt["da"] = "Clear twiddle";
         $tagopt["cr"] = "Calculate rank";
         $tagextra["onchange"] = "plactions_dofold()";
         Ht::stash_script("plactions_dofold()", "plactions_dofold");
     }
     // tag name cell
     $t = "";
     if ($user->privChair) {
         $t .= '<span class="fx99"><a class="q" href="#" onclick="return fold(\'placttags\')">' . expander(null, 0) . "</a></span>";
     }
     $t .= 'tag<span class="fn99">(s)</span> &nbsp;' . Ht::entry("tag", $qreq->tag, ["size" => 15, "onfocus" => "autosub('tag',this)", "class" => "wantcrpfocus"]) . ' &nbsp;' . Ht::submit("fn", "Go", ["value" => "tag", "onclick" => "return plist_submit.call(this)"]);
     if ($user->privChair) {
         $t .= "<div class='fx'><div style='margin:2px 0'>" . Ht::checkbox("tagcr_gapless", 1, $qreq->tagcr_gapless, array("style" => "margin-left:0")) . "&nbsp;" . Ht::label("Gapless order") . "</div>" . "<div style='margin:2px 0'>Using: &nbsp;" . Ht::select("tagcr_method", PaperRank::methods(), $qreq->tagcr_method) . "</div>" . "<div style='margin:2px 0'>Source tag: &nbsp;~" . Ht::entry("tagcr_source", $qreq->tagcr_source, array("size" => 15)) . "</div></div>";
     }
     $actions[] = [500, "tag", "Tag", "<b>:</b> &nbsp;" . Ht::select("tagfn", $tagopt, $qreq->tagfn, $tagextra) . " &nbsp;", ["id" => "foldplacttags", "class" => "foldc fold99c", "content" => $t]];
 }
예제 #2
0
 function selectors()
 {
     $sel = array("students" => "All students");
     foreach (ContactView::pset_list(true, false) as $pset) {
         if (Contact::student_can_see_pset($pset)) {
             if (!$pset->gitless || $pset->partner) {
                 $sel[] = array("optgroup", $pset->title);
             }
             if (!$pset->gitless) {
                 $sel[$pset->urlkey . ":workingrepo"] = "{$pset->title}, working repo";
                 $sel[$pset->urlkey . ":brokenrepo"] = "{$pset->title}, broken repo";
                 $sel[$pset->urlkey . ":openrepo"] = "{$pset->title}, open repo";
                 $sel[$pset->urlkey . ":norepo"] = "{$pset->title}, no repo";
             }
             if ($pset->partner) {
                 $sel[$pset->urlkey . ":partner"] = "{$pset->title}, partner";
                 $sel[$pset->urlkey . ":nopartner"] = "{$pset->title}, no partner";
             }
         }
     }
     $sel[] = array("optgroup");
     $sel["pc"] = "TFs";
     foreach (pcTags() as $t) {
         if ($t != "pc") {
             $sel["pc:{$t}"] = "#{$t} TFs";
         }
     }
     $sel["all"] = "All users";
     $usersel = array("all" => "All", "college" => "College", "extension" => "Extension");
     return Ht::select("recipients", $sel, $this->type, array("id" => "recipients", "onchange" => "setmailpsel(this)")) . " &nbsp;" . Ht::select("userrecipients", $usersel, $this->usertype, array("id" => "userrecipients"));
 }
예제 #3
0
 function list_actions(Contact $user, $qreq, PaperList $pl, &$actions)
 {
     global $Conf;
     Ht::stash_script("plactions_dofold()", "plactions_dofold");
     $Conf->stash_hotcrp_pc($user);
     $actions[] = [700, "assign", "Assign", "<b>:</b> &nbsp;" . Ht::select("assignfn", array("auto" => "Automatic assignments", "zzz1" => null, "conflict" => "Conflict", "unconflict" => "No conflict", "zzz2" => null, "assign" . REVIEW_PRIMARY => "Primary review", "assign" . REVIEW_SECONDARY => "Secondary review", "assign" . REVIEW_PC => "Optional review", "assign0" => "Clear review", "zzz3" => null, "lead" => "Discussion lead", "shepherd" => "Shepherd"), $qreq->assignfn, ["class" => "wantcrpfocus", "onchange" => "plactions_dofold()"]) . '<span class="fx"> &nbsp;<span id="atab_assign_for">for</span> &nbsp;' . Ht::select("markpc", [], 0, ["id" => "markpc", "class" => "need-pcselector", "data-pcselector-selected" => $qreq->markpc]) . "</span> &nbsp;" . Ht::submit("fn", "Go", ["value" => "assign", "onclick" => "return plist_submit.call(this)"])];
 }
예제 #4
0
function formulas_qrow($i, $q, $s, $errf)
{
    if ($q === "all") {
        $q = "";
    }
    $klass = ($errf ? "setting_error " : "") . "hotcrp_searchbox";
    $t = '<tr><td class="lentry">' . Ht::entry("q{$i}", $q, array("size" => 40, "placeholder" => "(All)", "class" => $klass));
    $t .= " <span style=\"padding-left:1em\">Style:</span> &nbsp;" . Ht::select("s{$i}", array("plain" => "plain", "by-tag" => "by tag", "redtag" => "red", "orangetag" => "orange", "yellowtag" => "yellow", "greentag" => "green", "bluetag" => "blue", "purpletag" => "purple", "graytag" => "gray"), $s !== "" ? $s : "by-tag");
    $t .= '</td><td class="nw"><a href="#" class="qx row_up" onclick="return author_change(this,-1)" tabindex="-1">&#x25b2;</a><a href="#" class="qx row_down" onclick="return author_change(this,1)" tabindex="-1">&#x25bc;</a><a href="#" class="qx row_kill" onclick="return author_change(this,Infinity)" tabindex="-1">x</a></td></tr>';
    return $t;
}
 static function echo_username_form(Contact $user, $first)
 {
     global $Me;
     if (!$first && !$user->seascode_username) {
         return;
     }
     echo Ht::form(hoturl_post("index", array("set_username" => 1, "u" => $Me->user_linkpart($user), "reposite" => "harvardseas"))), '<div class="f-contain">';
     $notes = array();
     if (!$user->seascode_username) {
         $notes[] = array(true, "Please enter your " . self::home_link("code.seas.harvard.edu") . " username and click “Save.”");
     }
     ContactView::echo_group(self::home_link("code.seas") . " username", Ht::entry("username", $user->seascode_username) . "  " . Ht::submit("Save"), $notes);
     echo "</div></form>";
 }
예제 #6
0
 function list_actions(Contact $user, $qreq, PaperList $pl, &$actions)
 {
     $xactions = SearchAction::list_subactions("get", $user, $qreq, $pl);
     foreach (PaperOption::option_ids() as $oid) {
         if ($pl->any["opt{$oid}"] && ($o = PaperOption::find($oid)) && $o->is_document()) {
             $xactions[] = GetDocument_SearchAction::make_option_action($o);
         }
     }
     usort($xactions, function ($a, $b) {
         return $a[0] - $b[0];
     });
     $sel_opt = array();
     $last_group = null;
     foreach ($xactions as $xact) {
         if ($xact[2] !== $last_group) {
             $sel_opt[] = ["optgroup", $xact[2]];
             $last_group = $xact[2];
         }
         $sel_opt[] = ["value" => $xact[1], "label" => $xact[3]];
     }
     if (!empty($sel_opt)) {
         $actions[] = [0, "get", "Download", "<b>:</b> &nbsp;" . Ht::select("getfn", $sel_opt, $qreq->getfn, ["tabindex" => 6, "class" => "wantcrpfocus", "style" => "max-width:10em"]) . "&nbsp; " . Ht::submit("fn", "Go", ["value" => "get", "tabindex" => 6, "onclick" => "return plist_submit.call(this)", "data-plist-submit-all" => 1])];
     }
 }
if (isset($_REQUEST["email"])) {
    echo "value=\"", htmlspecialchars($_REQUEST["email"]), "\" ";
}
?>
  /></td>
</tr>

<tr>
  <td class='caption'>Password</td>
  <td class='entry'><input type='password' name='password' size='50' /></td>
</tr>

<tr>
  <td class='caption'></td>
  <td class='entry'><?php 
echo Ht::radio("prefer", 0, true), "&nbsp;", Ht::label("Keep my current account (" . htmlspecialchars($Me->email) . ")"), "<br />\n", Ht::radio("prefer", 1), "&nbsp;", Ht::label("Keep the account named above and delete my current account");
?>
</td>
</tr>

<tr><td class='caption'></td><td class='entry'><?php 
echo Ht::submit("merge", "Merge accounts");
?>
</td></tr>
<tr class='last'><td class='caption'></td></tr>
</table>
</form>


<?php 
$Conf->footer();
예제 #8
0
function searchbar()
{
    global $Conf, $Eclass, $page, $start, $count, $nrows, $maxNrows, $nlinks, $offset;
    echo Ht::form_div(hoturl("log"), array("method" => "get")), "<table id='searchform'><tr>\n  <td class='lxcaption", $Eclass['q'], "'>With <b>any</b> of the words</td>\n  <td class='lentry", $Eclass['q'], "'><input type='text' size='40' name='q' value=\"", htmlspecialchars(defval($_REQUEST, "q", "")), "\" /><span class='sep'></span></td>\n  <td rowspan='3'>", Ht::submit("search", "Search"), "</td>\n</tr><tr>\n  <td class='lxcaption", $Eclass['pap'], "'>Concerning paper(s)</td>\n  <td class='lentry", $Eclass['pap'], "'><input type='text' size='40' name='pap' value=\"", htmlspecialchars(defval($_REQUEST, "pap", "")), "\" /></td>\n</tr><tr>\n  <td class='lxcaption", $Eclass['acct'], "'>Concerning account(s)</td>\n  <td class='lentry'><input type='text' size='40' name='acct' value=\"", htmlspecialchars(defval($_REQUEST, "acct", "")), "\" /></td>\n</tr><tr>\n  <td class='lxcaption", $Eclass['n'], "'>Show</td>\n  <td class='lentry", $Eclass['n'], "'><input type='text' size='4' name='n' value=\"", htmlspecialchars($_REQUEST["n"]), "\" /> &nbsp;records at a time</td>\n</tr><tr>\n  <td class='lxcaption", $Eclass['date'], "'>Starting at</td>\n  <td class='lentry", $Eclass['date'], "'><input type='text' size='40' name='date' value=\"", htmlspecialchars($_REQUEST["date"]), "\" /></td>\n</tr></table></div></form>";
    if ($nrows > $count || $page > 1) {
        $urls = array();
        $_REQUEST["offset"] = $offset;
        foreach (array("q", "pap", "acct", "n", "offset") as $x) {
            if ($_REQUEST[$x]) {
                $urls[] = "{$x}=" . urlencode($_REQUEST[$x]);
            }
        }
        $url = hoturl("log", join("&amp;", $urls));
        echo "<table class='lognav'><tr><td id='newest'><div>";
        if ($page > 1) {
            echo "<a href='{$url}&amp;page=1'><strong>Newest</strong></a> &nbsp;|&nbsp;&nbsp;";
        }
        echo "</div></td><td id='newer'><div>";
        if ($page > 1) {
            echo "<a href='{$url}&amp;page=", $page - 1, "'><strong>", Ht::img("_.gif", "<-", array("class" => "prev")), " Newer</strong></a>";
        }
        echo "</div></td><td id='newnum'><div>";
        if ($page - $nlinks > 1) {
            echo "&nbsp;...";
        }
        for ($p = max($page - $nlinks - 1, 0); $p + 1 < $page; $p++) {
            echo "&nbsp;<a href='{$url}&amp;page=", $p + 1, "'>", $p + 1, "</a>";
        }
        echo "</div></td><td id='thisnum'><div><strong class='thispage'>&nbsp;", $page, "&nbsp;</strong></div></td><td id='oldnum'><div>";
        $o = $offset ? $offset - $count : 0;
        for ($p = $page; $p * $count + $o < $start + min($nlinks * $count + 1, $nrows); $p++) {
            echo "<a href='{$url}&amp;page=", $p + 1, "'>", $p + 1, "</a>&nbsp;";
        }
        if ($nrows == $maxNrows) {
            echo "...&nbsp;";
        }
        echo "</div></td><td id='older'><div>";
        if ($nrows > $count) {
            echo "<a href='{$url}&amp;page=", $page + 1, "'><strong>Older ", Ht::img("_.gif", "->", array("class" => "next")), "</strong></a>";
        }
        echo "</div></td><td id='oldest'><div>";
        if ($nrows > $count) {
            echo "&nbsp;&nbsp;|&nbsp; <a href='{$url}&amp;page=earliest'><strong>Oldest</strong></a>";
        }
        echo "</div></td></tr></table>";
    }
    echo "<div class='g'></div>\n";
}
예제 #9
0
 private function send_prep($prep)
 {
     global $Conf;
     $cbkey = "c" . join("_", $prep->contacts) . "p" . $prep->paperId;
     if ($this->sending && !defval($_REQUEST, $cbkey)) {
         return;
     }
     set_time_limit(30);
     $this->echo_prologue();
     self::fix_body($prep);
     ++$this->mcount;
     if ($this->sending) {
         Mailer::send_preparation($prep);
         foreach ($prep->contacts as $cid) {
             $Conf->log("Account was sent mail" . $this->mailid_text, $cid, $prep->paperId);
         }
     }
     // hide passwords from non-chair users
     $show_prep = $prep;
     if (get($prep, "sensitive")) {
         $show_prep = $prep->sensitive;
         $show_prep->to = $prep->to;
         self::fix_body($show_prep);
     }
     echo '<div class="mail"><table>';
     $nprintrows = 0;
     foreach (array("To", "cc", "bcc", "reply-to", "Subject") as $k) {
         if ($k == "To") {
             $vh = array();
             foreach ($show_prep->to as $to) {
                 $vh[] = htmlspecialchars(MimeText::decode_header($to));
             }
             $vh = '<div style="max-width:60em"><span class="nw">' . join(',</span> <span class="nw">', $vh) . '</span></div>';
         } else {
             if ($k == "Subject") {
                 $vh = htmlspecialchars(MimeText::decode_header($show_prep->subject));
             } else {
                 if ($line = get($show_prep->headers, $k)) {
                     $k = substr($line, 0, strlen($k));
                     $vh = htmlspecialchars(MimeText::decode_header(substr($line, strlen($k) + 2)));
                 } else {
                     continue;
                 }
             }
         }
         echo " <tr>";
         if (++$nprintrows > 1) {
             echo "<td class='mhpad'></td>";
         } else {
             if ($this->sending) {
                 echo "<td class='mhx'></td>";
             } else {
                 ++$this->cbcount;
                 echo '<td class="mhcb"><input type="checkbox" class="cb" name="', $cbkey, '" value="1" checked="checked" data-range-type="mhcb" id="psel', $this->cbcount, '" onclick="rangeclick(event,this)" /></td>';
             }
         }
         echo '<td class="mhnp nw">', $k, ":</td>", '<td class="mhdp">', $vh, "</td></tr>\n";
     }
     echo " <tr><td></td><td></td><td class='mhb'><pre class='email'>", Ht::link_urls(htmlspecialchars($show_prep->body)), "</pre></td></tr>\n", "<tr><td class='mhpad'></td><td></td><td class='mhpad'></td></tr>", "</table></div>\n";
 }
    $paperList = new PaperList($search, ["sort" => true, "list" => true, "reviewer" => $pcm[$reviewer]], make_qreq());
    $paperList->display .= " topics ";
    if ($qreq->kind != "c") {
        $paperList->display .= "reviewers ";
    }
    if (isset($showau)) {
        $search->overrideMatchPreg = true;
        $search->matchPreg = array();
        if ($showau) {
            $search->matchPreg["authorInformation"] = make_match_preg($showau);
        }
        if ($showco) {
            $search->matchPreg["collaborators"] = make_match_preg($showco);
        }
    }
    $a = isset($qreq->sort) ? "&amp;sort=" . urlencode($qreq->sort) : "";
    echo "<div class='aahc'><form class='assignpc' method='post' action=\"", hoturl_post("manualassign", "reviewer={$reviewer}&amp;kind={$qreq->kind}{$a}"), "\" enctype='multipart/form-data' accept-charset='UTF-8'><div>\n", Ht::hidden("t", $qreq->t), Ht::hidden("q", $qreq->q), Ht::hidden("papx", join(" ", $search->paperList())), "<div class=\"aa\">", Ht::submit("update", "Save assignments", array("class" => "bb"));
    if ($qreq->kind != "c") {
        $rev_rounds = $Conf->round_selector_options();
        if (count($rev_rounds) > 1) {
            echo '<span style="padding-left:2em">Review round: &nbsp;', Ht::select("rev_roundtag", $rev_rounds, $qreq->rev_roundtag ?: "unnamed", array("id" => "assrevroundtag")), '</span>';
        } else {
            if (!@$rev_rounds["unnamed"]) {
                echo '<span style="padding-left:2em">Review round: ', $Conf->current_round_name(), '</span>';
            }
        }
    }
    echo "<span style='padding-left:2em'>", Ht::checkbox(false, false, true, array("id" => "assrevimmediate")), "&nbsp;", Ht::label("Automatically save assignments", "assrevimmediate"), "</span></div>\n", $paperList->table_html($qreq->kind == "c" ? "conflict" : "reviewAssignment", array("class" => "pltable_full", "table_id" => "foldpl", "header_links" => true, "nofooter" => true, "fold" => array("allrevtopicpref" => true))), "<div class='aa'>", Ht::submit("update", "Save assignments", array("class" => "bb")), "</div></div></form></div>\n";
}
echo '<hr class="c" />';
$Conf->footer();
예제 #11
0
파일: home.php 프로젝트: kohler/peteramati
function show_pset_table($pset)
{
    global $Conf, $Me, $Now, $Profile, $LastPsetFix;
    echo '<div id="', $pset->urlkey, '">';
    echo "<h3>", htmlspecialchars($pset->title), "</h3>";
    if ($Me->privChair) {
        show_pset_actions($pset);
    }
    if ($pset->disabled) {
        echo "</div>\n";
        return;
    }
    $t0 = $Profile ? microtime(true) : 0;
    // load students
    if ($Conf->opt("restrictRepoView")) {
        $view = "l2.link repoviewable";
        $viewjoin = "left join ContactLink l2 on (l2.cid=c.contactId and l2.type=" . LINK_REPOVIEW . " and l2.link=l.link)\n";
    } else {
        $view = "4 repoviewable";
        $viewjoin = "";
    }
    $result = Dbl::qe("select c.contactId, c.firstName, c.lastName, c.email,\n\tc.huid, c.github_username, c.seascode_username, c.anon_username, c.extension, c.disabled, c.dropped, c.roles, c.contactTags,\n\tgroup_concat(pl.link) pcid, group_concat(rpl.link) rpcid,\n\tr.repoid, r.cacheid, r.heads, r.url, r.open, r.working, r.lastpset, r.snapcheckat, {$view},\n\trg.gradehash, rg.gradercid, rg.placeholder, rg.placeholder_at\n\tfrom ContactInfo c\n\tleft join ContactLink l on (l.cid=c.contactId and l.type=" . LINK_REPO . " and l.pset={$pset->id})\n\t{$viewjoin}\n\tleft join Repository r on (r.repoid=l.link)\n\tleft join ContactLink pl on (pl.cid=c.contactId and pl.type=" . LINK_PARTNER . " and pl.pset={$pset->id})\n\tleft join ContactLink rpl on (rpl.cid=c.contactId and rpl.type=" . LINK_BACKPARTNER . " and rpl.pset={$pset->id})\n\tleft join RepositoryGrade rg on (rg.repoid=r.repoid and rg.pset={$pset->id})\n\twhere (c.roles&" . Contact::ROLE_PCLIKE . ")=0\n\tand (rg.repoid is not null or not c.dropped)\n\tgroup by c.contactId, r.repoid");
    $t1 = $Profile ? microtime(true) : 0;
    $anonymous = $pset->anonymous;
    if (req("anonymous") !== null && $Me->privChair) {
        $anonymous = !!req("anonymous");
    }
    $students = array();
    while ($result && ($s = Contact::fetch($result))) {
        $s->set_anonymous($anonymous);
        Contact::set_sorter($s, req("sort"));
        $students[$s->contactId] = $s;
        // maybe lastpset links are out of order
        if ($s->lastpset < $pset) {
            $LastPsetFix = true;
        }
    }
    uasort($students, "Contact::compare");
    $checkbox = $Me->privChair || !$pset->gitless && $pset->runners;
    $rows = array();
    $max_ncol = 0;
    $incomplete = array();
    $pcmembers = pcMembers();
    $jx = [];
    foreach ($students as $s) {
        if (!$s->visited) {
            $row = (object) ["student" => $s, "text" => "", "ptext" => []];
            $j = render_pset_row($pset, $students, $s, $row, $pcmembers, $anonymous);
            if ($s->pcid) {
                foreach (array_unique(explode(",", $s->pcid)) as $pcid) {
                    if (isset($students[$pcid])) {
                        $jj = render_pset_row($pset, $students, $students[$pcid], $row, $pcmembers, $anonymous);
                        $j["partners"][] = $jj;
                    }
                }
            }
            if ($row->sortprefix) {
                $j["boring"] = true;
            }
            $jx[$row->sortprefix . $s->sorter] = $j;
            $max_ncol = max($max_ncol, $row->ncol);
            if ($s->incomplete) {
                $u = $Me->user_linkpart($s);
                $incomplete[] = '<a href="' . hoturl("pset", array("pset" => $pset->urlkey, "u" => $u, "sort" => req("sort"))) . '">' . htmlspecialchars($u) . '</a>';
            }
        }
    }
    if (count($incomplete)) {
        echo '<div id="incomplete_pset', $pset->id, '" style="display:none" class="merror">', '<strong>', htmlspecialchars($pset->title), '</strong>: ', 'Your grading is incomplete. Missing grades: ', join(", ", $incomplete), '</div>', '<script>jQuery("#incomplete_pset', $pset->id, '").remove().show().appendTo("#incomplete_notices")</script>';
    }
    if ($checkbox) {
        echo Ht::form_div(hoturl_post("index", array("pset" => $pset->urlkey, "save" => 1)));
    }
    $sort_key = $anonymous ? "anon_username" : "username";
    usort($jx, function ($a, $b) use($sort_key) {
        if (get($a, "boring") != get($b, "boring")) {
            return get($a, "boring") ? 1 : -1;
        }
        return strcmp($a[$sort_key], $b[$sort_key]);
    });
    echo '<table class="s61', $anonymous ? " s61anonymous" : "", '" id="pa-pset' . $pset->id . '"></table>';
    $jd = ["checkbox" => $checkbox, "anonymous" => $anonymous, "grade_keys" => array_keys($pset->grades), "gitless" => $pset->gitless, "gitless_grades" => $pset->gitless_grades, "urlpattern" => hoturl("pset", ["pset" => $pset->urlkey, "u" => "@", "sort" => req("sort")])];
    $i = $nintotal = $last_in_total = 0;
    foreach ($pset->grades as $ge) {
        if (!$ge->no_total) {
            ++$nintotal;
            $last_in_total = $ge->name;
        }
        ++$i;
    }
    if ($nintotal > 1) {
        $jd["need_total"] = true;
    } else {
        if ($nintotal == 1) {
            $jd["total_key"] = $last_in_total;
        }
    }
    echo Ht::unstash(), '<script>pa_render_pset_table(', $pset->id, ',', json_encode($jd), ',', json_encode(array_values($jx)), ')</script>';
    if ($Me->privChair && !$pset->gitless_grades) {
        echo "<div class='g'></div>";
        $sel = array("none" => "N/A");
        foreach (pcMembers() as $pcm) {
            $sel[$pcm->email] = Text::name_html($pcm);
        }
        $sel["__random__"] = "Random";
        echo '<span class="nb" style="padding-right:2em">', Ht::select("grader", $sel, "none"), Ht::submit("setgrader", "Set grader"), '</span>';
    }
    if (!$pset->gitless) {
        $sel = array();
        foreach ($pset->runners as $r) {
            if ($Me->can_run($pset, $r)) {
                $sel[$r->name] = htmlspecialchars($r->title);
            }
        }
        if (count($sel)) {
            echo '<span class="nb" style="padding-right:2em">', Ht::select("runner", $sel), Ht::submit("runmany", "Run all"), '</span>';
        }
    }
    if ($checkbox) {
        echo "</div></form>\n";
    }
    if ($Profile) {
        $t2 = microtime(true);
        echo sprintf("<div>Δt %.06f DB, %.06f total</div>", $t1 - $t0, $t2 - $t0);
    }
    echo "</div>\n";
}
예제 #12
0
function goPaperForm($baseUrl = null, $args = array())
{
    global $Conf, $Me;
    if ($Me->is_empty()) {
        return "";
    }
    $list = SessionList::active();
    $x = Ht::form_div(hoturl($baseUrl ?: "paper", array("ls" => null)), array("method" => "get", "class" => "gopaper" . ($list ? " has_hotcrp_list" : ""), "data-hotcrp-list" => $list ? $list->listno : null));
    if ($baseUrl == "profile") {
        $x .= Ht::entry("u", "(User)", array("id" => "quicksearchq", "size" => 10, "placeholder" => "(User)"));
    } else {
        $x .= Ht::entry("p", "(All)", array("id" => "quicksearchq", "size" => 10, "placeholder" => "(All)", "class" => "hotcrp_searchbox"));
    }
    foreach ($args as $what => $val) {
        $x .= Ht::hidden($what, $val);
    }
    $x .= "&nbsp; " . Ht::submit("Search") . "</div></form>";
    return $x;
}
예제 #13
0
$xsep = " <span class='barsep'>&nbsp;|&nbsp;</span> ";
echo "<div id='homeinfo'>";
echo "<h2 class='homeemail'>", Text::user_html($User), "</h2>";
if ($User->seascode_username || $User->huid) {
    echo '<h3><a href="', hoturl("index", array("u" => $Me->user_linkpart($User))), '">', htmlspecialchars($User->seascode_username ?: $User->huid), '</a>';
    if ($Me->privChair) {
        echo "&nbsp;", become_user_link($User);
    }
    echo "</h3>";
}
if ($User->dropped) {
    ContactView::echo_group("", '<strong class="err">You have dropped the course.</strong> If this is incorrect, contact us.');
}
echo Ht::form(hoturl_post("profile", array("u" => $User->email))), "<div>";
if ($User->disabled || $User->password == "") {
    echo Ht::submit("enable", "Enable user", array("value" => 1));
} else {
    echo Ht::submit("disable", "Disable user", array("value" => 1));
}
echo '<hr>';
echo '<table class="pltable" style="margin-top:1em"><tbody class="pltable pltable_alternate">';
echo '<tr><td class="pl pls">Roles</td><td class="pl">';
echo Ht::radio("pctype", "chair", $User->roles & Contact::ROLE_CHAIR), "&nbsp;", Ht::label("Course instructor"), "<br>";
echo Ht::radio("pctype", "pc", $User->roles & Contact::ROLE_PC && !($User->roles & Contact::ROLE_CHAIR)), "&nbsp;", Ht::label("Course staff"), "<br>";
echo Ht::radio("pctype", "no", !($User->roles & (Contact::ROLE_PC | Contact::ROLE_CHAIR))), "&nbsp;", Ht::label("Not on course staff"), "<br>";
echo "</td></tr>\n";
echo '</tbody></table>';
echo Ht::submit("update", "Save changes", array("value" => 1));
echo "</div></form>\n";
echo "<div class='clear'></div>\n";
$Conf->footer();
예제 #14
0
파일: mail.php 프로젝트: kohler/peteramati
 private function run()
 {
     global $Conf, $Opt, $Me, $Error, $subjectPrefix, $mailer_options;
     $subject = trim(defval($_REQUEST, "subject", ""));
     if (substr($subject, 0, strlen($subjectPrefix)) != $subjectPrefix) {
         $subject = $subjectPrefix . $subject;
     }
     $emailBody = $_REQUEST["emailBody"];
     $template = array("subject" => $subject, "body" => $emailBody);
     $rest = array("cc" => $_REQUEST["cc"], "reply-to" => $_REQUEST["replyto"], "pset" => $this->recip->pset, "no_error_quit" => true);
     $rest = array_merge($rest, $mailer_options);
     $mailer = new CS61Mailer($Me, null, $rest);
     $prep = $mailer->make_preparation($template, $rest);
     $paper_sensitive = preg_match('/%[A-Z0-9]+[(%]/', $prep->subject . $prep->body);
     $q = $this->recip->query($paper_sensitive);
     if (!$q) {
         return $Conf->errorMsg("Bad recipients value");
     }
     $result = $Conf->qe_raw($q);
     if (!$result) {
         return;
     }
     $recipients = defval($_REQUEST, "recipients", "");
     if ($this->sending) {
         $q = "recipients='" . sqlq($recipients) . "', cc='" . sqlq($_REQUEST["cc"]) . "', replyto='" . sqlq($_REQUEST["replyto"]) . "', subject='" . sqlq($_REQUEST["subject"]) . "', emailBody='" . sqlq($_REQUEST["emailBody"]) . "'";
         if ($Conf->sversion >= 79) {
             $q .= ", q='" . sqlq($_REQUEST["q"]) . "', t='" . sqlq($_REQUEST["t"]) . "'";
         }
         if ($log_result = Dbl::query_raw("insert into MailLog set {$q}")) {
             $this->mailid_text = " #" . $log_result->insert_id;
         }
         $Me->log_activity("Sending mail{$this->mailid_text} \"{$subject}\"");
     } else {
         $rest["no_send"] = true;
     }
     $mailer = new CS61Mailer();
     $fake_prep = (object) array("subject" => "", "body" => "", "to" => array(), "contactId" => array(), "fake" => 1);
     $last_prep = $fake_prep;
     $nrows_done = 0;
     $nrows_left = edb_nrows($result);
     $nwarnings = 0;
     $preperrors = array();
     while ($row = edb_orow($result)) {
         ++$nrows_done;
         $contact = new Contact($row);
         $mailer->reset($contact, $row, $rest);
         $prep = $mailer->make_preparation($template, $rest);
         if (@$prep->errors) {
             foreach ($prep->errors as $lcfield => $hline) {
                 $reqfield = $lcfield == "reply-to" ? "replyto" : $lcfield;
                 $Error[$reqfield] = true;
                 $emsg = Mailer::$email_fields[$lcfield] . " destination isn’t a valid email list: <blockquote><tt>" . htmlspecialchars($hline) . "</tt></blockquote> Make sure email address are separated by commas; put names in \"quotes\" and email addresses in &lt;angle brackets&gt;.";
                 if (!isset($preperrors[$emsg])) {
                     $Conf->errorMsg($emsg);
                 }
                 $preperrors[$emsg] = true;
             }
         } else {
             if ($this->process_prep($prep, $last_prep, $row)) {
                 if ((!$Me->privChair || @$Opt["chairHidePasswords"]) && !@$last_prep->sensitive) {
                     $srest = array_merge($rest, array("sensitivity" => "display"));
                     $mailer->reset($contact, $row, $srest);
                     $last_prep->sensitive = $mailer->make_preparation($template, $srest);
                 }
             }
         }
         if ($nwarnings != $mailer->nwarnings() || $nrows_done % 5 == 0) {
             $this->echo_mailinfo($nrows_done, $nrows_left);
         }
         if ($nwarnings != $mailer->nwarnings()) {
             $this->echo_prologue();
             $nwarnings = $mailer->nwarnings();
             echo "<div id='foldmailwarn{$nwarnings}' class='hidden'><div class='warning'>", join("<br />", $mailer->warnings()), "</div></div>";
             echo Ht::unstash_script("\$\$('mailwarnings').innerHTML = \$\$('foldmailwarn{$nwarnings}').innerHTML;");
         }
     }
     $this->process_prep($fake_prep, $last_prep, (object) array());
     $this->echo_mailinfo($nrows_done, $nrows_left);
     if (!$this->started && !count($preperrors)) {
         return $Conf->errorMsg("No users match “" . $this->recip->unparse() . "” for that search.");
     } else {
         if (!$this->started) {
             return false;
         } else {
             if (!$this->sending) {
                 $this->echo_actions();
             }
         }
     }
     echo "</div></form>";
     echo Ht::unstash_script("fold('mail', null);");
     $Conf->footer();
     exit;
 }
예제 #15
0
                $capmgr->delete($capdata);
                $Conf->save_session("password_reset", (object) array("time" => $Now, "email" => $Acct->email, "password" => $_POST["password"]));
                go(hoturl("index"));
            }
        }
    }
    $password_class = " error";
}
$Conf->header("Reset password", "resetpassword", null);
if (!isset($_POST["autopassword"]) || trim($_POST["autopassword"]) != $_POST["autopassword"] || strlen($_POST["autopassword"]) < 16 || !preg_match("/\\A[-0-9A-Za-z@_+=]*\\z/", $_POST["autopassword"])) {
    $_POST["autopassword"] = Contact::random_password();
}
echo "<div class='homegrp'>\nWelcome to the ", htmlspecialchars($Conf->full_name()), " submissions site.";
if (opt("conferenceSite")) {
    echo " For general information about ", htmlspecialchars($Conf->short_name), ", see <a href=\"", htmlspecialchars(opt("conferenceSite")), "\">the conference site</a>.";
}
echo "</div>\n<hr class='home' />\n<div class='homegrp' id='homereset'>\n", Ht::form(hoturl_post("resetpassword")), '<div class="f-contain">', Ht::hidden("resetcap", $resetcap), Ht::hidden("autopassword", $_POST["autopassword"]), "<p>Use this form to reset your password. You may want to use the random password we’ve chosen.</p>";
echo '<table style="margin-bottom:2em">', '<tr><td class="lcaption">Your email</td><td>', htmlspecialchars($Acct->email), '</td></tr>
<tr><td class="lcaption">Suggested password</td><td>', htmlspecialchars($_POST["autopassword"]), '</td></tr></table>';
echo '<div class="f-i">
  <div class="f-c', $password_class, '">New password</div>
  <div class="f-e">', Ht::password("password", "", array("id" => "login_d", "tabindex" => 1, "size" => 36)), '</div>
</div>
<div class="f-i">
  <div class="f-c', $password_class, '">New password (again)</div>
  <div class="f-e">', Ht::password("password2", "", array("tabindex" => 1, "size" => 36)), '</div>
</div>
<div class="f-i" style="margin-top:2em">', Ht::submit("go", "Reset password", array("tabindex" => 1)), "</div>\n</div></form>\n<hr class='home' /></div>\n";
Ht::stash_script("crpfocus(\"login\", null, 2)");
echo '<hr class="c" />', "\n";
$Conf->footer();
예제 #16
0
파일: run.php 프로젝트: kohler/peteramati
        } else {
            if ($Runner->disabled) {
                quit("Command disabled");
            } else {
                quit("Can’t run command right now");
            }
        }
    }
}
// magic multi-runner
if ($Me->isPC && get($_GET, "runmany") && check_post()) {
    $Conf->header(htmlspecialchars($Pset->title . " " . $Runner->title), "home");
    echo '<h2 id="runmany61_who"></h2>', Ht::form(hoturl_post("run")), '<div class="f-contain">', Ht::hidden("u", ""), Ht::hidden("pset", $Pset->urlkey), Ht::hidden("run", $Runner->name, ["id" => "runmany61", "data-pa-runclass" => $Runner->runclass_argument()]), '</div></form>';
    echo '<div id="run61out_' . $Runner->runclass . '">', '<div class="run61" id="run61_' . $Runner->runclass . '">', '<div class="run61in"><pre class="run61pre"></pre></div>', '</div>', '</div>';
    echo '<div id="runmany61_users">', htmlspecialchars($_GET["runmany"]), '</div>';
    Ht::stash_script('runmany61()');
    echo '<div class="clear"></div>', "\n";
    $Conf->footer();
    exit;
}
// repo
$Info = user_pset_info();
$Repo = $Info->repo;
$RecentCommits = $Info->recent_commits();
// can we run this?
if (!$Repo) {
    quit("No repository to run");
} else {
    if (!$Info->commit()) {
        quit("No commit to run");
    } else {
예제 #17
0
파일: run.php 프로젝트: benesch/peteramati
    if (!$Me->can_view_run($Pset, $Runner, $RunMany ? null : $User)) {
        if (!$Me->isPC && !$Runner->visible) {
            quit("Command reserved for TFs");
        } else {
            if ($Runner->disabled) {
                quit("Command disabled");
            } else {
                quit("Can’t run command right now");
            }
        }
    }
}
// magic multi-runner
if ($Me->isPC && @$_GET["runmany"] && check_post()) {
    $Conf->header(htmlspecialchars($Pset->title . " " . $Runner->title), "home");
    echo '<h2 id="runmany61_who"></h2>', Ht::form(hoturl_post("run")), '<div class="f-contain">', Ht::hidden("u", ""), Ht::hidden("pset", $Pset->urlkey), Ht::hidden("run", $Runner->name, array("id" => "runmany61")), '</div></form>';
    echo '<div id="run61out_' . $Runner->name . '">', '<div class="run61" id="run61_' . $Runner->name . '">', '<div class="run61in"><pre class="run61pre"></pre></div>', '</div>', '</div>';
    echo '<div id="runmany61_users">', htmlspecialchars($_GET["runmany"]), '</div>';
    $Conf->footerScript('runmany61()');
    echo '<div class="clear"></div>', "\n";
    $Conf->footer();
    exit;
}
// repo
$Info = user_pset_info();
$Repo = $Info->repo;
$RecentCommits = $Info->recent_commits();
// can we run this?
if (!$Repo) {
    quit("No repository to run");
} else {
예제 #18
0
 function render($sv)
 {
     global $Conf, $Opt;
     echo "<h3 class=\"settings\">Abstract and PDF</h3>\n";
     echo Ht::select("sub_noabstract", [0 => "Abstract required", 2 => "Abstract optional", 1 => "No abstract"], opt_yes_no_optional("noAbstract"));
     echo " <span class=\"barsep\">·</span> ", Ht::select("sub_nopapers", array(0 => "PDF upload required", 2 => "PDF upload optional", 1 => "No PDF"), opt_yes_no_optional("noPapers"));
     if (is_executable("src/banal")) {
         echo "<div class='g'></div>", Ht::hidden("has_sub_banal", 1), "<table id='foldbanal' class='", $sv->curv("sub_banal") ? "foldo" : "foldc", "'>";
         $sv->echo_checkbox_row("sub_banal", "PDF format checker<span class='fx'>:</span>", "void fold('banal',!this.checked)");
         echo '<tr class="fx"><td></td><td class="top"><table class="secondary-settings"><tbody>';
         $bsetting = explode(";", preg_replace("/>.*/", "", $Conf->setting_data("sub_banal", "")));
         foreach (["papersize", "pagelimit", "columns", "textblock", "bodyfontsize", "bodyleading"] as $i => $name) {
             $val = get($bsetting, $i, "");
             $sv->set_oldv("sub_banal_{$name}", $val == "" ? "N/A" : $val);
         }
         $sv->echo_entry_row("sub_banal_papersize", "Paper size", "Examples: “letter”, “A4”, “8.5in&nbsp;x&nbsp;14in”,<br />“letter OR A4”");
         $sv->echo_entry_row("sub_banal_pagelimit", "Page limit");
         $sv->echo_entry_row("sub_banal_textblock", "Text block", "Examples: “6.5in&nbsp;x&nbsp;9in”, “1in&nbsp;margins”");
         echo '</tbody></table></td>', '<td><span class="sep"></span></td>', '<td class="top"><table class="secondary-settings"><tbody>';
         $sv->echo_entry_row("sub_banal_bodyfontsize", "Minimum body font size", null, "&nbsp;pt");
         $sv->echo_entry_row("sub_banal_bodyleading", "Minimum leading", null, "&nbsp;pt");
         $sv->echo_entry_row("sub_banal_columns", "Columns");
         echo "</tbody></table></td></tr></table>";
     }
     echo "<h3 class=\"settings\">Conflicts &amp; collaborators</h3>\n", "<table id=\"foldpcconf\" class=\"fold", $sv->curv("sub_pcconf") ? "o" : "c", "\">\n";
     $sv->echo_checkbox_row("sub_pcconf", "Collect authors’ PC conflicts", "void fold('pcconf',!this.checked)");
     echo "<tr class='fx'><td></td><td>";
     $conf = array();
     foreach (Conflict::$type_descriptions as $n => $d) {
         if ($n) {
             $conf[] = "“{$d}”";
         }
     }
     $sv->echo_checkbox("sub_pcconfsel", "Require conflict descriptions (" . commajoin($conf, "or") . ")");
     echo "</td></tr>\n";
     $sv->echo_checkbox_row("sub_collab", "Collect authors’ other collaborators as text");
     echo "</table>\n";
     echo "<h3 class=\"settings\">Submission options</h3>\n";
     echo "Options are selected by authors at submission time.  Examples have included “PC-authored paper,” “Consider this paper for a Best Student Paper award,” and “Allow the shadow PC to see this paper.”  The “option name” should be brief (“PC paper,” “Best Student Paper,” “Shadow PC”).  The optional description can explain further and may use XHTML.  ";
     echo "Add options one at a time.\n";
     echo "<div class='g'></div>\n", Ht::hidden("has_options", 1);
     $sep = "";
     $all_options = array_merge(PaperOption::nonfixed_option_list());
     // get our own iterator
     foreach ($all_options as $o) {
         echo $sep;
         $this->render_option($sv, $o);
         $sep = "\n<div style=\"margin-top:3em\"></div>\n";
     }
     echo $sep;
     $this->render_option($sv, null);
     // Topics
     // load topic interests
     $qinterest = $Conf->query_topic_interest();
     $result = $Conf->q("select topicId, if({$qinterest}>0,1,0), count(*) from TopicInterest where {$qinterest}!=0 group by topicId, {$qinterest}>0");
     $interests = array();
     $ninterests = 0;
     while ($row = edb_row($result)) {
         if (!isset($interests[$row[0]])) {
             $interests[$row[0]] = array();
         }
         $interests[$row[0]][$row[1]] = $row[2];
         $ninterests += $row[2] ? 1 : 0;
     }
     echo "<h3 class=\"settings g\">Topics</h3>\n";
     echo "Enter topics one per line.  Authors select the topics that apply to their papers; PC members use this information to find papers they'll want to review.  To delete a topic, delete its name.\n";
     echo "<div class='g'></div>", Ht::hidden("has_topics", 1), "<table id='newtoptable' class='", $ninterests ? "foldo" : "foldc", "'>";
     echo "<tr><th colspan='2'></th><th class='fx'><small>Low</small></th><th class='fx'><small>High</small></th></tr>";
     $td1 = '<td class="lcaption">Current</td>';
     foreach ($Conf->topic_map() as $tid => $tname) {
         if ($sv->use_req() && isset($sv->req["top{$tid}"])) {
             $tname = $sv->req["top{$tid}"];
         }
         echo '<tr>', $td1, '<td class="lentry">', Ht::entry("top{$tid}", $tname, array("size" => 40, "style" => "width:20em")), '</td>';
         $tinterests = defval($interests, $tid, array());
         echo '<td class="fx rpentry">', get($tinterests, 0) ? '<span class="topic-2">' . $tinterests[0] . "</span>" : "", "</td>", '<td class="fx rpentry">', get($tinterests, 1) ? '<span class="topic2">' . $tinterests[1] . "</span>" : "", "</td>";
         if ($td1 !== "<td></td>") {
             // example search
             echo "<td class='llentry' style='vertical-align:top' rowspan='40'><div class='f-i'>", "<div class='f-c'>Example search</div>";
             $oabbrev = strtolower($tname);
             if (strstr($oabbrev, " ") !== false) {
                 $oabbrev = "\"{$oabbrev}\"";
             }
             echo "“<a href=\"", hoturl("search", "q=topic:" . urlencode($oabbrev)), "\">", "topic:", htmlspecialchars($oabbrev), "</a>”", "<div class='hint'>Topic abbreviations are also allowed.</div>";
             if ($ninterests) {
                 echo "<a class='hint fn' href=\"#\" onclick=\"return fold('newtoptable')\">Show PC interest counts</a>", "<a class='hint fx' href=\"#\" onclick=\"return fold('newtoptable')\">Hide PC interest counts</a>";
             }
             echo "</div></td>";
         }
         echo "</tr>\n";
         $td1 = "<td></td>";
     }
     echo '<tr><td class="lcaption top">New<br><span class="hint">Enter one topic per line.</span></td><td class="lentry top">', Ht::textarea("topnew", $sv->use_req() ? get($sv->req, "topnew") : "", array("cols" => 40, "rows" => 2, "style" => "width:20em")), '</td></tr></table>';
 }
예제 #19
0
 function echo_linenote_entry_prototype()
 {
     echo '<tr class="diffl61 gw iscomment61"', ' data-pa-savednote="">', '<td colspan="2" class="difflnoteborder61"></td>', '<td class="difflnote61"><div class="diffnoteholder61" style="display:none">', Ht::form($this->hoturl_post("pset", array("savelinenote" => 1)), array("onsubmit" => "return savelinenote61(this)")), '<div class="f-contain">', Ht::hidden("file", ""), Ht::hidden("line", ""), Ht::hidden("iscomment", "", array("class" => "iscomment")), '<textarea class="diffnoteentry61" name="note"></textarea>', '<div class="aab aabr difflnoteaa61">', '<div class="aabut">', Ht::submit("Save comment"), '</div><div class="aabut">';
     if ($this->user_can_see_grades) {
         echo Ht::hidden("iscomment", 1);
     } else {
         echo Ht::checkbox("iscomment", 1), '&nbsp;', Ht::label("Show immediately");
     }
     echo '</div></div></div></form></div></td></tr>';
 }
예제 #20
0
 public function content($pl, $row, $rowidx)
 {
     if ($row->reviewerConflictType >= CONFLICT_AUTHOR) {
         return '<span class="author">Author</span>';
     }
     $rt = $row->reviewerConflictType > 0 ? -1 : min(max($row->reviewerReviewType, 0), REVIEW_PRIMARY);
     if ($pl->reviewer_contact()->can_accept_review_assignment_ignore_conflict($row) || $rt > 0) {
         $options = array(0 => "None", REVIEW_PRIMARY => "Primary", REVIEW_SECONDARY => "Secondary", REVIEW_PC => "Optional", -1 => "Conflict");
     } else {
         $options = array(0 => "None", -1 => "Conflict");
     }
     return Ht::select("assrev{$row->paperId}", $options, $rt, ["tabindex" => 3]);
 }
예제 #21
0
 private function unparse_html($row, PaperOptionValue $ov, PaperList $pl = null)
 {
     if ($ov->data === null || $ov->data === "") {
         return "";
     }
     if ($format = $row->format_of($ov->data)) {
         if ($pl) {
             $pl->need_render = true;
         }
         return '<div class="need-format" data-format="' . $format . ($pl ? '.plx' : '.abs') . '">' . htmlspecialchars($ov->data) . '</div>';
     } else {
         return '<div class="format0">' . Ht::link_urls(htmlspecialchars($ov->data)) . '</div>';
     }
 }
예제 #22
0
 function list_actions(Contact $user, $qreq, PaperList $plist, &$actions)
 {
     $actions[] = [1000, "mail", "Mail", "<b>:</b> &nbsp;" . Ht::select("recipients", array("au" => "Contact authors", "rev" => "Reviewers"), $qreq->recipients, ["class" => "wantcrpfocus"]) . " &nbsp;" . Ht::submit("fn", "Go", ["value" => "mail", "onclick" => "return plist_submit.call(this)", "data-plist-submit-all" => 1])];
 }
예제 #23
0
                echo "&nbsp; (<a class='q' href=\"" . hoturl("search", "q=pri:" . urlencode($pc->email)) . "\">{$numPrimary} primary</a>)";
            }
        }
        echo "</div><hr class=\"c\" /></div></div>\n";
    }
    echo "</div>\n", "<div class='aa' style='margin-bottom:0'>", Ht::submit("update", "Save assignments", array("class" => "bb")), " &nbsp;", Ht::submit("cancel", "Cancel"), " <span id='assresult' style='padding-left:1em'></span></div>\n\n", '</div></form>';
}
echo "</div></div>\n";
// add external reviewers
echo Ht::form($loginUrl), '<div class="aahc revcard"><div class="revcard_head">', "<h3>Request an external review</h3>\n", "<div class='hint'>External reviewers get access to their assigned papers, including ";
if (setting("extrev_view") >= 2) {
    echo "the other reviewers' identities and ";
}
echo "any eventual decision.  Before requesting an external review,\n you should generally check personally whether they are interested.";
if ($Me->allow_administer($prow)) {
    echo "\nTo create a review with no associated reviewer, leave Name and Email blank.";
}
echo '</div></div><div class="revcard_body">';
echo "<div class='f-i'><div class='f-ix'>\n  <div class='f-c'>Name</div>\n  <div class='f-e'><input type='text' name='name' value=\"", htmlspecialchars(defval($_REQUEST, "name", "")), "\" size='32' tabindex='1' /></div>\n</div><div class='f-ix'>\n  <div class='f-c", isset($Error["email"]) ? " error" : "", "'>Email</div>\n  <div class='f-e'><input type='text' name='email' value=\"", htmlspecialchars(defval($_REQUEST, "email", "")), "\" size='28' tabindex='1' /></div>\n</div><hr class=\"c\" /></div>\n\n";
// reason area
$null_mailer = new HotCRPMailer();
$reqbody = $null_mailer->expand_template("requestreview", false);
if (strpos($reqbody["body"], "%REASON%") !== false) {
    echo "<div class='f-i'>\n  <div class='f-c'>Note to reviewer <span class='f-cx'>(optional)</span></div>\n  <div class='f-e'>", Ht::textarea("reason", @$_REQUEST["reason"], array("class" => "papertext", "rows" => 2, "cols" => 60, "tabindex" => 1, "spellcheck" => "true")), "</div><hr class=\"c\" /></div>\n\n";
}
echo "<div class='f-i'>\n", Ht::submit("add", "Request review", array("tabindex" => 2)), "</div>\n\n";
if ($Me->can_administer($prow)) {
    echo "<div class='f-i'>\n  ", Ht::checkbox("override"), "&nbsp;", Ht::label("Override deadlines and any previous refusal"), "\n</div>\n";
}
echo "</div></div></form>\n";
$Conf->footer();
예제 #24
0
파일: pset.php 프로젝트: kohler/peteramati
function echo_all_grades()
{
    global $Me, $User, $Pset, $Info;
    if ($Info->is_handout_commit()) {
        return;
    }
    $gj = ContactView::grade_json($Info);
    if (get($gj, "grades") || $Info->can_see_grades && $Me != $User) {
        echo_grade_total($gj);
        foreach ($Pset->grades as $ge) {
            echo_grade_entry($ge);
        }
    }
    $lhg = $Info->late_hours();
    if ($lhg && $User == $Me && $Info->can_see_grades) {
        if ($lhg->hours || get($gj, "grades")) {
            echo '<div style="margin-top:1.5em">';
            ContactView::echo_group("late hours", '<span class="grader61" data-pa-grade="late_hours">' . htmlspecialchars($lhg->hours) . '</span>', array(), array("nowrap" => true));
            echo '</div>';
        }
    } else {
        if ($User != $Me) {
            $lhag = $Info->late_hours(true);
            $value = '<span class="gradeholder61">' . Ht::entry("late_hours", $lhg ? $lhg->hours : "", array("onchange" => "jQuery(this).closest('form').submit()", "class" => "grader61")) . '</span>';
            $value .= " " . Ht::submit("Save", array("tabindex" => 1));
            $value .= ' <span class="ajaxsave61"></span>';
            if ($lhag && $lhag->hours !== $lhg->hours) {
                $value .= ' <span class="autograde61">auto-late hours is ' . htmlspecialchars($lhag->hours) . '</span>';
            }
            echo Ht::form($Info->hoturl_post("pset", array("setlatehours" => 1)), array("onsubmit" => "return gradesubmit61(this)")), '<div class="f-contain" style="margin-top:1.5em">';
            ContactView::echo_group("late hours", $value, array(), array("nowrap" => true));
            echo '</div></form>';
        }
    }
}
예제 #25
0
 public function table_html($listname, $options = array())
 {
     global $Conf;
     if (!$this->_prepare()) {
         return null;
     }
     if (isset($options["fold"])) {
         foreach ($options["fold"] as $n => $v) {
             $this->viewmap->{$n} = $v;
         }
     }
     if (isset($options["table_id"])) {
         $this->viewmap->table_id = $options["table_id"];
     }
     // need tags for row coloring
     if ($this->contact->can_view_tags(null)) {
         $this->qopts["tags"] = 1;
     }
     $this->table_type = $listname;
     // get column list, check sort
     $field_list = $this->_list_columns($listname);
     if (!$field_list) {
         Conf::msg_error("There is no paper list query named “" . htmlspecialchars($listname) . "”.");
         return null;
     }
     $field_list = $this->_columns($field_list, true);
     $body_attr = $this->row_attr;
     $rows = $this->_rows($field_list);
     if ($rows === null) {
         return null;
     }
     // return IDs if requested
     if (empty($rows)) {
         if ($altq = $this->search->alternate_query()) {
             $altqh = htmlspecialchars($altq);
             $url = $this->search->url_site_relative_raw($altq);
             if (substr($url, 0, 5) == "search") {
                 $altqh = "<a href=\"" . htmlspecialchars(Navigation::siteurl() . $url) . "\">" . $altqh . "</a>";
             }
             return "No matching papers. Did you mean “{$altqh}”?";
         } else {
             return "No matching papers";
         }
     }
     // get field array
     $fieldDef = array();
     $ncol = $titlecol = 0;
     // folds: au:1, anonau:2, fullrow:3, aufull:4, force:5, rownum:6, [fields]
     $next_fold = 7;
     foreach ($field_list as $fdef) {
         if ($fdef->view != Column::VIEW_NONE) {
             $fieldDef[] = $fdef;
         }
         if ($fdef->view != Column::VIEW_NONE && $fdef->foldable) {
             $fdef->foldable = $next_fold;
             ++$next_fold;
         }
         if ($fdef->name == "title") {
             $titlecol = $ncol;
         }
         if ($fdef->view == Column::VIEW_COLUMN && !$fdef->is_folded) {
             ++$ncol;
         }
     }
     // count non-callout columns
     $skipcallout = 0;
     foreach ($fieldDef as $fdef) {
         if ($fdef->name != "id" && !isset($fdef->is_selector)) {
             break;
         } else {
             ++$skipcallout;
         }
     }
     // create render state
     $rstate = new PaperListRenderState($ncol, $titlecol, $skipcallout);
     // collect row data
     $body = array();
     $lastheading = !empty($this->search->groupmap) ? -1 : -2;
     $need_render = false;
     foreach ($rows as $row) {
         ++$this->count;
         if ($lastheading > -2) {
             $lastheading = $this->_check_heading($this->_row_thenval($row), $rstate, $rows, $lastheading, $body);
         }
         $body[] = $this->_row_text($rstate, $row, $fieldDef);
         if ($this->need_render && !$need_render) {
             $Conf->footerScript('$(plinfo.render_needed)', 'plist_render_needed');
             $need_render = true;
         }
         if ($this->need_render && $this->count % 16 == 15) {
             $body[count($body) - 1] .= "  <script>plinfo.render_needed()</script>\n";
             $this->need_render = false;
         }
     }
     if ($lastheading > -2 && $this->search->is_order_anno) {
         while ($lastheading + 1 < count($this->search->groupmap)) {
             $lastheading = $this->_check_heading($lastheading + 1, $rstate, $rows, $lastheading, $body);
         }
     }
     // header cells
     $colhead = "";
     $url = $this->search->url_site_relative_raw();
     if (!defval($options, "noheader")) {
         $colhead .= " <thead class=\"pltable\">\n  <tr class=\"pl_headrow\">";
         $ord = 0;
         $titleextra = $this->_make_title_header_extra($rstate, $fieldDef, get($options, "header_links"));
         foreach ($fieldDef as $fdef) {
             if ($fdef->view != Column::VIEW_COLUMN || $fdef->is_folded) {
                 continue;
             }
             $colhead .= "<th class=\"pl " . $fdef->className;
             if ($fdef->foldable) {
                 $colhead .= " fx" . $fdef->foldable;
             }
             $colhead .= "\">";
             if ($fdef->has_content) {
                 $colhead .= $this->_field_title($fdef, $ord);
             }
             if ($titleextra && $fdef->className == "pl_title") {
                 $colhead .= $titleextra;
                 $titleextra = false;
             }
             $colhead .= "</th>";
             ++$ord;
         }
         $colhead .= "</tr>\n";
         if ($this->search->is_order_anno) {
             $colhead .= "  <tr class=\"pl_headrow pl_annorow\" data-anno-tag=\"{$this->search->is_order_anno}\">";
             if ($rstate->titlecol) {
                 $colhead .= "<td colspan=\"{$rstate->titlecol}\"></td>";
             }
             $colhead .= "<td colspan=\"" . ($rstate->ncol - $rstate->titlecol) . "\"><a href=\"#\" onclick=\"return plinfo_tags.edit_anno(this)\">Annotate order</a></td></tr>\n";
         }
         $colhead .= " </thead>\n";
     }
     // table skeleton including fold classes
     $foldclasses = array();
     if ($this->foldable) {
         $foldclasses = $this->_analyze_folds($rstate, $fieldDef);
     }
     $enter = "";
     if (self::$include_stash) {
         $enter .= Ht::take_stash();
     }
     $enter .= "<table class=\"pltable plt_" . htmlspecialchars($listname);
     if (defval($options, "class")) {
         $enter .= " " . $options["class"];
     }
     if ($this->listNumber) {
         $enter .= " has_hotcrp_list";
     }
     if (!empty($foldclasses)) {
         $enter .= " " . join(" ", $foldclasses);
     }
     if ($this->viewmap->table_id) {
         $enter .= "\" id=\"" . $this->viewmap->table_id;
     }
     if (defval($options, "attributes")) {
         foreach ($options["attributes"] as $n => $v) {
             $enter .= "\" {$n}=\"" . htmlspecialchars($v);
         }
     }
     if ($this->search->is_order_anno) {
         $enter .= "\" data-order-tag=\"{$this->search->is_order_anno}";
     }
     foreach ($body_attr as $k => $v) {
         $enter .= "\" {$k}=\"" . htmlspecialchars($v);
     }
     if ($this->listNumber) {
         $enter .= '" data-hotcrp-list="' . $this->listNumber;
     }
     $enter .= "\" data-fold=\"true\">\n";
     $exit = "</table>";
     // maybe make columns, maybe not
     $tbody_class = "pltable";
     if ($this->viewmap->columns && !empty($rstate->ids) && $this->_column_split($rstate, $colhead, $body)) {
         $enter = '<div class="plsplit_col_ctr_ctr"><div class="plsplit_col_ctr">' . $enter;
         $exit = $exit . "</div></div>";
         $ncol = $rstate->split_ncol;
         $tbody_class = "pltable_split";
     } else {
         $enter .= $colhead;
         $tbody_class .= $rstate->hascolors ? " pltable_colored" : "";
     }
     // footer
     $foot = "";
     if ($this->viewmap->statistics && !$this->viewmap->columns) {
         $foot .= $this->_statistics_rows($rstate, $fieldDef);
     }
     if ($fieldDef[0] instanceof SelectorPaperColumn && !defval($options, "nofooter")) {
         $foot .= $this->_footer($ncol, get_s($options, "footer_extra"));
     }
     if ($foot) {
         $enter .= ' <tfoot' . ($rstate->hascolors ? ' class="pltable_colored"' : "") . ">\n" . $foot . " </tfoot>\n";
     }
     // body
     $enter .= " <tbody class=\"{$tbody_class}\">\n";
     // header scripts to set up delegations
     if ($this->_header_script) {
         $enter .= '  <script>' . $this->_header_script . "</script>\n";
     }
     // session variable to remember the list
     if ($this->listNumber) {
         $sl = $this->search->create_session_list_object($rstate->ids, self::_listDescription($listname), $this->sortdef());
         if (isset($this->qreq->sort)) {
             $url .= (strpos($url, "?") ? "&" : "?") . "sort=" . urlencode($this->qreq->sort);
         }
         $sl->url = $url;
         if (get($options, "list_properties")) {
             foreach ($options["list_properties"] as $k => $v) {
                 $sl->{$k} = $v;
             }
         }
         SessionList::change($this->listNumber, $sl);
     }
     foreach ($fieldDef as $fdef) {
         if ($fdef->has_content) {
             $this->any[$fdef->name] = true;
         }
     }
     if ($rstate->has_openau) {
         $this->any->openau = true;
     }
     if ($rstate->has_anonau) {
         $this->any->anonau = true;
     }
     $this->ids = $rstate->ids;
     return $enter . join("", $body) . " </tbody>\n" . $exit;
 }
예제 #26
0
 function render($sv)
 {
     global $Conf;
     // Tags
     $tagger = new Tagger();
     echo "<h3 class=\"settings\">Tags</h3>\n";
     echo "<table class=\"secondary-settings\"><tbody>";
     $sv->set_oldv("tag_chair", join(" ", array_keys(TagInfo::chair_tags())));
     $sv->echo_entry_row("tag_chair", "Chair-only tags", "PC members can view these tags, but only administrators can change them.");
     $sv->set_oldv("tag_sitewide", join(" ", array_keys(TagInfo::sitewide_tags())));
     if ($sv->newv("tag_sitewide") || $Conf->has_any_manager()) {
         $sv->echo_entry_row("tag_sitewide", "Site-wide tags", "Chairs and administrators can view and change these tags for every paper.");
     }
     $sv->set_oldv("tag_approval", join(" ", array_keys(TagInfo::approval_tags())));
     $sv->echo_entry_row("tag_approval", "Approval voting tags", "<a href=\"" . hoturl("help", "t=votetags") . "\">What is this?</a>");
     $x = [];
     foreach (TagInfo::vote_tags() as $n => $v) {
         $x[] = "{$n}#{$v}";
     }
     $sv->set_oldv("tag_vote", join(" ", $x));
     $sv->echo_entry_row("tag_vote", "Allotment voting tags", "“vote#10” declares an allotment of 10 votes per PC member. <span class=\"barsep\">·</span> <a href=\"" . hoturl("help", "t=votetags") . "\">What is this?</a>");
     $sv->set_oldv("tag_rank", $Conf->setting_data("tag_rank", ""));
     $sv->echo_entry_row("tag_rank", "Ranking tag", "The <a href='" . hoturl("offline") . "'>offline reviewing page</a> will expose support for uploading rankings by this tag. <span class='barsep'>·</span> <a href='" . hoturl("help", "t=ranking") . "'>What is this?</a>");
     echo "</tbody></table>";
     echo "<div class='g'></div>\n";
     $sv->echo_checkbox('tag_seeall', "PC can see tags for conflicted papers");
     preg_match_all('_(\\S+)=(\\S+)_', $Conf->setting_data("tag_color", ""), $m, PREG_SET_ORDER);
     $tag_colors = array();
     foreach ($m as $x) {
         $tag_colors[TagInfo::canonical_color($x[2])][] = $x[1];
     }
     $tag_colors_rows = array();
     foreach (explode("|", TagInfo::BASIC_COLORS) as $k) {
         if ($sv->use_req()) {
             $v = defval($sv->req, "tag_color_{$k}", "");
         } else {
             if (isset($tag_colors[$k])) {
                 $v = join(" ", $tag_colors[$k]);
             } else {
                 $v = "";
             }
         }
         $tag_colors_rows[] = "<tr class='k0 {$k}tag'><td class='lxcaption'></td><td class='lxcaption taghl'>{$k}</td><td class='lentry' style='font-size: 10.5pt'><input type='text' name='tag_color_{$k}' value=\"" . htmlspecialchars($v) . "\" size='40' /></td></tr>";
         /* MAINSIZE */
     }
     preg_match_all('_(\\S+)=(\\S+)_', $Conf->setting_data("tag_badge", ""), $m, PREG_SET_ORDER);
     $tag_badges = array();
     foreach ($m as $x) {
         $tag_badges[$x[2]][] = $x[1];
     }
     foreach (["black" => "black label", "red" => "red label", "green" => "green label", "blue" => "blue label", "white" => "white label"] as $k => $desc) {
         if ($sv->use_req()) {
             $v = defval($sv->req, "tag_badge_{$k}", "");
         } else {
             if (isset($tag_badges[$k])) {
                 $v = join(" ", $tag_badges[$k]);
             } else {
                 $v = "";
             }
         }
         $tag_colors_rows[] = "<tr class='k0'><td class='lxcaption'></td><td class='lxcaption'><span class='badge {$k}badge' style='margin:0'>{$desc}</span><td class='lentry' style='font-size:10.5pt'><input type='text' name='tag_badge_{$k}' value=\"" . htmlspecialchars($v) . "\" size='40' /></td></tr>";
         /* MAINSIZE */
     }
     echo Ht::hidden("has_tag_color", 1), '<h3 class="settings g">Styles and colors</h3>', "<div class='hint'>Papers and PC members tagged with a style name, or with one of the associated tags, will appear in that style in lists.</div>", "<div class='smg'></div>", "<table id='foldtag_color'><tr><th colspan='2'>Style name</th><th>Tags</th></tr>", join("", $tag_colors_rows), "</table>\n";
     echo '<h3 class="settings g">Tracks</h3>', "\n";
     echo "<div class='hint'>Tracks control the PC members allowed to view or review different sets of papers. <span class='barsep'>·</span> <a href=\"" . hoturl("help", "t=tracks") . "\">What is this?</a></div>", Ht::hidden("has_tracks", 1), "<div class=\"smg\"></div>\n";
     $this->do_track($sv, "", 0);
     $tracknum = 2;
     $trackj = $Conf->setting_json("tracks") ?: (object) array();
     // existing tracks
     foreach ($trackj as $trackname => $x) {
         if ($trackname !== "_") {
             $this->do_track($sv, $trackname, $tracknum);
             ++$tracknum;
         }
     }
     // new tracks (if error prevented saving)
     if ($sv->use_req()) {
         for ($i = 1; isset($sv->req["name_track{$i}"]); ++$i) {
             $trackname = trim($sv->req["name_track{$i}"]);
             if (!isset($trackj->{$trackname})) {
                 $this->do_track($sv, $trackname, $tracknum);
                 ++$tracknum;
             }
         }
     }
     // catchall track
     $this->do_track($sv, "_", 1);
     echo Ht::button("Add track", array("onclick" => "settings_add_track()"));
 }
예제 #27
0
 private function echo_message_base($name, $description, $hint, $class)
 {
     global $Conf;
     $si = $this->si($name);
     $rows = $si ? $si->size : 0 ?: 10;
     $default = $Conf->message_default_html($name);
     $current = $this->curv($name, $default);
     $description = '<a class="q" href="#" onclick="return foldup(this,event)">' . expander(null, 0) . $description . '</a>';
     echo '<div class="fold', $current == $default ? "c" : "o", '" data-fold="true">', '<div class="', $class, ' childfold" onclick="return foldup(this,event)">', $this->label($name, $description), ' <span class="f-cx fx">(HTML allowed)</span></div>', $hint, Ht::textarea($name, $current, $this->sjs($name, array("class" => "fx", "rows" => $rows, "cols" => 80))), '</div><div class="g"></div>', "\n";
 }
예제 #28
0
function save_comment($text, $is_response, $roundnum)
{
    global $Me, $Conf, $prow, $crow;
    if ($crow) {
        $roundnum = (int) $crow->commentRound;
    }
    // If I have a review token for this paper, save under that anonymous user.
    $user = $Me;
    if ((!$crow || $crow->contactId != $Me->contactId) && ($cid = $Me->review_token_cid($prow)) && (!$crow || $crow->contactId == $cid)) {
        $user = Contact::find_by_id($cid);
    }
    $req = array("visibility" => @$_REQUEST["visibility"], "submit" => $is_response && @$_REQUEST["submitresponse"], "text" => $text, "tags" => @$_REQUEST["commenttags"], "blind" => @$_REQUEST["blind"]);
    if ($is_response && !$crow) {
        $cinfo = new CommentInfo((object) array("commentType" => COMMENTTYPE_RESPONSE, "commentRound" => $roundnum), $prow);
    } else {
        $cinfo = new CommentInfo($crow, $prow);
    }
    $ok = $cinfo->save($req, $user);
    $what = $is_response ? "Response" : "Comment";
    $confirm = false;
    if (!$ok && $is_response) {
        $crows = $Conf->comment_rows($Conf->comment_query("paperId={$prow->paperId} and (commentType&" . COMMENTTYPE_RESPONSE . ")!=0 and commentRound={$roundnum}"), $Me);
        reset($crows);
        $cur_response = @current($crows);
        if ($cur_response && $cur_response->comment == $text) {
            $cinfo = new CommentInfo($cur_response, $prow);
            $ok = true;
        } else {
            $confirm = Ht::xmsg("error", "A response was entered concurrently by another user. Reload to see it.");
        }
    }
    if (!$ok) {
        /* nada */
    } else {
        if ($is_response && (!$cinfo->commentId || $cinfo->commentType & COMMENTTYPE_DRAFT)) {
            if ($cinfo->commentId) {
                $confirm = 'Response saved. <strong>This draft response will not be shown to reviewers.</strong>';
            } else {
                $confirm = 'Response deleted.';
            }
            $isuf = $roundnum ? "_{$roundnum}" : "";
            if (($dl = $Conf->printableTimeSetting("resp_done{$isuf}")) != "N/A") {
                $confirm .= " You have until {$dl} to submit the response.";
            }
            $confirm = Ht::xmsg("warning", $confirm);
        } else {
            if ($is_response) {
                $rname = $Conf->resp_round_text($roundnum);
                $confirm = Ht::xmsg("confirm", ($rname ? "{$rname} response" : "Response") . ' submitted.');
            } else {
                if ($cinfo->commentId) {
                    $confirm = Ht::xmsg("confirm", "Comment saved.");
                } else {
                    $confirm = Ht::xmsg("confirm", "Comment deleted.");
                }
            }
        }
    }
    $j = array("ok" => $ok);
    if ($cinfo->commentId) {
        $j["cmt"] = $cinfo->unparse_json($Me);
    }
    if ($confirm) {
        $j["msg"] = $confirm;
    }
    $Conf->ajaxExit($j);
}
예제 #29
0
파일: diff.php 프로젝트: kohler/peteramati
$lnorder = new LinenotesOrder($all_linenotes, $Info->can_see_grades);
$lnorder->set_diff($diff);
// print line notes
$notelinks = array();
foreach ($lnorder->seq() as $fl) {
    $f = str_starts_with($fl[0], $Pset->directory_slash) ? substr($fl[0], strlen($Pset->directory_slash)) : $fl[0];
    $notelinks[] = '<a href="#L' . $fl[1] . '_' . html_id_encode($fl[0]) . '" onclick="return gotoline61(this)" class="noteref61' . (!$fl[2] && !$Info->user_can_see_grades ? " hiddennote61" : "") . '">' . htmlspecialchars($f) . ':' . substr($fl[1], 1) . '</a>';
}
if (count($notelinks)) {
    ContactView::echo_group("notes", join(", ", $notelinks));
}
// check for any linenotes
$has_any_linenotes = false;
foreach ($diff as $file => $dinfo) {
    if ($lnorder->file($file)) {
        $has_any_linenotes = true;
        break;
    }
}
// line notes
foreach ($diff as $file => $dinfo) {
    $linenotes = $lnorder->file($file);
    $open = $linenotes || !$dinfo->boring || !$hasha_mine && !$hashb_mine;
    $Info->echo_file_diff($file, $dinfo, $lnorder, $open);
}
Ht::stash_script('jQuery(".diffnoteentry61").autogrow();jQuery(window).on("beforeunload",beforeunload61)');
echo "<table id=\"diff61linenotetemplate\" style=\"display:none\"><tbody>";
$Info->echo_linenote_entry_prototype();
echo "</tbody></table>";
echo "<div class='clear'></div>\n";
$Conf->footer();
예제 #30
0
 <path d="M 61.71,62.611 C 66.977,55.945 70.128,47.531 70.128,38.378 C 70.128,29.161 66.936,20.696 61.609,14.01" style="fill:none;stroke:#111111;stroke-width:5;stroke-linecap:round"/>
</svg><svg id="muteicon" class="fx" width="1.5em" height="1.5em" viewBox="0 0 75 75" style="position:relative;bottom:-3px">
 <polygon points="39.389,13.769 22.235,28.606 6,28.606 6,47.699 21.989,47.699 39.389,62.75 39.389,13.769" style="stroke:#111111;stroke-width:5;stroke-linejoin:round;fill:#111111;" />
 <path d="M 48.651772,50.269646 69.395223,25.971024" style="fill:none;stroke:#111111;stroke-width:5;stroke-linecap:round"/>
 <path d="M 69.395223,50.269646 48.651772,25.971024" style="fill:none;stroke:#111111;stroke-width:5;stroke-linecap:round" />
</svg></button></td>';
//echo '<span class="hidden fhn_ib">&nbsp;Mute</span>';
//echo '<span class="hidden fhx_ib">&nbsp;Unmute</span></button></td>';
// show-papers
if ($Me->has_database_account()) {
    echo '<td style="padding-left:2em">', Ht::checkbox("buzzer_showpapers", 1, $show_papers, array("id" => "buzzer_showpapers", "onclick" => "trackertable_showpapers()")), "&nbsp;", Ht::label("Show papers"), '</td>';
    Ht::stash_script("trackertable_showpapers()");
}
// kiosk mode
if ($Me->privChair) {
    echo '<td style="padding-left:2em">', Ht::js_button("Kiosk mode", "popup(this,'kiosk',0,true)"), '</td>';
    $Conf->footerHtml('<div id="popup_kiosk" class="popupc">
<p>Kiosk mode is a discussion status page with no
other site privileges. It’s safe to leave a browser in kiosk mode
open in the hallway.</p>
<p><b>Kiosk mode will sign you out of the site.</b>
Do not use kiosk mode on your main browser. Instead, sign in to
another browser and navigate to this page.
Or use these URLs:</p>
<p><table><tr><td class="lcaption nw">With papers</td>
<td>' . hoturl_absolute("buzzer", array("__PATH__" => $kiosk_keys[1])) . '</td></tr>
<tr><td class="lcaption nw">Conflicts only</td>
<td>' . hoturl_absolute("buzzer", array("__PATH__" => $kiosk_keys[0])) . '</td></tr></table></p>' . Ht::form_div(hoturl_post("buzzer")) . '<div class="popup_actions">' . Ht::hidden("buzzer_showpapers", 1, array("class" => "popup_populate")) . Ht::js_button("Cancel", "popup(null,'kiosk',1)") . Ht::submit("signout_to_kiosk", "Enter kiosk mode", array("class" => "bb")) . '</div></div></form>');
}
echo "</tr></table></form>\n";
$Conf->footer();