Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- if($sucursal == 0){
- if (!empty($dni)){
- $query = $this->_model->getUserIdByDniList($dni);
- } else {
- if (!empty($email)) {
- $query = $this->_model->getUserByEmail($email);
- } else {
- if (($role != 0) and (!empty($apellido)) and ($banned != "2")) {
- $query = $this->_model->getUserByRoleApellidoAndBanned($role, $apellido, $banned);
- } else {
- if (($role != 0) and (!empty($apellido))) {
- $query = $this->_model->getUserByApellidoAndRole($role, $apellido);
- } else {
- if (($role != 0) and ($banned != "2")) {
- $query = $this->_model->getUserByRoleAndBanned($role, $banned);
- } else {
- if ($role != 0) {
- $query = $this->_model->filterByRole($role);
- } else {
- if ((!empty($apellido)) and ($banned != "2")) {
- $query = $this->_model->getUserByApellidoAndBanned($apellido, $banned);
- } else {
- if (!empty($apellido)) {
- $query = $this->_model->getUserByApellido($apellido);
- } else {
- if ($banned != "2") {
- $query = $this->_model->getUserByBanned($banned);
- } else {
- $query = '';
- }
- }
- }
- }
- }
- }
- }
- }
- }
- }else{
- if (!empty($dni)){
- $query = $this->_model->getUserIdByDniList($dni,$sucursal);
- } else {
- if (!empty($email)) {
- $query = $this->_model->getUserByEmail($email,$sucursal);
- } else {
- if ($_SESSION['exts']['user']->role == "admin") {
- if (($role != 0) and (!empty($apellido)) and ($banned != "2")) {
- $query = $this->_model->getUserByRoleApellidoAndBannedBySucursal($role, $apellido, $banned, $sucursal);
- } else {
- if (($role != 0) and (!empty($apellido))) {
- $query = $this->_model->getUserByApellidoAndRoleBySucursal($role, $apellido, $sucursal);
- } else {
- if (($role != 0) and ($banned != "2")) {
- $query = $this->_model->getUserByRoleAndBannedBySucursal($role, $banned, $sucursal);
- } else {
- if ($role != 0) {
- $query = $this->_model->filterByRoleBySucursal($role, $sucursal);
- } else {
- if ((!empty($apellido)) and ($banned != "2")) {
- $query = $this->_model->getUserByApellidoAndBannedBySucursal($apellido, $banned, $sucursal);
- } else {
- if (!empty($apellido)) {
- $query = $this->_model->getUserByApellidoBySucursal($apellido, $sucursal);
- } else {
- if ($banned != "2") {
- $query = $this->_model->getUserByBannedBySucursal($banned, $sucursal);
- } else {
- $query = $this->_model->getQueryListBySucursal($sucursal);
- }
- }
- }
- }
- }
- }
- }
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement