当前位置: 首页>>代码示例>>PHP>>正文


PHP hoturl函数代码示例

本文整理汇总了PHP中hoturl函数的典型用法代码示例。如果您正苦于以下问题:PHP hoturl函数的具体用法?PHP hoturl怎么用?PHP hoturl使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。


在下文中一共展示了hoturl函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: render

 function render($sv)
 {
     global $Conf, $Opt;
     echo '<div class="f-c">', $sv->label("opt.shortName", "Conference abbreviation"), "</div>\n";
     $sv->echo_entry("opt.shortName");
     echo '<div class="f-h">Examples: “HotOS XIV”, “NSDI \'14”</div>';
     echo "<div class=\"g\"></div>\n";
     if ($sv->oldv("opt.longName") == $sv->oldv("opt.shortName")) {
         $sv->set_oldv("opt.longName", "");
     }
     echo "<div class='f-c'>", $sv->label("opt.longName", "Conference name"), "</div>\n";
     $sv->echo_entry("opt.longName");
     echo '<div class="f-h">Example: “14th Workshop on Hot Topics in Operating Systems”</div>';
     echo "<div class=\"g\"></div>\n";
     echo "<div class='f-c'>", $sv->label("opt.conferenceSite", "Conference URL"), "</div>\n";
     $sv->echo_entry("opt.conferenceSite");
     echo '<div class="f-h">Example: “http://yourconference.org/”</div>';
     echo '<div class="lg"></div>', "\n";
     echo '<div class="f-c">', $sv->label("opt.contactName", "Name of site contact"), "</div>\n";
     $sv->echo_entry("opt.contactName");
     echo '<div class="g"></div>', "\n";
     echo "<div class='f-c'>", $sv->label("opt.contactEmail", "Email of site contact"), "</div>\n";
     $sv->echo_entry("opt.contactEmail");
     echo '<div class="f-h">The site contact is the contact point for users if something goes wrong. It defaults to the chair.</div>';
     echo '<div class="lg"></div>', "\n";
     echo '<div class="f-c">', $sv->label("opt.emailReplyTo", "Reply-To field for email"), "</div>\n";
     $sv->echo_entry("opt.emailReplyTo");
     echo '<div class="g"></div>', "\n";
     echo '<div class="f-c">', $sv->label("opt.emailCc", "Default Cc for reviewer email"), "</div>\n";
     $sv->echo_entry("opt.emailCc");
     echo '<div class="f-h">This applies to email sent to reviewers and email sent using the <a href="', hoturl("mail"), '">mail tool</a>. It doesn’t apply to account-related email or email sent to submitters.</div>';
 }
开发者ID:vaskevich,项目名称:nu-admissions-review,代码行数:32,代码来源:s_basics.php

示例2: error_go

function error_go($url, $message)
{
    if ($url === false) {
        $url = hoturl("index");
    }
    Conf::msg_error($message);
    go($url);
}
开发者ID:kohler,项目名称:peteramati,代码行数:8,代码来源:redirect.php

示例3: error_go

function error_go($url, $message)
{
    global $Conf;
    if ($url === false) {
        $url = hoturl("index");
    }
    $Conf->errorMsg($message);
    go($url);
}
开发者ID:benesch,项目名称:peteramati,代码行数:9,代码来源:redirect.php

示例4: run

 function run(Contact $user, $qreq, $ssel)
 {
     $r = in_array($qreq->recipients, ["au", "rev"]) ? $qreq->recipients : "all";
     if ($ssel->equals_search(new PaperSearch($user, $qreq))) {
         $x = "q=" . urlencode($qreq->q) . "&plimit=1";
     } else {
         $x = "p=" . join("+", $ssel->selection());
     }
     go(hoturl("mail", $x . "&t=" . urlencode($qreq->t) . "&recipients={$r}"));
 }
开发者ID:vaskevich,项目名称:nu-admissions-review,代码行数:10,代码来源:sa_mail.php

