Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- header('Content-Type: image/png');
- $db = mysql_connect("localhost", "XXXXXX","XXXXXXXXX");
- mysql_select_db("bonzaii_staty",$db);
- $wynik = mysql_query("SELECT * FROM Stats_player WHERE player='". $_GET['id'] ."'") or die(mysql_error());
- $wynik2 = mysql_query("SELECT * FROM Stats_move WHERE player='". $_GET['id'] ."'") or die(mysql_error());
- $wynik3 = mysql_query("SELECT * FROM Stats_block WHERE player='". $_GET['id'] ."' AND blockID='56'") or die(mysql_error());
- $wiersz = mysql_fetch_array($wynik);
- $wiersz2 = mysql_fetch_array($wynik2);
- $wiersz3 = mysql_fetch_array($wynik3);
- $dni = floor($wiersz['playtime'] / 86400);
- $godzin = floor(($wiersz['playtime'] - $dni*86400) / 3600);
- $minut = floor(($wiersz['playtime'] - $godzin*3600 - $dni*86400) / 60);
- $sekund = floor($wiersz['playtime'] - $godzin*3600 - $dni*86400 - $minut*60);
- $czas = "".$dni." d ".$godzin." g ".$minut." m ".$sekund." s.";
- $dystans = round($wiersz2['distance']);
- $ip = 'bonzaii.eu';
- $port = 25565;
- $sprawdz = @fsockopen($ip, $port, $empty, $empty, 1);
- $tlo = imagecreatefrompng('tlo.png');
- $bialy = imagecolorallocate($tlo, 255, 255, 255);
- $czerwony = imagecolorallocate($tlo, 255, 0, 0);
- $zielony = imagecolorallocate($tlo, 0, 255, 0);
- $niebieski = imagecolorallocate($tlo, 0, 0, 255);
- $ciemnozielony = imagecolorallocate($tlo, 25, 105, 25);
- $jasnoniebieski = imagecolorallocate($tlo, 35, 125, 225);
- $zielony2 = imagecolorallocate($tlo, 25, 150, 25);
- $lajtowy = imagecolorallocate($tlo, 255, 180, 0);
- $arial = 'arial.ttf';
- $visitor = 'visitor1.ttf';
- $gremlins = 'gremlins.ttf';
- $gothika = 'gothika.ttf';
- $impact = 'impact-label.ttf';
- $impact2 = 'impact-label-reversed.ttf';
- $resident = 'resident-evil.ttf';
- $tr = 'tr.ttf';
- $final = 'final.ttf';
- if($wiersz['player'] == null){
- imagettftext($tlo, 20, 0, 350, 35, $bialy, $gothika, "Bonzaii.eu");
- if($sprawdz !== FALSE)
- {
- imagettftext($tlo, 13, 0, 390, 50, $zielony, $visitor, "ONLINE");
- }else{
- imagettftext($tlo, 13, 0, 385, 50, $czerwony, $visitor, "OFFLINE");
- }
- imagettftext($tlo, 15, 0, 20, 65, $jasnoniebieski, $tr, "Niepoprawny nick");
- imagettftext($tlo, 15, 0, 20, 85, $jasnoniebieski, $tr, "lub brak uzytkownika w bazie");
- }else{
- imagettftext($tlo, 20, 40, 266, 115, $bialy, $gothika, "Bonzaii.eu");
- if($sprawdz !== FALSE)
- {
- imagettftext($tlo, 13, 40, 310, 100, $zielony, $visitor, "ONLINE");
- }else{
- imagettftext($tlo, 13, 40, 305, 105, $czerwony, $visitor, "OFFLINE");
- }
- imagettftext($tlo, 13, 0, 100, 25, $jasnoniebieski, $tr, $wiersz['player']);
- imagettftext($tlo, 13, 0, 20, 45, $ciemnozielony, $gremlins, "czas online ");
- imagestring($tlo, 4, 127, 32, $czas, $lajtowy);
- imagettftext($tlo, 13, 0, 20, 65, $ciemnozielony, $gremlins, "dolaczen ");
- imagestring($tlo, 4, 110, 52, $wiersz['joins'], $lajtowy);
- imagettftext($tlo, 13, 0, 20, 85, $ciemnozielony, $gremlins, "jadl juz ");
- imagettftext($tlo, 13, 0, 135, 85, $ciemnozielony, $gremlins, "razy");
- imagestring($tlo, 4, 100, 72, $wiersz['omnomnom'], $lajtowy);
- imagettftext($tlo, 13, 0, 20, 105, $ciemnozielony, $gremlins, "przeszedl blokow");
- imagestring($tlo, 4, 180, 92, $dystans, $lajtowy);
- $diax = imagecreatefrompng('DiamondOre.png');
- imagecopy($tlo,$diax,400,32,0,0,16,16);
- imagestring($tlo, 4, 425, 32, $wiersz3['break'], $lajtowy);
- $bench = imagecreatefrompng('workbenchfront.png');
- imagecopy($tlo,$bench,400,52,0,0,16,16);
- imagestring($tlo, 4, 425, 52, $wiersz['itemscrafted'], $lajtowy);
- imagestring($tlo, 4, 400, 72, "XP", $zielony2);
- imagestring($tlo, 4, 425, 72, $wiersz['xpgained'], $lajtowy);
- $word = imagecreatefrompng('speech-bubble.png');
- imagecopy($tlo,$word,400,92,0,0,16,16);
- imagestring($tlo, 4, 425, 92, $wiersz['wordssaid'], $lajtowy);
- }
- imagepng($tlo);
- imagedestroy($tlo);
- ?>
Advertisement
Add Comment
Please, Sign In to add comment