| 12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485 |
- <?php
- /**
- * Login view.
- *
- * Contains the view layout and some code to present the data.
- *
- * @author Iñigo Valentin <i@inigovalentin.com>
- * @license https://www.gnu.org/licenses/gpl-3.0.en.html GNU General Public License V3
- * @package SWDB
- * @category View
- * @property Login_Page $page The page model.
- * @var Login_Page $page The page model.
- */
- ?>
- <!DOCTYPE html>
- <html lang='en'>
- <head>
- <?=$page->generate_head()?>
- </head>
- <body>
- <header>
- <?php
- include __DIR__ . "/inc/header_app.php";
- ?>
- </header>
- <aside>
- </aside>
- <main>
- <section class='list'>
- <h2>
- Select player
- </h2>
- <article>
- <!-- TODO: Action via JS, and fallback in controller -->
- <form method='POST' action='/action/login/'>
- <table>
- <tr>
- <td class='label'>
- <label for='uname'>
- Player
- </label>
- </td>
- <td class='input'>
- <input type='text' name='uname' id='uname' required/>
- </td>
- </tr>
- <tr>
- <td class='label'>
- <label for='password'>
- Password
- </label>
- </td>
- <td class='input'>
- <input type='password' name='password' id='password' required/>
- </td>
- </tr>
- <tr>
- <td class='submit' colspan='2'>
- <input type='submit' value='Go'/>
- </td>
- </tr>
- <?php
- if ($page->is_error()){
- ?>
- <tr>
- <td class='error' colspan='2'>
- <span>
- <?=$page->get_error_message()?>
- </span>
- </td>
- </tr>
- <?php
- }
- ?>
- </table>
- </form>
- </article>
- </section> <!-- #catalog -->
- </main>
- <?php
- include __DIR__ . "/inc/footer.php";
- ?>
- </body>
- </html>
|