<?php
include( "mta_sdk.php" );
include( "func.php" );
$mtaServer = new mta( "127.0.0.1", 22005, *******,***** );
$resource = $mtaServer->getResource ("RPG");
$ret = $resource->call ( "getStatToBanner", $_GET['acc']);
//$my_img = ImageCreateFromPNG("ban.png");
$my_img = imagecreate( 466, 96 );
$background = imagecolorallocate( $my_img, 60, 150, 60 );
$text_colour = imagecolorallocate( $my_img, 255, 255, 0 );
$text_zielony = imagecolorallocate( $my_img, 0, 255, 0 );
$text_czerwony = imagecolorallocate( $my_img, 255, 0, 0 );
imagestring( $my_img, 4, 50, 10, 'Score: '.$ret[0],$text_colour );
imagestring( $my_img, 4, 200, 10, 'Status: '.$ret[5],iff($ret[5] == "online",$text_zielony,iff($ret[5] == "offline",$text_czerwony,$text_colour)) );
imagestring( $my_img, 4, 50, 25, 'Kasa: '.$ret[2],$text_colour );
imagestring( $my_img, 4, 200, 25, 'Konto: '.$ret[6],$text_colour );
imagestring( $my_img, 4, 50, 40, 'Skin: '.$ret[3],$text_colour );
imagestring( $my_img, 4, 200, 40, 'Prawa: '.$ret[7],$text_colour );
imagestring( $my_img, 4, 10, 80, "Całkowicie Polski Serwer! (banner stats public beta 0.1)",$text_colour );
imagesetthickness ( $my_img, 5 );
imageline( $my_img, 50, 60, $ret[1] + 50, 60, imagecolorallocate( $my_img, 255, 0, 0 ) );
imageline( $my_img, 50, 70,$ret[4] + 50, 70, imagecolorallocate( $my_img, 128, 128, 128 ) );
if ($ret[0])
{
$icon = imagecreatefrompng("img/" .$ret[3]. ".png");
$iwidth = imagesx($icon);
$iheight = imagesy($icon);
imagecopy($my_img,$icon,370,15,0,0,$iwidth,$iheight);
}
header( "Content-type: image/png" );
imagepng( $my_img );
imagecolordeallocate( $line_color );
imagecolordeallocate( $text_color );
imagecolordeallocate( $background );
imagedestroy( $my_img );
?>
Obrazek później będzie zmieniony wiec to tylko na chwile