Hi
This is an automatism freleeche on the torrent of 8 Go and more which will become freeleech automatically.
NOTE: I add a writing to make it easier for you to add the desired number for your site.
Add before closing your page [color=rgb(184, 49, 47)]?>[/color] [color=rgb(204, 204, 204)]in [/color][color=rgb(251, 160, 38)] ../backend/cleanup.php [/color]
[color=rgb(204, 204, 204)]
To change the number on this line:
[color=rgb(204, 204, 204)]$gigs = [/color][color=rgb(65, 168, 95)]8589934592[/color][color=rgb(204, 204, 204)]; [/color]
This is an automatism freleeche on the torrent of 8 Go and more which will become freeleech automatically.
NOTE: I add a writing to make it easier for you to add the desired number for your site.
Add before closing your page [color=rgb(184, 49, 47)]?>[/color] [color=rgb(204, 204, 204)]in [/color][color=rgb(251, 160, 38)] ../backend/cleanup.php [/color]
[color=rgb(204, 204, 204)]
####################################
# AUTO SET FREELEECH BY SPIRITBLUE #
####################################
// EXAMPLE //
// 1 octet = 8 bits
// 1 ko = 1024 octets, or 8192 bits
// 1 Mo = 1024 Ko, or 1048576 octets, or 8388608 bits
// 1 Go = 1024 Mo, or 1048576 Ko, or 1073741824 octets, or 8589934592 bits
$gigs = 8589934592;
$query = SQL_Query_exec("SELECT `id`, `name` FROM `torrents` WHERE `banned` = 'no' AND `freeleech` = '0' AND `size` >= $gigs");
if (mysqli_num_rows($query) > 0)
{
while ($row = mysqli_fetch_array($query))
{
SQL_Query_exec("UPDATE `torrents` SET `freeleech` = '1' WHERE `id` = '{$row["id"]}'");
write_log("Freeleech added on <a href='torrents-details.php?id={$row["id"]}'>{$row["name"]}</a> because it is bigger than 8gb.");
}
}
##########################
# END AUTO SET FREELEECH #
##########################
[/color]To change the number on this line:
[color=rgb(204, 204, 204)]$gigs = [/color][color=rgb(65, 168, 95)]8589934592[/color][color=rgb(204, 204, 204)]; [/color]

