Pages: [1] 2 3   Go Down
  Print  
Author Topic: Dynamic Banner Shows Stats Of Member and Site  (Read 1443 times)
Aligroup
Global Moderator
Hero Member
*****
Offline Offline

Posts: 781



View Profile WWW
« on: October 31, 2011, 01:02:11 AM »

Helow Friends
if u want to add dynamic banner in  ur ptc site
which will show Members Payments, Site Hits, Balance e.t.c
Demo:-


Go to Cpanel in public_html
create new file name as banner.php

add this code and save it

Quote
<?php

   $id=$_GET['u'];
   include("config.php");
        include("includes/mysql.php");
        $Db1 = new DB_sql;
$Db1->connect($DBHost, $DBDatabase, $DBUser, $DBPassword);
        
       
   $specialPTP=true;
   $members = mysql_fetch_assoc(mysql_query('SELECT COUNT(userid) AS total FROM user'));
   $user = mysql_fetch_assoc(mysql_query('SELECT username,referral_earns FROM user WHERE userid=\''.$id.'\''));
   $amount = mysql_fetch_assoc(mysql_query("SELECT SUM(amount) AS total FROM payment_history WHERE username='".$user['username']."' and status=1"));
   
   $stats = mysql_fetch_assoc(mysql_query('SELECT new_members, hits, clicked FROM stats WHERE date=\''.date('d\/m\/y').'\''));
   $totalpaid = mysql_fetch_assoc(mysql_query('SELECT SUM(amount) AS total, COUNT(amount) AS amount FROM payment_history WHERE status != 2'));
   
   
   $xImg = ImageCreateFromJPEG('elite.jpg');
   $col = imagecolorallocate($xImg, 255, 255, 255);

   imagestring($xImg, 3, 200, 5, 'User:  '.$user['username'], $col);

   imagestring($xImg, 3, 200, 18, 'Members: '.$members['total'], $col);
   imagestring($xImg, 3, 200, 31, 'Paid Out: '.$totalpaid['total'], $col);
   imagestring($xImg, 3, 200, 44, 'Payouts Made: '.$totalpaid['amount'], $col);

   imagestring($xImg, 3, 350, 5, 'Received: '.$amount['total'], $col);
   imagestring($xImg, 3, 350, 18, 'New Members: '.$stats['new_members'], $col);
   imagestring($xImg, 3, 350, 31, 'Hits: '.$stats['hits'], $col);
   imagestring($xImg, 3, 350, 44, 'Clicks: '.$stats['clicked'], $col);
   
   header('Content-type: image/jpeg');
   mysql_close();
   imagejpeg($xImg, NULL, 100);

?>

than go to members > banners.php

edit it and add
on line number 6 or where u want to add banner

Quote
"http://www.$settings[domain_name]/banner.php?u=".$thismemberinfo['userid']


now make ur banner and rename it to  elite.jpg
upload it to public_html

Done
Your Dynamic Banner Is Ready  Smiley


Best Regards,
Waqar-Ali
http://goldclix.info
Logged

Iam Online almost 15 hours Daily
Goldclix " Advertize Your Site Free Check Here"

Upgrade to an SDR 3
757jterrell
Administrator
Hero Member
*****
Offline Offline

Posts: 1637



View Profile WWW
« Reply #1 on: November 06, 2011, 06:42:12 PM »

Very nice
Logged

clixswarmer
Newbie
*
Offline Offline

Posts: 12



View Profile WWW
« Reply #2 on: November 11, 2011, 10:24:06 AM »

This is great!  I got it to work.  But how do you change the color and position of the dynamic texts?
Logged

Aligroup
Global Moderator
Hero Member
*****
Offline Offline

Posts: 781



View Profile WWW
« Reply #3 on: November 13, 2011, 12:52:15 PM »

u can add html commonds to add text color  Smiley
Logged

Iam Online almost 15 hours Daily
Goldclix " Advertize Your Site Free Check Here"

vizdo
Full Member
***
Offline Offline

Posts: 104



