Guest User

Untitled

a guest
Aug 29th, 2012
95
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.29 KB | None | 0 0
  1. <?php
  2. require ('config.php');
  3. if (isset($_GET['player']) && isset($_GET['img'])) {
  4. $user = $_GET['player'];
  5. $img = $_GET['img'];
  6. $watermark = "Made with dynsig basic";
  7. $im = imagecreatefrompng(getcwd() . '/images/signatures/' . $img);
  8. if (!$im) {
  9. die("");
  10. }
  11. $font = 'resources/font.ttf';
  12. $fontsize = 25;
  13. $color = imagecolorallocate($im, 255, 255, 255);
  14. $width = imagesx($im);
  15. $height = imagesy($im);
  16.  
  17. imagettftext($im, $fontsize, 0, 70, 37, $color, $font, "IP: ".$server_ip);
  18. imagettftext($im, $fontsize, 0, 10, 77, $color, $font, "Player: ".$user);
  19. imagettftext($im, 8, 0, $width - 120, $height - 5, $color, $font, $watermark);
  20.  
  21. Header('Content-type: image/png');
  22. imagepng($im);
  23. imagedestroy($im);
  24. }
  25. ?>
  26. <!DOCTYPE html>
  27. <html>
  28. <title>Choose your signature!</title>
  29. <body bgcolor="gray" background="images\back.png">
  30. <font color="white" size="4">
  31. <center>
  32. <form action = "index.php" method="GET">
  33. Minecraft Name: <input type="text" name="player" value = "Notch"/><br><br><br>
  34. <font color="white" size="5">
  35. <b>Click an image below to create your signature!</b><br><br><br>
  36. </font>
  37. <?php
  38. $numbers = array("1", "2", "3", "4", "5", "6", "7", "8", "9", "0");
  39. if ($handle = opendir(getcwd() . '/images/signatures')) {
  40. while (false !== ($entry = readdir($handle))) {
  41. if ($entry != "." && $entry != "..") {
  42. $name = str_replace(".png", "", $entry);
  43. echo "\n<b>".str_replace($numbers, "", $name)."</b><br>\n";
  44. echo "<input type=\"image\" src=\"index.php?img=".$entry."&player=Notch\" name=\"img\" value=\"".$entry."\"/>\n<br><br>";
  45. }
  46. }
  47. closedir($handle);
  48. }
  49. ?>
  50. </form>
  51. </center>
  52. </font>
  53. </body>
  54. </html>
Advertisement
Add Comment
Please, Sign In to add comment