本文整理汇总了PHP中Problem::is_valid方法的典型用法代码示例。如果您正苦于以下问题:PHP Problem::is_valid方法的具体用法?PHP Problem::is_valid怎么用?PHP Problem::is_valid使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Problem
的用法示例。
在下文中一共展示了Problem::is_valid方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: Problem
if (!contest_started($cid) || !($current_user->is_root() || contest_get_val($cid, "isprivate") == 0 || contest_get_val($cid, "isprivate") == 1 && $current_user->is_in_contest($cid) || contest_get_val($cid, "isprivate") == 2 && contest_get_val($cid, "password") == $_COOKIE[$config["cookie_prefix"] . "contest_pass_{$cid}"])) {
?>
<div class="span12">
<p class="alert alert-error">Problem Unavailable! Or it's a private contest!</p>
</div>
<?php
} else {
?>
<div class="span9">
<?php
$show_problem = new Problem();
$pid = $prob_info["pid"];
$label = $prob_info["lable"];
$show_problem->set_problem($pid);
if (!$show_problem->is_valid()) {
?>
<p class="alert alert-error">Problem Unavailable!</p>
<?php
} else {
?>
<div id="showproblem">
<ul class="nav nav-pills" id="probpagi">
<?php
foreach (contest_get_problem_basic($cid) as $prob) {
?>
<li<?php
echo $prob['lable'] == $label ? " class='active'" : "";
?>
><a href="#problem/<?php
echo $prob['lable'];
示例2: 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>
示例3: 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");