View Profile WWW
« Reply #4 on: November 19, 2011, 04:47:31 PM »

works great, thank you

and how can i change font size?

and when user has $0 paid it shows nothing:

« Last Edit: November 19, 2011, 05:51:45 PM by vizdo » Logged

Aligroup
Global Moderator
Hero Member
*****
Offline Offline

Posts: 781



View Profile WWW
« Reply #5 on: November 21, 2011, 01:16:17 AM »

works great, thank you

and how can i change font size?

and when user has $0 paid it shows nothing:



yes obiviously when there is 0$ paid it show 0$ and to change text size edit code and add html commonds...
Logged

Iam Online almost 15 hours Daily
Goldclix " Advertize Your Site Free Check Here"

narsi
Newbie
*
Offline Offline

Posts: 9


View Profile
« Reply #6 on: November 21, 2011, 09:45:09 AM »

Seraching for this for so long time....Thankyou for posting.... Smiley Smiley
Logged
sew77williams
Full Member
***
Offline Offline

Posts: 108


AuroraPlus


View Profile WWW
« Reply #7 on: December 10, 2011, 01:49:46 AM »

Can someone make me a free banner?Just a old plain banner and logo with

Cheap-O-Templates
Largest Auroragpt Template Resources
Logged

Aligroup
Global Moderator
Hero Member
*****
Offline Offline

Posts: 781



View Profile WWW
« Reply #8 on: December 10, 2011, 03:52:18 AM »

Logged

Iam Online almost 15 hours Daily
Goldclix " Advertize Your Site Free Check Here"

sew77williams
Full Member
***
Offline Offline

Posts: 108


AuroraPlus


View Profile WWW
« Reply #9 on: December 10, 2011, 12:22:51 PM »

That logo or banner but its nice azz hell
Logged

Aligroup
Global Moderator
Hero Member
*****
Offline Offline

Posts: 781



View Profile WWW
« Reply #10 on: December 10, 2011, 12:29:45 PM »

That logo or banner but its nice azz hell

lolzzzz i also dont know just take it   Grin
Logged

Iam Online almost 15 hours Daily
Goldclix " Advertize Your Site Free Check Here"

HP
Jr. Member
**
Offline Offline

Posts: 58


View Profile
« Reply #11 on: December 28, 2011, 06:42:32 AM »

Can u tell where to add html tags?
Can u show a edited code of this with html tags?
Logged
Aligroup
Global Moderator
Hero Member
*****
Offline Offline

Posts: 781



View Profile WWW
« Reply #12 on: December 28, 2011, 07:40:43 AM »

Can u tell where to add html tags?
Can u show a edited code of this with html tags?

u can add echo in bannes.php file read first topic u will get ur answer...
Logged

Iam Online almost 15 hours Daily
Goldclix " Advertize Your Site Free Check Here"

HP
Jr. Member
**
Offline Offline

Posts: 58


View Profile
« Reply #13 on: December 30, 2011, 04:07:54 AM »

Can u tell where to add html tags?
Can u show a edited code of this with html tags?

u can add echo in bannes.php file read first topic u will get ur answer...

Can u give a Short example?

Can u just edit this line:

 
Code:
   imagestring($xImg, 3, 200, 18, 'Members: '.$members['total'], $col);

Thank U! Smiley
Logged
Aligroup
Global Moderator
Hero Member
*****
Offline Offline

Posts: 781



View Profile WWW
« Reply #14 on: December 30, 2011, 06:40:32 AM »

Quote

Can u give a Short example?

Can u just edit this line:

 
Code:
   imagestring($xImg, 3, 200, 18, 'Members: '.$members['total'], $col);

Thank U! Smiley

u just want to show Members?Huh?
Logged

Iam Online almost 15 hours Daily
Goldclix " Advertize Your Site Free Check Here"

Get a SDR 3 NOW at http://ptcfactory.info

The best and most up to date Aurora script in the market!!
Pages: [1] 2 3   Go Up
  Print  
 
Jump to: