login.php 2.7 KB

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