Advertisement
Guest User

Untitled

a guest
Apr 19th, 2017
74
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.95 KB | None | 0 0
  1. <?php
  2. if ( empty($_POST) )
  3. {
  4. ?>
  5.  
  6. <!DOCTYPE html>
  7. <html>
  8. <head>
  9. <meta charset='utf-8'>
  10. <title>MayBe</title>
  11.  
  12. <style type='text/css'>
  13. form {
  14. width: 450px;
  15. margin-right: auto;
  16. margin-left: auto;
  17. font-family: Arial, Helvetica, sans-serif;
  18. font-size: 13px;
  19. color: #333333;
  20. padding: 10px;
  21. margin-top: 50px;
  22. border: thin solid #AEAEAE;
  23. background-color: #a1bdd5;
  24. }
  25. legend {
  26. font-family: Arial, Helvetica, sans-serif;
  27. font-size: 16px;
  28. font-weight: bold;
  29. color: #333333;
  30. padding: 2px;
  31. }
  32. label {
  33. margin: 10px;
  34. }
  35. .submit {
  36. margin-left: 50px;
  37. }
  38. .link {
  39. margin-left: 350px;
  40. }
  41. </style>
  42. </head>
  43.  
  44. <body>
  45. <form id='form1' name='form1' method='post'>
  46. <fieldset>
  47. <legend>Area riservata</legend>
  48. <p> </p>
  49. <p>
  50. <label for='textfield'><strong>Username</strong></label>
  51. <input type='text' name='username' tabindex='10' id='textfield' />
  52. </p>
  53. <p> </p>
  54. <p>
  55. <label for='label'><strong>Password</strong></label>
  56. <input type='password' name='password' id='label' />
  57. </p>
  58. <p> </p>
  59. <p>
  60. <label for='Submit'></label>
  61. <input name='Submit' type='submit' class='submit' id='Submit' tabindex='30' value='Invia' />
  62. </p>
  63. </fieldset>
  64. </form>
  65. </body>
  66. </html>
  67.  
  68. <?php
  69. }
  70. else
  71. {
  72. $username = $_POST['username'];
  73. $password = $_POST['password'];
  74.  
  75. if ( ($username == "admin" and $password == "admin")
  76. or ($username == "matteotti" and $password == "matteotti111")
  77. or ($username == "marconi" and $password == "marconi123") )
  78. {
  79. <?php phpinfo(); ?>
  80.  
  81. }
  82. else
  83. {
  84. echo "<center><h2><font color=#FF0000><h2>Accesso negato.</font></h2><br>Le credenziali inserite non risultano valide.<br><a href=\"javascript:history.go(-1)\">Clicca qui per tornare al form e reinserire username e password.</a></center>";
  85. die;
  86. }
  87. }
  88. ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement