|
|
@@ -0,0 +1,82 @@
|
|
|
+<!DOCTYPE html>
|
|
|
+<html lang='en'>
|
|
|
+ <head>
|
|
|
+ <meta content='text/html; charset=utf-8' http-equiv='content-type'/>
|
|
|
+ <meta name='viewport' content='width=device-width, initial-scale=1, maximum-scale=1, minimum-scale=1'/>
|
|
|
+ <title><?=$page->title?></title>
|
|
|
+ <link rel='shortcut icon' href='<?=$page->favicon?>'/>
|
|
|
+ <!-- CSS files -->
|
|
|
+ <link rel='stylesheet' type='text/css' href='<?=$path["css"]?>ui.css'/>
|
|
|
+ <link rel='stylesheet' type='text/css' href='<?=$path["css"]?>landing.css'/>
|
|
|
+ <!-- Script files -->
|
|
|
+ <script src="<?=$path["js"]?>ui.js"></script>
|
|
|
+ <!-- Meta tags -->
|
|
|
+ <link rel='canonical' href='<?=$page->canonical?>'/>
|
|
|
+ <link rel='author' href='<?=$page->author?>'/>
|
|
|
+ <link rel='publisher' href='<?=$page->author?>'/>
|
|
|
+ <meta name='description' content='<?=$page->description?>'/>
|
|
|
+ <meta property='og:title' content='<?=$page->title?>'/>
|
|
|
+ <meta property='og:url' content='<?=$page->canonical?>'/>
|
|
|
+ <meta property='og:description' content='<?=$page->description?>'/>
|
|
|
+ <meta property='og:image' content='<?=$page->icon?>'/>
|
|
|
+ <meta property='og:site_name' content='<?=$page->name?>'/>
|
|
|
+ <meta property='og:type' content='website'/>
|
|
|
+ <meta property='og:locale' content='en'/>
|
|
|
+ <meta name='twitter:card' content='summary'/>
|
|
|
+ <meta name='twitter:title' content='<?=$page->title?>'/>
|
|
|
+ <meta name='twitter:description' content='<?=$page->description?>'/>
|
|
|
+ <meta name='twitter:image' content='<?=$page->icon?>'/>
|
|
|
+ <meta name='twitter:url' content='<?=$page->canonical?>'/>
|
|
|
+ <meta name='robots' content='index follow'/>
|
|
|
+ <script>
|
|
|
+ /**
|
|
|
+ * Performs the login action, andrredirects to the user home page.
|
|
|
+ *
|
|
|
+ * Intended to be called before parsing form action.
|
|
|
+ *
|
|
|
+ * @return Always false, to stop th actual form to be submitted.
|
|
|
+ */
|
|
|
+ function login(){
|
|
|
+ sel = document.getElementById('uid');
|
|
|
+ uid = sel.options[sel.selectedIndex].value;
|
|
|
+ if (uid.match(/^[0-9]{7}$/g) != null){
|
|
|
+ document.location='/' + uid + '/';
|
|
|
+ }
|
|
|
+ //else{
|
|
|
+ // TODO alert('N UID');
|
|
|
+ //}
|
|
|
+ return false;
|
|
|
+ }
|
|
|
+ </script>
|
|
|
+ </head>
|
|
|
+ <body>
|
|
|
+<?php
|
|
|
+ include __DIR__ . "/inc/header.php";
|
|
|
+?>
|
|
|
+ <section class='list'>
|
|
|
+ <h2>
|
|
|
+ Select player
|
|
|
+ </h2>
|
|
|
+ <article>
|
|
|
+ <!-- TODO: Action via JS, and fllback in controller -->
|
|
|
+ <form method='GET' action='/' onsubmit="return login();">
|
|
|
+ <select id='uid' name='uid'>
|
|
|
+ <option value='0'> </option>
|
|
|
+<?php
|
|
|
+ foreach ($page->players as $player_id => $player_name){
|
|
|
+?>
|
|
|
+ <option value='<?=$player_id?>'><?=$player_name?></option>
|
|
|
+<?php
|
|
|
+ }
|
|
|
+?>
|
|
|
+ </select>
|
|
|
+ <input type='submit' value='Go'/>
|
|
|
+ </form>
|
|
|
+ </article>
|
|
|
+ </section> <!-- #catalog -->
|
|
|
+
|
|
|
+<?php
|
|
|
+ include __DIR__ . "/inc/footer.php";
|
|
|
+?>
|
|
|
+ </body>
|
|
|
+</html>
|