Initial commit

bla
This commit is contained in:
2019-04-06 16:14:29 +02:00
parent cd762249ed
commit 57691246ed
50 changed files with 1247 additions and 0 deletions

View File

@@ -0,0 +1,6 @@
<?php
?>

View File

@@ -0,0 +1,7 @@
<?php
include_once("./app/assets/AssetHandler.php");
AssetHandler::printAsset("logo.png", true, 128);
?>
<nav>
<a href="?p=login">log in</a> <a href="?p=register">register</a> <a href="?p=">home</a>
</nav>

View File

@@ -0,0 +1,6 @@
<?php
include("./app/assets/logo.php");
?>
<nav>
<a href="?p=attempt_logout">log out</a> <a href="?p=">home</a> <a href="?p=destroy">simulate browser session expiry</a>
</nav>

View File

@@ -0,0 +1,3 @@
<article>
<h1>Welkom op hForumPHP. Log in of registreer om iets te doen.</h1>
</article>

View File

@@ -0,0 +1,57 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<title>
<?=$sSiteTitle?>
</title>
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" type="text/css" media="screen" href="css/main.css" />
</head>
<body>
<header>
<?php
if(UserSession::isUserSignedIn()){
include("./app/pagecontent/content_header_signedin.php");
}else{
include("./app/pagecontent/content_header.php");
}
?>
</header>
<main>
<?php
//Laad juiste pagina content
switch($p){
case '':
include("./app/pagecontent/content_index.php");
break;
case 'register':
include("./app/pagecontent/login/content_register.php");
break;
case 'login':
include("./app/pagecontent/login/content_login.php");
break;
case 'attempt_reg':
include("We signed you up (probably)");
break;
case 'attempt_login':
if(UserSession::isUserSignedIn()){
include("./app/pagecontent/login/content_login_succesful.php");
}else{
include("./app/pagecontent/login/content_login_unsuccesful.php");
}
break;
case 'attempt_logout':
break;
case 'destroy':
include("./app/pagecontent/login/content_destroy.php");
break;
default:
echo "404";
break;
}
?>
</main>
</body>
</html>

View File

@@ -0,0 +1,3 @@
<article>
<h1>You're still signed in thanks to our cookies!</h1>
</article>

View File

@@ -0,0 +1,10 @@
<article>
<form action="?p=attempt_login" method="post">
E-mail: <input type="text" name="email"><br>
Password: <input type="password" name="password"><br>
<input type="submit">
</form>
</article>
<?php
?>

View File

@@ -0,0 +1,8 @@
<article>
<h1>Login succesful :DDDDDDDD</h1>
</article>
<?php
//print_r($_COOKIE['usersession']);
?>

View File

@@ -0,0 +1,3 @@
<article>
<h1>UNEXPECTED LOGIN ERROR. OUR CODEMONKEYS DID SOMETHING VERY WRONG :(</h1>
</article>

View File

@@ -0,0 +1,9 @@
<article>
<form action="attempt_register.php" method="post">
Username: <input type="text" name="name"><br>
E-mail: <input type="text" name="email"><br>
Password: <input type="password" name="pass"><br>
Verify Password: <input type="password" name="pass2"><br>
<input type="submit">
</form>
</article>