Advertisement
Guest User

Untitled

a guest
Oct 14th, 2017
91
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 6.36 KB | None | 0 0
  1. <?php
  2.  
  3. echo sha1("%20");
  4. echo "<br />";
  5. echo sha1("&nbsp;");
  6. echo "<br />";
  7. echo sha1(" ");
  8.  
  9. // Check variables.
  10. $fullname = isset($_POST['fullname']) ? $_POST['fullname'] : false;
  11. $username = isset($_POST['username']) ? $_POST['username'] : false;
  12. $password = isset($_POST['password']) ? $_POST['password'] : false;
  13. $repeatpassword = isset($_POST['repeatpassword']) ? $_POST['repeatpassword'] : false;
  14. $date = isset($_POST['date']) ? $_POST['date'] : false;
  15.  
  16. // Set variables.
  17. @$submit = $_POST['submit'];
  18.  
  19. @$fullname = strip_tags($_POST['fullname']);
  20. @$username = strip_tags($_POST['username']);
  21.  
  22. @$password = sha1(strip_tags($_POST['password']));
  23. @$repeatpassword = sha1(strip_tags($_POST['repeatpassword']));
  24. @$date = date("Y-m-d");
  25.  
  26. echo "<h1>Register</h1>";
  27.  
  28. echo "<p><sub>Form status:</sub></p>";
  29. echo "<span class='base4 form_status'>";
  30. if(isset($_POST['fullname'])) {
  31.     if (!empty($_POST['fullname'])) {echo "The fullname has been <b>set</b>.<br />";}
  32.     else {echo "No information entered for <b>fullname</b>.<br />";}
  33. } else {echo "The fullname is <b>not set</b> yet.<br />";}
  34. if(isset($_POST['username'])) {
  35.     if (!empty($_POST['username'])) {echo "The username has been <b>set</b>.<br />";}
  36.     else {echo "No information entered for <b>username</b>.<br />";}
  37. } else {echo "The username is <b>not set</b> yet.<br />";}
  38. if(isset($_POST['password'])) {
  39.     if (!empty($_POST['password'])) {echo "The password has been <b>set</b>.<br />";}
  40.     else {echo "No information entered for <b>password</b>.<br />";}
  41. } else {echo "The password is <b>not set</b> yet.<br />";}
  42. if(isset($_POST['repeatpassword'])) {
  43.     if (!empty($_POST['repeatpassword'])) {echo "The repeated password has been <b>set</b>.<br />";}
  44.     else {echo "No information entered for <b>repeated password</b>.<br />";}
  45. } else {echo "The repeated password is <b>not set</b> yet.<br />";}
  46. echo "</span>";
  47.  
  48. if (($fullname)==='da39a3ee5e6b4b0d3255bfef95601890afd80709'||'b858cb282617fb0956d960215c8e84d1ccf909c6'||'986f2ed15c79ed805000eccd85519810b2db2a93'||'47c1f11ed4d1aad1a1b674bda71a89d4ff562d55') {$fullname = '[MANDATORY!]';}
  49. if (($username)==='da39a3ee5e6b4b0d3255bfef95601890afd80709'||'b858cb282617fb0956d960215c8e84d1ccf909c6'||'986f2ed15c79ed805000eccd85519810b2db2a93'||'47c1f11ed4d1aad1a1b674bda71a89d4ff562d55') {$username = '[MANDATORY!]';}
  50. if (($password)==='da39a3ee5e6b4b0d3255bfef95601890afd80709'||'b858cb282617fb0956d960215c8e84d1ccf909c6'||'986f2ed15c79ed805000eccd85519810b2db2a93'||'47c1f11ed4d1aad1a1b674bda71a89d4ff562d55') {$password = '[MANDATORY!]';}
  51. if (($repeatpassword)==='da39a3ee5e6b4b0d3255bfef95601890afd80709'||'b858cb282617fb0956d960215c8e84d1ccf909c6'||'986f2ed15c79ed805000eccd85519810b2db2a93'||'47c1f11ed4d1aad1a1b674bda71a89d4ff562d55') {$repeatpassword = '[MANDATORY!]';}
  52.  
  53. $sent_data = "<p><b>Full name:</b> $fullname<br /><b>Username:</b> $username</br><b>Password (SHA1-encrypted):</b> <span id='asterix'>$password</span><br /><b>Repeated password (SHA1-encrypted):</b> <span id='asterix'>$repeatpassword</span></p>";
  54.  
  55. if ($submit)
  56. {
  57. echo $sent_data;
  58. }
  59.  
  60. ?>
  61. <html>
  62. <head>
  63. <title>Register form</title>
  64. <script type="text/javascript" src="../../jquery/jquery-1.4.2.js"></script>
  65. <script type="text/javascript">
  66.     $(document).ready(function(){
  67.         $('.button').click(function(){ return true; });
  68.     });
  69. </script>
  70. <style>
  71.     /* The following styles are used only for this page - the actual plugin styles are in slidernav.css */
  72.     * { margin: 0; padding: 0; }
  73.     body { padding: 40px; background: #eee; font-family:'Base 5'; text-shadow: 0.0em 0.0em 0.2em #FFF;}
  74.     a { text-decoration: none; }
  75.     h1, h2, h3 { margin: 0 0 20px; text-shadow: 2px 2px #fff; }
  76.     h2 { font-size: 28px; }
  77.     h3 { font-size: 22px; }
  78.     pre { background: #fff; width: 460px; padding: 10px 20px; border-left: 5px solid #ccc; margin: 0 0 20px; }
  79.     p { width: 500px; font-size: 18px; line-height: 24px; margin: 0 0 30px; }
  80.     input { margin: 0; padding: 0.4em; height: 2.022em; width: 19.2em; font-family: Verdana, Arial; font-size: 12px; line-height: 18px; }
  81.    
  82.     .button {
  83.         padding: 5px 10px;
  84.         display: inline;
  85.         background: #777 url(img/button_shade.png) repeat-x bottom;
  86.         border: none;
  87.         color: #fff;
  88.         cursor: pointer;
  89.         font-weight: bold;
  90.         border-radius: 5px;
  91.         -moz-border-radius: 5px;
  92.         -webkit-border-radius: 5px;
  93.         text-shadow: 1px 1px #666;
  94.         }
  95.     .button:hover {
  96.         background-position: 0 center;
  97.         }
  98.     .button:active {
  99.         background-position: 0 top;
  100.         position: relative;
  101.         top: 1px;
  102.         padding: 6px 10px 4px;
  103.         }
  104.     .button.red { background-color: #e50000; }
  105.     .button.purple { background-color: #9400bf; }
  106.     .button.green { background-color: #58aa00; }
  107.     .button.orange { background-color: #ff9c00; }
  108.     .button.blue { background-color: #2c6da0; }
  109.     .button.black { background-color: #333; }
  110.     .button.white { background-color: #fff; color: #000; text-shadow: 1px 1px #fff; }
  111.     .button.small { font-size: 75%; padding: 3px 7px; }
  112.     .button.small:active { padding: 4px 7px 2px; background-position: 0 top; }
  113.     .button.large { font-size: 125%; padding: 7px 12px; }
  114.     .button.large:active { padding: 8px 12px 6px; background-position: 0 top; }
  115. </style>
  116. <style type="text/css">
  117. #asterix {color:transparent;}
  118. .form_status {color: lightgreen; text-shadow: 0.0em 0.0em 0.3em #222, 0.0em 0.0em 0.1em #000;}
  119. @font-face {font-family: "Base 4"; src: url(../../fonts/base4.ttf);}
  120. @font-face {font-family: "Base 5"; src: url(../../fonts/base5.ttf);}
  121. @font-face {font-family: "Base 6"; src: url(../../fonts/base6.ttf);}
  122. .base4 {font-family: "Base 4"; font-size: 100%;}
  123. .base5 {font-family: "Base 5"; font-size: 100%; src: url(../../fonts/base5.ttf);}
  124. .base6 {font-family: "Base 6"; font-size: 100%; src: url(../../fonts/base6.ttf);}
  125. </style>
  126. </head>
  127. <body>
  128. <p>
  129. <form name="register_form" action='register.php' method='POST'>
  130.     <table>
  131.         <tr>
  132.             <td>
  133.             Your full name:
  134.             </td>
  135.             <td>
  136.             <input type='text' name='fullname'>
  137.             </td>
  138.         </tr>
  139.         <tr>
  140.             <td>
  141.             Choose a username:
  142.             </td>
  143.             <td>
  144.             <input type='text' name='username'>
  145.             </td>
  146.         </tr>
  147.         <tr>
  148.             <td>
  149.             Choose a password:
  150.             </td>
  151.             <td>
  152.             <input type='password' name='password'>
  153.             </td>
  154.         </tr>
  155.         <tr>
  156.             <td>
  157.             Repeat your password:
  158.             </td>
  159.             <td>
  160.             <input type='password' name='repeatpassword'>
  161.             </td>
  162.         </tr>
  163.     </table>
  164.     <p>
  165.     <input type='submit' name='submit' value='Register' class='base5 button green'>
  166. </form>
  167. </p>
  168. </body>
  169. </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement