handle = function() { global $hack; DB::query("delete from hacks where id = {$hack['id']}"); }; $delete_form->submit_button_config['class_str'] = 'btn btn-danger'; $delete_form->submit_button_config['text'] = '删除此Hack'; $delete_form->submit_button_config['align'] = 'right'; $delete_form->submit_button_config['smart_confirm'] = ''; $delete_form->succ_href = "/hacks"; $delete_form->runAtServer(); } $should_show_content = hasViewPermission($problem_extra_config['view_content_type'], $myUser, $problem, $submission); $should_show_all_details = hasViewPermission($problem_extra_config['view_all_details_type'], $myUser, $problem, $submission); $should_show_details = hasViewPermission($problem_extra_config['view_details_type'], $myUser, $problem, $submission); $should_show_details_to_me = isSuperUser($myUser); if ($hack['success'] === null) { $should_show_all_details = false; } if (!isSubmissionFullVisibleToUser($submission, $contest, $problem, $myUser) || !isHackFullVisibleToUser($hack, $contest, $problem, $myUser)) { $should_show_content = $should_show_all_details = false; } if ($should_show_all_details) { $styler = new HackDetailsStyler(); if (!$should_show_details) { $styler->fade_all_details = true; $styler->show_small_tip = false; } } ?>