fix common undefined constant error

This commit is contained in:
xiaomlove
2021-03-31 03:17:33 +08:00
parent 32dee2d6e3
commit 4e7fb39d90
19 changed files with 91 additions and 91 deletions

View File

@@ -11,15 +11,15 @@ loggedinorreturn();
if (get_user_class() < $staffmem_class)
permissiondenied();
if ($_POST['setdealt']){
$res = sql_query ("SELECT id FROM reports WHERE dealtwith=0 AND id IN (" . implode(", ", $_POST[delreport]) . ")");
$res = sql_query ("SELECT id FROM reports WHERE dealtwith=0 AND id IN (" . implode(", ", $_POST['delreport']) . ")");
while ($arr = mysql_fetch_assoc($res))
sql_query ("UPDATE reports SET dealtwith=1, dealtby = $CURUSER[id] WHERE id = $arr[id]") or sqlerr();
sql_query ("UPDATE reports SET dealtwith=1, dealtby = {$CURUSER['id']} WHERE id = {$arr['id']}") or sqlerr();
$Cache->delete_value('staff_new_report_count');
}
elseif ($_POST['delete']){
$res = sql_query ("SELECT id FROM reports WHERE id IN (" . implode(", ", $_POST[delreport]) . ")");
$res = sql_query ("SELECT id FROM reports WHERE id IN (" . implode(", ", $_POST['delreport']) . ")");
while ($arr = mysql_fetch_assoc($res))
sql_query ("DELETE from reports WHERE id = $arr[id]") or sqlerr();
sql_query ("DELETE from reports WHERE id = {$arr['id']}") or sqlerr();
$Cache->delete_value('staff_new_report_count');
$Cache->delete_value('staff_report_count');
}