Actionhandler geimplementeerd.

This commit is contained in:
2019-05-17 16:33:24 +02:00
parent 89dcca3021
commit 4a050eda84
12 changed files with 105 additions and 13 deletions

View File

@@ -1,5 +1,5 @@
<article>
<form action="" method="post">
<form action="?p=showtopics" method="post">
E-mail: <input type="text" name="email"><br>
Password: <input type="password" name="password"><br>
<input type="hidden" name="p" value="do_login" />

View File

@@ -1,10 +1,8 @@
<?php
if(UserSession::isUserSignedIn()){
echo "LIST OF BOARDS LMAO";
}
else{
echo "You must be signed in to view this page.";
}
?>

View File

@@ -0,0 +1,14 @@
<h1>TOPICS:</h1>
<?php
//Gedeeltelijk dummy code omdat de database nog niet zo ver is. Verder al wel functioneel. Gebrukersnamen worden ingeladen.
if(UserSession::isUserSignedIn()){
//$topics = Database::GetTopicList();
$topics = [ [0, "Hoeveel ICTers heb je nodig om een forum te bouwen?", 2],
[1, "LOREM IPSUM DOLOR", 3]];
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>';
}
}
?>

View File

@@ -0,0 +1,16 @@
<?php
if(isset($completed)){
echo("account activated!");
}
else{
echo("account activation went wrong!
<br> Go here: <a href='?p=resend_email'>Resend email verification</a>
<br>
");
}
?>

View File

@@ -3,5 +3,5 @@ include_once("./controller/AssetHandler.php");
AssetHandler::printAsset("logo.png", true, 128);
?>
<nav>
<a href="?p=attempt_logout">log out</a> <a href="?p=">home</a> <a href="?p=destroy">simulate $_SESSION expiry</a>
<a href="?p=attempt_logout">log out</a> <a href="?p=">home</a> <a href="?p=create_topic">create thread</a> <a href="?p=destroy">simulate $_SESSION expiry</a>
</nav>