login.php 2.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081
  1. <?php
  2. /**
  3. * Login view.
  4. *
  5. * Contains the view layout and some code to present the data.
  6. *
  7. * @author Iñigo Valentin <i@inigovalentin.com>
  8. * @license https://www.gnu.org/licenses/gpl-3.0.en.html GNU General Public License V3
  9. * @package SWDB
  10. * @category View
  11. * @property Login_Page $page The page model.
  12. * @var Login_Page $page The page model.
  13. */
  14. ?>
  15. <!DOCTYPE html>
  16. <html lang='en'>
  17. <head>
  18. <?=$page->generate_head()?>
  19. </head>
  20. <body>
  21. <?php
  22. include __DIR__ . "/inc/header_app.php";
  23. ?>
  24. <aside>
  25. </aside>
  26. <main>
  27. <section class='list'>
  28. <h2>
  29. Select player
  30. </h2>
  31. <article>
  32. <!-- TODO: Action via JS, and fllback in controller -->
  33. <form method='POST' action='/action/login/'>
  34. <table>
  35. <tr>
  36. <td class='label'>
  37. <label for='uname'>
  38. Player
  39. </label>
  40. </td>
  41. <td class='input'>
  42. <input type='text' name='uname' id='uname' required/>
  43. </td>
  44. </tr>
  45. <tr>
  46. <td class='label'>
  47. <label for='password'>
  48. Password
  49. </label>
  50. </td>
  51. <td class='input'>
  52. <input type='password' name='password' id='password' required/>
  53. </td>
  54. </tr>
  55. <tr>
  56. <td class='submit' colspan='2'>
  57. <input type='submit' value='Go'/>
  58. </td>
  59. </tr>
  60. <?php
  61. if ($page->is_error()){
  62. ?>
  63. <tr>
  64. <td class='error' colspan='2'>
  65. <?=$page->error_message?>
  66. </td>
  67. </tr>
  68. <?php
  69. }
  70. ?>
  71. </table>
  72. </form>
  73. </article>
  74. </section> <!-- #catalog -->
  75. </main>
  76. <?php
  77. include __DIR__ . "/inc/footer.php";
  78. ?>
  79. </body>
  80. </html>