Example #1
0
session_start();
require_once dirname(__FILE__) . '/app/views/helpers/PathHelper.php';
$path = new PathHelper();
require_once $path->getModelPath() . 'DBHandler.php';
require_once $path->getModelPath() . 'AuthHandler.php';
require_once $path->getConfigPath() . 'connectionInfo.private.php';
$dbHandler = new DBHandler($host, $user, $password, $db);
$authHandler = new AuthHandler($dbHandler);
?>
<!DOCTYPE html>
<html>
<head lang="en">
    <meta charset="UTF-8">
    <title>User Notes</title>
    <link rel="shortcut icon" type="image/x-icon" href="<?php 
echo $path->getAssetPath();
?>
/favicon.ico">
    <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/font-awesome/4.4.0/css/font-awesome.min.css">
    <link rel="stylesheet" href="<?php 
echo $path->getAssetPath();
?>
/css/notes.css"/>
</head>
<body>

<header class="header">
    <?php 
// ================================================================================================================
// LOGIN
if (isset($_POST['username']) && isset($_POST['password'])) {