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


PHP Conf::msg_info方法代码示例

本文整理汇总了PHP中Conf::msg_info方法的典型用法代码示例。如果您正苦于以下问题:PHP Conf::msg_info方法的具体用法?PHP Conf::msg_info怎么用?PHP Conf::msg_info使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Conf的用法示例。


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

示例1: result_html

 private function result_html()
 {
     global $Conf, $Me, $Qreq, $SSel, $pcsel;
     $assignments = $this->autoassigner->assignments();
     ReviewAssigner::$prefinfo = $this->autoassigner->prefinfo;
     ob_start();
     if (!$assignments) {
         $Conf->warnMsg("Nothing to assign.");
         return ob_get_clean();
     }
     $assignset = new AssignmentSet($Me, true);
     $assignset->parse(join("\n", $assignments));
     list($atypes, $apids) = $assignset->types_and_papers(true);
     $badpairs_inputs = $badpairs_arg = array();
     for ($i = 1; $i <= 20; ++$i) {
         if ($Qreq["bpa{$i}"] && $Qreq["bpb{$i}"]) {
             array_push($badpairs_inputs, Ht::hidden("bpa{$i}", $Qreq["bpa{$i}"]), Ht::hidden("bpb{$i}", $Qreq["bpb{$i}"]));
             $badpairs_arg[] = $Qreq["bpa{$i}"] . "-" . $Qreq["bpb{$i}"];
         }
     }
     echo Ht::form_div(hoturl_post("autoassign", ["saveassignment" => 1, "assigntypes" => join(" ", $atypes), "assignpids" => join(" ", $apids), "xbadpairs" => count($badpairs_arg) ? join(" ", $badpairs_arg) : null, "profile" => $Qreq->profile, "XDEBUG_PROFILE" => $Qreq->XDEBUG_PROFILE, "seed" => $Qreq->seed]));
     $atype = $assignset->type_description();
     echo "<h3>Proposed " . ($atype ? $atype . " " : "") . "assignment</h3>";
     Conf::msg_info("Select “Apply changes” if this looks OK.  (You can always alter the assignment afterwards.)  Reviewer preferences, if any, are shown as “P#”.");
     $assignset->report_errors();
     $assignset->echo_unparse_display();
     // print preference unhappiness
     if ($Qreq->profile && $this->atype_review) {
         $umap = $this->autoassigner->pc_unhappiness();
         sort($umap);
         echo '<p style="font-size:65%">Preference unhappiness: ';
         $usum = 0;
         foreach ($umap as $u) {
             $usum += $u;
         }
         if (count($umap) % 2 == 0) {
             $umedian = ($umap[count($umap) / 2 - 1] + $umap[count($umap) / 2]) / 2;
         } else {
             $umedian = $umap[(count($umap) - 1) / 2];
         }
         echo 'mean ', sprintf("%.2f", $usum / count($umap)), ', min ', $umap[0], ', 10% ', $umap[(int) (count($umap) * 0.1)], ', 25% ', $umap[(int) (count($umap) * 0.25)], ', median ', $umedian, ', 75% ', $umap[(int) (count($umap) * 0.75)], ', 90% ', $umap[(int) (count($umap) * 0.9)], ', max ', $umap[count($umap) - 1], '<br/>Time: ', sprintf("%.6f", microtime(true) - $this->start_at);
         foreach ($this->autoassigner->profile as $name => $time) {
             echo ', ', sprintf("%s %.6f", htmlspecialchars($name), $time);
         }
         echo '</p>';
     }
     echo "<div class='g'></div>", "<div class='aahc'><div class='aa'>\n", Ht::submit("submit", "Apply changes"), "\n&nbsp;", Ht::submit("download", "Download assignment file"), "\n&nbsp;", Ht::submit("cancel", "Cancel"), "\n";
     foreach (array("t", "q", "a", "revtype", "revaddtype", "revpctype", "cleartype", "revct", "revaddct", "revpcct", "pctyp", "balance", "badpairs", "rev_roundtag", "method", "haspap") as $t) {
         if (isset($Qreq[$t])) {
             echo Ht::hidden($t, $Qreq[$t]);
         }
     }
     echo Ht::hidden("pcs", join(" ", array_keys($pcsel))), join("", $badpairs_inputs), Ht::hidden("p", join(" ", $SSel->selection())), "\n";
     // save the assignment
     echo Ht::hidden("assignment", join("\n", $assignments)), "\n";
     echo "</div></div></div></form>";
     return ob_get_clean();
 }
