CONTEST_IN_PROGRESS) { redirectTo("/contest/{$contest['id']}"); } $register_form = new UOJForm('register'); $register_form->handle = function() use ($myUser, $contest) { DB::query("replace into contests_registrants (username, contest_id, has_participated) values ('{$myUser['username']}', {$contest['id']}, 0)"); updateContestPlayerNum($contest); }; $register_form->submit_button_config['class_str'] = 'btn btn-primary'; $register_form->submit_button_config['text'] = '我已阅读规则,确认报名比赛'; if ($contest['cur_progress'] == CONTEST_IN_PROGRESS) { $register_form->succ_href = "/contest/{$contest['id']}/confirm"; } else { $register_form->succ_href = "/contests"; } $register_form->runAtServer(); ?>
您即将报名比赛 “= $contest['name'] ?>”,请在报名前仔细阅读以下比赛规则: