예제 #1
0
파일: u.php 프로젝트: wan-qy/ojseven
function check_time()
{
    $tc = date("his");
    //echo $tc;
    if (date("a") == "pm" && $tc < 120000) {
        $tc += 120000;
    }
    //echo $tc;
    $c_ipf = fopen("conf/cont.conf", "r");
    $cid = fread($c_ipf, 8);
    fclose($c_ipf);
    if (check_stat($cid) != 1) {
        return false;
    }
    if ($tc <= gettl()) {
        return true;
    } else {
        return false;
    }
}
예제 #2
0
파일: cur.php 프로젝트: wan-qy/ojseven
    }
    printf("<td>%02d:%02d:00 %s</td></tr>", $ttl / 10000, $ttl % 10000 / 100, $wx);
}
?>

<?php 
echo "<tr height='30px'>";
echo "<td width='200px'>Judge type</td>\n";
echo "<td>" . $ccfg['judgetype'] . "</td>\n";
echo "</tr>";
?>
</table>

<p style='text-align:left;'>Problem infomation</p>
<table width='100%' style='text-align:center;<?php 
if (check_stat($cid) > 2) {
    echo "display:hidden;'";
}
?>
'>
<?php 
$cfgs = array();
$epid = chr(97 + $ccfg['totprob']);
for ($pi = 'a'; $pi < $epid; ++$pi) {
    $cfgs[$pi] = readcfg("../data/" . $cid . "/" . $pi . ".cfg");
}
echo "<tr style='background-color:#3f3fff;color:white;'><td width='20%'>Problem</td>";
for ($pi = 'a'; $pi < $epid; ++$pi) {
    echo "<td width='20%'>" . $cfgs[$pi]['pid'] . "</td>";
}
echo "</tr>";
예제 #3
0
파일: vs.php 프로젝트: wan-qy/ojseven
                    echo "</pre>";
                    fclose($dipf);
                }
                echo "</td>";
            }
        }
        fclose($ipf);
    } else {
        echo "<tr><td><div style='color: blue;text-align:left;' >Pending</div></td></tr>";
    }
}
?>
</table>

<div style='text-align:left;width:80%;'>
<?php 
echo "<p>Code</p>";
if (check_stat($cid) >= 2 || $_SESSION['signedin'] && ($_SESSION['uid'] == $uid || is_admin($_SESSION['uid']))) {
    printcode($cid, $uid, $pname);
}
?>
</div>

</div>

<?php 
include 'oj-footer.php';
?>
</body>
</html>