Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <html>
- <head>
- <title>GTI Userbar Generator</title>
- <link rel="stylesheet" type="text/css" href="css.css">
- </head>
- <body>
- <center>
- <div>
- <h1>Generate Userbar</h1>
- <!-- You must change the path here, or else it won't work correctly! -->
- <form action="index.php" method=post>
- <input type="text" name="id" class="rounded" placeholder="Account name (Example: JohnSmith)" size="35"/>
- <hr>
- <div id="formsubmitbutton">
- Click the button or press enter to create your userbar
- <br>
- <button style="background-color:transparent; border-width: 0px " onclick="ButtonClicked()"type="submit" name="submit" value="submit">
- <img src="img/button.png" alt="Convert button" height="64" width="128">
- </button>
- <br>
- <br>
- <?php
- if(isset($_REQUEST['submit']))
- {
- $accname = $_REQUEST['id'];
- }
- $value = $accname;
- $template = file_get_contents('*******.txt'); //change template.txt to the file you want to use as template
- $template = str_replace("##NAME##", $value, $template); // ##NAME## is the variable
- $newFile = fopen($accname.'.img.php', 'w');
- fwrite($newFile, $template);
- fclose($newFile);
- ?>
- </div>
- <!-- this stuff makes the "loading" part when you click the button -->
- <!-- START -->
- <div id="buttonreplacement" style="display:none;">
- <img src="img/loading.gif" alt="Working...">
- <br>
- <b>Processing...</b>
- </div>
- <!-- this stuff makes the "loading" part when you click the button -->
- <script type="text/javascript">
- function ButtonClicked()
- {
- document.getElementById("formsubmitbutton").style.display = "none"; // to undisplay
- document.getElementById("buttonreplacement").style.display = ""; // to display
- return true;
- }
- var FirstLoading = true;
- function RestoreSubmitButton()
- {
- if( FirstLoading )
- {
- FirstLoading = false;
- return;
- }
- document.getElementById("formsubmitbutton").style.display = ""; // to display
- document.getElementById("buttonreplacement").style.display = "none"; // to undisplay
- }
- // To disable restoring submit button, disable or delete next line.
- document.onfocus = RestoreSubmitButton;
- </script>
- <!-- END -->
- <?php
- if(isset($_REQUEST['submit']))
- {
- $accname = $_REQUEST['id'];
- }
- //echo "Your image: <img src='$accname.img.php'>";
- echo "<img src='$accname.img.php'>";
- echo "<br>";
- echo "<br>";
- echo "<br>";
- echo "Major Contributions by Pilovali. All Rights Reserved.";
- ?>
- </center>
- </div>
- </div>
- </body>
- </html>
Advertisement
Add Comment
Please, Sign In to add comment