1 Star 0 Fork 0

Blood.Cold/nexusphp

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
fastdelete.php 1.87 KB
一键复制 编辑 原始数据 按行查看 历史
xiaomlove 提交于 2020-12-26 01:42 . init
<?php
require_once("include/bittorrent.php");
dbconn();
require_once(get_langfile_path());
require_once(get_langfile_path("",true));
loggedinorreturn();
function bark($msg) {
global $lang_fastdelete;
stdhead();
stdmsg($lang_fastdelete['std_delete_failed'], $msg);
stdfoot();
exit;
}
if (!mkglobal("id"))
bark($lang_fastdelete['std_missing_form_data']);
$id = 0 + $id;
int_check($id);
$sure = $_GET["sure"];
$res = sql_query("SELECT name,owner,seeders,anonymous FROM torrents WHERE id = $id");
$row = mysql_fetch_array($res);
if (!$row)
die();
if (get_user_class() < $torrentmanage_class)
bark($lang_fastdelete['text_no_permission']);
if (!$sure)
{
stderr($lang_fastdelete['std_delete_torrent'], $lang_fastdelete['std_delete_torrent_note']."<a class=altlink href=fastdelete.php?id=$id&sure=1>".$lang_fastdelete['std_here_if_sure'],false);
}
deletetorrent($id);
KPS("-",$uploadtorrent_bonus,$row["owner"]);
if ($row['anonymous'] == 'yes' && $CURUSER["id"] == $row["owner"]) {
write_log("Torrent $id ($row[name]) was deleted by its anonymous uploader",'normal');
} else {
write_log("Torrent $id ($row[name]) was deleted by $CURUSER[username]",'normal');
}
//Send pm to torrent uploader
if ($CURUSER["id"] != $row["owner"]){
$dt = sqlesc(date("Y-m-d H:i:s"));
$subject = sqlesc($lang_fastdelete_target[get_user_lang($row["owner"])]['msg_torrent_deleted']);
$msg = sqlesc($lang_fastdelete_target[get_user_lang($row["owner"])]['msg_the_torrent_you_uploaded'].$row['name'].$lang_fastdelete_target[get_user_lang($row["owner"])]['msg_was_deleted_by']."[url=userdetails.php?id=".$CURUSER['id']."]".$CURUSER['username']."[/url]".$lang_fastdelete_target[get_user_lang($row["owner"])]['msg_blank']);
sql_query("INSERT INTO messages (sender, receiver, subject, added, msg) VALUES(0, $row[owner], $subject, $dt, $msg)") or sqlerr(__FILE__, __LINE__);
}
header("Refresh: 0; url=torrents.php");
?>
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/scruixin_Blood/nexusphp.git
[email protected]:scruixin_Blood/nexusphp.git
scruixin_Blood
nexusphp
nexusphp
master

搜索帮助