示例5: render

 function render($sv)
 {
     global $Me;
     if ($sv->curv("acct_addr")) {
         $sv->echo_checkbox("acct_addr", "Collect users’ addresses and phone numbers");
     }
     echo "<h3 class=\"settings g\">Program committee &amp; system administrators</h3>";
     echo "<p><a href='", hoturl("profile", "u=new&amp;role=pc"), "' class='button'>Create PC account</a> &nbsp;|&nbsp; ", "Select a user’s name to edit a profile.</p>\n";
     $pl = new ContactList($Me, false);
     echo $pl->table_html("pcadminx", hoturl("users", "t=pcadmin"));
 }
开发者ID:vaskevich,项目名称:nu-admissions-review,代码行数:11,代码来源:s_users.php

示例6: loadRows

function loadRows()
{
    global $prow, $rrows, $Conf, $Me;
    $Conf->paper = $prow = PaperTable::paperRow($whyNot);
    if (!$prow) {
        errorMsgExit(whyNotText($whyNot, "view"));
    }
    if ($whyNot = $Me->perm_request_review($prow, false)) {
        $wnt = whyNotText($whyNot, "request reviews for");
        error_go(hoturl("paper", array("p" => $prow->paperId, "ls" => @$_REQUEST["ls"])), $wnt);
    }
    $rrows = $Conf->reviewRow(array('paperId' => $prow->paperId, 'array' => 1), $whyNot);
}
开发者ID:vaskevich,项目名称:nu-admissions-review,代码行数:13,代码来源:assign.php

示例7: output

function output($User)
{
    global $Me;
    $u = $Me->user_linkpart($User);
    echo '<div class="facebook61">', '<a href="', hoturl("index", ["u" => $u]), '">', '<img class="bigface61" src="' . hoturl("face", ["u" => $u, "imageid" => $User->contactImageId ?: 0]) . '" border="0" />', '</a>', '<h2 class="infacebook61"><a class="q" href="', hoturl("index", ["u" => $u]), '">', htmlspecialchars($u), '</a>';
    if ($Me->privChair) {
        echo "&nbsp;", become_user_link($User);
    }
    echo '</h2>';
    if ($User !== $Me) {
        echo '<h3 class="infacebook61">', Text::user_html($User), '</h3>';
    }
    echo '</div>';
}
开发者ID:kohler,项目名称:peteramati,代码行数:14,代码来源:face.php

示例8: show_pset_table

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>";
//.........这里部分代码省略.........
开发者ID:kohler,项目名称:peteramati,代码行数:101,代码来源:home.php

示例9: render

 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()"));
 }
开发者ID:vaskevich,项目名称:nu-admissions-review,代码行数:90,代码来源:s_tags.php

示例10: admin_home_messages

