-
+
-
+
" type="text" required >
diff --git a/web/admin/privilege_list.php b/web/admin/privilege_list.php
index c56e14c..3b24fb1 100644
--- a/web/admin/privilege_list.php
+++ b/web/admin/privilege_list.php
@@ -72,7 +72,7 @@ if(isset($_GET['keyword']) && $_GET['keyword']!=""){
echo "
".$row['rightstr'];
if($row['valuestr']!="true") echo ":".$row['valuestr'];
echo " ";
- echo "
Delete ";
+ echo "
Delete ";
echo "";
}
?>
diff --git a/web/admin/problem_add.php b/web/admin/problem_add.php
index e677422..0d30065 100644
--- a/web/admin/problem_add.php
+++ b/web/admin/problem_add.php
@@ -12,24 +12,28 @@ require_once ("../include/problem.php");
// contest_id
$title = $_POST['title'];
-$title = str_replace(",", ",", $title);
+// $title = str_replace(",", ",", $title);
+$title = htmlspecialchars_decode($title, ENT_QUOTES, 'UTF-8');
$time_limit = $_POST['time_limit'];
$memory_limit = $_POST['memory_limit'];
$description = $_POST['description'];
//$description = str_replace("
", "", $description);
//$description = str_replace("
", "
", $description);
-$description = str_replace(",", ",", $description);
+// $description = str_replace(",", ",", $description);
+$description = htmlspecialchars_decode($description, ENT_QUOTES, 'UTF-8');
$input = $_POST['input'];
//$input = str_replace("
", "", $input);
//$input = str_replace("
", "
", $input);
-$input = str_replace(",", ",", $input);
+// $input = str_replace(",", ",", $input);
+$input = htmlspecialchars_decode($input, ENT_QUOTES, 'UTF-8');
$output = $_POST['output'];
//$output = str_replace("
", "", $output);
//$output = str_replace("
", "
", $output);
-$output = str_replace(",", ",", $output);
+// $output = str_replace(",", ",", $output);
+$output = htmlspecialchars_decode($output, ENT_QUOTES, 'UTF-8');
$sample_input = $_POST['sample_input'];
$sample_output = $_POST['sample_output'];
@@ -44,7 +48,8 @@ if ($test_output=="") $test_output="\n";
$hint = $_POST['hint'];
//$hint = str_replace("
", "", $hint);
//$hint = str_replace("
", "
", $hint);
-$hint = str_replace(",", ",", $hint);
+// $hint = str_replace(",", ",", $hint);
+$hint = htmlspecialchars_decode($hint, ENT_QUOTES, 'UTF-8');
$source = $_POST['source'];
diff --git a/web/admin/problem_add_loj.php b/web/admin/problem_add_loj.php
index e2e3fd8..293bcd2 100644
--- a/web/admin/problem_add_loj.php
+++ b/web/admin/problem_add_loj.php
@@ -59,11 +59,11 @@ $_SESSION[$OJ_NAME.'_'."p$pid"]=true;
$loj_id=intval($_POST['loj_id']);
//print_r($_POST);
echo "
".$loj_id."
";
-echo htmlentities("wget https://loj.ac/problem/".$loj_id."/testdata/download -O $OJ_DATA/$pid/data.zip");
+echo htmlspecialchars("wget https://loj.ac/problem/".$loj_id."/testdata/download -O $OJ_DATA/$pid/data.zip");
echo system("wget https://loj.ac/problem/".$loj_id."/testdata/download -O $OJ_DATA/$pid/data.zip");
echo system("/home/judge/src/install/ans2out $OJ_DATA/$pid/");
echo "
";
-echo htmlentities("unzip $OJ_DATA/$pid/data.zip -d $OJ_DATA/$pid");
+echo htmlspecialchars("unzip $OJ_DATA/$pid/data.zip -d $OJ_DATA/$pid");
echo system("unzip $OJ_DATA/$pid/data.zip -d $OJ_DATA/$pid");
echo system("/usr/bin/loj.ac $OJ_DATA/$pid");
echo "
";
diff --git a/web/admin/problem_add_page.php b/web/admin/problem_add_page.php
index 5212014..9fc0298 100644
--- a/web/admin/problem_add_page.php
+++ b/web/admin/problem_add_page.php
@@ -90,7 +90,7 @@ if (!(isset($_SESSION[$OJ_NAME . '_' . 'administrator']) || isset($_SESSION[$OJ_
" . $MSG_SOURCE . " 用空格分隔" . "" ?>
+ rows=1>
" . $MSG_CONTEST . "" ?>
diff --git a/web/admin/problem_add_page_bas.php b/web/admin/problem_add_page_bas.php
index d7c9cef..e7f0399 100644
--- a/web/admin/problem_add_page_bas.php
+++ b/web/admin/problem_add_page_bas.php
@@ -94,7 +94,7 @@ Test Output:
Hint:
SpecialJudge: N Y
-Source:
+Source:
contest:
NOW() order by `contest_id`";
diff --git a/web/admin/problem_add_page_hdu.php b/web/admin/problem_add_page_hdu.php
index fe4bc74..fcad87f 100644
--- a/web/admin/problem_add_page_hdu.php
+++ b/web/admin/problem_add_page_hdu.php
@@ -89,7 +89,7 @@ Test Output:
Hint:
SpecialJudge: N Y
-Source:
+Source:
diff --git a/web/admin/problem_add_page_pku.php b/web/admin/problem_add_page_pku.php
index 6359c5a..f5af44e 100644
--- a/web/admin/problem_add_page_pku.php
+++ b/web/admin/problem_add_page_pku.php
@@ -60,7 +60,7 @@ include_once("kindeditor.php") ;
$element=$html->find('pre[class=sio]',1);
$sample_output=$element->innertext;
$element=$html->find('div[class=ptx]',3);
- $hint=htmlentities($element->outertext);
+ $hint=htmlspecialchars($element->outertext);
?>