Example #1
0
File: run.php Project: Zhi2014/cogs
<div class='span6'>
<div class='alert alert-info'>
正在连接评测机...
<?php 
flush();
$free = $Cp->getgds($_POST['judger']);
if (!$free) {
    //$Cp->unlock();
    异常("当前没有空闲的评测机,请稍后重新提交。", 取路径("problem/problem.php?pid={$_POST['pid']}"));
}
$Cp->lock();
$Cp->getdir();
if ($_POST['rejudge'] == 1) {
    $Cp->get_rejudge_src($src);
} else {
    if (!$Cp->getupload()) {
        $Cp->unlock();
        异常("源代码上传失败。请检查文件大小。", 取路径("problem/problem.php?pid={$_POST['pid']}"));
    }
}
?>
<span class='badge badge-info'><?php 
echo $Cp->state['grid'];
?>
</span>
<span class='label label-info'><?php 
echo $Cp->state['name'];
?>
 <?php 
echo $Cp->state['ver'];
?>