br />

Go Back   PTCPay.Com > The Marketplace > Design and Coding Services

Notices

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 08-18-2010, 02:23 PM
Junior Member
 
Join Date: Jul 2010
Posts: 24
Default Gen4 Coding and Addons

Here I'll post some stuff for Gen4 script,it will be small things but usefull for some PTC owners

1. Available Referrals on header stats

Go to theme/GeN4/t.php and find:

Code:
if($set['showstats']) {
	$total = "SELECT COUNT(*) AS users, SUM(totalclicks) AS clicks FROM `users`";
	$total = mysql_fetch_array(mysql_query($total));
	$totalusers = $total['users'];
	$totalclicks = $total['clicks'];
	$online = mysql_query("SELECT * FROM users WHERE lastaction >= unix_timestamp() - 60*5"); 
	$online = mysql_num_rows($online);
	$total_withdrew = mysql_query("SELECT SUM(withdrew) FROM `users`;");
	$total_withdrew = mysql_fetch_array($total_withdrew);
	$total_withdrew = $total_withdrew[0];
}
add after:

Code:
$tsp = time()-60*60*24*$set['refs_minactdays'];
	if(!$set['refs_minactdays']) $tsp = 0;
	$user = mysql_query("SELECT * FROM users WHERE `username` != '{$ir['username']}' AND upline='' AND `activeclicks` >= {$set['refs_minclicks']} AND lastaction >= $tsp;");
	$users = mysql_num_rows($user);
	$avail = $users;
Then find:
Code:
<div class="infocounter">
and add before </div>

Code:
<img src="../themes/GeN4/images/totalusers.png" width="16" height="16" alt="" /> Referrals Available: <?php echo $users; ?><br />
Now you will have something like this:

Referrals Available: xxx


I'll add more stuff later
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
Forum Jump


All times are GMT. The time now is 05:46 AM.
Powered by vBulletin® Version 3.8.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.