handle = function() { global $myUser, $contest; DB::query("delete from contests_registrants where username = '{$myUser['username']}' and contest_id = {$contest['id']}"); updateContestPlayerNum($contest); }; $unregister_form->submit_button_config['class_str'] = 'btn btn-danger btn-xs'; $unregister_form->submit_button_config['text'] = '取消报名'; $unregister_form->succ_href = "/contests"; $unregister_form->runAtServer(); } } ?>

printHTML(); ?>
已报名
当前尚未报名,您可以报名
#'.UOJLocale::get('username').'remote_addr'; $ip_owner = array(); foreach (DB::selectAll("select * from contests_registrants where contest_id = {$contest['id']} order by username desc") as $reg) { $user = queryUser($reg['username']); $ip_owner[$user['remote_addr']] = $reg['username']; } } else { $header_row = '#'.UOJLocale::get('username').''; } echoLongTable(array('*'), 'contests_registrants', "contest_id = {$contest['id']}", 'order by username desc', $header_row, function($contest, $num) { global $myUser; global $show_ip, $ip_owner; $user = queryUser($contest['username']); $user_link = getUserLink($contest['username']); if (!$show_ip) { echo ''; } else { if ($ip_owner[$user['remote_addr']] != $user['username']) { echo ''; } else { echo ''; } } echo ''.$num.''; echo ''.$user_link.''; if ($show_ip) { echo ''.$user['remote_addr'].''; } echo ''; }, array('page_len' => 100, 'get_row_index' => '', 'print_after_table' => function() { } ) ); ?>