Members   Search      Help    Register    Login    Home
Home » Discussion Forums » M0dZ & HaCkZ » wanted to add a wait hack
wanted to add a wait hack [message #221] Fri, 15 September 2006 19:56 Go to next message
joeroberts is currently offline joeroberts  United States
Messages: 1971
Registered: June 2006
Location: U.S.A
Releaser
Da HacKer
well this work does any one know
$rzz = mysql_query("SELECT * FROM ".$db_prefix."_users WHERE ip='$ip' LIMIT 1");
	$azz = mysql_fetch_assoc($rzz);
		if ($left > 0 && $azz["level"] < premium )
		{
		$uclass = $azz["level"];
		$gigs = $azz["uploaded"] / (1024*1024*1024);
		$elapsed = floor((gmtime() - $torrent["ts"]) / 3600);
		$ratio = (($azz["downloaded"] > 0) ? ($azz["uploaded"] / $azz["downloaded"]) : 1); 
		// users with ratio = 0 AND 0 gigs, wait 24hr? 
		if ($ratio == 0 && $gigs == 0) $wait = 24;     
		elseif ($ratio < 0.50 || $gigs < 1) $wait = 24;
		elseif ($ratio < 0.65 || $gigs < 3) $wait = 12;
		elseif ($ratio < 0.80 || $gigs < 5) $wait = 6;
		elseif ($ratio < 0.95 || $gigs < 7) $wait = 2;
		else $wait = 0;
		if ($wait)
		if ($elapsed < $wait)
		err("Not authorized (" . ($wait - $elapsed) . "h) - READ THE FAQ! $SITEURL");
		}

and did i mess anything


http://a.imageshack.us/img831/5562/mybikes.png

[Updated on: Fri, 15 September 2006 20:11]

Report message to a moderator

Re: wanted to add a wait hack [message #223 is a reply to message #221] Fri, 15 September 2006 22:53 Go to previous messageGo to next message
djechelon is currently offline djechelon  Italy
Messages: 207
Registered: June 2006
Location: Ercolano, NA
Releaser
Administrator

Why the hell you keep using the mysql functions? Laughing

Unfortunately, no one can be told what the Matrix is. You have to see it for yourself.
Re: wanted to add a wait hack [message #224 is a reply to message #223] Sat, 16 September 2006 04:22 Go to previous messageGo to next message
joeroberts is currently offline joeroberts  United States
Messages: 1971
Registered: June 2006
Location: U.S.A
Releaser
Da HacKer
well it wasnt intented tobe a completed hack it was intent to ask for advise
and for the question there is not a quiry for the info that i require inless i change one like
$user_sql = "SELECT id, level FROM ".$db_prefix."_users WHERE ".$sql_where." ORDER BY lastlogin DESC LIMIT 1;";
if (!$userres = $db->sql_query($user_sql)) err("SQL Error: ".$user_sql);
if ($userrow = $db->sql_fetchrow($userres)) {
        $uid = $userrow["id"];
        $ulevel = $userrow["level"];

to this
$user_sql = "SELECT id, level, upload, download FROM ".$db_prefix."_users WHERE ".$sql_where." ORDER BY lastlogin DESC LIMIT 1;";
if (!$userres = $db->sql_query($user_sql)) err("SQL Error: ".$user_sql);
if ($userrow = $db->sql_fetchrow($userres)) {
        $uid = $userrow["id"];
        $ulevel = $userrow["level"];

and then change the hack to
	
		if ($left > 0 && $azz["level"]=="user")
		{
		$uclass = $userrow["level"];
		$gigs = $userrow["uploaded"] / (1024*1024*1024);
		$elapsed = floor((gmtime() - $torrent["ts"]) / 3600);
		$ratio = (($userrow["downloaded"] > 0) ? ($userrow["uploaded"] / $userrow["downloaded"]) : 1); 
		// users with ratio = 0 AND 0 gigs, wait 24hr? 
		if ($ratio == 0 && $gigs == 0) $wait = 24;     
		elseif ($ratio < 0.50 || $gigs < 1) $wait = 24;
		elseif ($ratio < 0.65 || $gigs < 3) $wait = 12;
		elseif ($ratio < 0.80 || $gigs < 5) $wait = 6;
		elseif ($ratio < 0.95 || $gigs < 7) $wait = 2;
		else $wait = 0;
		if ($wait)
		if ($elapsed < $wait)
		err("Not authorized (" . ($wait - $elapsed) . "h) - READ THE FAQ! $SITEURL");
		}

that would do away with the extra query and use what is there but not sure if it well carry over


http://a.imageshack.us/img831/5562/mybikes.png

[Updated on: Sun, 17 September 2006 21:36]

Report message to a moderator

Re: wanted to add a wait hack [message #4377 is a reply to message #221] Sun, 04 July 2010 16:17 Go to previous messageGo to next message
firefly007 is currently offline firefly007  South Africa
Messages: 79
Registered: May 2010
Seeder
I would like to know if it would be possible to show the wait time if given in the torrent list so the person will knows if he has a wait added.


Re: wanted to add a wait hack [message #4464 is a reply to message #224] Thu, 15 July 2010 16:07 Go to previous messageGo to next message
firefly007 is currently offline firefly007  South Africa
Messages: 79
Registered: May 2010
Seeder
what files must be moded and changes made?


Re: wanted to add a wait hack [message #4761 is a reply to message #4377] Fri, 27 August 2010 23:01 Go to previous message
Daffy is currently offline Daffy  United Kingdom
Messages: 359
Registered: October 2009
Location: uk
Releaser

open include/bittorrent.php

find
        echo "<th align=\"center\" width=\"2%\"><p>"._btcomments."</p></th>";



add below
echo"<td class=\"colhead\" align=\"center\">Wait Time</td>\n";


then find
echo"<td align=\"center\">";
                if (!$row["comments"])
                        print($row["comments"] . "");
                else {
                        $hit = ($row["owner"] == $user->id) ? "" : "&hit=1";
                        echo "<b><a href=\"details.php?id=".$row["id"].$hit."&comm=startcomments\">" . $row["comments"] . "</a></b>";
                }
echo"</td>\n";


add below
if ($left > 0 && $azz["level"]=="user")
		{
		$uclass = $userrow["level"];
		$gigs = $userrow["uploaded"] / (1024*1024*1024);
		$elapsed = floor((gmtime() - $torrent["ts"]) / 3600);
		$ratio = (($userrow["downloaded"] > 0) ? ($userrow["uploaded"] / $userrow["downloaded"]) : 1); 
		// users with ratio = 0 AND 0 gigs, wait 24hr? 
		if ($ratio == 0 && $gigs == 0) $wait = 24;     
		elseif ($ratio < 0.50 || $gigs < 1) $wait = 24;
		elseif ($ratio < 0.65 || $gigs < 3) $wait = 12;
		elseif ($ratio < 0.80 || $gigs < 5) $wait = 6;
		elseif ($ratio < 0.95 || $gigs < 7) $wait = 2;
		else $wait = 0;
		if ($wait)
		if ($elapsed < $wait)
		err("Not authorized (" . ($wait - $elapsed) . "h) - READ THE FAQ! $SITEURL");
		}

echo"<td align=\"center\">" . number_format($wait - $elapsed) . "<br>hours</td>\n";


no erros, theres more to do i think but this is a start


[Updated on: Fri, 27 August 2010 23:03]

Report message to a moderator

Previous Topic:Modifying the Search function
Next Topic:speed test hack
Goto Forum:
  


Current Time: Wed Feb 08 21:18:49 GMT 2012

Total time taken to generate the page: 0.00793 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software