changed reply button to only be there when user is logged in

master
BodgeMaster 2021-09-07 10:39:53 +02:00
parent 952ad0bcc2
commit 205fcdea42
1 changed files with 8 additions and 3 deletions

View File

@ -28,11 +28,16 @@ foreach($statement->fetchAll() as $ROW) {
$reply_reference = "";
}
// determine whether to put a reply button
if ($login) {
$reply_button = "<a href=\"./?id=" . $_GET['id'] . "&action=post&reply_to=$post_id&end\" class=\"post_reply\"><button class=\"post_reply\">Reply</button></a>";
} else {
$reply_button = ""
}
echo "<section id=\"$post_id\" >
<div>
<a href=\"./?id=" . $_GET['id'] . "&action=post&reply_to=$post_id&end\" class=\"post_reply\">
<button class=\"post_reply\">Reply</button>
</a>
$reply_button
<h1 class=\"post\">$post_title</h1>
$reply_reference
</div>