board is visible to public, posting is only possible when logged in

master
Jakob 2020-03-08 18:19:37 +01:00
parent 55977fcf05
commit 7b544103af
1 changed files with 14 additions and 13 deletions

View File

@ -3,7 +3,6 @@ session_start();
%SET_LOGIN_VARIABLE%
%NO_CHEAP_SESSION_STEALING%
%PLEAZE_NO_CACHE%
%REQUIRE_LOGIN%
$navbar="boards";
$id=$_GET['id'];
?>
@ -51,19 +50,21 @@ $id=$_GET['id'];
</div>
<div class="item-3">
<?php
if(isset($_GET['action'])) {
if($_GET['action']=='post') {
include("./post.php");
} elseif($_GET['action']=='submit') {
$user_id=$_SESSION[user_id];
$title=$_POST['title'];
$content=$_POST['content'];
include("./submit.php");
} elseif($_GET['action']=='edit') {
include("./edit.php");
if($login) {
if(isset($_GET['action'])) {
if($_GET['action']=='post') {
include("./post.php");
} elseif($_GET['action']=='submit') {
$user_id=$_SESSION[user_id];
$title=$_POST['title'];
$content=$_POST['content'];
include("./submit.php");
} elseif($_GET['action']=='edit') {
include("./edit.php");
}
} else {
include("./default.php");
}
} else {
include("./default.php");
}
?>
</div>