Exemple #1
0
             }
         }
     } else {
         echo global_common::convertToXML($arrHeader, array('rs', 'inf'), array(2, 'Mật khẩu mới không trùng nhau'), array(0, 1));
         return;
     }
 } else {
     if ($_pgR["act"] == Model_User::ACT_UPDATE_RESET_PASS) {
         $password = $_pgR['password'];
         $password = html_entity_decode($password, ENT_COMPAT, 'UTF-8');
         $confirmpass = $_pgR['confirmpass'];
         $confirmpass = html_entity_decode($confirmpass, ENT_COMPAT, 'UTF-8');
         $resetid = $_pgR['resetid'];
         $resetid = html_entity_decode($resetid, ENT_COMPAT, 'UTF-8');
         if ($password == $confirmpass) {
             $resetPw = $objReset->getResetPasswordByID($resetid);
             $result = $objUser->changeResetPassword($resetPw[global_mapping::UserID], $password);
             //echo $result;
             if ($result > 0) {
                 $resetPw[global_mapping::ResetDate] = global_common::nowSQL();
                 $resetPw[global_mapping::IsDeleted] = 1;
                 $objReset->update($resetid, $resetPw[global_mapping::UserID], $resetPw[global_mapping::CreatedDate], $resetPw[global_mapping::ExpireDate], $resetPw[global_mapping::ResetDate], $resetPw[global_mapping::IsDeleted]);
                 $arrHeader = global_common::getMessageHeaderArr($banCode);
                 //$banCode
                 echo global_common::convertToXML($arrHeader, array('rs', 'inf'), array(1, 'Cập nhật thành công'), array(0, 1));
                 return;
             } else {
                 echo global_common::convertToXML($arrHeader, array('rs', 'inf'), array(0, 'Cập nhật thất bại. Xin vui lòng thử lại sau!'), array(0, 1));
                 return;
             }
         } else {