summaryrefslogtreecommitdiff
path: root/web
diff options
context:
space:
mode:
Diffstat (limited to 'web')
-rw-r--r--web/home.php50
-rw-r--r--web/welcome.php3
2 files changed, 53 insertions, 0 deletions
diff --git a/web/home.php b/web/home.php
new file mode 100644
index 0000000..fdcd976
--- /dev/null
+++ b/web/home.php
@@ -0,0 +1,50 @@
+<?php
+
+// define site root
+define('SITE_ROOT', realpath('../'));
+
+// Bring in our composer autoloader
+require SITE_ROOT . '/vendor/autoload.php';
+
+use App\Core\Main;
+
+if ($_POST) {
+ $name = $_POST['name'];
+ $game = $_POST['game'];
+ $action = $_POST['action'];
+ new Main($name, $game, $action);
+ exit;
+}
+?>
+
+<html>
+
+ <head>
+
+ </head>
+
+ <body>
+
+ <div class="welcome">
+
+ <h1>Welcome</h1>
+ <p>This is a trial of a game</p>
+
+ </div>
+
+ <div class="identify">
+
+ <form class="identify__form" action="" method="post">
+ <label for="identify-name">Enter a Nickname</label>
+ <input type="text" name="name" value="" placeholder="Example: CoolDude69">
+ <label for="identify-name">Enter a Game Code</label>
+ <input type="text" name="game" value="" placeholder="#abc123">
+ <input type="hidden" name="action" value="identify">
+ <button type="submit" name="identify-action">Go</button>
+ </form>
+
+ </div>
+
+ </body>
+
+</html>
diff --git a/web/welcome.php b/web/welcome.php
new file mode 100644
index 0000000..568ecf2
--- /dev/null
+++ b/web/welcome.php
@@ -0,0 +1,3 @@
+<?php
+
+echo $this->game->getHandler()->renderWelcome();