代码拉取完成,页面将自动刷新
<?php
require_once("include/bittorrent.php");
dbconn();
require_once(get_langfile_path());
require(get_langfile_path("", true));
loggedinorreturn();
if (get_user_class() < $askreseed_class)
permissiondenied();
$reseedid = 0 + $_GET["reseedid"];
$speed = $_GET["speed"]; //0为请求续种,1为请求加速
$res = sql_query("SELECT seeders, last_reseed FROM torrents WHERE id=" . sqlesc($reseedid) . " LIMIT 1") or sqlerr(__FILE__, __LINE__);
$row = mysql_fetch_array($res);
if ($row['seeders'] > 0 && $speed == 0) {
stderr($lang_takereseed['std_error'], $lang_takereseed['std_torrent_not_dead']);
} elseif (strtotime($row['last_reseed']) > (TIMENOW - 900)) {
if ($speed == 0) {
stderr($lang_takereseed['std_error'], $lang_takereseed['std_reseed_sent_recently']);
} elseif ($speed == 1) {
stderr($lang_takereseed['std_error'], $lang_takereseed['std_speed_sent_recently']);
}
} else {
$res = sql_query("SELECT snatched.userid, snatched.torrentid, torrents.name as torrent_name, users.id FROM snatched inner join users on snatched.userid = users.id inner join torrents on snatched.torrentid = torrents.id where snatched.finished = 'Yes' AND snatched.torrentid = $reseedid") or sqlerr();
while ($row = mysql_fetch_assoc($res)) {
if ($speed == 0) {
$rs_subject = $lang_takereseed_target[get_user_lang($row["userid"])]['msg_reseed_request'];
$pn_msg = $lang_takereseed_target[get_user_lang($row["userid"])]['msg_user'] . $CURUSER["username"] . $lang_takereseed_target[get_user_lang($row["userid"])]['msg_ask_reseed'] . "[url=" . get_protocol_prefix() . "$BASEURL/details.php?id=" . $reseedid . "]" . $row["torrent_name"] . "[/url]" . $lang_takereseed_target[get_user_lang($row["userid"])]['msg_thank_you'];
sql_query("INSERT INTO messages (sender, receiver, added, subject, msg) VALUES(0, $row[userid], '" . date("Y-m-d H:i:s") . "'," . sqlesc($rs_subject) . ", " . sqlesc($pn_msg) . ")") or sqlerr(__FILE__, __LINE__);
} elseif ($speed == 1) {
$rs_subject = $lang_takereseed_target[get_user_lang($row["userid"])]['msg_speed_request'];
$pn_msg = $lang_takereseed_target[get_user_lang($row["userid"])]['msg_user'] . $CURUSER["username"] . $lang_takereseed_target[get_user_lang($row["userid"])]['msg_ask_speed'] . "[url=" . get_protocol_prefix() . "$BASEURL/details.php?id=" . $reseedid . "]" . $row["torrent_name"] . "[/url]" . $lang_takereseed_target[get_user_lang($row["userid"])]['msg_thank_you'];
sql_query("INSERT INTO messages (sender, receiver, added, subject, msg) VALUES(0, $row[userid], '" . date("Y-m-d H:i:s") . "'," . sqlesc($rs_subject) . ", " . sqlesc($pn_msg) . ")") or sqlerr(__FILE__, __LINE__);
}
}
sql_query("UPDATE torrents SET last_reseed = " . sqlesc(date("Y-m-d H:i:s")) . " WHERE id=" . sqlesc($reseedid));
if ($speed == 0) {
stdhead($lang_takereseed['head_reseed_request']);
begin_main_frame();
print("<center>" . $lang_takereseed['std_it_worked'] . "</center>");
end_main_frame();
stdfoot();
} elseif ($speed == 1) {
stdhead($lang_takereseed['head_speed_request']);
begin_main_frame();
print("<center>" . $lang_takereseed['std_it_worked_speed'] . "</center>");
end_main_frame();
stdfoot();
}
}
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。