1 Star 3 Fork 2

mojie126/HDCN-PT

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
thanks.php 873 Bytes
一键复制 编辑 原始数据 按行查看 历史
<?php
require_once("include/bittorrent.php");
dbconn();
loggedinorreturn();
if ($_GET['id'])
stderr("派对结束了!", "这一招不管用了,你需要点击按钮!");
$userid = 0 + $CURUSER["id"];
$torrentid = 0 + $_POST["id"];
$arr = mysql_fetch_array(sql_query("SELECT owner FROM torrents where id = $torrentid"));
if (!$arr)
stderr("错误", "不存在的种子");
$torrentowner = $arr['owner'];
$trows = mysql_num_rows(sql_query("SELECT id FROM thanks WHERE torrentid = $torrentid AND userid = $userid"));
if ($trows != 0)
stderr("错误", "已经感谢过了!");
if (isset($userid) && isset($torrentid)) {
$res = sql_query("INSERT INTO thanks (torrentid, userid) VALUES ($torrentid, $userid)");
KPS("+", $saythanks_bonus, $CURUSER['id']); //User gets bonus for saying thanks
KPS("+", $receivethanks_bonus, $torrentowner); //Thanks receiver get bonus
}
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
PHP
1
https://gitee.com/mojie126/HDCN-PT.git
git@gitee.com:mojie126/HDCN-PT.git
mojie126
HDCN-PT
HDCN-PT
master

搜索帮助