PageRenderTime 105ms CodeModel.GetById 29ms RepoModel.GetById 1ms app.codeStats 0ms

/libs/cgi/doc/src/utilities/sessions/sessions_quickstart.html

http://github.com/darrengarvey/cgi
HTML | 83 lines | 75 code | 8 blank | 0 comment | 0 complexity | 7b77e04657ba93d8f630cdf0e4eadff5 MD5 | raw file
  1. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
  2. "DTD/xhtml1-strict.dtd">
  3. <html>
  4. <head>
  5. <title>Basic Login Example</title>
  6. <style type="text/css">
  7. body {
  8. width: 100%;
  9. padding: 0;
  10. margin: 0;
  11. }
  12. #body {
  13. padding: 10px;
  14. width: 400px;
  15. }
  16. {{#LOGIN_FORM}}
  17. #login-form {
  18. background: #C8F0B7;
  19. border:2px solid #98D087;
  20. padding:10px;
  21. }
  22. #login-form label {
  23. float: left;
  24. text-align: right;
  25. padding: 0px 10px;
  26. width: 150px;
  27. display: block;
  28. }
  29. #login-form input {
  30. margin: 0 10px;
  31. }
  32. {{/LOGIN_FORM}}
  33. {{#HAS_ERROR}}
  34. div.error {
  35. border: 2px solid #dd4444;
  36. background: #ffaaaa;
  37. padding: 5px 10px;
  38. text-align: center;
  39. -moz-border-radius: 10px;
  40. }
  41. {{/HAS_ERROR}}
  42. </style>
  43. </head>
  44. <body>
  45. <div id="body">
  46. {{#HAS_ERROR}}
  47. <div class="error">{{error}}</div>
  48. {{/HAS_ERROR}}
  49. Last Accessed: {{last_accessed}} UTC
  50. {{#AUTHENTICATED_PAGE}}
  51. {{! This is a comment. Note that the ":h" below is a modifier that HTML-encodes the email address.}}
  52. <p>Hello, <a href="mailto:{{user_email:h}}">{{user_name:h}}</a> from {{user_location}}!</p>
  53. <p><a href="?logout">Log Out</a></p>
  54. {{/AUTHENTICATED_PAGE}}
  55. {{#DEFAULT_PAGE}}
  56. <p>Hello, world.</p>
  57. {{/DEFAULT_PAGE}}
  58. {{#LOGIN_FORM}}
  59. <p>Log in below.</p>
  60. <form id="login-form" method="post">
  61. <div>
  62. <label for="name">Name:</label>
  63. <input type="text" id="name" name="name" value="{{user_name}}">
  64. </div>
  65. <div>
  66. <label for="pass">Password:</label>
  67. <input type="password" id="pass" name="pass" value="">
  68. </div>
  69. <input type="hidden" name="login" value="1">
  70. <input type="submit" name="submit" value="Submit">
  71. </form>
  72. {{/LOGIN_FORM}}
  73. </div>
  74. </body>
  75. </html>