4 const LOGIN_PROCESS
= true;
6 require_once __DIR__
. '/_inc.php';
8 if ($membres->isLogged())
10 utils
::redirect('/admin/');
13 // Relance session_start et renvoie une image de 1px transparente
14 if (isset($_GET['keepSessionAlive']))
16 $membres->keepSessionAlive();
18 header('Cache-Control: no-cache, must-revalidate');
19 header('Expires: Mon, 26 Jul 1997 05:00:00 GMT');
21 header('Content-Type: image/gif');
22 echo base64_decode("R0lGODlhAQABAIAAAP///////yH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==");
29 if (utils
::post('login'))
31 if (!utils
::CSRF_check('login'))
37 if (utils
::post('id') && utils
::post('passe')
38 && $membres->login(utils
::post('id'), utils
::post('passe')))
40 utils
::redirect('/admin/');
47 $champs = $config->get('champs_membres');
49 $champ = $champs->get($config->get('champ_identifiant'));
51 $tpl->assign('champ', $champ);
52 $tpl->assign('error', $error);
54 $tpl->display('admin/login.tpl');