예제 #1
0
 } else {
     if (strpos($_POST['pwd'], "'") === FALSE and strpos($_POST['user_mail'], "'") === FALSE) {
         $user_mail = $_POST['user_mail'];
         //			$user_mail = str_replace("'","''",$_POST['user_mail']);
         //			$password = str_replace("'","''",$_POST['pwd']);
         $password = $_POST['pwd'];
         $resultIsLogin = $userClass->isLogin($user_mail);
         if ($resultIsLogin != null and $resultIsLogin[0]->result == 1) {
             $resultPwd = $userClass->getPasswordByLogin($user_mail);
             $user_pasw = $resultPwd[0]->user_pasw;
             if (password_verify($password, $user_pasw)) {
                 $_SESSION['last_access'] = time();
                 $_SESSION['ip'] = $_SERVER['REMOTE_ADDR'];
                 $_SESSION['user_mail'] = $user_mail;
                 $_SESSION['message'] = htmlentities("Vous êtes bien connecté");
                 $params = $paramClass->getList();
                 for ($i = 0; $i < 9; $i++) {
                     $param_lib = $params[$i]->param_lib;
                     $param_value = $params[$i]->param_value;
                     switch ($param_lib) {
                         case 'prop_arg_rank_default':
                             $_SESSION['prop_arg_rank_default'] = $param_value;
                             break;
                         case 'prop_arg_u_rank_default':
                             $_SESSION['prop_arg_u_rank_default'] = $param_value;
                             break;
                         case 'prop_debat_rank_default':
                             $_SESSION['prop_debat_rank_default'] = $param_value;
                             break;
                         case 'prop_arg_rank_validation':
                             $_SESSION['prop_arg_rank_validation'] = $param_value;