Exemplo n.º 1
0
 if ($i == 0 && $row['result'] < 4) {
     $last = $row['solution_id'];
 }
 if ($top == -1) {
     $top = $row['solution_id'];
 }
 $bottom = $row['solution_id'];
 $flag = !is_running(intval($row['contest_id'])) || isset($_SESSION['source_browser']) || $_SESSION['U']->getAut() == "admin" || !strcmp($row['user_id'], $_SESSION['U']->getU_id());
 $cnt = 1 - $cnt;
 $view_status[$i][0] = $row['solution_id'];
 if ($row['contest_id'] > 0) {
     $view_status[$i][1] = "<a href='contestrank.php?cid=" . $row['contest_id'] . "&user_id=" . $row['user_id'] . "#" . $row['user_id'] . "'>" . $row['user_id'] . "</a>";
 } else {
     $view_status[$i][1] = "<a id=\"blue\">" . $row['user_id'] . "</a>";
 }
 $turnedid = turnid($row['problem_id']);
 $view_status[$i][2] = "<div class=center><a href='problem.php?id=" . $row['problem_id'] . "'>" . $turnedid . "</a></div>";
 if (intval($row['result']) == 11 && ($row['user_id'] == $_SESSION['U']->getU_id() || isset($_SESSION['source_browser']))) {
     $view_status[$i][3] = "<a href='ceinfo.php?sid=" . $row['solution_id'] . "' class='" . $judge_color[$row['result']] . "'>" . $MSG_Compile_Click . "</a>";
 } else {
     if ((intval($row['result']) == 6 || $row['result'] == 10 || $row['result'] == 13) && ($row['user_id'] == $_SESSION['U']->getU_id() || isset($_SESSION['source_browser']))) {
         $view_status[$i][3] = "<a href='reinfo.php?sid=" . $row['solution_id'] . "' class='" . $judge_color[$row['result']] . "'>" . $judge_result[$row['result']] . "</a>";
     } else {
         if (!$lock || $lock_time > $row['in_date'] || $row['user_id'] == $_SESSION['U']->getU_id()) {
             if ($OJ_SIM && $row['sim'] > 80 && $row['sim_s_id'] != $row['s_id']) {
                 $view_status[$i][3] = "<span class='" . $judge_color[$row['result']] . "'>*" . $judge_result[$row['result']] . "</span>";
                 if (isset($_SESSION['source_browser'])) {
                     $view_status[$i][3] .= "<a href=comparesource.php?left=" . $row['sim_s_id'] . "&right=" . $row['solution_id'] . "  class='btn btn-info'  target=original>" . $row['sim_s_id'] . "(" . $row['sim'] . "%)</a>";
                 } else {
                     $view_status[$i][3] .= "<span class='btn btn-info'>" . $row['sim_s_id'] . "</span>";
                 }
Exemplo n.º 2
0
<script src="include/checksource.js">

</script>
<form action="inc/submit.php" method="post" 
<?php 
if ($OJ_LANG == "cn") {
    ?>
 onsubmit="return checksource(document.getElementById('source').value);"
<?php 
}
?>
 
 >
<?php 
if (isset($id)) {
    $turnedid = turnid($id);
    ?>
<span style="color:red;">
Problem <b><?php 
    echo $turnedid;
    ?>
</b></span><br>
<input type='hidden' value='<?php 
    echo $id;
    ?>
' name="id">
<?php 
} else {
    $PID = "ABCDEFGHIJKLMNOPQRSTUVWXYZ";
    if ($pid > 25) {
        $pid = 25;