Example #1
0
        $uidarr[$totu] = $uid;
        ++$totu;
    }
    fclose($uidpf);
}
if ($ccfg['judgetype'] != 'noiacm' && $ccfg['stat'] == 1 && !is_admin($_SESSION['uid'])) {
    $totu = 1;
    $uidarr[0] = $_SESSION['uid'];
}
if ($ccfg['judgetype'] != "noi") {
    echo "var printtime=1;";
} else {
    echo "var printtime=0;";
}
for ($pi = 'a'; $pi < $epid; ++$pi) {
    $cfgs[$pi] = readcfg("../data/" . $cid . "/" . $pi . ".cfg");
}
for ($ui = 0; $ui < $totu; ++$ui) {
    $uid = $uidarr[$ui];
    //echo "alert('".$uid."');";
    $pn = 0;
    $tots = 0;
    $pscos = array();
    echo "ul[" . $ui . "]={};\n";
    echo "ul[" . $ui . "].uid='" . $uid . "';\n";
    echo "ul[" . $ui . "].a=new Array();\n";
    for ($i = 'a'; $i < $epid; ++$i) {
        echo "ul[" . $ui . "].a[" . $pn . "]={};\n";
        $pprf = '../upload/' . $cid . "/" . $uid . "/" . $pid[$pn];
        if (!$corr) {
            $tfln = "../upload/" . $cid . "/" . $uid . "/" . $i . ".cnt";
Example #2
0
     }
     $cid = read_fline("./conf/cont.conf");
     if (strlen($_POST['etime']) == 5) {
         if (!write_file("./conf/time.conf", $_POST['etime'])) {
             echo "End time error<br/>";
         }
     } else {
         echo "End time not changed<br/>";
     }
     for ($i = 'a'; $i <= 'c'; ++$i) {
         if (strlen($_POST[$i]) > 0) {
             $fln = "../data/" . $_POST['cid'] . "/" . $i . ".cfg";
             if (!is_file($fln)) {
                 write_cfg($cid, $i, $_POST[$i]);
             } else {
                 $pcfg = readcfg($fln);
                 if ($_POST[$i] != $pcfg['pid']) {
                     write_cfg($cid, $i, $_POST[$i]);
                 }
             }
         }
     }
     if (!is_file("../data/" . $_POST['cid'] . "/.contcfg")) {
         write_ccfg($cid);
     }
     include "forms/ccont.php";
     echo "Changed<br/>";
 } else {
     if ($_GET['cmd'] == 'cprob') {
         include "./forms/cprob.php";
     } else {
Example #3
0
    $tc = date("his");
    //echo $tc;
    if (date("a") == "pm" && $tc < 120000) {
        $tc += 120000;
    }
    //echo $tc;
    if ($tc <= gettl()) {
        return true;
    } else {
        return false;
    }
}
$ccfg = readccfg("../data/" . $cid . "/.contcfg");
$pcfgs = array();
for ($i = 0; $i < $ccfg['totprob']; ++$i) {
    $pcfgs[chr($i + 97)] = readcfg("../data/" . $cid . "/" . chr($i + 97) . ".cfg");
}
if (!$corr && !check_time()) {
    header("Location: error.php?word=Out of submit time");
    return;
} else {
    if ($corr) {
        $contd = "../data/" . $cid . "/";
        $stat = $ccfg['stat'];
        if ($stat < 2 && !is_admin($uid)) {
            header("Location: error.php?word=How do you find this page?");
            return;
        }
        $ufid = $uid . "-" . date("Ymdhisa");
        $tmpstr = '../upload/' . $cid;
        if (!is_dir($tmpstr)) {