handle = function() { global $myUser; DB::query("insert into problems (title, uploader, is_hidden, submission_requirement) values ('New Problem', '{$myUser['username']}', 1, '{}')"); $id = DB::insert_id(); DB::query("insert into problems_contents (id, statement, statement_md) values ($id, '', '')"); dataNewProblem($id); }; $new_problem_form->submit_button_config['align'] = 'right'; $new_problem_form->submit_button_config['class_str'] = 'btn btn-primary'; $new_problem_form->submit_button_config['text'] = UOJLocale::get('problems::add new'); $new_problem_form->submit_button_config['smart_confirm'] = ''; $new_problem_form->runAtServer(); } function echoProblem($problem) { global $myUser, $REQUIRE_LIB; if (isProblemVisibleToUser($problem, $myUser)) { echo '
'.UOJLocale::get('none').' |