Создать простой сайт, где будет страница с формой для авторизации и страница для авторизованного пользователя.
<?php
ini_set("display_errors", 1);
ini_set("display_startup_errors", 1);
error_reporting(E_ALL);
session_start();
require("config.php");
require_once("Core/Helper.php");
require_once("Core/Authentication.php");
require_once("Core/Database.php");
require_once("Core/DatabaseService.php");
require_once("Core/ContentRegistry.php");
$config = new Configuration();
//$config->setDbName($config->getDbName()."_".str_replace(".", "_", Helper::getClientIP()));
$dbService = new DatabaseService();
if(!$dbService->isConnected()) {
die('Could not connect to database server.');
}
if(!$dbService->isDatabaseExists($config->getDbName())) {
$dbService->createDatabase($config->getDbName());
}
$authentication = new Authentication();
?>
<!doctype html>
<html>
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no" />
<title>Sergey Drozdov - Content Management</title>
<script type="text/javascript" src="scripts/jquery.min.js"></script>
<script type="text/javascript" src="scripts/bootstrap/bootstrap.min.js"></script>
<link rel="stylesheet" href="scripts/bootstrap/bootstrap.min.css" integrity="sha384-9aIt2nRpC12Uk9gS9baDl411NQApFmC26EwAOH8WgZl5MYYxFfc+NcPb1dKGj7Sk" crossorigin="anonymous">
<script type="text/javascript" src="scripts/bootstrap_dialog/bootstrap-dialog.js"></script>
<script src="scripts/js/bootstrapValidator.min.js"></script>
<link rel="stylesheet" href="scripts/bootstrap_dialog/bootstrap-dialog.css" />
<link rel="stylesheet" href="css/style.css" />
</head>
<body>
<div class="jumbotron">
<h1 class="display-4">Content Management</h1>
<p class="lead">This is a simple test project by <a href="http://sd.blackball.lv/job-change">Sergey Drozdov</a>.</p>
<hr class="my-4">
<ul class="nav">
<li class="nav-item">
<a class="nav-link" href="./">Home</a>
</li>
<li class="nav-item">
<a class="nav-link" href="./content.php">Content</a>
</li>
<li class="nav-item">
<a class="nav-link" href="./description.php">Description</a>
</li>
<li class="nav-item">
<a class="nav-link" href="./about.php">About</a>
</li>
<?php
if ($authentication->isLoggedIn())
{
echo "<li class=\"nav-item\">
<a class=\"nav-link\" href=\"./logoff.php\">Sign Out</a>
</li>";
}
?>
</ul>
</div>
<div class="container">