32 lines
810 B
PHP
32 lines
810 B
PHP
<?php
|
|
$games = file("games.txt", FILE_IGNORE_NEW_LINES | FILE_SKIP_EMPTY_LINES);
|
|
$game = $games[array_rand($games)];
|
|
?>
|
|
<!DOCTYPE html>
|
|
<html>
|
|
<head>
|
|
<title>pin</title>
|
|
<link rel="stylesheet" href="../gruvbox/gruvbox.min.css">
|
|
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
|
</head>
|
|
<body id="top">
|
|
<main>
|
|
<h1>right brain pin picker</h1>
|
|
|
|
<p>reload the page to pick a table</p>
|
|
|
|
<ul>
|
|
<?php foreach ($games as $g) {
|
|
if ($g === $game) { ?>
|
|
<li><strong><mark><?=$g?></mark></strong></li>
|
|
<?php } else { ?>
|
|
<li><?=$g?></li>
|
|
<?php }
|
|
} ?>
|
|
</ul>
|
|
|
|
</main>
|
|
</body>
|
|
</html>
|
|
|