contra

Untitled

Dec 13th, 2014
310
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.02 KB | None | 0 0
  1. <?php
  2. /************************************************************************/
  3. /* PHP Simple PasswordProtect v1.0 */
  4. /* =========================== */
  5. /* */
  6. /* Written by Steve Dawson - http://www.stevedawson.com */
  7. /* Freelance Web Developer - PHP, MySQL, HTML programming */
  8. /* */
  9. /* This program is free software. You can redistribute it and/or modify */
  10. /* but please leave this header intact, thanks */
  11. /************************************************************************/
  12. ##########################################################################
  13. $password = "passwordhere"; // Modify Password to suit for access, Max 10 Char.
  14. ##########################################################################
  15. ?>
  16. <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
  17. <html>
  18. <head>
  19. <title>- Password Protected -</title>
  20. <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
  21. <style type="text/css">
  22. <!--
  23. P { FONT-SIZE: 8pt; COLOR: #000000; FONT-FAMILY: Verdana, Tahoma, Arial}
  24. TD { FONT-SIZE: 8pt; COLOR: #000000; FONT-FAMILY: Verdana, Tahoma, Arial}
  25. -->
  26. </style>
  27. </head>
  28. <body>
  29. <?php
  30. print "<h2 align=\"center\">- Password Protected -</h2>";
  31. // If password is valid let the user get access
  32. if (isset($_POST["password"]) && ($_POST["password"]=="$password")) {
  33. ?>
  34. <!-- START OF HIDDEN HTML - PLACE YOUR CONTENT HERE -->
  35. <html>
  36. <head>
  37. <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
  38. <style type="text/css">
  39. <!--
  40. P { FONT-SIZE: 8pt; COLOR: #000000; FONT-FAMILY: Verdana, Tahoma, Arial}
  41. TD { FONT-SIZE: 8pt; COLOR: #000000; FONT-FAMILY: Verdana, Tahoma, Arial}
  42. -->
  43. </style>
  44. </head>
  45. <body>
  46. <!-- START OF HIDDEN HTML - PLACE YOUR CONTENT HERE -->
  47.  
  48. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
  49. <html xmlns="http://www.w3.org/1999/xhtml">
  50. <head>
  51. <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
  52. <title>Takedown</title>
  53. <link href="css/style.css"rel="stylesheet" type="text/css" />
  54. </head>
  55.  
  56. <body>
  57.  
  58. </div>
  59. <h2 class="head" ><center>contraversy</center></h2>
  60. <div class="content">
  61. <p></p>
  62. </div>
  63. <div class="footer">
  64.  
  65. </div>
  66. </body>
  67. </html>
  68.  
  69.  
  70. <!-- END OF HIDDEN HTML -->
  71.  
  72. <?php
  73. }
  74. else
  75. {
  76. // Wrong password or no password entered display this message
  77. if (isset($_POST['password']) || $password == "") {
  78. print "<p align=\"center\"><font color=\"red\"><b>Incorrect Password</b><br>Please enter the correct password</font></p>";}
  79. print "<form method=\"post\"><p align=\"center\">Please enter your password for access<br>";
  80. print "<input name=\"password\" type=\"password\" size=\"25\" maxlength=\"10\"><input value=\"Login\" type=\"submit\"></p></form>";
  81. }
  82.  
  83. ?>
  84. <BR>
  85. </body>
  86. </html>
Advertisement
Add Comment
Please, Sign In to add comment