info['id'] . '">' . $contest->info['name'] . ''; if ($contest->progress() == CONTEST_NOT_STARTED) { $cur_rest_second = $contest->info['start_time']->getTimestamp() - UOJTime::$time_now->getTimestamp(); if ($cur_rest_second < $rest_second) { $upcoming_contest_name = $contest->info['name']; $upcoming_contest_href = '/contest/' . $contest->info['id']; $rest_second = $cur_rest_second; } if ($contest->userHasRegistered(Auth::user())) { $contest_name_link .= '' . UOJLocale::get('contests::registered') . ''; } else { $contest_name_link .= '' . UOJLocale::get('contests::register') . ''; } } elseif ($contest->progress() == CONTEST_IN_PROGRESS) { if ($contest->allowExtraRegistration() && !$contest->userHasRegistered(Auth::user())) { $contest_name_link .= '' . UOJLocale::get('contests::register') . ' (' . UOJLocale::get('contests::in progress') . ')' . ''; } else { $contest_name_link .= '' . UOJLocale::get('contests::in progress') . ''; } } elseif ($contest->progress() == CONTEST_FINISHED) { $contest_name_link .= '' . UOJLocale::get('contests::ended') . ''; } else { if ($contest->basicRule() == 'OI') { if ($contest->progress() == CONTEST_PENDING_FINAL_TEST) { $contest_name_link .= '' . UOJLocale::get('contests::pending final test') . ''; } elseif ($contest->progress() == CONTEST_TESTING) { $contest_name_link .= '' . UOJLocale::get('contests::final testing') . ''; } } elseif ($contest->basicRule() == 'ACM' || $contest->basicRule() == 'IOI') { $contest_name_link .= '' . UOJLocale::get('contests::official results to be announced') . ''; } } $last_hour = round($contest->info['last_min'] / 60, 2); echo '