2024-10-10

This commit is contained in:
2024-10-10 12:56:56 +08:00
commit 7b347c848a
2648 changed files with 643965 additions and 0 deletions

47
web/swadmin/setmsg.php Normal file
View File

@@ -0,0 +1,47 @@
<?php
require_once("admin-header.php");
if(!(isset($_SESSION[$OJ_NAME.'_'.'administrator']))){
echo "<a href='../loginpage.php'>Please Login First!</a>";
exit(1);
}
echo "<hr>";
echo "<center><h3>$MSG_SETMESSAGE</h3></center>";
if(isset($_POST['do'])){
require_once("../include/check_post_key.php");
@mkdir("../admin/msg");
$fp = fopen($OJ_SAE?"saestor://web/msg.txt":"../admin/msg/$domain.txt","w");
$msg = $_POST['msg'];
$msg = str_replace("<p>", "", $msg);
$msg = str_replace("</p>", "<br />", $msg);
$msg = str_replace(",", "&#44;", $msg);
if(false){
$title = stripslashes($title);
}
$msg = RemoveXSS($msg);
fputs($fp,$msg);
fclose($fp);
echo "Update At ".date('Y-m-d h:i:s');
}
$msg = file_get_contents($OJ_SAE?"saestor://web/msg.txt":"msg.txt");
include("kindeditor.php");
?>
<div class="container">
<form action='setmsg.php' method='post'>
<textarea name='msg' rows=25 class="kindeditor" ><?php echo $msg?></textarea><br>
<input type='hidden' name='do' value='do'>
<center><input type='submit' value='Save'></center>
如果升级无法修改公告发送“修改公告”到微信公众号onlinejudge看解决方案。<br>
if this does not work, try run "sudo chown -R www-data /home/judge/src/web " in terminal.
<?php require_once("../include/set_post_key.php");?>
</form>
</div>
<?php require_once('../oj-footer.php'); ?>