<?php
header("Content-type: image/gif");
include('function.php');
############################
## Get User's ID From Url ##
############################
$id = [b]119431[/b];
$stats = UserStats($id);
##################
## Create Image ##
##################
$BGImage = imagecreatefromgif("[b]bg1.gif[/b]");
#############################################
## Set The String Vars' To Diffrent Values ##
#############################################
$Line1 = "Username:";
$Line2 = ucfirst($stats['AccountName']);
$Line3 = "Team:";
$Line4 = $stats['TeamName'];
$Line5 = "Keys:";
$Line6 = $stats['TotalKeyCount'];
$Line7 = "Clicks:";
$Line8 = $stats['TotalMouseClicks'];
$Line9 = "Rank:";
$Line10 = $stats['Rank'];
$Line11 = "Team Rank:";
$Line12 = $stats['RankInTeam'];
######################################################
## Create Variables Holding User's Information From ##
######################################################
#########################################
## RPG Font Colors ##
## ##
## Each value can be between 0 and 255 ##
## First set is for the "title" text ##
## Second set is for the "value" text ##
#########################################
###########
## First ##
###########
$r1 = [b]0[/b];
$b1 =[b] 0[/b];
$g1 =[b] 0[/b];
############
## Second ##
############
$r2 = [b]84[/b];
$g2 = [b]123[/b];
$b2 = [b]84[/b];
##############################
## If No Colors, Both Black ##
##############################
if (!$g2) { $g2 = 0; }
if (!$r2) { $r2 = 0; }
if (!$b2) { $b2 = 0; }
if (!$g1) { $g1 = 0; }
if (!$r1) { $r1 = 0; }
if (!$b1) { $b1 = 0; }
#######################################
## Create Colors To Use In The Image ##
#######################################
$color1 = imagecolorallocate($BGImage, $r1, $g1, $b1);
$color2 = imagecolorallocate($BGImage, $r2, $g2, $b2);
#################
## Define Font ##
#################
$font = "[b]mckenzie.ttf[/b]";
##################################################
## Start Placeing User's Information Onto Image ##
##################################################
##################
## Col 1, Row 1 ##
##################
imagettftext($BGImage, 15, 0, 7, 23, $color1, $font, $Line1);
imagettftext($BGImage, 15, 0, 65, 23, $color2, $font, $Line2);
##################
## Col 1, Row 2 ##
##################
imagettftext($BGImage, 15, 0, 7, 52, $color1, $font, $Line3);
imagettftext($BGImage, 15, 0, 40, 52, $color2, $font, $Line4);
##################
## Col 2, Row 1 ##
##################
imagettftext($BGImage, 15, 0, 165, 23, $color1, $font, $Line5);
imagettftext($BGImage, 15, 0, 197, 23, $color2, $font, $Line6);
##################
## Col 2, Row 2 ##
##################
imagettftext($BGImage, 15, 0, 165, 52, $color1, $font, $Line7);
imagettftext($BGImage, 15, 0, 200, 52, $color2, $font, $Line8);
##################
## Col 3, Row 1 ##
##################
imagettftext($BGImage, 15, 0, 275, 23, $color1, $font, $Line9);
imagettftext($BGImage, 15, 0, 308, 23, $color2, $font, $Line10);
##################
## Col 3, Row 2 ##
##################
imagettftext($BGImage, 15, 0, 275, 52, $color1, $font, $Line11);
imagettftext($BGImage, 15, 0, 338, 52, $color2, $font, $Line12);
##################
## Finish Image ##
##################
imagegif($BGImage);
############################
## Destroy Finished Image ##
############################
imagedestroy($BGImage);
?>