who reads these
This commit is contained in:
parent
3d70af386d
commit
e02816e81e
1 changed files with 12 additions and 14 deletions
|
@ -18,24 +18,12 @@
|
||||||
page_header();
|
page_header();
|
||||||
|
|
||||||
$form_message = post_handler();
|
$form_message = post_handler();
|
||||||
|
|
||||||
if ($username) {
|
|
||||||
form("Broadcast your thoughts...", $form_message, array(
|
|
||||||
array('key' => 'Your message', 'type' => 'textarea', 'name' => 'post', 'default' => '')
|
|
||||||
));
|
|
||||||
}
|
|
||||||
|
|
||||||
$stmt = $db->prepare("SELECT * FROM comment ORDER BY date DESC");
|
|
||||||
$stmt->execute([]);
|
|
||||||
|
|
||||||
$posts = $stmt->fetchAll(PDO::FETCH_DEFAULT);
|
|
||||||
|
|
||||||
?>
|
?>
|
||||||
|
|
||||||
<div class="banner"><img class="banner-background" src="/img/newlogo.svg">
|
<div class="banner"><img class="banner-background" src="/img/newlogo.svg">
|
||||||
<div class="banner-content">
|
<div class="banner-content">
|
||||||
<h1>BiglyChat</h1>
|
<h1>BiglyChat</h1>
|
||||||
<p>BiglyChat is a niche community for weird Dervland experiments and games.</p>
|
<pre>BiglyChat is a niche community for weird Dervland experiments and games.</pre>
|
||||||
<h2>Community</h2>
|
<h2>Community</h2>
|
||||||
|
|
||||||
<a class="form-button" href="/register.php">Join the Community</a>
|
<a class="form-button" href="/register.php">Join the Community</a>
|
||||||
|
@ -47,7 +35,17 @@
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<?php
|
<?php
|
||||||
|
if ($username) {
|
||||||
|
form("Broadcast your thoughts...", $form_message, array(
|
||||||
|
array('key' => 'Your message', 'type' => 'textarea', 'name' => 'post', 'default' => '')
|
||||||
|
));
|
||||||
|
}
|
||||||
|
|
||||||
|
$stmt = $db->prepare("SELECT * FROM comment ORDER BY date DESC");
|
||||||
|
$stmt->execute([]);
|
||||||
|
|
||||||
|
$posts = $stmt->fetchAll(PDO::FETCH_DEFAULT);
|
||||||
|
|
||||||
foreach ($posts as $post) { ?>
|
foreach ($posts as $post) { ?>
|
||||||
<div class='comment'>
|
<div class='comment'>
|
||||||
|
|
Loading…
Reference in a new issue