Advertisement
Guest User

Untitled

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