1 Star 3 Fork 2

mojie126/HDCN-PT

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
freeleech.php 3.97 KB
一键复制 编辑 原始数据 按行查看 历史
mojie126 提交于 2015-01-20 15:00 . 全站促销也增加RatioLess模式
<?php
require "include/bittorrent.php";
dbconn();
loggedinorreturn();
require_once(get_langfile_path());
if (get_user_class() < UC_ADMINISTRATOR)
stderr("错误", "权限不足");
if (!empty($_POST['globaltime'])) {
sql_query("UPDATE torrents_state SET global_endfree = '" . $_POST['globaltime'] . "'");
stderr('成功', '全局促销时效到 ' . $_POST['globaltime'] . '');
}
$action = isset($_POST['action']) ? htmlspecialchars($_POST['action']) : (isset($_GET['action']) ? htmlspecialchars($_GET['action']) : 'main');
if ($action == 'setallfree') {
sql_query("UPDATE torrents_state SET global_sp_state = 2");
$Cache->delete_value('global_promotion_state');
stderr('成功', '所有种子均设为Free');
} elseif ($action == 'setall2up') {
sql_query("UPDATE torrents_state SET global_sp_state = 3");
$Cache->delete_value('global_promotion_state');
stderr('成功', '所有种子均设为2x');
} elseif ($action == 'setall2up_free') {
sql_query("UPDATE torrents_state SET global_sp_state = 4");
$Cache->delete_value('global_promotion_state');
stderr('成功', '所有种子均设为2xFree');
} elseif ($action == 'setallhalf_down') {
sql_query("UPDATE torrents_state SET global_sp_state = 5");
$Cache->delete_value('global_promotion_state');
stderr('成功', '所有种子均设为50%');
} elseif ($action == 'setall2up_half_down') {
sql_query("UPDATE torrents_state SET global_sp_state = 6");
$Cache->delete_value('global_promotion_state');
stderr('成功', '所有种子均设为2x50%');
} elseif ($action == 'setall30_down') {
sql_query("UPDATE torrents_state SET global_sp_state = 7");
$Cache->delete_value('global_promotion_state');
stderr('成功', '所有种子均设为30%');
} elseif ($action == 'setallnormal') {
sql_query("UPDATE torrents_state SET global_sp_state = 1");
$Cache->delete_value('global_promotion_state');
stderr('成功', '所有种子均设正常');
} elseif ($action == 'main') {
if ($ratioless == 'no') {
stderr(
$lang_freeleech['head_freeleech'], $lang_freeleech['text_free'] . ' <a class=altlink href=freeleech.php?action=setallfree>' . $lang_freeleech['text_go'] . '</a><hr>' .
$lang_freeleech['text_2xup'] . ' <a class=altlink href=freeleech.php?action=setall2up>' . $lang_freeleech['text_go'] . '</a><hr>' .
$lang_freeleech['text_2xup_free'] . ' <a class=altlink href=freeleech.php?action=setall2up_free>' . $lang_freeleech['text_go'] . '</a><hr>' .
$lang_freeleech['text_halfdown'] . '<a class=altlink href=freeleech.php?action=setallhalf_down>' . $lang_freeleech['text_go'] . '</a><hr>' .
$lang_freeleech['text_2xup_halfdown'] . '<a class=altlink href=freeleech.php?action=setall2up_half_down>' . $lang_freeleech['text_go'] . '</a><hr>' .
$lang_freeleech['text_30down'] . '<a class=altlink href=freeleech.php?action=setall30_down>' . $lang_freeleech['text_go'] . '</a><hr>' .
$lang_freeleech['text_normal'] . '<a class=altlink href=freeleech.php?action=setallnormal>' . $lang_freeleech['text_go'] . '</a><hr>' .
"<form method=post>全局促销时效:" . "<input type=text id=globaltime name=globaltime style=\"width: 150px\" class=\"Wdate\" onfocus='WdatePicker({dateFmt: \"yyyy-MM-dd HH:mm:ss\", isShowWeek: \"true\", minDate: \"%y-%M-%d %H:%m:%s\"})' value=\"" . date("Y-m-d H:i:s", time() + 86400 * 1) . "\" /><i>(默认 1 天)</i><input type=submit name=submit value='提交(只需点击一次)' /></form>"
, false
);
} else {
stderr(
$lang_freeleech['head_freeleech'], $lang_freeleech['text_2xup'] . ' <a class=altlink href=freeleech.php?action=setall2up>' . $lang_freeleech['text_go'] . '</a><hr>' .
"<form method=post>全局促销时效:" . "<input type=text id=globaltime name=globaltime style=\"width: 150px\" class=\"Wdate\" onfocus='WdatePicker({dateFmt: \"yyyy-MM-dd HH:mm:ss\", isShowWeek: \"true\", minDate: \"%y-%M-%d %H:%m:%s\"})' value=\"" . date("Y-m-d H:i:s", time() + 86400 * 1) . "\" /><i>(默认 1 天)</i><input type=submit name=submit value='提交(只需点击一次)' /></form>"
, false
);
}
}
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
PHP
1
https://gitee.com/mojie126/HDCN-PT.git
git@gitee.com:mojie126/HDCN-PT.git
mojie126
HDCN-PT
HDCN-PT
master

搜索帮助