From 166945c1e7b4c9336741408c046c6159eece751f Mon Sep 17 00:00:00 2001 From: klarkxy <278370456@qq.com> Date: Sat, 23 Nov 2024 17:27:26 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E9=80=BB=E8=BE=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- web/admin/problem_add_page.php | 410 +++++++++++++++++---------------- web/admin/problem_edit.php | 2 +- 2 files changed, 210 insertions(+), 202 deletions(-) diff --git a/web/admin/problem_add_page.php b/web/admin/problem_add_page.php index 947bda3..30f7c3f 100644 --- a/web/admin/problem_add_page.php +++ b/web/admin/problem_add_page.php @@ -1,220 +1,228 @@ -Please Login First!"; - exit(1); - } +Please Login First!"; + exit(1); +} ?> - + + Problem Add - -

".$MSG_PROBLEM."-".$MSG_ADD."

"; + +

" .$MSG_PROBLEM."-".$MSG_ADD."

+ "; include_once("kindeditor.php") ; $source=pdo_query("select source from problem order by problem_id desc limit 1"); //默认续用最后一次的分类标签 if(!empty($source)&&isset($source[0]))$source=$source[0][0];else $source=""; -?> + ?> -
- -
-
- -

-

- - -
- ".$MSG_TITLE.""?> - -

-

- - sec - - MiB

-

-

- ".$MSG_Description."(<64kB)"?> -
-

-

- ".$MSG_Input."(<64kB)"?> -

-

-

- ".$MSG_Output."(<64kB)"?> -

-

-

- ".$MSG_Sample_Input."(<64kB)"?> -

-

-

- ".$MSG_Sample_Output."(<64kB)"?> -

-

-

- ".$MSG_Test_Input.""?> -
-

-

-

- ".$MSG_Test_Output.""?> -
-

-

-

- ".$MSG_HINT."(<64kB)"?> -

-

-

- ".$MSG_SPJ.""?> - 更多测试数据,在题目添加后补充。
-
- (用于选择判断填空题,用法见hustoj.com)
-

-

- ".$MSG_SOURCE." 用空格分隔".""?> -

-

-

".$MSG_CONTEST.""?> - -

+
-
- - + +
+ + +

+

+ +
- - -
- - + - - + $(document).ready(function () { + // 默认开启预览功能 + // + + // 监听checkbox的点击事件 + $('#preview-toggle').change(function () { + if (this.checked) { + transform(); + } else { + // 假设这里是关闭预览的函数 + untransform(); + } + }); + }); + function untransform() { + console.log("预览关闭"); + // 恢复原始的 #main 元素样式 + let main = $("#main"); + main.addClass("container"); + main.css("width", ""); + main.css("margin-left", ""); + + // 移除预览的 iframe + $("#preview").remove(); + + + // 移除同步事件 + $("input").off('keyup', sync); + $("textarea").off('keyup', sync); + } + + + + + \ No newline at end of file diff --git a/web/admin/problem_edit.php b/web/admin/problem_edit.php index 6cd24a4..886f50d 100644 --- a/web/admin/problem_edit.php +++ b/web/admin/problem_edit.php @@ -61,7 +61,7 @@ include_once("kindeditor.php") ;

".$MSG_Description.""?> -
+