Файловый менеджер - Редактировать - /var/www/jonas-eriksen.dk/anfald/index.php
Назад
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/> <?php include 'database_anfald.php'; $db = new database(); $latest = $db->get_latest_input(); $all = $db->get_all(); $timezone = +1; ?> <style> table { font-family: arial, sans-serif; border-collapse: collapse; width: 100%; } td, th { border: 1px solid #dddddd; text-align: left; padding: 8px; } </style> <h1>Anfald</h1> <table class="table"> <thead> <tr> <th>Dato</th> <th>Besvimet</th> <th>Ryk i kroppen</th> <th>Mærkelig følelse</th> <th>Kommentar</th> <th></th> </tr> </thead> <tbody> <tr> <form id="usrform" method="POST" action="/insert.php"> <td><input type="date" name="date"></td> <td><input type="checkbox" name="faint"></td> <td><input type="checkbox" name="twitch"></td> <td><input type="checkbox" name="feeling"></td> <td><textarea name="comment" form="usrform"></textarea></td> <td><input type="submit"></td> </form> </tr> </tbody> </table> <h2>Seneste</h2> <table class="table"> <thead> <tr> <th>Dato</th> <th>Besvimet</th> <th>Ryk i kroppen</th> <th>Mærkelig følelse</th> <th>Kommentar</th> </tr> </thead> <tbody> <tr> <td><?php echo gmdate("Y-m-d", $latest['date'] + 3600*($timezone+date("I"))); ?></td> <td> <?php if ($latest['faint']) { echo '✓'; } else { echo '☓'; } ?> </td> <td> <?php if ($latest['twitch']) { echo '✓'; } else { echo '☓'; } ?> </td> <td> <?php if ($latest['feeling']) { echo '✓'; } else { echo '☓'; } ?> </td> <td> <?php echo utf8_encode(nl2br($latest['comment'])); ?> </td> </tr> </tbody> </table> <h2>Alle</h2> <table class="table"> <thead> <tr> <th>Dato</th> <th>Besvimet</th> <th>Ryk i kroppen</th> <th>Mærkelig følelse</th> <th>Kommentar</th> </tr> </thead> <tbody> <?php foreach($all as $k=>$v) { ?> <tr> <td><?php echo gmdate("Y-m-d", $v['date'] + 3600*($timezone+date("I"))); ?></td> <td> <?php if ($v['faint']) { echo '✓'; } else { echo '☓'; } ?> </td> <td> <?php if ($v['twitch']) { echo '✓'; } else { echo '☓'; } ?> </td> <td> <?php if ($v['feeling']) { echo '✓'; } else { echo '☓'; } ?> </td> <td> <?php echo utf8_encode(nl2br($v['comment'])); ?> </td> </tr> <?php } ?> </tbody> </table>
| ver. 1.4 |
Github
|
.
| PHP 7.4.33 | Генерация страницы: 0 |
proxy
|
phpinfo
|
Настройка