Ajout logout + check date php

This commit is contained in:
adri
2019-01-09 12:37:11 +01:00
parent aca024783e
commit 5ef0b64a60
4 changed files with 16 additions and 6 deletions

View File

@@ -6,14 +6,18 @@ error_reporting(E_ALL);
session_start();
if(isset($_POST["sessionDestroy"]))
{
session_destroy();
header('Location: index.php');
}
if(!isset($_SESSION["sl"]))
{
$_SESSION["sl"] = "1";
$_SESSION["login"] = "";
}
require_once SITE_ROOT.'/vendor/autoload.php';
$loader = new Twig_Loader_Filesystem( SITE_ROOT.'/views');
$twig = new Twig_Environment($loader, array(
'cache' => /*SITE_ROOT.'/twig/compilation_cache'*/false,