本文整理汇总了PHP中Problem::get_val方法的典型用法代码示例。如果您正苦于以下问题:PHP Problem::get_val方法的具体用法?PHP Problem::get_val怎么用?PHP Problem::get_val使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Problem
的用法示例。
在下文中一共展示了Problem::get_val方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: Problem
<?php
include_once 'functions/problems.php';
$pid = convert_str($_GET['pid']);
if ($pid == "") {
$pid = "0";
}
$show_problem = new Problem();
$show_problem->set_problem($pid);
if ($show_problem->is_valid() && $show_problem->get_val("hide") == 0) {
$pagetitle = "Statistics of Problem " . $pid;
} else {
$pagetitle = "Problem Unavailable";
}
include_once "header.php";
include_once "functions/sidebars.php";
?>
<div class="span8">
<h3>Leaderboard of <a href="problem_show.php?pid=<?php
echo $pid;
?>
">Problem <?php
echo $pid;
?>
</a></h3>
<table class="table table-hover table-striped" id="pleader">
<thead>
<tr>
<th width="10%">Rank</th>
<th width="10%">ACs</th>
<th width="10%">Runid</th>
示例2:
<li<?php
echo $prob['lable'] == $label ? " class='active'" : "";
?>
><a href="#problem/<?php
echo $prob['lable'];
?>
"><?php
echo $prob['lable'];
?>
</a></li>
<?php
}
?>
</ul>
<h2 style="text-align:center" class="pagetitle"><?php
echo $label . ". " . $show_problem->get_val("title");
?>
</h2>
<div id="conditions" class="well tcenter">
<?php
if ($show_problem->get_val("ignore_noc") == "0") {
?>
<?php
if ($show_problem->get_val("time_limit") == $show_problem->get_val("case_time_limit")) {
?>
<div class="span6">Time Limit: <?php
echo $show_problem->get_val("time_limit");
?>
ms</div>
<div class="span6">Memory Limit: <?php
echo $show_problem->get_val("memory_limit");
示例3: Problem
</head>
<body>
<?php
include_once 'functions/problems.php';
include_once 'functions/users.php';
include_once 'functions/contests.php';
$cid = convert_str($_GET['cid']);
if (!contest_exist($cid) || $current_user->is_root() == false && !$current_user->match(contest_get_val($cid, "owner"))) {
echo "<h1>You are not allowed to view this page.</h1>";
die;
}
$show_problem = new Problem();
foreach ((array) contest_get_problem_summaries($cid) as $cp) {
$show_problem->set_problem($cp["pid"]);
$html = "<center><h1>" . $cp["lable"] . ". " . $show_problem->get_val("title") . "</h1></center>";
if ($show_problem->get_val("description") != "") {
$html .= latex_content($show_problem->get_val("description"));
}
if ($show_problem->get_val("input") != "") {
$html .= "<h2 style='margin-top:10px'>Input</h2>" . latex_content($show_problem->get_val("input"));
}
if ($show_problem->get_val("output") != "") {
$html .= "<h2 style='margin-top:10px'>Output</h2>" . latex_content($show_problem->get_val("output"));
}
if ($show_problem->get_val("sample_in") != "") {
$html .= "<h2 style='margin-top:10px'>Sample Input</h2>";
if (stristr($show_problem->get_val("sample_in"), '<br') == null && stristr($show_problem->get_val("sample_in"), '<pre') == null && stristr($show_problem->get_val("sample_in"), '<p>') == null) {
$html .= "<pre>" . $show_problem->get_val("sample_in") . "</pre>";
} else {
$html .= $show_problem->get_val("sample_in");
示例4: Problem
<?php
include_once 'functions/problems.php';
$pid = convert_str($_GET['pid']);
if ($pid == "") {
$pid = "0";
}
$show_problem = new Problem();
$show_problem->set_problem($pid);
if ($show_problem->is_valid() && $show_problem->get_val("hide") == 0) {
$pagetitle = "BNUOJ " . $pid . " - " . $show_problem->get_val("title");
} else {
$pagetitle = "Problem Unavailable";
}
$lastlang = $_COOKIE[$config["cookie_prefix"] . "lastlang"];
if ($lastlang == null) {
$lastlang = 1;
}
include_once "header.php";
?>
<div class="span12">
<?php
if (!$show_problem->is_valid() || $show_problem->get_val("hide") == 1 && !$current_user->is_root()) {
?>
<p class="alert alert-error">Problem Unavailable!</p>
<?php
} else {
?>
<div id="showproblem">
<h2 style="text-align:center"><?php
echo $show_problem->get_val("title");