2015-08-25 16:54:13 +02:00
|
|
|
<?php
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Authentification page
|
|
|
|
*
|
|
|
|
* Copyright (c) 2009 Evolix - Tous droits reserves
|
|
|
|
*
|
|
|
|
* vim: expandtab softtabstop=4 tabstop=4 shiftwidth=4 showtabline=2
|
|
|
|
*
|
|
|
|
* @author Gregory Colpart <reg@evolix.fr>
|
|
|
|
* @author Thomas Martin <tmartin@evolix.fr>
|
|
|
|
* @author Sebastien Palma <spalma@evolix.fr>
|
|
|
|
* @version 1.0
|
|
|
|
*/
|
|
|
|
|
|
|
|
if ((empty($_GET['form']) || $_GET['form']!=1) && !empty($_POST)) {
|
|
|
|
$username=$_POST['login'];
|
|
|
|
$password=$_POST['passw'];
|
|
|
|
|
2017-09-01 03:35:16 +02:00
|
|
|
if (hash("sha256",$password) == $conf['logins'][$username]) {
|
2015-08-25 16:54:13 +02:00
|
|
|
$_SESSION['auth']=1;
|
|
|
|
$_SESSION['user']=$username;
|
|
|
|
$_SESSION['error']='';
|
|
|
|
} else {
|
|
|
|
$_SESSION['auth']=0;
|
|
|
|
$_SESSION['user']='';
|
|
|
|
$_SESSION['error']=1;
|
|
|
|
}
|
|
|
|
http_redirect('/');
|
|
|
|
|
|
|
|
} else {
|
|
|
|
|
|
|
|
if(!empty($_SESSION['error'])) {
|
|
|
|
$error=$_SESSION['error'];
|
|
|
|
}
|
|
|
|
|
|
|
|
include_once EVOADMIN_BASE . '../tpl/header.tpl.php';
|
|
|
|
include_once EVOADMIN_BASE . '../tpl/auth.tpl.php';
|
|
|
|
include_once EVOADMIN_BASE . '../tpl/footer.tpl.php';
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
?>
|