Ajout logout + check date php
This commit is contained in:
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user