代码拉取完成,页面将自动刷新
<?php
session_start();
if(!isset($_SESSION['username'])){
if ($_SESSION['admin']!="1"){
header("Location:login.php");
exit;
}
}
require ("./core/conn.php");
if ($_POST) {
if (get_magic_quotes_gpc()) {
$reply = htmlspecialchars(trim($_POST['reply']));
} else {
$reply = addslashes(htmlspecialchars(trim($_POST['reply'])));
}
// 修改为空时,将修改时间置为空
$replytime = $reply ? time() : 'NULL';
$update_sql = "UPDATE msg SET reply = '$reply', replytime = $replytime WHERE id = $_POST[id]";
if (mysqli_query($conn, $update_sql)) {
exit('<script language="javascript">alert("回复成功!");self.location = "index.php";</script>');
} else {
exit('回复失败:' . mysqli_error() . '[ <a href="javascript:history.back()">返 回</a> ]');
}
}
?>
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。