1 Star 3 Fork 2

mojie126/HDCN-PT

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
takenotice.php 922 Bytes
一键复制 编辑 原始数据 按行查看 历史
<?php
require "include/bittorrent.php";
dbconn();
loggedinorreturn();
checkserver();
if (get_user_class() < $staffmem_class) {
stderr("错误", "权限不足");
}
$username = $CURUSER['username'];
$noticeoff = $_POST['noticeoff'] == '' || $_POST['noticeoff'] == 'yes' ? "yes" : "no";
$notice = $_POST['notice'];
if ($notice == '') {
stderr("错误", "内容不可为空!");
}
$data = date("Y-m-d H:i:s", TIMENOW);
$count = mysql_num_rows(sql_query("SELECT id FROM notice ORDER BY id DESC LIMIT 1"));
if ($count == 0) {
sql_query("INSERT notice (noticeoff, notice, bydata, byuser) VALUES ('$noticeoff', '$notice', '$data', '$username')");
} else {
sql_query("UPDATE notice SET noticeoff = '$noticeoff', notice = '$notice', bydata = '$data', byuser = '$username' ORDER BY id DESC LIMIT 1");
}
write_log("管理员 $username 修改了小公告");
header("Location: " . get_protocol_prefix() . "$BASEURL/notice.php");
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
PHP
1
https://gitee.com/mojie126/HDCN-PT.git
git@gitee.com:mojie126/HDCN-PT.git
mojie126
HDCN-PT
HDCN-PT
master

搜索帮助