You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

45 lines
1.4 KiB

  1. local etlua = require"etlua"
  2. local form = etlua.compile[[
  3. <!DOCTYPE html>
  4. <html>
  5. <head>
  6. <title>Yokokas Quest Character Profile Creator</title>
  7. </head>
  8. <body>
  9. <%= data %>
  10. <form action="/cgi/yqtemplate" method="post">
  11. <label for="name">Character name:</label>
  12. <input type="text" id="name" name="name" /><br>
  13. <label for="class1">Class 1:</label>
  14. <select name=class1 id=class1>
  15. <option value=1>Beast</option>
  16. <option value=2>Swordsman</option>
  17. <option value=3>Spirit Bird</option>
  18. <option value=4>Twin Blades</option>
  19. <option value=5>Healer</option>
  20. <option value=6>Summoner</option>
  21. <option value=7>Tamer</option>
  22. <option value=8>Pugilist</option>
  23. <option value=9>Mounted Fighter</option>
  24. <option value=10>Fruit Animal</option>
  25. <option value=11>Spellcaster</option>
  26. </select>
  27. <input type="submit" value="Generate">
  28. </form>
  29. <hr />
  30. Based on the character profiles in the webcomic <a
  31. href=https://yokokasquest.com>Yokokas Quest</a> by Chris Hyacinth R. Assets
  32. shared by the author on the <a
  33. href=https://forums.cisumchronicles.com/>webcomics forums</a>.
  34. </body>
  35. </html>
  36. ]]
  37. return {
  38. desc = "Creates Yokoka’s quest-style personal status page",
  39. run = function(fcgi)
  40. fcgi.print("Content-Type: text/html; charset=utf-8\r\n\r\n")
  41. local data = fcgi.post()
  42. fcgi.print(form({data = data}))
  43. end
  44. }