Guest User

Untitled

a guest
Jul 20th, 2016
203
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 2.34 KB | None | 0 0
  1. <!DOCTYPE html>
  2. <html>
  3. <head>
  4.     <meta charset="UTF-8">
  5.     <title>Secure Password Generator</title>
  6.     <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/css/bootstrap.min.css" integrity="sha384-1q8mTJOASx8j1Au+a5WDVnPi2lkFfwwEAa8hDDdjZlpLegxhjVME1fgjWPGmkzs7" crossorigin="anonymous">
  7.     <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/css/bootstrap-theme.min.css" integrity="sha384-fLW2N01lMqjakBkx3l/M9EahuwpSfeNvV63J5ezn3uZzapT0u7EYsXMjQV+0En5r" crossorigin="anonymous">
  8.     <script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/js/bootstrap.min.js" integrity="sha384-0mSbJDEHialfmuBBQP6A4Qrprq5OVfW37PRR3j5ELqxss1yVqOtnepnHVP9aJ7xS" crossorigin="anonymous"></script>
  9. </head>
  10. <body>
  11.     <div class="container">
  12.         <div class="row">
  13.             <div class="col-md-4 col-md-offset-4" style="margin-top: 80px;max-width: 350px">
  14.                 <a href="generate-password.php" style="display:block; margin-left: 20px; margin-bottom: 23px;">Clear Password</a>
  15.  
  16. <?php
  17.  
  18. require_once('dice.php');
  19.  
  20.  
  21. if(isset($_GET['rolls']) && empty($_GET['rolls'])){
  22.     die('You need to choose an amount of times to roll.');
  23. }
  24.  
  25. if(isset($_GET['lang']) && empty($_GET['lang'])){
  26.     die('You have to choose a language!'); 
  27. }  
  28.  
  29. if(!empty($_GET['lang']) && !empty($_GET['rolls'])){
  30.     rollDice($_GET['rolls'], $_GET['lang']);
  31. }
  32.  
  33. ?>
  34.                 <form action="" method="get">
  35.                     <div class="form-group">
  36.                         <label for="rolls">Amount of times to roll dice</label>
  37.                         <input type="text" name="rolls" placeholder="Number of rolls" class="form-control" />
  38.                     </div>
  39.                     <div class="form-group">
  40.                         <label for="lang">Dictionary language</label>
  41.                     <select name="lang" class="form-control">
  42.                         <option value="en">English</option>
  43.                         <option value="no">Norwegian</option>
  44.                         <option value="dk">Danish</option>
  45.                         <option value="se">Swedish</option>
  46.                         <option value="fi">Soumi</option>
  47.                         <option value="de">German</option>
  48.                         <option value="nl">Dutch</option>
  49.                         <option value="fr">French</option>
  50.                         <option value="es">Spanish</option>
  51.                         <option value="it">Italian</option>
  52.                         <option value="ru">Russian</option>
  53.                         <option value="tr">Turkish</option>
  54.                     </select>
  55.                     </div>
  56.                     <input type="submit" class="btn btn-default form-control" />
  57.                 </form>
  58.             </div>
  59.         </div>
  60.     </div>
  61. </body>
  62. </html>
Add Comment
Please, Sign In to add comment