修改逻辑
This commit is contained in:
@@ -8,6 +8,7 @@
|
|||||||
?>
|
?>
|
||||||
|
|
||||||
<html>
|
<html>
|
||||||
|
|
||||||
<head>
|
<head>
|
||||||
<meta http-equiv="Pragma" content="no-cache">
|
<meta http-equiv="Pragma" content="no-cache">
|
||||||
<meta http-equiv="Cache-Control" content="no-cache">
|
<meta http-equiv="Cache-Control" content="no-cache">
|
||||||
@@ -15,14 +16,15 @@
|
|||||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
|
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
|
||||||
<title>Problem Add</title>
|
<title>Problem Add</title>
|
||||||
</head>
|
</head>
|
||||||
<pre?php
|
<pre?php echo "<center><h3>" .$MSG_PROBLEM."-".$MSG_ADD."</h3>
|
||||||
echo "<center><h3>".$MSG_PROBLEM."-".$MSG_ADD."</h3></center>";
|
</center>";
|
||||||
include_once("kindeditor.php") ;
|
include_once("kindeditor.php") ;
|
||||||
$source=pdo_query("select source from problem order by problem_id desc limit 1"); //默认续用最后一次的分类标签
|
$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="";
|
if(!empty($source)&&isset($source[0]))$source=$source[0][0];else $source="";
|
||||||
?>
|
?>
|
||||||
|
|
||||||
<hr>
|
<hr>
|
||||||
|
|
||||||
<body leftmargin="30">
|
<body leftmargin="30">
|
||||||
<div id="main" class="container">
|
<div id="main" class="container">
|
||||||
<form method=POST action=problem_add.php>
|
<form method=POST action=problem_add.php>
|
||||||
@@ -33,19 +35,22 @@
|
|||||||
<label for="preview-toggle">题目预览</label>
|
<label for="preview-toggle">题目预览</label>
|
||||||
</div>
|
</div>
|
||||||
<?php echo "<h3>" . $MSG_TITLE . "</h3>" ?>
|
<?php echo "<h3>" . $MSG_TITLE . "</h3>" ?>
|
||||||
<input class="input input-large" style="width:100%;" type=text name='title' > <input type=submit value='<?php echo $MSG_SAVE?>' name=submit>
|
<input class="input input-large" style="width:100%;" type=text name='title'> <input type=submit
|
||||||
|
value='<?php echo $MSG_SAVE ?>' name=submit>
|
||||||
</p>
|
</p>
|
||||||
<p align=left>
|
<p align=left>
|
||||||
<?php echo $MSG_Time_Limit ?>
|
<?php echo $MSG_Time_Limit ?>
|
||||||
<input class="input input-mini" type=number min="0.001" max="300" step="0.001" name=time_limit size=20 value=1> sec
|
<input class="input input-mini" type=number min="0.001" max="300" step="0.001" name=time_limit size=20
|
||||||
|
value=1> sec
|
||||||
<?php echo $MSG_Memory_Limit ?>
|
<?php echo $MSG_Memory_Limit ?>
|
||||||
<input class="input input-mini" type=number min="1" max="2048" step="1" name=memory_limit size=20 value=128> MiB<br><br>
|
<input class="input input-mini" type=number min="1" max="2048" step="1" name=memory_limit size=20 value=128>
|
||||||
|
MiB<br><br>
|
||||||
</p>
|
</p>
|
||||||
<p align=left>
|
< align=left>
|
||||||
<?php echo "<h4>" . $MSG_Description . "(<64kB)</h4>" ?>
|
<?php echo "<h4>" . $MSG_Description . "(<64kB)</h4>" ?>
|
||||||
<textarea class="kindeditor" rows=13 name=description cols=80><span class='md auto_select'><pre>
|
<textarea class="kindeditor" rows=13 name=description cols=80><span class='md auto_select'>
|
||||||
<br><br>
|
<br><br>
|
||||||
</pre></span></textarea><br>
|
</span></textarea><br>
|
||||||
</p>
|
</p>
|
||||||
<p align=left>
|
<p align=left>
|
||||||
<?php echo "<h4>" . $MSG_Input . "(<64kB)</h4>" ?>
|
<?php echo "<h4>" . $MSG_Input . "(<64kB)</h4>" ?>
|
||||||
@@ -84,11 +89,13 @@
|
|||||||
<?php echo "<h4>" . $MSG_SPJ . "</h4>" ?>
|
<?php echo "<h4>" . $MSG_SPJ . "</h4>" ?>
|
||||||
<input type=radio name=spj value='0' checked><?php echo $MSG_NJ ?> 更多测试数据,在题目添加后补充。<br>
|
<input type=radio name=spj value='0' checked><?php echo $MSG_NJ ?> 更多测试数据,在题目添加后补充。<br>
|
||||||
<input type=radio name=spj value='1'><?php echo $MSG_SPJ ?> <?php echo "(" . $MSG_HELP_SPJ . ")" ?><br>
|
<input type=radio name=spj value='1'><?php echo $MSG_SPJ ?> <?php echo "(" . $MSG_HELP_SPJ . ")" ?><br>
|
||||||
<input type=radio name=spj value='2' ><?php echo $MSG_RTJ?>(用于选择判断填空题,用法见<a target='_blank' href='http://hustoj.com'>hustoj.com</a>)<br>
|
<input type=radio name=spj value='2'><?php echo $MSG_RTJ ?>(用于选择判断填空题,用法见<a target='_blank'
|
||||||
|
href='http://hustoj.com'>hustoj.com</a>)<br>
|
||||||
</p>
|
</p>
|
||||||
<p align=left>
|
<p align=left>
|
||||||
<?php echo "<h4>" . $MSG_SOURCE . " 用空格分隔" . "</h4>" ?>
|
<?php echo "<h4>" . $MSG_SOURCE . " 用空格分隔" . "</h4>" ?>
|
||||||
<textarea name=source style="width:100%;" rows=1><?php echo htmlentities($source,ENT_QUOTES,'UTF-8') ?></textarea><br><br>
|
<textarea name=source style="width:100%;"
|
||||||
|
rows=1><?php echo htmlentities($source, ENT_QUOTES, 'UTF-8') ?></textarea><br><br>
|
||||||
</p>
|
</p>
|
||||||
<p align=left><?php echo "<h4>" . $MSG_CONTEST . "</h4>" ?>
|
<p align=left><?php echo "<h4>" . $MSG_CONTEST . "</h4>" ?>
|
||||||
<select name=contest_id>
|
<select name=contest_id>
|
||||||
@@ -97,8 +104,7 @@
|
|||||||
$result = pdo_query($sql);
|
$result = pdo_query($sql);
|
||||||
echo "<option value=''>none</option>";
|
echo "<option value=''>none</option>";
|
||||||
if (count($result) == 0) {
|
if (count($result) == 0) {
|
||||||
}
|
} else {
|
||||||
else {
|
|
||||||
foreach ($result as $row) {
|
foreach ($result as $row) {
|
||||||
echo "<option value='{$row['contest_id']}'>{$row['contest_id']} {$row['title']}</option>";
|
echo "<option value='{$row['contest_id']}'>{$row['contest_id']} {$row['title']}</option>";
|
||||||
}
|
}
|
||||||
@@ -186,7 +192,8 @@
|
|||||||
|
|
||||||
$(document).ready(function () {
|
$(document).ready(function () {
|
||||||
// 默认开启预览功能
|
// 默认开启预览功能
|
||||||
// <?php if (!(isset($OJ_OLD_FASHINED) && $OJ_OLD_FASHINED )) echo " transform();" ?>
|
// <?php if (!(isset($OJ_OLD_FASHINED) && $OJ_OLD_FASHINED))
|
||||||
|
echo " transform();" ?>
|
||||||
|
|
||||||
// 监听checkbox的点击事件
|
// 监听checkbox的点击事件
|
||||||
$('#preview-toggle').change(function () {
|
$('#preview-toggle').change(function () {
|
||||||
@@ -217,4 +224,5 @@ function untransform() {
|
|||||||
|
|
||||||
</script>
|
</script>
|
||||||
</body>
|
</body>
|
||||||
|
|
||||||
</html>
|
</html>
|
||||||
@@ -61,7 +61,7 @@ include_once("kindeditor.php") ;
|
|||||||
</p>
|
</p>
|
||||||
<p align=left>
|
<p align=left>
|
||||||
<?php echo "<h4>".$MSG_Description."</h4>"?>
|
<?php echo "<h4>".$MSG_Description."</h4>"?>
|
||||||
<textarea class="kindeditor" rows=13 name=description cols=80><?php echo htmlentities($row['description'],ENT_QUOTES,"UTF-8")?></textarea><br>
|
<textarea class="kindeditor" rows=13 name=description cols=80><?php echo $row['description']?></textarea><br>
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
<p align=left>
|
<p align=left>
|
||||||
|
|||||||
Reference in New Issue
Block a user