-
Notifications
You must be signed in to change notification settings - Fork 50
/
freeleech.php
49 lines (48 loc) · 2.23 KB
/
freeleech.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
<?php
require "include/bittorrent.php";
dbconn();
loggedinorreturn();
if (get_user_class() < UC_ADMINISTRATOR)
stderr("Error", "Permission denied.");
$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('Success','All torrents have been set free..');
}
elseif ($action == 'setall2up')
{
sql_query("UPDATE torrents_state SET global_sp_state = 3");
$Cache->delete_value('global_promotion_state');
stderr('Success','All torrents have been set 2x up..');
}
elseif ($action == 'setall2up_free')
{
sql_query("UPDATE torrents_state SET global_sp_state = 4");
$Cache->delete_value('global_promotion_state');
stderr('Success','All torrents have been set 2x up and free..');
}
elseif ($action == 'setallhalf_down')
{
sql_query("UPDATE torrents_state SET global_sp_state = 5");
$Cache->delete_value('global_promotion_state');
stderr('Success','All torrents have been set half down..');
}
elseif ($action == 'setall2up_half_down')
{
sql_query("UPDATE torrents_state SET global_sp_state = 6");
$Cache->delete_value('global_promotion_state');
stderr('Success','All torrents have been set half down..');
}
elseif ($action == 'setallnormal')
{
sql_query("UPDATE torrents_state SET global_sp_state = 1");
$Cache->delete_value('global_promotion_state');
stderr('Success','All torrents have been set normal..');
}
elseif ($action == 'main')
{
stderr('Select action','Click <a class=altlink href=freeleech.php?action=setallfree>here</a> to set all torrents free.. <br /> Click <a class=altlink href=freeleech.php?action=setall2up>here</a> to set all torrents 2x up..<br /> Click <a class=altlink href=freeleech.php?action=setall2up_free>here</a> to set all torrents 2x up and free.. <br />Click <a class=altlink href=freeleech.php?action=setallhalf_down>here</a> to set all torrents half down..<br />Click <a class=altlink href=freeleech.php?action=setall2up_half_down>here</a> to set all torrents 2x up and half down..<br />Click <a class=altlink href=freeleech.php?action=setallnormal>here</a> to set all torrents normal..', false);
}
?>