{$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['last_min'])).'">'.$contest['start_time_str'].'', ''; echo '', UOJLocale::get('hours', $last_hour), ''; echo '', ''; if (isset($REQUIRE_LIB['bootstrap5'])) { echo ''; } else { echo ''; } echo ' ×'.$contest['player_num'].'', ''; echo '', '
'.$click_zan_block.'
', ''; echo ''; } ?>

'; } else { 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 .= ''; $table_config = array('page_len' => 40); if (isset($REQUIRE_LIB['bootstrap5'])) { $table_config['div_classes'] = array('card', 'mb-3'); $table_config['table_classes'] = array('table', 'uoj-table', 'mb-0', 'text-center'); } echoLongTable(array('*'), 'contests', "status != 'finished'", 'order by start_time desc, id desc', $table_header, echoContest, $table_config ); if ($rest_second <= 86400) { $notification = json_encode($upcoming_contest_name . " 已经开始了。是否要跳转到比赛页面?"); echo <<
$upcoming_contest_name 倒计时
EOD; } ?>