{$contest['name']} EOD; genMoreContestInfo($contest); if ($contest['cur_progress'] == CONTEST_NOT_STARTED) { $cur_rest_second = $contest['start_time']->getTimestamp() - UOJTime::$time_now->getTimestamp(); if ($cur_rest_second < $rest_second) { $upcoming_contest_name = $contest['name']; $upcoming_contest_href = "/contest/{$contest['id']}"; $rest_second = $cur_rest_second; } if ($myUser != null && hasRegistered($myUser, $contest)) { $contest_name_link .= ''.UOJLocale::get('contests::registered').''; } else { $contest_name_link .= ''.UOJLocale::get('contests::register').''; } } elseif ($contest['cur_progress'] == CONTEST_IN_PROGRESS) { $contest_name_link .= ''.UOJLocale::get('contests::in progress').''; } elseif ($contest['cur_progress'] == CONTEST_PENDING_FINAL_TEST) { $contest_name_link .= ''.UOJLocale::get('contests::pending final test').''; } elseif ($contest['cur_progress'] == CONTEST_TESTING) { $contest_name_link .= ''.UOJLocale::get('contests::final testing').''; } elseif ($contest['cur_progress'] == CONTEST_FINISHED) { $contest_name_link .= ''.UOJLocale::get('contests::ended').''; } $last_hour = round($contest['last_min'] / 60, 2); $click_zan_block = getClickZanBlock('C', $contest['id'], $contest['zan']); echo ''; echo '', $contest_name_link, ''; echo '', ''.$contest['start_time_str'].'', ''; echo '', UOJLocale::get('hours', $last_hour), ''; echo '', ' ×'.$contest['player_num'].'', ''; echo '', '
'.$click_zan_block.'
', ''; echo ''; } ?>

'; $table_header .= ''.UOJLocale::get('contests::contest name').''; $table_header .= ''.UOJLocale::get('contests::start time').''; $table_header .= ''.UOJLocale::get('contests::duration').''; $table_header .= ''.UOJLocale::get('contests::the number of registrants').''; $table_header .= ''.UOJLocale::get('appraisal').''; $table_header .= ''; echoLongTable(array('*'), 'contests', "status != 'finished'", 'order by id desc', $table_header, echoContest, array('page_len' => 100) ); if ($rest_second <= 86400) { $notification = json_encode($upcoming_contest_name . "已经开始了。是否要跳转到比赛页面?"); echo <<
$upcoming_contest_name 倒计时
EOD; } ?>

100, 'print_after_table' => function() { global $myUser; if (isSuperUser($myUser)) { echo '
'; echo ''.UOJLocale::get('contests::add new contest').''; echo '
'; } } ) ); ?>