function admin_home_messages()
{
    global $Opt, $Conf;
    $m = array();
    $errmarker = "<span class=\"error\">Error:</span> ";
    if (preg_match("/^(?:[1-4]\\.|5\\.[012])/", phpversion())) {
        $m[] = $errmarker . "HotCRP requires PHP version 5.3 or higher.  You are running PHP version " . htmlspecialchars(phpversion()) . ".";
    }
    if (get_magic_quotes_gpc()) {
        $m[] = $errmarker . "The PHP <code>magic_quotes_gpc</code> feature is on, which is a bad idea.  Check that your Web server is using HotCRP’s <code>.htaccess</code> file.  You may also want to disable <code>magic_quotes_gpc</code> in your <code>php.ini</code> configuration file.";
    }
    if (get_magic_quotes_runtime()) {
        $m[] = $errmarker . "The PHP <code>magic_quotes_runtime</code> feature is on, which is a bad idea.  Check that your Web server is using HotCRP’s <code>.htaccess</code> file.  You may also want to disable <code>magic_quotes_runtime</code> in your <code>php.ini</code> configuration file.";
    }
    if (defined("JSON_HOTCRP")) {
        $m[] = "Your PHP was built without JSON functionality. HotCRP is using its built-in replacements; the native functions would be faster.";
    }
    if ((int) $Opt["globalSessionLifetime"] < $Opt["sessionLifetime"]) {
        $m[] = "PHP’s systemwide <code>session.gc_maxlifetime</code> setting, which is " . htmlspecialchars($Opt["globalSessionLifetime"]) . " seconds, is less than HotCRP’s preferred session expiration time, which is " . $Opt["sessionLifetime"] . " seconds.  You should update <code>session.gc_maxlifetime</code> in the <code>php.ini</code> file or users may be booted off the system earlier than you expect.";
    }
    if (!function_exists("imagecreate")) {
        $m[] = $errmarker . "This PHP installation lacks support for the GD library, so HotCRP cannot generate score charts (as backup for browsers that don’t support &lt;canvas&gt;). You should update your PHP installation. For example, on Ubuntu Linux, install the <code>php5-gd</code> package.";
    }
    $result = $Conf->qx("show variables like 'max_allowed_packet'");
    $max_file_size = ini_get_bytes("upload_max_filesize");
    if (($row = edb_row($result)) && $row[1] < $max_file_size && !@$Opt["dbNoPapers"]) {
        $m[] = $errmarker . "MySQL’s <code>max_allowed_packet</code> setting, which is " . htmlspecialchars($row[1]) . "&nbsp;bytes, is less than the PHP upload file limit, which is {$max_file_size}&nbsp;bytes.  You should update <code>max_allowed_packet</code> in the system-wide <code>my.cnf</code> file or the system may not be able to handle large papers.";
    }
    // Conference names
    if (@$Opt["shortNameDefaulted"]) {
        $m[] = "<a href=\"" . hoturl("settings", "group=msg") . "\">Set the conference abbreviation</a> to a short name for your conference, such as “OSDI ’14”.";
    } else {
        if (simplify_whitespace($Opt["shortName"]) != $Opt["shortName"]) {
            $m[] = "The <a href=\"" . hoturl("settings", "group=msg") . "\">conference abbreviation</a> setting has a funny value. To fix it, remove leading and trailing spaces, use only space characters (no tabs or newlines), and make sure words are separated by single spaces (never two or more).";
        }
    }
    $site_contact = Contact::site_contact();
    if (!$site_contact->email || $site_contact->email == "you@example.com") {
        $m[] = "<a href=\"" . hoturl("settings", "group=msg") . "\">Set the conference contact’s name and email</a> so submitters can reach someone if things go wrong.";
    }
    // Backwards compatibility
    if (@$Conf->setting_data("clickthrough_submit")) {
        // delete 12/2014
        $m[] = "You need to recreate the <a href=\"" . hoturl("settings", "group=msg") . "\">clickthrough submission terms</a>.";
    }
    // Weird URLs?
    foreach (array("conferenceSite", "paperSite") as $k) {
        if (isset($Opt[$k]) && $Opt[$k] && !preg_match('`\\Ahttps?://(?:[-.~\\w:/?#\\[\\]@!$&\'()*+,;=]|%[0-9a-fA-F][0-9a-fA-F])*\\z`', $Opt[$k])) {
            $m[] = $errmarker . "The <code>\$Opt[\"{$k}\"]</code> setting, ‘<code>" . htmlspecialchars($Opt[$k]) . "</code>’, is not a valid URL.  Edit the <code>conf/options.php</code> file to fix this problem.";
        }
    }
    // Double-encoding bugs found?
    if ($Conf->setting("bug_doubleencoding")) {
        $m[] = "Double-encoded URLs have been detected. Incorrect uses of Apache’s <code>mod_rewrite</code>, and other middleware, can encode URL parameters twice. This can cause problems, for instance when users log in via links in email. (“<code>a@b.com</code>” should be encoded as “<code>a%40b.com</code>”; a double encoding will produce “<code>a%2540b.com</code>”.) HotCRP has tried to compensate, but you really should fix the problem. For <code>mod_rewrite</code> add <a href='http://httpd.apache.org/docs/current/mod/mod_rewrite.html'>the <code>[NE]</code> option</a> to the relevant RewriteRule. <a href=\"" . hoturl_post("index", "clearbug=doubleencoding") . "\">(Clear&nbsp;this&nbsp;message)</a>";
    }
    // Unnotified reviews?
    if ($Conf->setting("pcrev_assigntime", 0) > $Conf->setting("pcrev_informtime", 0)) {
        $assigntime = $Conf->setting("pcrev_assigntime");
        $result = $Conf->qe("select paperId from PaperReview where reviewType>" . REVIEW_PC . " and timeRequested>timeRequestNotified and reviewSubmitted is null and reviewNeedsSubmit!=0 limit 1");
        if (edb_nrows($result)) {
            $m[] = "PC review assignments have changed. You may want to <a href=\"" . hoturl("mail", "template=newpcrev") . "\">send mail about the new assignments</a>. <a href=\"" . hoturl_post("index", "clearnewpcrev={$assigntime}") . "\">(Clear&nbsp;this&nbsp;message)</a>";
        } else {
            $Conf->save_setting("pcrev_informtime", $assigntime);
        }
    }
    if (count($m)) {
        $Conf->warnMsg("<div>" . join('</div><div style="margin-top:0.5em">', $m) . "</div>");
    }
}
开发者ID:benesch,项目名称:peteramati,代码行数:69,代码来源:adminhome.php

