Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php if (!defined('BlogUi')) exit;
- # Si l'admin est déjà enregistré
- if (Utilities::isAdmin())
- $this->reloadPage(null, 'administration/home.html');
- # Vérification des données de l'utilisateur et du captcha
- if (isset($_POST['submit'], $_POST['user_name'], $_POST['user_pass'])) :
- unset($_SESSION['returnDataReloadPage']);
- if (!LOCAL)
- if (isset($_POST['g-recaptcha-response']))
- $responseCatpcha = Utilities::verifyCaptcha();
- else
- $responseCatpcha = false;
- else
- $responseCatpcha = false;
- if ($this->acceptCookies AND (LOCAL OR $responseCatpcha === true)) :
- include BUI_ROOT . 'data/config.identifiant.php';
- if (sha1($_POST['user_name']) == BUI_IDENTIFY_ADMIN_NAME AND sha1($_POST['user_pass']) == BUI_IDENTIFY_ADMIN_PASS) :
- $_SESSION['ADMIN_OPENING'] = true;
- $this->reloadPage(null, 'administration/home.html');
- else :
- $this->reloadPage(['error' => ['Identifiants incorrects']]);
- endif;
- else :
- if (!$responseCatpcha OR !$this->acceptCookies)
- $responseCatpcha = ['Cookies désactivés'];
- $this->reloadPage(['error' => $responseCatpcha]);
- endif;
- endif;
- # Réinsère les données du formulaire en cas d'échec de celui-ci
- Utilities::getPost($this);
- ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement