代码拉取完成,页面将自动刷新
<?php
require "include/bittorrent.php";
dbconn();
//Send some headers to keep the user's browser from caching the response.
header("Expires: Mon, 26 Jul 1997 05:00:00 GMT");
header("Last-Modified: " . gmdate("D, d M Y H:i:s") . "GMT");
header("Cache-Control: no-cache, must-revalidate");
header("Pragma: no-cache");
header("Content-Type: text/xml; charset=utf-8");
$torrentid = 0 + $_GET['torrentid'];
if (isset($CURUSER)) {
$res_bookmark = sql_query("SELECT * FROM bookmarks WHERE torrentid=" . sqlesc($torrentid) . " AND userid=" . sqlesc($CURUSER[id]));
if (mysql_num_rows($res_bookmark) == 1) {
sql_query("DELETE FROM bookmarks WHERE torrentid=" . sqlesc($torrentid) . " AND userid=" . sqlesc($CURUSER['id'])) or sqlerr(__FILE__, __LINE__);
$Cache->delete_value('user_' . $CURUSER['id'] . '_bookmark_array');
echo "deleted";
} else {
sql_query("INSERT INTO bookmarks (torrentid, userid) VALUES (" . sqlesc($torrentid) . "," . sqlesc($CURUSER['id']) . ")") or sqlerr(__FILE__, __LINE__);
$Cache->delete_value('user_' . $CURUSER['id'] . '_bookmark_array');
echo "added";
}
} else
echo "failed";
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。