示例11: user_prev_next

if ($User->seascode_username && $Me->isPC) {
    // links to next/prev users
    $links = user_prev_next($User, $Pset);
    if ($links[0] || $links[1]) {
        $userkey = $User->is_anonymous ? "anon_username" : "seascode_username";
        echo "<div style=\"color:gray;float:right\"><h3 style=\"margin-top:0\">";
        if ($links[0]) {
            $u = $Me->user_linkpart($links[0], $User->is_anonymous);
            echo '<a href="', hoturl("pset", array("pset" => $Pset->urlkey, "u" => $u, "sort" => @$_REQUEST["sort"])), '">« ', htmlspecialchars($u), '</a>';
        }
        if ($links[0] && $links[1]) {
            echo ' · ';
        }
        if ($links[1]) {
            $u = $Me->user_linkpart($links[1], $User->is_anonymous);
            echo '<a href="', hoturl("pset", array("pset" => $Pset->urlkey, "u" => $u, "sort" => @$_REQUEST["sort"])), '">', htmlspecialchars($u), ' »</a>';
        }
        echo "</h3></div>";
    }
}
ContactView::echo_heading($User);
$u = $Me->user_linkpart($User);
// Per-pset
function diff_line_code($t)
{
    global $TABWIDTH;
    while (($p = strpos($t, "\t")) !== false) {
        $t = substr($t, 0, $p) . str_repeat(" ", $TABWIDTH - $p % $TABWIDTH) . substr($t, $p + 1);
    }
    return str_replace("  ", " &nbsp;", htmlspecialchars($t));
}
开发者ID:benesch,项目名称:peteramati,代码行数:31,代码来源:pset.php

示例12: crosscheck

 function crosscheck($sv)
 {
     if (($sv->has_interest("options") || $sv->has_interest("sub_blind")) && $sv->newv("options") && $sv->newv("sub_blind") == Conf::BLIND_ALWAYS) {
         $options = json_decode($sv->newv("options"));
         foreach ((array) $options as $id => $o) {
             if (get($o, "visibility") === "nonblind") {
                 $sv->set_warning("optp{$id}", "The “" . htmlspecialchars($o->name) . "” option is “visible if authors are visible,” but authors are not visible. You may want to change <a href=\"" . hoturl("settings", "group=sub") . "\">Settings &gt; Submissions</a> &gt; Blind submission to “Blind until review.”");
             }
         }
     }
 }
开发者ID:vaskevich,项目名称:nu-admissions-review,代码行数:11,代码来源:s_subform.php

示例13: saveAssignments

function saveAssignments($qreq, $reviewer)
{
    global $Conf, $Me, $Now, $pcm;
    $reviewer_contact = $pcm[$reviewer];
    $round_number = null;
    if (!count($qreq->assrev)) {
        return;
    }
    $result = Dbl::qe_raw($Conf->paperQuery($Me, array("paperId" => array_keys($qreq->assrev), "reviewer" => $reviewer)));
    $lastPaperId = -1;
    $del = $ins = "";
    while ($row = PaperInfo::fetch($result, $Me)) {
        if ($row->paperId == $lastPaperId || !$Me->can_administer($row) || $row->reviewerConflictType >= CONFLICT_AUTHOR || !isset($qreq->assrev[$row->paperId])) {
            continue;
        }
        $lastPaperId = $row->paperId;
        $type = $qreq->assrev[$row->paperId];
        if ($type >= 0 && $row->reviewerConflictType > 0 && $row->reviewerConflictType < CONFLICT_AUTHOR) {
            $del .= " or paperId={$row->paperId}";
        }
        if ($type < 0 && $row->reviewerConflictType < CONFLICT_CHAIRMARK) {
            $ins .= ", ({$row->paperId}, {$reviewer}, " . CONFLICT_CHAIRMARK . ")";
        }
        if ($qreq->kind == "a" && $type != $row->reviewerReviewType && ($type <= 0 || $reviewer_contact->can_accept_review_assignment_ignore_conflict($row))) {
            if ($type > 0 && $round_number === null) {
                $round_number = $Conf->round_number($qreq->rev_roundtag, true);
            }
            $Me->assign_review($row->paperId, $reviewer, $type, array("round_number" => $round_number));
        }
    }
    if ($ins) {
        $Conf->qe("insert into PaperConflict (paperId, contactId, conflictType) values " . substr($ins, 2) . " on duplicate key update conflictType=greatest(conflictType,values(conflictType))");
    }
    if ($del) {
        $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]);
}
开发者ID:vaskevich,项目名称:nu-admissions-review,代码行数:42,代码来源:manualassign.php

