diff --git a/web/app/controllers/problem.php b/web/app/controllers/problem.php
index 3998d72..ef9da45 100644
--- a/web/app/controllers/problem.php
+++ b/web/app/controllers/problem.php
@@ -263,9 +263,9 @@ if (UOJContest::cur()) {
= $problem_content['statement'] ?>
-
-
+
+
= UOJProblem::cur()->queryContent()['remote_content'] ?>
diff --git a/web/app/controllers/problem_statement_manage.php b/web/app/controllers/problem_statement_manage.php
index 723fe58..2cab3d8 100644
--- a/web/app/controllers/problem_statement_manage.php
+++ b/web/app/controllers/problem_statement_manage.php
@@ -157,6 +157,36 @@ if (UOJProblem::info('type') == 'remote') {
redirectTo(UOJProblem::cur()->getUri());
};
$re_crawl_form->runAtServer();
+
+ $convert_local_form = new UOJForm('convert_local');
+ $convert_local_form->handle = function () {
+ DB::update([
+ "update problems",
+ "set", [
+ "type" => 'local',
+ "submission_requirement" => "{}",
+ "extra_config" => "{}",
+ ],
+ "where", [
+ "id" => UOJProblem::info('id'),
+ ],
+ ]);
+
+ DB::update([
+ "update problems_contents",
+ "set", [
+ "remote_content" => '',
+ ],
+ "where", [
+ "id" => UOJProblem::info('id'),
+ ],
+ ]);
+ };
+ $convert_local_form->config['submit_container']['class'] = '';
+ $convert_local_form->config['submit_button']['class'] = 'btn btn-danger';
+ $convert_local_form->config['submit_button']['text'] = '将本题转换为本地题目(不可逆)';
+ $convert_local_form->config['confirm']['text'] = '您真的要*不可逆*地将本题转换为本地题目吗?';
+ $convert_local_form->runAtServer();
}
$view_type_form = new UOJForm('view_type');
@@ -444,6 +474,15 @@ $solution_view_type_form->runAtServer();
printHTML() ?>
+
+