5) $turned_off=true; if($loadavg[0]>10) exit(); fclose($Handle); define ( '_DB_SERVER', 'localhost' ); define ( '_DB_USER', 'sr' ); define ( '_DB_PASS', 'srmtllc!06' ); define ( '_DB_NAME', 'rewards' ); //include "../lib/.htconfig.php"; include "../lib/.database.php"; header("Cache-Control: no-cache, must-revalidate"); // HTTP/1.1 header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); // Date in the past header("Content-type: image/png"); $uid = $_GET["uid"]; $size = $_GET["size"]; //show all earnings ever if( !is_numeric($uid) || $size=="" || $turned_off ) $earnings="$$$"; else $earnings = number_format($db->Fetch("select earnings from users where id='" . $uid . "'"),2,".",""); if($size=="125") { $image= imagecreatefrompng("125x125.png"); if (!$image) { // See if it failed $image = imagecreatetruecolor (150, 30); // Create a blank image $bgc = imagecolorallocate ($image, 255, 255, 255); $tc = imagecolorallocate ($image, 0, 0, 0); imagefilledrectangle ($image, 0, 0, 150, 30, $bgc); // Output an errmsg imagestring ($image, 1, 5, 5, "Error loading $imgname", $tc); //echo "error"; } $red = imagecolorallocate($image, 255, 0, 0); $px = imagesx($image)/2 - 6*strlen($earnings); $font = imageloadfont("arial24.gdf"); imagestring($image, $font, $px, 100, $earnings, $red); imagepng($image); } else if ($size=="125b") { $image = imagecreatefrompng("125x125(2).png"); $red = imagecolorallocate($image, 255, 0, 0); $px = imagesx($image)/2 - 6 * strlen($earnings); $font = imageloadfont("arial24.gdf"); imagestring($image, $font, $px, 80, $earnings, $red); imagepng($image); } else if ($size=="468") { $image = imagecreatefrompng("468.png"); $red = imagecolorallocate($image, 255, 0, 0); $font = imageloadfont("arial20bold.gdf"); imagestring($image, $font,377, 53, $earnings, $red); imagepng($image); } imagedestroy($image); ?>