示例14: hoturl

    $dt = HotCRPDocument::parse_dtype(@$_REQUEST["dt"]);
    if ($dt === null) {
        $dt = @$_REQUEST["final"] ? DTYPE_FINAL : DTYPE_SUBMISSION;
    }
    if ($Conf->setting("sub_banal{$dt}")) {
        $format = $Conf->setting_data("sub_banal{$dt}", "");
    } else {
        $format = $Conf->setting_data("sub_banal", "");
    }
    $status = $cf->analyzePaper($prow->paperId, $dt, $format);
    // chairs get a hint message about multiple checking
    if ($Me->privChair) {
        $nbanal = $Conf->session("nbanal", 0) + 1;
        $Conf->save_session("nbanal", $nbanal);
        if ($nbanal >= 3 && $nbanal <= 6) {
            $cf->msg("info", "To run the format checker for many papers, use Download &gt; Format check on the <a href='" . hoturl("search", "q=") . "'>search page</a>.");
        }
    }
    $cf->reportMessages();
    if ($ajax) {
        $Conf->ajaxExit(array("status" => $status), true);
    }
}
// withdraw and revive actions
if (isset($_REQUEST["withdraw"]) && !$newPaper && check_post()) {
    if (!($whyNot = $Me->perm_withdraw_paper($prow))) {
        $reason = defval($_REQUEST, "reason", "");
        if ($reason == "" && $Me->privChair && defval($_REQUEST, "doemail") > 0) {
            $reason = defval($_REQUEST, "emailNote", "");
        }
        Dbl::qe("update Paper set timeWithdrawn={$Now}, timeSubmitted=if(timeSubmitted>0,-100,0), withdrawReason=? where paperId={$prow->paperId}", $reason != "" ? $reason : null);
开发者ID:vaskevich,项目名称:nu-admissions-review,代码行数:31,代码来源:paper.php

示例15: normalize

 private function normalize($cj, $old_user)
 {
     // Errors prevent saving
     global $Conf, $Me, $Now;
     // Canonicalize keys
     foreach (array("preferredEmail" => "preferred_email", "institution" => "affiliation", "voicePhoneNumber" => "phone", "addressLine1" => "address", "zipCode" => "zip", "postal_code" => "zip") as $x => $y) {
         if (isset($cj->{$x}) && !isset($cj->{$y})) {
             $cj->{$y} = $cj->{$x};
         }
     }
     // Stringiness
     foreach (array("firstName", "lastName", "email", "preferred_email", "affiliation", "phone", "old_password", "new_password", "city", "state", "zip", "country") as $k) {
         if (isset($cj->{$k}) && !is_string($cj->{$k})) {
             $this->set_error($k, "Format error [{$k}]");
             unset($cj->{$k});
         }
     }
     // Email
     if (!get($cj, "email") && $old_user) {
         $cj->email = $old_user->email;
     } else {
         if (!get($cj, "email")) {
             $this->set_error("email", "Email is required.");
         } else {
             if (!isset($this->errf["email"]) && !validate_email($cj->email) && (!$old_user || $old_user->email !== $cj->email)) {
                 $this->set_error("email", "Invalid email address “" . htmlspecialchars($cj->email) . "”.");
             }
         }
     }
     // ID
     if (get($cj, "id") === "new") {
         if (get($cj, "email") && Contact::id_by_email($cj->email)) {
             $this->set_error("email", "Email address “" . htmlspecialchars($cj->email) . "” is already in use.");
             $this->errf["email_inuse"] = true;
         }
     } else {
         if (!get($cj, "id") && $old_user && $old_user->contactId) {
             $cj->id = $old_user->contactId;
         }
         if (get($cj, "id") && !is_int($cj->id)) {
             $this->set_error("id", "Format error [id]");
         }
         if ($old_user && get($cj, "email") && strtolower($old_user->email) !== strtolower($cj->email) && Contact::id_by_email($cj->email)) {
             $this->set_error("email", "Email address “" . htmlspecialchars($cj->email) . "” is already in use. You may want to <a href=\"" . hoturl("mergeaccounts") . "\">merge these accounts</a>.");
         }
     }
     // Contactdb information
     if ($old_user && !$old_user->contactId) {
         if (!isset($cj->firstName) && !isset($cj->lastName)) {
             $cj->firstName = $old_user->firstName;
             $cj->lastName = $old_user->lastName;
         }
         if (!isset($cj->affiliation)) {
             $cj->affiliation = $old_user->affiliation;
         }
         if (!isset($cj->collaborators)) {
             $cj->collaborators = $old_user->collaborators;
         }
     }
     // Preferred email
     if (get($cj, "preferred_email") && !isset($this->errf["preferred_email"]) && !validate_email($cj->preferred_email) && (!$old_user || $old_user->preferredEmail !== $cj->preferred_email)) {
         $this->set_error("preferred_email", "Invalid email address “" . htmlspecialchars($cj->preferred_email) . "”");
     }
     // Address
     $address = array();
     if (is_array(get($cj, "address"))) {
         $address = $cj->address;
     } else {
         if (is_string(get($cj, "address"))) {
             $address[] = $cj->address;
         } else {
             if (get($cj, "address")) {
                 $this->set_error("address", "Format error [address]");
             }
         }
         if (is_string(get($cj, "address2"))) {
             $address[] = $cj->address2;
         } else {
             if (is_string(get($cj, "addressLine2"))) {
                 $address[] = $cj->addressLine2;
             } else {
                 if (get($cj, "address2") || get($cj, "addressLine2")) {
                     $this->set_error("address2", "Format error [address2]");
                 }
             }
         }
     }
     foreach ($address as $a) {
         if (!is_string($a)) {
             $this->set_error("address", "Format error [address]");
         }
     }
     if (count($address)) {
         $cj->address = $address;
     }
     // Collaborators
     if (is_array(get($cj, "collaborators"))) {
         foreach ($cj->collaborators as $c) {
             if (!is_string($c)) {
                 $this->set_error("collaborators", "Format error [collaborators]");
//.........这里部分代码省略.........
开发者ID:vaskevich,项目名称:nu-admissions-review,代码行数:101,代码来源:userstatus.php


注:本文中的hoturl函数示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。