代码拉取完成,页面将自动刷新
<?php
require "include/bittorrent.php";
if ($_SERVER["REQUEST_METHOD"] != "POST")
stderr("错误", "权限不足");
dbconn();
loggedinorreturn();
checkserver();
if (get_user_class() < UC_SYSOP)
stderr("错误", "权限不足");
$sender_id = ($_POST['sender'] == 'system' ? 0 : (int) $CURUSER['id']);
$dt = sqlesc(date("Y-m-d H:i:s"));
$msg = trim($_POST['msg']);
$amount = $_POST['amount'];
if (!$msg || !$amount)
stderr("错误", "不要留空");
if (!is_numeric($amount))
stderr("错误", "上传量必须为数字");
$updateset = $_POST['clases'];
if (is_array($updateset)) {
foreach ($updateset as $class) {
if (!is_valid_id($class) && $class != 0)
stderr("错误", "不存在的用户组");
}
}else {
if (!is_valid_id($updateset) && $updateset != 0)
stderr("错误", "不存在的用户组");
}
$subject = trim($_POST['subject']);
$query = sql_query("SELECT id FROM users WHERE class IN (" . implode(",", $updateset) . ")");
$amount = sqlesc(getsize_int($amount, "G"));
sql_query("UPDATE users SET uploaded=uploaded + $amount WHERE class IN (" . implode(",", $updateset) . ")") or sqlerr(__FILE__, __LINE__);
while ($dat = mysql_fetch_assoc($query)) {
sql_query("INSERT INTO messages (sender, receiver, added, subject, msg) VALUES ($sender_id, $dat[id], $dt, " . sqlesc($subject) . ", " . sqlesc($msg) . ")") or sqlerr(__FILE__, __LINE__);
}
header("Refresh: 0; url=amountupload.php?sent=1");
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。