JoseluisGGR

Untitled

Mar 1st, 2017
105
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.44 KB | None | 0 0
  1. <?php
  2. require_once 'engine/init.php';
  3.  
  4. if (isset($_GET['name']) === true && empty($_GET['name']) === false) {
  5. $name = getValue($_GET['name']);
  6. $user_id = user_character_exist($name);
  7.  
  8. if ($user_id !== false) {
  9. if(!file_exists('./cache/signatures/' . $user_id.'.png'))
  10. {
  11. $image = imagecreatefrompng('./images/signatures/signature.png');
  12. $color= imagecolorallocate($image , 255, 255, 255);
  13. imagettftext($image , 12, 0, 20, 32, $color, './images/signatures/font.ttf' , 'Name:');
  14. imagettftext($image , 12, 0, 70, 32, $color, './images/signatures/font.ttf' , 'My name');
  15.  
  16. imagettftext($image , 12, 0, 20, 52, $color, './images/signatures/font.ttf' , 'Level:');
  17. imagettftext($image , 12, 0, 70, 52, $color, './images/signatures/font.ttf' , '22 - Sorcerer');
  18.  
  19.  
  20. imagettftext($image , 12, 0, 20, 75, $color, './images/signatures/font.ttf' , 'Guild:');
  21. imagettftext($image , 12, 0, 70, 75, $color, './images/signatures/font.ttf' , 'My guild');
  22.  
  23. imagettftext($image , 12, 0, 20, 95, $color, './images/signatures/font.ttf' , 'Last Login:');
  24. imagettftext($image , 12, 0, 100, 95, $color, './images/signatures/font.ttf' , 'Never logged in.');
  25. imagepng($image, 'cache/signatures/' . $user_id.'.png');
  26. imagedestroy($image);
  27. }
  28. header("Content-type: image/png");
  29. echo file_get_contents('./cache/signatures/' . $user_id.'.png');
  30. }
  31. } else {
  32. header('Location: index.php');
  33. }
Advertisement
Add Comment
Please, Sign In to add comment