index_en.php 1.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  1. <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
  2. <html>
  3. <head>
  4. <meta content="text/html; charset=UTF-8" http-equiv="content-type">
  5. <meta name="viewport" content="width=device-width">
  6. <title>Password Generator</title>
  7. <script src="http://code.jquery.com/jquery-latest.js"></script>
  8. <script>
  9. $(document).ready(function() {
  10. $('#btn_click').on('click', function() {
  11. var url = 'index.php';
  12. $('#passgen-wrapper').load(url + ' #passgen');
  13. });
  14. });
  15. </script>
  16. </head>
  17. <body>
  18. <h1 style="text-align: center;">Password Generator</h1>
  19. <div id="passgen-wrapper">
  20. <div id="passgen" style="text-align: center;">
  21. <?php
  22. $lowercase = array('alpha', 'bravo', 'charlie', 'delta', 'echo', 'foxtrot', 'golf', 'hotel', 'india', 'juliette', 'kilo', 'lima', 'mike', 'november', 'oscar', 'papa', 'quebec', 'romeo', 'sierra', 'tango', 'uniform', 'victor', 'whisky', 'xray', 'yankee', 'zulu');
  23. $uppercase = array('ALPHA', 'BRAVO', 'CHARLIE', 'DELTA', 'ECHO', 'FOXTROT', 'GOLF', 'HOTEL', 'INDIA', 'JULIETTE', 'KILO', 'LIMA', 'MIKE', 'NOVEMBER', 'OSCAR', 'PAPA', 'QUEBEC', 'ROMEO', 'SIERRA', 'TANGO', 'UNIFORM', 'VICTOR', 'WHISKY', 'XRAY', 'YANKEE', 'ZULU');
  24. $special = array('@', '+', '-', '&');
  25. echo $lowercase[array_rand($lowercase)];
  26. echo $uppercase[array_rand($uppercase)];
  27. echo $special[array_rand($special)];
  28. echo(rand(1,99));
  29. ?>
  30. </div>
  31. </div>
  32. <br />
  33. <div style="text-align: center;">
  34. <button type="button" id="btn_click" />Generate new password</button>
  35. <br /><br />
  36. Made in France 🇫🇷 by <a href="https://gitlab.am-networks.fr/am" target="_blank">Alexandre</a><br />
  37. <a href="https://gitlab.am-networks.fr/am/PasswordGenerator-PHP" target="_blank">Click here to access source code</a>
  38. </div>
  39. </body>
  40. </html>