Files
nexusphp/public/takeupdate.php
SPC a80f53d4f4 fix: Change Refresh into Location
If use Refresh, it will not work on some browser and
some protocols (e.g. HTTP/2). So, change Refresh
into Location.

Signed-off-by: SPC <github@spcsky.com>
2025-02-19 20:04:54 +08:00

27 lines
903 B
PHP

<?php
require_once("../include/bittorrent.php");
function bark($msg) {
stdhead();
stdmsg("Failed", $msg);
stdfoot();
exit;
}
dbconn();
loggedinorreturn();
user_can('staffmem', true);
if ($_POST['setdealt']){
$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();
$Cache->delete_value('staff_new_report_count');
}
elseif ($_POST['delete']){
$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();
$Cache->delete_value('staff_new_report_count');
$Cache->delete_value('staff_report_count');
}
header("Location: reports.php");