コード例 #1
0
ファイル: ccont.php プロジェクト: wan-qy/ojseven
' onchange='clrpname();'/></td>
</tr>

<tr>
<td><label for='etime'> End time(hh:mm) </td>
<td><input type='text' id='etime' name='etime' value='<?php 
echo read_file("./conf/time.conf");
?>
'/></td>
</tr>

<?php 
if ($cid == -1) {
    $cid = read_fline("./conf/cont.conf");
}
$ccfg = readccfg("../data/" . $cid . "/.contcfg");
$eid = chr(97 + $ccfg['totprob']);
for ($i = 'a'; $i < $eid; ++$i) {
    echo "<tr>\n";
    echo "<td><label for='" . $i . "'> Problem " . $i . "</td>\n";
    if (strlen($cid) > 0) {
        echo "<td><input type='text' id='pid" . $i . "' name='" . $i . "'" . " value='" . read_fline("../data/" . $cid . "/" . $i . ".cfg") . "'/></td>";
    } else {
        echo "<td><input type='text' id='" . $i . "' name='" . $i . "'/></td>";
    }
    echo "</tr>";
}
?>
</table>

<input type='submit' value='Submit'/>
コード例 #2
0
ファイル: contests.php プロジェクト: wan-qy/ojseven
echo "<tr style='background-color:#3f3fff;color:white;'><td width='10%'>Index</td><td>Contest</td><td>Status</td><td>Participate</td><td>Problems</td></tr>";
$coli = 1;
for ($ti = 0; $ti < $tot; ++$ti) {
    $contd = $cidl[$ti];
    if (!checkaccess($contd, $_SESSION['uid'])) {
        continue;
    }
    ++$coli;
    if ($coli % 2 == 0) {
        echo "<tr style='background-color:#efffef;color:black;'>";
    } else {
        echo "<tr style='background-color:#efefff;color:black;'>";
    }
    echo "<td>" . ($tot - $ti - 1) . "</td>";
    $cfgfln = "../data/" . $contd . "/.contcfg";
    $curcfg = readccfg($cfgfln);
    echo "<td><a href='cur.php?cid=" . $contd . "'>" . $contd . "</a> </td>";
    if ($curcfg['stat'] == '1') {
        echo "<td><span style='color:red'>Running</span></td>";
    } elseif ($curcfg['stat'] == '2') {
        echo "<td><span style='color:green'>Finished</span></td>";
    } else {
        echo "<td><span style='color:black'>Unknown</span></td>";
    }
    $csu = cntline("../upload/" . $contd . "/uid.list");
    $cco = cntline("../upload/" . $contd . "/cuid.list");
    echo "<td><a href='uc.php?cid=" . $contd . "'>";
    echo "x" . $csu;
    echo "</a></td>";
    echo "<td>" . $curcfg['totprob'] . "</td>";
    echo "</tr>";