general fixes and changes

This commit is contained in:
Andreas Schaafsma 2019-06-15 19:19:09 +02:00
parent 2f04de5692
commit 08693663f8
7 changed files with 24 additions and 4 deletions

View File

@ -92,7 +92,6 @@ Class UserSession{
return false;
}
*/
//session exists, no need to do anything
if(isset($_SESSION['usersession'])){
return true;
@ -109,6 +108,7 @@ Class UserSession{
return true;
}
else{
//remove session from the database
Database::invalidateSession($_COOKIE['usersession']);
}
}

View File

@ -14,5 +14,4 @@ class Thread{
array_push(Thread::$threadArray, $this);
}
}
?>

View File

@ -22,8 +22,8 @@ ActionHandler::doAction();
//Store de geselecteerde model in variabele $model
$model=HUtils::getPage(HUtils::FETCHPOST);
//Model side operaties die afgerond moeten worden voor de paginacontent in wordt geladen
$model = "./model/model_".$model.".php";
if($page != ""){
$path = "./model/model_".$model.".php";
if($model != ""){
if(file_exists($path)){
include_once($path);
}

View File

View File

@ -0,0 +1,19 @@
<?php
require('./model/User.php');
class Thread{
private $id;
private $title;
private $content;
function Thread(){
}
}
?>

View File

View File

@ -8,7 +8,9 @@ if(UserSession::isUserSignedIn()){
for($i = 0; $i < sizeof($topics); $i++){
echo '<a href="?p=showthread&topic='.$i.'">'.$topics[$i][1].'</a> - Gestart door: '.Database::getUsername($topics[$i][2]);
echo '<br>';
}
echo();
}
?>