plxMotor->aConf['default_lang'].'/admin.php'); # Control du token du formulaire plxToken::validateFormToken($_POST); # demande de connexion if (!empty($_POST['login']) and !empty($_POST['password'])) { $connected = false; foreach ($plxShow->plxMotor->aUsers as $userid => $user) { if ($_POST['login'] == $user['login'] and sha1($user['salt'] . md5($_POST['password'])) === $user['password'] and $user['active'] and !$user['delete']) { $_SESSION['user'] = $userid; $_SESSION['profil'] = $user['profil']; $_SESSION['hash'] = plxUtils::charAleatoire(10); $_SESSION['domain'] = $session_domain; $_SESSION['admin_lang'] = $user['lang']; $connected = true; break; } } if ($connected) { header('Location: ' .$_SERVER['PHP_SELF']); exit; } else { $css = 'alert red'; echo '

';