View Single Post
  #1  
Old 26th September 2019, 17:40
elvira's Avatar
elvira elvira is offline
Senior Member
 
Join Date: Jan 2008
Slovenia
Posts: 153
Default free silver and 2xup
hey can someone check if I have correct in announce.php


PHP Code:
$res mysql_query("SELECT id, banned, free, silver, dupla_seed, seeders + leechers AS numpeers, UNIX_TIMESTAMP(added) AS ts FROM torrents WHERE " hash_where("info_hash"$info_hash)); 

and this one use for userfree


PHP Code:
    $rz mysql_query("SELECT id, uploaded, downloaded, class, userfree, parked FROM users WHERE passkey=".sqlesc($passkey)." AND enabled = 'yes' ORDER BY last_access DESC LIMIT 1") or err("Tracker error 2"); 

and this







Quote:
//userfree
if ($upthis > 0 || $downthis > 0)
if ($az["userfree"] == "no")
$downthis = max(0, $downloaded - $self["downloaded"]);
else
$downthis = 0;

//2x upload
if ($torrent['dupla_seed']=='yes')
if ($upthis > 0 || $downthis > 0)
$upthis = $upthis * 2;

//silver download
if($torrent['silver']=='yes'){
if ($upthis > 0 || $downthis > 0)
$downthis=$downthis/2;
$upthis = $upthis*2;
mysql_query("UPDATE users SET uploaded = uploaded + $upthis, downloaded = downloaded + $downthis WHERE id=$userid") or err("Tracker error 3 (silver)");
}

//normal download
if ($torrent['free']=='no')
if ($upthis > 0 || $downthis > 0)
mysql_query("UPDATE users SET uploaded = uploaded + $upthis, downloaded = downloaded + $downthis WHERE id=$userid") or err("Tracker error 3");

//gold download
if ($torrent['free']=='yes')
if ($upthis > 0 || $downthis > 0)
mysql_query("UPDATE users SET uploaded = uploaded + $upthis WHERE id=$userid") or err("Tracker error 3");

thanks for help

Last edited by elvira; 26th September 2019 at 18:32.
Reply With Quote