Example #1
0
<?php

/**
 * @application Automatical Judging System
 * @author deltamaster
 * @copyright Softrank Research Center
 * @version 2.0.0.0
 */
$contest = new contest();
$contestname = $contest->config['contestname'];
$starttime = ProcessTime($contest->config['starttime']);
$endtime = ProcessTime($contest->config['endtime']);
$started = $contest->started();
$ended = $contest->ended();
$timepassed = $contest->timepassed();
$totaltime = $contest->totaltime();
$introduction = $contest->config['introduction'];
$introduction_html = translate($contest->config['introduction']);
Example #2
0
 public function timepassed()
 {
     $start = ProcessTime($this->config['starttime']);
     return time() - $start['time'];
 }
Example #3
0
            showmessage($lang['invalid_operation']);
        }
    }
    $recordset = array();
    $query = $db->query("SELECT * FROM `{$tablepre}view_submit`");
    while ($temprecord = $db->fetch_array($query)) {
        $recordset[$temprecord['id']] = $temprecord;
        $recordset[$temprecord['id']]['problem'] = unserialize(base64_decode($temprecord['problem']));
    }
}
if (submitcheck('settings')) {
    if ($adminid != 1) {
        showmessage($lang['invalid_operation'], 'index.php');
    }
    $inputstarttime = ProcessTime($_POST['config']['starttime']);
    $inputendtime = ProcessTime($_POST['config']['endtime']);
    if (!$inputstarttime || !$inputendtime || $inputstarttime['time'] > $inputendtime['time']) {
        showmessage($lang['end_before_start'], 'admin.php?action=settings');
    }
    if (!VerifyContestName($_POST['config']['contestname'])) {
        showmessage($lang['configure_invalid'], 'admin.php?action=settings');
    }
    foreach ($_POST['config'] as $configname => $configvalue) {
        $query = $db->query("UPDATE `{$tablepre}config` SET `value`='{$configvalue}' WHERE `name`='{$configname}'");
    }
    showmessage($lang['configure_success'], 'admin.php');
}
if ($action == 'announce') {
    if (submitcheck('submitannouncement')) {
        if (!$submituid) {
            $submituid = 0;