开发者ID:vaskevich,项目名称:nu-admissions-review,代码行数:58,代码来源:autoassign.php

示例2: requestReviewChecks

function requestReviewChecks($themHtml, $reqId)
{
    global $Me, $prow;
    // check for outstanding review request
    $result = Dbl::qe_raw("select reviewId, firstName, lastName, email, password from PaperReview join ContactInfo on (ContactInfo.contactId=PaperReview.requestedBy) where paperId={$prow->paperId} and PaperReview.contactId={$reqId}");
    if (!$result) {
        return false;
    } else {
        if ($row = edb_orow($result)) {
            return Conf::msg_error(Text::user_html($row) . " has already requested a review from {$themHtml}.");
        }
    }
    // check for outstanding refusal to review
    $result = Dbl::qe_raw("select paperId, '<conflict>' from PaperConflict where paperId={$prow->paperId} and contactId={$reqId} union select paperId, reason from PaperReviewRefused where paperId={$prow->paperId} and contactId={$reqId}");
    if (edb_nrows($result) > 0) {
        $row = edb_row($result);
        if ($row[1] === "<conflict>") {
            return Conf::msg_error("{$themHtml} has a conflict registered with paper #{$prow->paperId} and cannot be asked to review it.");
        } else {
            if ($Me->override_deadlines($prow)) {
                Conf::msg_info("Overriding previous refusal to review paper #{$prow->paperId}." . ($row[1] ? "  (Their reason was “" . htmlspecialchars($row[1]) . "”.)" : ""));
                Dbl::qe_raw("delete from PaperReviewRefused where paperId={$prow->paperId} and contactId={$reqId}");
            } else {
                return Conf::msg_error("{$themHtml} refused a previous request to review paper #{$prow->paperId}." . ($row[1] ? " (Their reason was “" . htmlspecialchars($row[1]) . "”.)" : "") . ($Me->allow_administer($prow) ? " As an administrator, you can override this refusal with the “Override...” checkbox." : ""));
            }
        }
    }
    return true;
}
开发者ID:vaskevich,项目名称:nu-admissions-review,代码行数:29,代码来源:assign.php

示例3: compile_combine_functions

 public function compile_combine_functions(Contact $contact)
 {
     $this->check();
     $state = new FormulaCompiler($contact);
     $this->_parse && $this->_parse->compile_fragments($state);
     $t = self::compile_body($contact, $state, null);
     if (count($state->fragments) == 1) {
         $t .= "  return " . $state->fragments[0] . ";\n";
     } else {
         $t .= "  return [" . join(", ", $state->fragments) . "];\n";
     }
     $args = '$prow, $rrow_cid, $contact, $format = 0, $forceShow = false';
     self::DEBUG && Conf::msg_info(Ht::pre_text("function ({$args}) {\n  // fragments " . simplify_whitespace($this->expression) . "\n  {$t}}\n"));
     $outf = create_function($args, $t);
     // regroup function
     $state->clear();
     $state->combining = 0;
     $expr = $this->_parse ? $this->_parse->compile($state) : "0";
     $t = self::compile_body(null, $state, $expr);
     $args = '$groups, $format = null, $forceShow = false';
     self::DEBUG && Conf::msg_info(Ht::pre_text("function ({$args}) {\n  // combine " . simplify_whitespace($this->expression) . "\n  {$t}}\n"));
     $inf = create_function($args, $t);
     return [$outf, $inf];
 }
开发者ID:vaskevich,项目名称:nu-admissions-review,代码行数:24,代码来源:formula.php


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