Exemplo n.º 1
0
 $strcolors = "0";
 $run = DBUserRuns($_SESSION["usertable"]["contestnumber"], $_SESSION["usertable"]["usersitenumber"], $_SESSION["usertable"]["usernumber"]);
 for ($i = 0; $i < count($run); $i++) {
     $strtmp .= " <tr>\n";
     $strtmp .= "  <td nowrap>" . $run[$i]["number"] . "</td>\n";
     $strtmp .= "  <td nowrap>" . dateconvminutes($run[$i]["timestamp"]) . "</td>\n";
     $strtmp .= "  <td nowrap>" . $run[$i]["problem"] . "</td>\n";
     $strtmp .= "  <td nowrap>" . $run[$i]["language"] . "</td>\n";
     //  $strtmp .= "  <td nowrap>" . $run[$i]["status"] . "</td>\n";
     if (trim($run[$i]["answer"]) == "") {
         $run[$i]["answer"] = "Not answered yet";
         $strtmp .= "  <td>Not answered yet";
     } else {
         $strtmp .= "  <td>" . $run[$i]["answer"];
         if ($run[$i]['yes'] == 't') {
             $strtmp .= " <img alt=\"" . $run[$i]["colorname"] . "\" width=\"15\" " . "src=\"" . balloonurl($run[$i]["color"]) . "\" />";
             $strcolors .= "\t" . $run[$i]["colorname"] . "\t" . $run[$i]["color"];
         }
     }
     $strtmp .= "</td>\n";
     $strtmp .= "<td nowrap><a href=\"../filedownload.php?" . filedownload($run[$i]["oid"], $run[$i]["filename"]) . "\">";
     $strtmp .= $run[$i]["filename"] . "</a>";
     $strtmp .= "</td>\n";
     $strtmp .= " </tr>\n";
 }
 $strtmp .= "</table>";
 if (count($run) == 0) {
     $strtmp .= "<br><center><b><font color=\"#ff0000\">NO RUNS AVAILABLE</font></b></center>";
 }
 $linesubmission = @file_get_contents($_SESSION["locr"] . $ds . "private" . $ds . 'run-using-command.config');
 if (trim($linesubmission) == '1') {
Exemplo n.º 2
0
        $doslow = false;
        $rn = explode("\t", $strcolors);
        $n = count($rn);
        for ($i = 1; $i < $n - 1; $i++) {
            echo "<img alt=\"" . $rn[$i] . "\" width=\"10\" " . "src=\"" . balloonurl($rn[$i + 1]) . "\" />\n";
            $i++;
        }
    } else {
        unset($strtmp);
    }
}
if ($doslow) {
    $run = DBUserRunsYES($_SESSION["usertable"]["contestnumber"], $_SESSION["usertable"]["usersitenumber"], $_SESSION["usertable"]["usernumber"]);
    $n = count($run);
    for ($i = 0; $i < $n; $i++) {
        echo "<img alt=\"" . $run[$i]["colorname"] . "\" width=\"10\" " . "src=\"" . balloonurl($run[$i]["color"]) . "\" />\n";
    }
}
if (!isset($_SESSION["popuptime"]) || $_SESSION["popuptime"] < time() - 120) {
    $_SESSION["popuptime"] = time();
    if (($st = DBSiteInfo($_SESSION["usertable"]["contestnumber"], $_SESSION["usertable"]["usersitenumber"])) != null) {
        $clar = DBUserClars($_SESSION["usertable"]["contestnumber"], $_SESSION["usertable"]["usersitenumber"], $_SESSION["usertable"]["usernumber"]);
        for ($i = 0; $i < count($clar); $i++) {
            if ($clar[$i]["anstime"] > $_SESSION["usertable"]["userlastlogin"] - $st["sitestartdate"] && $clar[$i]["anstime"] < $st['siteduration'] && trim($clar[$i]["answer"]) != '' && !isset($_SESSION["popups"]['clar' . $i . '-' . $clar[$i]["anstime"]])) {
                $_SESSION["popups"]['clar' . $i . '-' . $clar[$i]["anstime"]] = "(Clar for problem " . $clar[$i]["problem"] . " answered)\n";
            }
        }
        $run = DBUserRuns($_SESSION["usertable"]["contestnumber"], $_SESSION["usertable"]["usersitenumber"], $_SESSION["usertable"]["usernumber"]);
        for ($i = 0; $i < count($run); $i++) {
            if ($run[$i]["anstime"] > $_SESSION["usertable"]["userlastlogin"] - $st["sitestartdate"] && $run[$i]["anstime"] < $st['sitelastmileanswer'] && $run[$i]["ansfake"] != "t" && !isset($_SESSION["popups"]['run' . $i . '-' . $run[$i]["anstime"]])) {
                $_SESSION["popups"]['run' . $i . '-' . $run[$i]["anstime"]] = "(Run " . $run[$i]["number"] . " result: " . $run[$i]["answer"] . ')\\n';
Exemplo n.º 3
0
 //    $strtmp .= "</td>\n";
 //    if(!$detail && $score[$e]["userdesc"]!="")
 //        $strtmp .= "(" . $score[$e]["userdesc"] . ")";
 $strtmp .= "</td>";
 if ($level > 0) {
     if (!$des) {
         $strtmp .= "<td>";
     }
     for ($h = 0; $h < count($pr); $h++) {
         $ee = $pr[$h]["number"];
         if ($detail) {
             if ($des) {
                 $strtmp .= "<td nowrap>";
                 //					$name=$score[$e]["problem"][$ee]["name"];
                 if (isset($score[$e]["problem"][$ee]["solved"]) && $score[$e]["problem"][$ee]["solved"]) {
                     $strtmp .= "<img alt=\"" . $score[$e]["problem"][$ee]["colorname"] . ":\" width=\"18\" " . "src=\"" . balloonurl($score[$e]["problem"][$ee]["color"]) . "\" />";
                 } else {
                     if ($level > 3 && isset($score[$e]["problem"][$ee]["judging"]) && $score[$e]["problem"][$ee]["judging"]) {
                         $strtmp .= "<img alt=\"\" width=\"18\" " . "src=\"{$loc}/images/bigballoontransp-blink.gif\" />\n";
                     } else {
                         $strtmp .= "&nbsp;";
                     }
                 }
             }
             if ($ver && $level < 3) {
                 if (isset($score[$e]["problem"][$ee]["solved"]) && $score[$e]["problem"][$ee]["solved"]) {
                     if ($level == 1) {
                         $strtmp .= "/" . $score[$e]["problem"][$ee]["time"] . "\n";
                     } else {
                         $strtmp .= $score[$e]["problem"][$ee]["count"] . "/" . $score[$e]["problem"][$ee]["time"] . "\n";
                     }
Exemplo n.º 4
0
     continue;
 }
 $anyprinted = true;
 $st = $task[$i]["status"];
 if ($st == "processing" && $task[$i]["staff"] == $_SESSION["usertable"]["usernumber"] && $task[$i]["staffsite"] == $_SESSION["usertable"]["usersitenumber"]) {
     $mine = 1;
 } else {
     $mine = 0;
 }
 echo " <tr>\n";
 echo "  <td nowrap>" . $task[$i]["number"] . "</td>\n";
 echo "  <td nowrap>" . dateconvminutes($task[$i]["timestamp"]) . "</td>\n";
 echo "  <td nowrap>" . $task[$i]["username"] . "(" . $task[$i]["user"] . ") / " . $task[$i]["site"] . "</td>\n";
 echo "  <td>" . $task[$i]["description"];
 if ($task[$i]["color"] != "") {
     echo " <img alt=\"" . $task[$i]["colorname"] . "\" width=\"25\" " . "src=\"" . balloonurl($task[$i]["color"]) . "\" />";
 }
 echo "</td>\n";
 if ($task[$i]["oid"] != null) {
     $msg = "///// " . $task[$i]["username"] . " " . $task[$i]["username"] . " " . $task[$i]["username"] . " " . $task[$i]["username"] . " " . $task[$i]["username"] . " " . $task[$i]["username"];
     echo "  <td nowrap><a href=\"../filedownload.php?" . filedownload($task[$i]["oid"], $task[$i]["filename"]) . "\">" . $task[$i]["filename"] . "</a>";
     echo " <a href=\"#\" class=menu style=\"font-weight:bold\" onClick=\"window.open('../filewindow.php?" . filedownload($task[$i]["oid"], $task[$i]["filename"], $msg) . "', 'Viewx{$i}','width=680,height=600,scrollbars=yes,toolbar=yes," . "resizable=yes')\">view</a>";
     echo "</td>\n";
 } else {
     echo "  <td nowrap>&nbsp;</td>\n";
 }
 if ($mine) {
     $color = "ff7777";
 } else {
     if ($st == "done") {
         $color = "bbbbff";
Exemplo n.º 5
0
    echo "<td>{$val}</td>";
    echo "</tr>";
}
echo "</table></center>";
echo "</td>";
echo "<td><img alt=\"\" src=\"piechart.php?order=1&dados=" . rawurlencode($str) . "\" /></td></tr></table></center>\n";
//----------------------------------------------------------
echo "<br />";
echo "<hr />";
echo "<center><h3>Runs by User and Problem</h3></center>\n";
echo "<center><table border=1>\n";
echo "<tr><td><b><u>Users x Problems</u></b></td>";
reset($d['problem']);
while (list($key, $val) = each($d['problem'])) {
    echo "<td>{$key} ";
    echo "<img alt=\"balloon\" width=\"15\" " . "src=\"" . balloonurl($d['color'][$key]) . "\" />\n";
    echo "</td>";
}
echo "<td>Total</td><td>Accepted</td></tr>\n";
reset($d['username']);
while (list($keya, $vala) = each($d['username'])) {
    $keya = $d['username'][$keya];
    if (isset($d['user'][$keya])) {
        $vala = $d['user'][$keya];
    } else {
        $vala = 0;
    }
    echo "<tr><td>" . $d['userfull'][$keya] . "</td>";
    reset($d['problem']);
    while (list($key, $val) = each($d['problem'])) {
        if (!isset($d['up'][$keya][$key])) {
Exemplo n.º 6
0
      if ($prob[$i]["soloid"] != null) {
        $tx = $prob[$i]["solhash"];
        echo "  <td nowrap><a href=\"../filedownload.php?" . filedownload($prob[$i]["soloid"],$prob[$i]["solfilename"]) ."\">" . 
    	$prob[$i]["solfilename"] . "</a> ".
    	"<img title=\"hash: $tx\" alt=\"$tx\" width=\"25\" src=\"../images/bigballoontransp-hash.png\" />" . 
    	"</td>\n";
      }
      else
        echo "  <td nowrap>&nbsp;</td>\n";
      if ($prob[$i]["timelimit"]!="")
        echo "  <td nowrap>" . $prob[$i]["timelimit"] . "</td>\n";
      else
        echo "  <td nowrap>&nbsp;</td>\n";
    */
    if ($prob[$i]["color"] != "") {
        echo "  <td nowrap>" . $prob[$i]["colorname"] . "<img title=\"" . $prob[$i]["color"] . "\" alt=\"" . $prob[$i]["colorname"] . "\" width=\"25\" src=\"" . balloonurl($prob[$i]["color"]) . "\" /></td>\n";
    } else {
        echo "  <td nowrap>&nbsp;</td>\n";
    }
    echo " </tr>\n";
}
echo "</table>";
if (count($prob) == 0) {
    echo "<br><center><b><font color=\"#ff0000\">NO PROBLEMS DEFINED</font></b></center>";
}
?>

<br><br><center><b>Clicking on a problem number will delete it.<br>
WARNING: deleting a problem will remove EVERYTHING related to it.<br>
It is NOT recommended to change anything while the contest is running.<br>
To import a problem, fill in the following fields.<br>
Exemplo n.º 7
0
<br>
<table width="100%" border=1>
 <tr>
  <td><b>Name</b></td>
  <td><b>Basename</b></td>
  <td><b>Fullname</b></td>
  <td><b>Descfile</b></td>
 </tr>
<?php 
$prob = DBGetProblems($_SESSION["usertable"]["contestnumber"]);
for ($i = 0; $i < count($prob); $i++) {
    echo " <tr>\n";
    //  echo "  <td nowrap>" . $prob[$i]["number"] . "</td>\n";
    echo "  <td nowrap>" . $prob[$i]["problem"];
    if ($prob[$i]["color"] != "") {
        echo " <img alt=\"" . $prob[$i]["colorname"] . "\" width=\"20\" " . "src=\"" . balloonurl($prob[$i]["color"]) . "\" />\n";
    }
    echo "</td>\n";
    echo "  <td nowrap>" . $prob[$i]["basefilename"] . "&nbsp;</td>\n";
    echo "  <td nowrap>" . $prob[$i]["fullname"] . "&nbsp;</td>\n";
    if (isset($prob[$i]["descoid"]) && $prob[$i]["descoid"] != null && isset($prob[$i]["descfilename"])) {
        echo "  <td nowrap><a href=\"../filedownload.php?" . filedownload($prob[$i]["descoid"], $prob[$i]["descfilename"]) . "\">" . basename($prob[$i]["descfilename"]) . "</td>\n";
    } else {
        echo "  <td nowrap>no description file available</td>\n";
    }
    echo " </tr>\n";
}
echo "</table>";
if (count($prob) == 0) {
    echo "<br><center><b><font color=\"#ff0000\">NO PROBLEMS AVAILABLE YET</font></b></center>";
}