59 lines
1.1 KiB
PHP
59 lines
1.1 KiB
PHP
<html lang="en">
|
|
<head>
|
|
<title>Babblebox</title>
|
|
<style type="text/css">
|
|
body {
|
|
background-image: url('/img/background.jpg');
|
|
color: black;
|
|
font: 11px verdana;
|
|
margin: 0px;
|
|
padding: 0px;
|
|
}
|
|
|
|
div {
|
|
padding: 2px;
|
|
border: solid 1px black;
|
|
margin: 2px;
|
|
text-align: left;
|
|
}
|
|
|
|
a {
|
|
color: #663300;
|
|
text-decoration: none;
|
|
font-weight: bold;
|
|
}
|
|
|
|
a:hover {
|
|
color: #330000;
|
|
}
|
|
|
|
div.message {
|
|
background-color: white;
|
|
}
|
|
|
|
div.message:nth-child(even) {
|
|
background-color: #eeeeee;
|
|
}
|
|
</style>
|
|
</head>
|
|
|
|
<body onload="window.scrollTo(0, 99999)">
|
|
<?php
|
|
$has_chats = false;
|
|
while ($row = $messages->fetchArray(SQLITE3_ASSOC)):
|
|
$has_chats = true;
|
|
?>
|
|
<div class="message">[<b><?= $row['author'] ?></b>] <?= $row['babble'] ?></div>
|
|
<?php
|
|
endwhile;
|
|
if (!$has_chats) echo 'There are no messages. :(';
|
|
?>
|
|
|
|
<form action="/babblebox" method="post" style="margin-top: 1rem;">
|
|
<input type="text" name="babble" maxlength="255" style="width: 100%;"><br>
|
|
<input type="submit" name="submit" value="Babble">
|
|
<input type="reset" name="reset" value="Clear">
|
|
</form>
|
|
</body>
|
|
</html>
|