LawyerMorty

Untitled

May 1st, 2014
267
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.38 KB | None | 0 0
  1. <html>
  2. <head>
  3. <title>GTI Userbar Generator</title>
  4. <link rel="stylesheet" type="text/css" href="css.css">
  5.  
  6. </head>
  7. <body>
  8. <center>
  9. <div>
  10.  
  11. <h1>Generate Userbar</h1>
  12. <!-- You must change the path here, or else it won't work correctly! -->
  13. <form action="index.php" method=post>
  14. <input type="text" name="id" class="rounded" placeholder="Account name (Example: JohnSmith)" size="35"/>
  15. <hr>
  16. <div id="formsubmitbutton">
  17. Click the button or press enter to create your userbar
  18. <br>
  19. <button style="background-color:transparent; border-width: 0px " onclick="ButtonClicked()"type="submit" name="submit" value="submit">
  20. <img src="img/button.png" alt="Convert button" height="64" width="128">
  21. </button>
  22.  
  23.  
  24. <br>
  25.  
  26. <br>
  27. <?php
  28. if(isset($_REQUEST['submit']))
  29. {
  30. $accname = $_REQUEST['id'];
  31. }
  32. $value = $accname;
  33. $template = file_get_contents('*******.txt'); //change template.txt to the file you want to use as template
  34. $template = str_replace("##NAME##", $value, $template); // ##NAME## is the variable
  35. $newFile = fopen($accname.'.img.php', 'w');
  36. fwrite($newFile, $template);
  37. fclose($newFile);
  38. ?>
  39. </div>
  40. <!-- this stuff makes the "loading" part when you click the button -->
  41. <!-- START -->
  42. <div id="buttonreplacement" style="display:none;">
  43. <img src="img/loading.gif" alt="Working...">
  44. <br>
  45. <b>Processing...</b>
  46. </div>
  47.  
  48.  
  49. <!-- this stuff makes the "loading" part when you click the button -->
  50. <script type="text/javascript">
  51.  
  52. function ButtonClicked()
  53. {
  54. document.getElementById("formsubmitbutton").style.display = "none"; // to undisplay
  55. document.getElementById("buttonreplacement").style.display = ""; // to display
  56. return true;
  57. }
  58. var FirstLoading = true;
  59. function RestoreSubmitButton()
  60. {
  61. if( FirstLoading )
  62. {
  63. FirstLoading = false;
  64. return;
  65. }
  66. document.getElementById("formsubmitbutton").style.display = ""; // to display
  67. document.getElementById("buttonreplacement").style.display = "none"; // to undisplay
  68. }
  69. // To disable restoring submit button, disable or delete next line.
  70. document.onfocus = RestoreSubmitButton;
  71. </script>
  72. <!-- END -->
  73. <?php
  74. if(isset($_REQUEST['submit']))
  75. {
  76. $accname = $_REQUEST['id'];
  77. }
  78. //echo "Your image: <img src='$accname.img.php'>";
  79. echo "<img src='$accname.img.php'>";
  80. echo "<br>";
  81. echo "<br>";
  82. echo "<br>";
  83. echo "Major Contributions by Pilovali. All Rights Reserved.";
  84. ?>
  85. </center>
  86. </div>
  87. </div>
  88. </body>
  89. </html>
Advertisement
Add Comment
Please, Sign In to add comment