Guest User

Sign

a guest
Jul 3rd, 2015
231
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.93 KB | None | 0 0
  1. <?php
  2.  
  3. require_once('config.php');
  4.  
  5. function FilterText($str, $advanced=false) {
  6. if($advanced == true){ return mysql_real_escape_string($str); }
  7. $str = mysql_real_escape_string(htmlspecialchars($str));
  8. return $str;
  9. }
  10.  
  11. function HoloText($str, $advanced=false, $bbcode=false) {
  12. if($advanced == true){ return stripslashes($str); }
  13. $str = nl2br(htmlspecialchars($str));
  14. if($bbcode == true){$str = bbcode_format($str); }
  15. return $str;
  16. }
  17.  
  18. if(isset($_GET['user'])){
  19.  
  20. $userid = FilterText($_GET['user']);
  21. $main_sql = mysql_query("SELECT * FROM contas WHERE Username = '".$userid."'") or die(mysql_error());
  22. $conta_existe = mysql_num_rows($main_sql);
  23.  
  24. if($conta_existe == "1"){
  25. $contas = mysql_fetch_assoc($main_sql);
  26. $Kills = $contas['Kills'];
  27. $Deaths = $contas['Deaths'];
  28. $Level = $contas['Level'];
  29. $Status = $contas['StatsLine'];
  30. $Race = $contas['RacePoints'];
  31. $Ratio = $contas['Ratio'];
  32. $Duels = $contas['DuelsWon'];
  33.  
  34. } else {
  35. echo "Conta nao existe";
  36. exit();
  37. }
  38.  
  39. }
  40.  
  41.  
  42.  
  43.  
  44. header('Content-Type: image/png');
  45.  
  46. $im = ImageCreateFromPNG("img/sign.png");
  47.  
  48.  
  49. $white = imagecolorallocate($im, 255, 255, 255);
  50. $grey = imagecolorallocate($im, 128, 128, 128);
  51. $black = imagecolorallocate($im, 0,0,0);
  52.  
  53.  
  54. $text = 'Testing...';
  55. // Replace path by your own font path
  56. $font = 'visitor2.ttf';
  57.  
  58. // Add some shadow to the text
  59.  
  60. imagettftext($im,12,0,57,32, $black, $font, "$userid");
  61. imagettftext($im,12,0,57,62, $black, $font, "$Status");
  62. imagettftext($im,12,0,147,32, $black, $font, "$Level");
  63. imagettftext($im,12,0,147,62, $black, $font, "$Race");
  64. imagettftext($im,12,0,237,32, $black, $font, "$Kills");
  65. imagettftext($im,12,0,237,62, $black, $font, "$Deaths");
  66. imagettftext($im,12,0,327,32, $black, $font, "$Ratio");
  67. imagettftext($im,12,0,327,62, $black, $font, "$Duels");
  68.  
  69.  
  70. // Using imagepng() results in clearer text compared with imagejpeg()
  71. imagepng($im);
  72. imagedestroy($im);
  73. ?>
Advertisement
Add Comment
Please, Sign In to add comment