插件拦截
// 检查操作是否短时间内重复
function topicadmin_check() {
global $_G;
if ($_POST && $_GET['modsubmit'] == 'yes') {
if ($_GET['warned'] && $_GET['action'] == 'warn') {
foreach($_GET['topiclist'] as $pid) {
$res = DB::fetch_first("select * from pre_forum_warning WHERE pid=".intval($pid).
" and dateline>".(TIMESTAMP - 60));
if ($res) {
showmessage("1分钟内已给该楼层警告,请勿重复提交");
}
}
}
}
}