Advertisement
Guest User

Untitled

a guest
May 14th, 2017
73
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.17 KB | None | 0 0
  1. <?php
  2.  
  3. #### Display Functions ####
  4.  
  5. function show_userbox()
  6. {
  7. // retrieve the session information
  8. $u = $_SESSION['username'];
  9. $uid = $_SESSION['loginid'];
  10. // display the user box
  11. echo "<div id='userbox'>
  12. Welcome $u
  13. <a href='./logout.php'>Logout</a>
  14. </ul>
  15. </div>";
  16. }
  17.  
  18. function show_loginform($disabled = false)
  19. {
  20.  
  21. echo '<form name="login-form" id="login-form" method="post" action="./index.php">
  22. <fieldset>
  23. <legend>Please login</legend>
  24. <dl>
  25. <dt><label title="Username">Username: </label></dt>
  26. <dd><input tabindex="1" accesskey="u" name="username" type="text" maxlength="30" id="username" /></dd>
  27. </dl>
  28. <dl>
  29. <dt><label title="Password">Password: </label></dt>
  30. <dd><input tabindex="2" accesskey="p" name="password" type="password" maxlength="15" id="password" /></dd>
  31. </dl>
  32. <ul>
  33. <li><a href="./register.php" title="Register">Register</a></li>
  34. <li><a href="./lostpassword.php" title="Lost Password">Lost password?</a></li>
  35. </ul>
  36. <p><input tabindex="3" accesskey="l" type="submit" name="cmdlogin" value="Login" ';
  37. if ($disabled == true)
  38. {
  39. echo 'disabled="disabled"';
  40. }
  41. echo ' /></p></fieldset></form>';
  42.  
  43.  
  44. }
  45.  
  46. function show_registration_form(){
  47.  
  48. echo '<form action="./register.php" method="post">
  49. <fieldset><legend>Register</legend>
  50. <dl>
  51. <dt><label for="username">Username:</label></dt>
  52. <dd><input name="username" type="text" id="username" maxlength="30">
  53. </dd>
  54. </dl>
  55. <dl>
  56. <dt><label for="password">Password:</label></dt>
  57. <dd><input name="password" type="password" id="password" maxlength="15">
  58. </dd>
  59. </dl>
  60. <dl>
  61. <dt><label for="password2">Re-type password:</label></dt>
  62. <dd><input name="password2" type="password" id="password2" maxlength="15">
  63. </dd>
  64. </dl>
  65. <dl>
  66. <dt><label for="email">email:</label></dt>
  67. <dd><input name="email" type="text" id="email" maxlength="255">
  68. </dd>
  69. </dl>
  70. <p>
  71. <input name="reset" type="reset" value="Reset">
  72. <input name="register" type="submit" value="Register">
  73. </p>
  74. </fieldset>
  75. </form>';
  76.  
  77. }
  78. ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement