login.php 2.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283
  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. <header>
  22. <?php
  23. include __DIR__ . "/inc/header_app.php";
  24. ?>
  25. </header>
  26. <aside>
  27. </aside>
  28. <main>
  29. <section class='list'>
  30. <h2>
  31. Select player
  32. </h2>
  33. <article>
  34. <!-- TODO: Action via JS, and fllback in controller -->
  35. <form method='POST' action='/action/login/'>
  36. <table>
  37. <tr>
  38. <td class='label'>
  39. <label for='uname'>
  40. Player
  41. </label>
  42. </td>
  43. <td class='input'>
  44. <input type='text' name='uname' id='uname' required/>
  45. </td>
  46. </tr>
  47. <tr>
  48. <td class='label'>
  49. <label for='password'>
  50. Password
  51. </label>
  52. </td>
  53. <td class='input'>
  54. <input type='password' name='password' id='password' required/>
  55. </td>
  56. </tr>
  57. <tr>
  58. <td class='submit' colspan='2'>
  59. <input type='submit' value='Go'/>
  60. </td>
  61. </tr>
  62. <?php
  63. if ($page->is_error()){
  64. ?>
  65. <tr>
  66. <td class='error' colspan='2'>
  67. <?=$page->error_message?>
  68. </td>
  69. </tr>
  70. <?php
  71. }
  72. ?>
  73. </table>
  74. </form>
  75. </article>
  76. </section> <!-- #catalog -->
  77. </main>
  78. <?php
  79. include __DIR__ . "/inc/footer.php";
  80. ?>
  81. </body>
  82. </html>