Hey,someone have freeleech mod for TBDev,i mean mod who allow set all torrents to freeleech and then if need back to normal,a have freeleech mod: i go to freeleech and input the torrent ID then torrent are freeleech,but this mod:
PHP Code:
<?
ob_start("ob_gzhandler");
require "include/bittorrent.php";
dbconn();
loggedinorreturn();
if (get_user_class() < UC_THRUST)
{
stderr("Error", "Access denied.");
}
if ($HTTP_SERVER_VARS["REQUEST_METHOD"] == "POST")
{
if ($HTTP_POST_VARS["setto"] == "")
{
stderr("Error", "Missing form data.");
}
$what=$HTTP_POST_VARS["setto"];
$condition=$HTTP_POST_VARS["condition"];
$size=$HTTP_POST_VARS["size"];
switch( $what )
{
case 1 : // Freeleech
$freeleech='yes';
break;
case 2 : // Normal
$freeleech='no';
break;
default : stderr("Error", "Please choose if free or not free!");
}
switch($condition)
{
case 0 : $condition="";
break;
case 1 : $condition="=";
break;
case 2 : $condition="<";
break;
case 3 : $condition="<=";
break;
case 4 : $condition=">";
break;
case 5 : $condition=">=";
break;
}
if ( $condition )
{
switch( $size )
{
case 0 : $size="";
$condition="";
break;
case 1 : $size=524288000;
break;
case 2 : $size=1073741824;
break;
case 3 : $size=2*1073741824;
break;
case 4 : $size=3*1073741824;
break;
case 5 : $size=4*1073741824;
break;
case 6 : $size=6*1073741824;
break;
case 7 : $size=8*1073741824;
break;
}
}
if ( $condition && $size )
{
$where = " where size ".$condition." ".$size;
}
mysql_query("UPDATE torrents SET freeleech= '1' AND free=".sqlesc($freeleech).$where) or sqlerr(__FILE__, __LINE__);
header("Location: browse.php");
die;
}
stdhead("Change all torrents");
?>
<h1>Set All Torrents to Free Leech or Normal.Just Click FreeLeech and click ok.Leave the other to as N/A</h1>
<form method=post action=setfreeleech.php>
<table border=1 cellspacing=0 cellpadding=5>
<tr>
<td class=rowhead>What?</td>
<td>
<select name=setto>
<option value="0">---- Please Choose ----</option>
<option value="1">Freeleech</option>
<option value="2">Normal</option>
</select>
<select name=condition>
<option value="0">N/A</option>
<option value="1">Equal</option>
<option value="2">Less</option>
<option value="3">Less or equal</option>
<option value="4">More than</option>
<option value="5">More or equal</option>
</select>
<select name=size>
<option value="0">N/A</option>
<option value="1">500MB</option>
<option value="2">1GB</option>
<option value="3">2GB</option>
<option value="4">3GB</option>
<option value="5">4GB</option>
<option value="6">6GB</option>
<option value="7">8GB</option>
</select>
</td>
</tr>
<tr><td colspan=2 align=center><input type=submit value="Okay" class=btn></td></tr>
</table>
</form>
<?
stdfoot();
?>
don't work for me! I set all to free leech but nothing happen,me redir. to browse.php but nothing action.. :unknown: