123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100 |
- <html>
-
- <head>
- <link rel="stylesheet" href="style.css">
- </head>
-
- <?php
-
- require_once "ships.inc";
- require_once "dbase.inc";
- require_once "login.inc";
- require_once "gamefunction.inc";
- require_once "gamevisual.inc";
- session_start();
-
- logoutUser();
- checkLogin();
- loginTimout();
-
- ?>
-
- <body class="game">
-
- <?php $inputResult = validateInput(); ?>
-
- <main class="gamemain">
- <h1> Welkom <?= $_SESSION["spelerNaam"]; ?></h1>
-
- <!-- visual table shows hits/misses -->
- <table>
- <thead>
- <tr>
- <?php theadVisualTable(); ?>
- </tr>
- </thead>
- <tbody>
- <tr>
- <?php tbodyVisualTable(); ?>
- </tr>
- </tbody>
- </table>
-
- <!-- put in coordinate shot or try again-->
- <form action="<?php echo htmlspecialchars($_SERVER["PHP_SELF"]); ?>" method="POST">
- <?php
- shotForm();
- difficultyForm();
- ?>
- <input type="submit" class="difficulty__selection" <?php submitButtonValue(); ?>>
- </form>
-
- <?php
- showGameResult();
- echo $inputResult;
- ?>
-
- <p> <?php showShotsLeft(); ?> </p>
-
- <!-- logout button -->
- <form action="<?php echo htmlspecialchars($_SERVER["PHP_SELF"]); ?>" method="POST">
- <input type="submit" value="logout" name="logout" class="difficulty__selection">
- </form>
-
-
- <!-- high score table -->
- <table>
- <caption>
- High Scores
- </caption>
- <thead>
- <tr>
- <th>Naam</th>
- <th>Score</th>
- </tr>
- </thead>
- <tbody>
- <?php tbodyHighScores(); ?>
- </tbody>
- </table>
-
- <!-- User score table -->
- <table>
- <caption>
- History results <?= $_SESSION['spelerNaam']; ?>
- </caption>
- <thead>
- <tr>
- <th>Datum</th>
- <th>Score</th>
- <th>Difficulty</th>
- </tr>
- </thead>
- <tbody>
- <?php tbodyUserScores(); ?>
- </tbody>
- </table>
- </main>
- </body>
-
- </html>
|