PageRenderTime 43ms CodeModel.GetById 20ms RepoModel.GetById 0ms app.codeStats 0ms

/libs/cgi/example/cgi/cookies2/index.html

http://github.com/darrengarvey/cgi
HTML | 53 lines | 46 code | 7 blank | 0 comment | 0 complexity | fdc7cd143daafa89d9a1ac0c5c2b787d MD5 | raw file
  1. <html>
  2. <head>
  3. <title>aCGI Cookie Game Example (using Google cTemplate)</title>
  4. <link rel="stylesheet" type="text/css" href="/css/style.css" />
  5. <script type="text/javascript" src="/js/main.js"></script>
  6. </head>
  7. <body>
  8. {{#HAS_NAME_IN_COOKIE_true}}
  9. <h1>Hello again {{USER_NAME}}</h1>
  10. <p><a href="?reset=true"><input type="submit" value="Reset" /></a></p>
  11. {{/HAS_NAME_IN_COOKIE_true}}
  12. {{#HAS_NAME_IN_COOKIE_false}}
  13. <h1>Hello there.</h1>
  14. {{/HAS_NAME_IN_COOKIE_false}}
  15. <p>Here is list of the cookies you currently have for this site:</p>
  16. {{#DATA_MAP}}
  17. {{#ERROR}}
  18. EMPTY
  19. {{/ERROR}}
  20. <ul class="nvpair">
  21. {{#ROW}}
  22. <li class="name">{{NAME}}</li>
  23. <li class="value">{{VALUE}}
  24. <a href="?name={{NAME}}&del=checked">Remove</a>
  25. </li>
  26. {{/ROW}}
  27. <div class="clear"></div>
  28. </ul>
  29. {{/DATA_MAP}}
  30. <p>
  31. You can add cookies using the form below.
  32. If you add a cookie value for 'name', it will show up above.
  33. </p>
  34. <form method="get" action="{{SCRIPT_NAME}}" id="getform">
  35. <label for="name" class="name">Name:</label>
  36. <input id="name" name="name" class="value" type="text" value=" {{COOKIE_NAME}}"></input>
  37. <label for="value" class="name">Value:</label>
  38. <input id="value" name="value" class="value" type="text" value=" {{COOKIE_VALUE}}"></input>
  39. <label for="del" class="name">Delete this cookie?</label>
  40. <input id="del" name="del" class="value" type="checkbox"></input>
  41. <div class="clear"></div>
  42. <input type="submit"></input>
  43. </form>
  44. <input type="submit" onclick="switch_method('getform'); switch_value(this); return false;" value="Switch to POST"></input>
  45. </body>
  46. </html>