userCanManage(Auth::user()) || UOJResponse::page403(); $managers_form = newAddDelCmdForm( 'managers', 'validateUserAndStoreByUsername', function ($type, $username, &$vdata) { $user = $vdata['user'][$username]; if ($type == '+') { DB::insert([ "insert into problems_permissions", "(problem_id, username)", "values", DB::tuple([UOJProblem::info('id'), $user['username']]) ]); } else if ($type == '-') { DB::delete([ "delete from problems_permissions", "where", [ "problem_id" => UOJProblem::info('id'), "username" => $user['username'] ] ]); } } ); $managers_form->runAtServer(); if (isSuperUser(Auth::user())) { $update_uploader_form = new UOJBs4Form('update_uploader'); $update_uploader_form->addInput( 'new_uploader_username', 'text', '用户名', UOJProblem::info('uploader') ?: 'root', function ($username, &$vdata) { if (!UOJUser::query($username)) { return '用户不存在'; } $vdata['username'] = $username; return ''; }, null ); $update_uploader_form->submit_button_config['align'] = 'compressed'; $update_uploader_form->submit_button_config['text'] = '修改上传者'; $update_uploader_form->submit_button_config['class_str'] = 'mt-2 btn btn-warning'; $update_uploader_form->handle = function (&$vdata) { DB::update([ "update problems", "set", ["uploader" => $vdata['username']], "where", ["id" => UOJProblem::info('id')] ]); }; $update_uploader_form->runAtServer(); } ?>

getTitle() ?> 管理

UOJProblem::info('id')] ]); foreach ($res as $row) { $row_id++; echo '', '', '', ''; } ?>
# 用户名
', $row_id, '', UOJUser::getLink($row['username']), '

命令格式:命令一行一个,+mike表示把mike加入管理者,-mike表示把mike从管理者中移除

printHTML(); ?>
printHTML(); ?>