CONTEST_IN_PROGRESS) { redirectTo("/contest/{$contest['id']}"); } $confirm_form = new UOJForm('confirm'); $confirm_form->submit_button_config['class_str'] = 'btn btn-primary'; $confirm_form->submit_button_config['margin_class'] = 'mt-3'; $confirm_form->submit_button_config['text'] = '我已核对信息,确认参加比赛'; $confirm_form->handle = function() use ($myUser, $contest) { DB::update("update contests_registrants set has_participated = 1 where username = '{$myUser['username']}' and contest_id = {$contest['id']}"); }; $confirm_form->succ_href = "/contest/{$contest['id']}"; $confirm_form->runAtServer(); ?>
您即将参加比赛 “= $contest['name'] ?>”,请在正式参赛前仔细核对以下比赛信息:
比赛名称 | = $contest['name'] ?> |
参赛选手 | = getUserLink($myUser['username']) ?> |
开始时间 | = $contest['start_time_str'] ?> |
结束时间 | = $contest['end_time_str'] ?> |
比赛赛制 | = $contest['extra_config']['contest_type'] ?: 'OI' ?> |