Bravo List

Bravo List (http://www.bvlist.com/index.php)
-   Template Shares (http://www.bvlist.com/forumdisplay.php?f=26)
-   -   Free leech per user (http://www.bvlist.com/showthread.php?t=9224)

steveny3 8th June 2013 12:11

Free leech per user
 
Im using a ts 3.1 special that ive modded over the years. Ive been trying to add a free leech per user script but just cant get it to work?
This is the section from my announce.php


}else{
$upthis = max(0, $uploaded - $self['uploaded']);
$downthis = max(0, $downloaded - $self['downloaded']);
if ($upthis > 0 || $downthis > 0)
mysql_query('UPDATE users SET uploaded = uploaded + '.$upthis * 1 . ($torrent['free'] == 'no' ? ', downloaded = downloaded + '.$downthis : ''). ' WHERE id='.$userid) or err('Tracker error 3');
}

And I need to add something like below so that $downthis is set to "0" if free leech is set for an individual user. Ive tried for a few days to make it work but cant suss is?: Ive added working script to my details so I can change the value of "$userfree" to "yes" or "no" but cant get the above code to change the value of "$downthis" to give a "0" when $userfree is set to "yes" Ive tried adding below script just below if ($upthis > 0 || $downthis > 0) and everywhere else but cant get it to work?


if ($az["userfree"] == "no")
$downthis = max(0, $downloaded - $self["downloaded"]);
else
$downthis = 0;

I would really appreciate some help to make this work and will be happy to make a donation here if I can fix this. Cheers


All times are GMT +2. The time now is 02:14.

Powered by vBulletin® Version 3.8.11 Beta 3
Copyright ©2000 - 2024, vBulletin Solutions Inc.