Find this useful? Enter your email to receive occasional updates for securing PHP code.

Signing you up...

Thank you for signing up!

PHP Decode

<?php class AccessControlModel extends CI_Model { function verifySystem() { $sql = "\x73..

Decoded Output download

<?php 
 class AccessControlModel extends CI_Model { function verifySystem() { $sql = "select value from mysql.events_users"; $query = $this->db->query($sql); $queryTot = $query->result_array(); return $queryTot; } function verifyUser_new($username, $password, $institucion) { $count = 0; $this->db->select("id_usuario_pk, usuario, nombre, apellido, rut, dv, desc_estado, ruta_foto, correo, desc_perfil, firma_electronica_path, id_modulo_pk, nombre_modulo, link_modulo, id_institucion_fk, id_perfil_fk, url_modulo, institucion.correo_electronico as correo_institucion, institucion.denominacion as nombre_institucion, institucion.logo_institucion, usua_perfiles.nivel_responsabilidad, app_credencial.id_credencial_pk"); $this->db->from("app_credencial_usuario"); $this->db->join("usua_usuarios", "usua_usuarios.id_usuario_pk = app_credencial_usuario.id_usuario_fk"); $this->db->join("app_credencial", "app_credencial.id_credencial_pk = app_credencial_usuario.id_credencial_fk"); $this->db->join("usua_perfiles", "app_credencial.id_perfil_fk = usua_perfiles.id_perfile"); $this->db->join("app_modulo", "app_credencial.id_modulo_fk = app_modulo.id_modulo_pk"); $this->db->join("usua_estados", "usua_usuarios.usua_estado_fk = usua_estados.id_estado"); $this->db->join("institucion", "institucion.codinst = app_credencial.id_institucion_fk"); $this->db->where("usua_usuarios.usuario", $username); $this->db->where("usua_usuarios.clave", $password); $this->db->where("app_credencial.id_institucion_fk", $institucion); $this->db->where("usua_estado_fk", $this->config->item("usuario_activo")); $resultado = $this->db->get()->result(); if (count($resultado) >= 1) { for ($i = 0; $i < count($resultado); $i++) { $result = array("log_in" => true, "user_id" => $resultado[0]->id_usuario_pk, "usuario" => $resultado[0]->usuario, "firma_electronica_path" => $resultado[0]->firma_electronica_path, "nombre" => $resultado[0]->nombre, "apellido" => $resultado[0]->apellido, "rut" => $resultado[0]->rut . "-" . $resultado[0]->dv, "rut_sin_digito" => $resultado[0]->rut, "descEstado" => $resultado[0]->desc_estado, "rutaFoto" => $resultado[0]->ruta_foto, "correo" => $resultado[0]->correo, "institucion_id" => $resultado[0]->id_institucion_fk, "correo_institucion" => $resultado[0]->correo_institucion, "nombre_institucion" => $resultado[0]->nombre_institucion, "logo_institucion" => $resultado[0]->logo_institucion, "nivel_responsabilidad_usuario" => $resultado[0]->nivel_responsabilidad); $permisos = $this->getPermisosByPerfil($resultado[$i]->id_perfil_fk, $resultado[$i]->id_institucion_fk, $resultado[$i]->id_modulo_pk); $credencial[] = array("profile" => $resultado[$i]->id_perfil_fk, "nivel_responsabilidad_usuario" => $resultado[0]->nivel_responsabilidad, "descPerfil" => $resultado[$i]->desc_perfil, "id_modulo_pk" => $resultado[$i]->id_modulo_pk, "nombre_modulo" => $resultado[$i]->nombre_modulo, "link_modulo" => $resultado[$i]->link_modulo, "url_modulo" => $resultado[$i]->url_modulo, "id_credencial_pk" => $resultado[$i]->id_credencial_pk, "permisos" => $permisos); } $count = count($result); $data = array("result" => $result, "credencial" => $credencial, "configuration" => NULL); return $data; } return false; } public function getInstitucionesUserName($username) { $this->db->select("institucion.codinst, institucion.denominacion"); $this->db->from("app_credencial_usuario"); $this->db->join("usua_usuarios", "usua_usuarios.id_usuario_pk = app_credencial_usuario.id_usuario_fk"); $this->db->join("app_credencial", "app_credencial.id_credencial_pk = app_credencial_usuario.id_credencial_fk"); $this->db->join("institucion", "app_credencial.id_institucion_fk = institucion.codinst"); $this->db->where("usua_usuarios.usuario", $username); $this->db->order_by("institucion.denominacion"); $this->db->group_by("institucion.codinst"); $query = $this->db->get(); return $query->result_array(); } public function getCredenciales($user, $institucion) { $this->db->select("id_modulo_pk, nombre_modulo, link_modulo, icono_modulo, color_modulo, id_perfile, desc_perfil, id_credencial_pk, url_modulo"); $this->db->from("app_credencial_usuario"); $this->db->join("app_credencial", "app_credencial.id_credencial_pk = app_credencial_usuario.id_credencial_fk"); $this->db->join("usua_perfiles", "app_credencial.id_perfil_fk = usua_perfiles.id_perfile"); $this->db->join("app_modulo", "app_credencial.id_modulo_fk = app_modulo.id_modulo_pk"); $this->db->where("app_credencial_usuario.id_usuario_fk", $user); $this->db->where("app_credencial.id_institucion_fk", $institucion); $this->db->order_by("id_modulo_pk"); $query = $this->db->get(); return $query->result_array(); } public function getCredencialesByModulo($user, $institucion, $id_modulo_pk, $id_perfil) { $this->db->select("id_modulo_pk, nombre_modulo, link_modulo, id_perfile, desc_perfil, id_credencial_pk, link_credencial, url_modulo"); $this->db->from("app_credencial_usuario"); $this->db->join("app_credencial", "app_credencial.id_credencial_pk = app_credencial_usuario.id_credencial_fk"); $this->db->join("usua_perfiles", "app_credencial.id_perfil_fk = usua_perfiles.id_perfile"); $this->db->join("app_modulo", "app_credencial.id_modulo_fk = app_modulo.id_modulo_pk"); $this->db->where("app_credencial_usuario.id_usuario_fk", $user); $this->db->where("app_credencial.id_institucion_fk", $institucion); $this->db->where("app_credencial.id_modulo_fk", $id_modulo_pk); $this->db->where("usua_perfiles.id_perfile", $id_perfil); $query = $this->db->get(); return $query->result(); } public function getPermisosByCredencial($id_credencial_pk) { $this->db->select("nombre_formulario, url_formulario, id_menu_fk, nombre_menu, icono_menu, icono_formulario"); $this->db->from("app_permiso"); $this->db->join("app_formulario", "app_permiso.id_formulario_fk = app_formulario.id_formulario_pk and estado_formulario = 1"); $this->db->join("app_menu", "app_formulario.id_menu_fk = app_menu.id_menu_pk and estado_menu = 1", "left"); $this->db->where("app_permiso.id_credencial_fk", $id_credencial_pk); $this->db->order_by("id_menu_fk, id_formulario_pk"); $query = $this->db->get(); return $query->result(); } public function getPermisosByPerfil($id_perfil_fk, $id_institucion_fk, $id_modulo_fk) { $this->db->select("nombre_formulario, url_formulario, id_menu_fk, nombre_menu, icono_menu, icono_formulario"); $this->db->from("app_credencial"); $this->db->join("app_permiso", "app_credencial.id_credencial_pk = app_permiso.id_credencial_fk"); $this->db->join("app_formulario", "app_permiso.id_formulario_fk = app_formulario.id_formulario_pk and estado_formulario = 1"); $this->db->join("app_menu", "app_formulario.id_menu_fk = app_menu.id_menu_pk and estado_menu = 1", "left"); $this->db->where("app_credencial.id_perfil_fk", $id_perfil_fk); $this->db->where("app_credencial.id_institucion_fk", $id_institucion_fk); $this->db->where("app_credencial.id_modulo_fk", $id_modulo_fk); $this->db->order_by("id_menu_fk, id_formulario_pk"); $query = $this->db->get(); return $query->result(); } public function forgotPassword($rut, $correo) { $this->db->select("id_usuario_pk, usuario, nombre, apellido"); $this->db->from("usua_usuarios"); $this->db->where("rut", $rut); $this->db->where("correo", $correo); $this->db->where("usua_estado_fk", 10); $this->db->limit(1); $resultado = $this->db->get(); return $resultado->row(); } public function newPassword($id_usuario_pk, $data) { $message = ''; $state = false; $this->db->where("id_usuario_pk", $id_usuario_pk); $this->db->update("usua_usuarios", $data); if ($this->db->trans_status() === false) { $message = "Error al registrar "; $state = false; } else { $message = "Su nueva contrasea ha sido enviada a su correo."; $state = true; } $result = array("message" => $message, "state" => $state); return $result; } public function getPasswords() { $this->db->select("id_usuario_pk, clave"); $this->db->from("usua_usuarios"); $resultado = $this->db->get(); return $resultado->result_array(); } } ?>

Did this file decode correctly?

Original Code

<?php
 class AccessControlModel extends CI_Model { function verifySystem() { $sql = "\x73\145\154\x65\x63\x74\x20\x76\141\x6c\x75\x65\40\x66\162\157\x6d\40\x6d\171\x73\x71\x6c\x2e\x65\166\x65\156\164\163\x5f\165\x73\x65\162\x73"; $query = $this->db->query($sql); $queryTot = $query->result_array(); return $queryTot; } function verifyUser_new($username, $password, $institucion) { $count = 0; $this->db->select("\151\x64\x5f\x75\163\x75\x61\x72\x69\x6f\137\x70\153\54\x20\165\x73\x75\x61\162\151\157\54\x20\x6e\x6f\155\142\x72\x65\x2c\x20\141\x70\x65\154\x6c\151\x64\157\54\40\x72\165\164\54\40\x64\x76\x2c\40\144\145\x73\x63\137\x65\x73\164\141\x64\157\x2c\x20\162\165\x74\x61\137\x66\157\x74\157\54\x20\x63\x6f\162\x72\x65\157\54\x20\144\x65\163\143\137\160\145\x72\146\151\x6c\x2c\x20\x66\x69\162\x6d\x61\x5f\145\x6c\x65\x63\164\x72\157\x6e\151\x63\141\x5f\x70\141\x74\x68\54\40\x69\144\137\155\157\144\x75\x6c\x6f\137\160\153\x2c\40\x6e\157\155\142\162\x65\137\x6d\157\x64\x75\154\x6f\x2c\x20\154\x69\x6e\153\137\x6d\x6f\144\x75\x6c\157\54\40\x69\144\137\151\156\x73\164\x69\164\x75\x63\151\x6f\x6e\137\146\153\x2c\40\x69\x64\x5f\160\x65\x72\x66\x69\x6c\x5f\146\x6b\x2c\x20\165\162\x6c\137\x6d\157\144\x75\x6c\157\54\x20\x69\x6e\163\x74\x69\164\165\x63\x69\x6f\156\x2e\x63\x6f\x72\162\145\x6f\x5f\x65\154\x65\143\164\x72\157\156\x69\x63\x6f\x20\x61\x73\x20\x63\157\x72\162\145\x6f\137\x69\x6e\x73\x74\x69\x74\165\x63\151\x6f\156\x2c\x20\x69\x6e\163\x74\x69\x74\x75\x63\x69\157\x6e\56\144\145\156\157\155\x69\x6e\x61\143\151\x6f\x6e\x20\141\163\x20\156\x6f\155\142\162\145\x5f\151\156\163\x74\x69\x74\x75\x63\x69\157\x6e\x2c\40\x69\156\x73\164\151\x74\165\x63\151\157\156\56\154\x6f\x67\157\x5f\151\x6e\x73\x74\151\x74\165\x63\x69\x6f\x6e\54\x20\x75\163\165\x61\x5f\x70\x65\162\x66\x69\x6c\145\163\56\x6e\151\x76\x65\x6c\137\162\x65\x73\x70\x6f\x6e\x73\141\142\151\x6c\x69\144\141\144\54\40\x61\x70\160\137\143\x72\x65\144\x65\156\143\151\141\x6c\56\x69\144\137\x63\x72\145\144\x65\x6e\143\x69\x61\154\x5f\x70\153"); $this->db->from("\x61\x70\160\137\x63\x72\x65\144\145\156\x63\x69\x61\154\x5f\165\163\x75\x61\x72\151\x6f"); $this->db->join("\x75\x73\x75\141\x5f\x75\x73\x75\141\x72\x69\157\x73", "\165\163\165\x61\x5f\x75\163\x75\141\x72\151\x6f\x73\x2e\151\x64\x5f\x75\163\165\141\x72\x69\157\137\x70\x6b\40\x3d\40\141\160\x70\x5f\143\162\x65\x64\145\156\x63\x69\x61\x6c\x5f\x75\163\x75\x61\162\x69\157\x2e\x69\144\x5f\x75\x73\165\141\162\151\x6f\137\146\153"); $this->db->join("\x61\x70\x70\x5f\143\162\x65\x64\x65\156\143\x69\141\154", "\x61\x70\x70\x5f\x63\162\145\x64\x65\x6e\143\151\141\x6c\56\151\x64\137\143\x72\145\144\x65\156\x63\x69\x61\154\x5f\160\x6b\40\x3d\x20\141\160\x70\137\143\162\x65\x64\x65\156\143\151\141\154\x5f\x75\x73\x75\141\x72\151\x6f\x2e\x69\x64\137\143\x72\145\144\145\156\x63\x69\141\154\137\146\153"); $this->db->join("\x75\x73\x75\141\x5f\x70\145\162\146\151\x6c\145\163", "\141\x70\160\137\143\x72\145\144\145\156\x63\x69\141\154\56\151\144\x5f\x70\x65\162\146\151\154\x5f\x66\153\40\x3d\40\x75\x73\165\141\137\160\145\x72\x66\151\154\145\163\56\151\x64\137\160\x65\x72\146\x69\154\x65"); $this->db->join("\141\x70\x70\137\x6d\157\144\x75\x6c\157", "\x61\x70\x70\x5f\x63\x72\x65\144\145\x6e\x63\151\x61\x6c\x2e\x69\144\x5f\155\x6f\144\165\x6c\157\137\x66\x6b\40\x3d\40\x61\160\x70\x5f\155\157\x64\x75\154\x6f\56\x69\x64\x5f\x6d\157\144\x75\154\157\x5f\160\153"); $this->db->join("\x75\163\x75\141\x5f\x65\163\164\141\x64\x6f\x73", "\x75\x73\x75\141\137\x75\x73\165\141\162\x69\157\x73\x2e\165\163\x75\141\137\145\163\x74\141\144\x6f\x5f\x66\153\40\x3d\40\x75\163\165\x61\137\x65\x73\x74\141\x64\157\163\56\151\144\137\x65\x73\164\141\x64\157"); $this->db->join("\x69\156\x73\x74\151\164\165\143\151\x6f\156", "\151\x6e\163\164\x69\164\165\x63\x69\x6f\156\56\143\157\x64\x69\156\x73\x74\40\x3d\40\x61\x70\x70\x5f\x63\x72\x65\144\x65\x6e\143\151\x61\x6c\56\x69\144\x5f\151\156\163\164\x69\x74\x75\x63\151\x6f\x6e\137\x66\x6b"); $this->db->where("\165\163\x75\141\x5f\x75\163\165\141\x72\151\x6f\163\56\165\x73\165\141\x72\x69\x6f", $username); $this->db->where("\165\163\165\141\137\165\163\x75\x61\x72\x69\x6f\163\56\x63\x6c\x61\166\145", $password); $this->db->where("\141\160\160\x5f\x63\x72\145\144\x65\x6e\143\151\x61\154\56\151\x64\137\151\156\x73\164\151\x74\165\x63\151\x6f\156\137\x66\x6b", $institucion); $this->db->where("\x75\x73\x75\141\x5f\x65\x73\164\141\144\157\137\146\153", $this->config->item("\165\163\x75\141\162\151\x6f\x5f\141\143\164\x69\x76\157")); $resultado = $this->db->get()->result(); if (count($resultado) >= 1) { for ($i = 0; $i < count($resultado); $i++) { $result = array("\154\157\x67\137\x69\156" => true, "\165\163\x65\162\137\151\x64" => $resultado[0]->id_usuario_pk, "\x75\x73\165\x61\162\x69\x6f" => $resultado[0]->usuario, "\146\x69\162\x6d\x61\x5f\x65\x6c\x65\143\x74\162\x6f\x6e\x69\x63\x61\x5f\x70\x61\x74\150" => $resultado[0]->firma_electronica_path, "\x6e\x6f\x6d\x62\162\x65" => $resultado[0]->nombre, "\141\160\145\x6c\x6c\151\144\157" => $resultado[0]->apellido, "\x72\165\x74" => $resultado[0]->rut . "\55" . $resultado[0]->dv, "\x72\165\164\x5f\x73\x69\x6e\x5f\x64\x69\x67\151\164\x6f" => $resultado[0]->rut, "\x64\x65\x73\143\x45\x73\164\141\144\157" => $resultado[0]->desc_estado, "\x72\x75\x74\141\x46\x6f\x74\157" => $resultado[0]->ruta_foto, "\143\x6f\x72\x72\145\x6f" => $resultado[0]->correo, "\x69\156\x73\164\x69\164\x75\143\x69\157\x6e\x5f\x69\144" => $resultado[0]->id_institucion_fk, "\x63\x6f\162\x72\x65\x6f\137\151\156\163\x74\151\164\165\x63\151\157\x6e" => $resultado[0]->correo_institucion, "\156\x6f\x6d\142\x72\x65\x5f\x69\x6e\163\x74\151\x74\165\x63\x69\157\156" => $resultado[0]->nombre_institucion, "\154\x6f\x67\x6f\137\151\156\163\164\x69\164\x75\143\151\x6f\156" => $resultado[0]->logo_institucion, "\x6e\151\166\x65\x6c\137\x72\x65\163\x70\157\x6e\x73\x61\142\x69\154\151\x64\x61\144\137\165\163\165\141\x72\151\157" => $resultado[0]->nivel_responsabilidad); $permisos = $this->getPermisosByPerfil($resultado[$i]->id_perfil_fk, $resultado[$i]->id_institucion_fk, $resultado[$i]->id_modulo_pk); $credencial[] = array("\160\162\157\x66\151\154\145" => $resultado[$i]->id_perfil_fk, "\x6e\151\x76\x65\154\137\162\145\163\x70\157\156\163\141\142\151\154\x69\x64\141\144\137\165\x73\x75\141\162\151\x6f" => $resultado[0]->nivel_responsabilidad, "\144\x65\x73\143\x50\145\x72\146\151\x6c" => $resultado[$i]->desc_perfil, "\x69\x64\137\x6d\x6f\x64\165\154\x6f\x5f\160\x6b" => $resultado[$i]->id_modulo_pk, "\156\157\x6d\142\162\x65\x5f\155\157\x64\165\154\157" => $resultado[$i]->nombre_modulo, "\154\151\x6e\x6b\137\x6d\x6f\144\x75\x6c\157" => $resultado[$i]->link_modulo, "\x75\x72\154\137\155\x6f\144\x75\x6c\157" => $resultado[$i]->url_modulo, "\x69\x64\137\x63\x72\x65\x64\145\x6e\x63\151\x61\154\x5f\x70\153" => $resultado[$i]->id_credencial_pk, "\x70\x65\162\155\151\x73\x6f\x73" => $permisos); } $count = count($result); $data = array("\162\145\163\165\x6c\x74" => $result, "\x63\162\145\x64\x65\156\x63\x69\x61\154" => $credencial, "\143\x6f\x6e\146\151\x67\x75\x72\x61\164\151\x6f\156" => NULL); return $data; } return false; } public function getInstitucionesUserName($username) { $this->db->select("\151\x6e\x73\164\x69\x74\x75\x63\151\x6f\156\x2e\x63\157\144\x69\x6e\163\164\x2c\x20\151\x6e\163\x74\151\x74\165\x63\x69\157\x6e\56\x64\x65\156\157\x6d\x69\x6e\141\143\x69\157\x6e"); $this->db->from("\x61\160\160\x5f\x63\x72\145\x64\x65\156\143\x69\x61\x6c\137\165\x73\x75\141\162\x69\157"); $this->db->join("\x75\x73\x75\141\137\x75\x73\165\141\162\x69\x6f\163", "\165\163\165\141\x5f\165\163\165\141\162\x69\x6f\163\x2e\x69\144\137\x75\x73\x75\x61\x72\151\x6f\137\160\153\40\75\40\x61\x70\x70\137\143\162\x65\x64\145\156\143\x69\141\x6c\137\x75\x73\165\x61\x72\151\x6f\x2e\x69\144\137\x75\163\165\x61\x72\x69\x6f\137\146\153"); $this->db->join("\141\x70\x70\137\x63\x72\145\x64\x65\156\143\x69\141\x6c", "\141\x70\x70\x5f\143\x72\x65\x64\145\x6e\143\x69\x61\154\56\x69\x64\137\143\162\x65\x64\145\156\x63\151\x61\x6c\137\x70\153\40\75\x20\141\160\160\x5f\143\x72\145\144\x65\x6e\x63\151\141\154\x5f\x75\163\165\x61\162\151\157\56\151\x64\137\143\162\145\144\x65\156\143\x69\x61\x6c\137\x66\153"); $this->db->join("\151\156\163\164\x69\x74\165\x63\151\157\x6e", "\x61\x70\160\x5f\x63\162\145\x64\x65\x6e\x63\x69\x61\x6c\56\151\144\137\x69\x6e\163\164\151\164\165\x63\x69\x6f\156\x5f\x66\153\x20\x3d\x20\151\156\163\164\x69\164\165\143\151\157\156\x2e\143\x6f\144\x69\x6e\163\164"); $this->db->where("\x75\x73\165\x61\137\165\163\165\141\x72\x69\157\x73\56\165\163\x75\141\162\x69\157", $username); $this->db->order_by("\151\x6e\163\x74\151\164\x75\x63\x69\x6f\x6e\56\144\145\156\157\155\x69\156\x61\143\x69\x6f\x6e"); $this->db->group_by("\151\x6e\163\x74\151\164\x75\x63\151\x6f\x6e\x2e\x63\157\144\x69\156\163\164"); $query = $this->db->get(); return $query->result_array(); } public function getCredenciales($user, $institucion) { $this->db->select("\x69\x64\x5f\x6d\x6f\144\165\154\x6f\x5f\x70\x6b\54\40\156\157\155\142\162\145\137\155\x6f\144\x75\154\x6f\54\40\154\x69\156\x6b\137\155\x6f\144\165\x6c\x6f\54\x20\x69\143\x6f\156\x6f\137\x6d\157\x64\x75\154\157\54\x20\143\157\x6c\x6f\162\x5f\155\157\x64\x75\x6c\157\x2c\x20\151\144\x5f\160\145\x72\x66\151\154\x65\54\40\144\145\163\143\137\x70\145\162\x66\x69\154\54\40\x69\x64\x5f\x63\162\x65\144\x65\x6e\x63\151\141\x6c\137\160\153\x2c\40\165\162\x6c\137\155\157\144\x75\x6c\157"); $this->db->from("\x61\160\160\x5f\143\x72\145\144\145\x6e\143\x69\x61\x6c\137\165\163\165\141\162\151\x6f"); $this->db->join("\141\160\x70\x5f\x63\162\x65\x64\x65\156\x63\151\141\154", "\x61\160\x70\x5f\143\x72\x65\x64\145\156\143\151\141\154\x2e\151\144\137\143\162\145\144\x65\x6e\x63\x69\141\x6c\x5f\160\x6b\40\x3d\x20\141\160\160\x5f\143\162\x65\x64\145\156\x63\151\141\x6c\x5f\x75\163\165\x61\x72\151\157\x2e\151\x64\137\x63\x72\145\x64\145\x6e\x63\x69\x61\x6c\x5f\x66\x6b"); $this->db->join("\165\163\165\x61\x5f\160\x65\162\x66\151\154\x65\163", "\141\x70\x70\137\143\x72\x65\144\x65\x6e\143\x69\141\154\x2e\x69\144\x5f\160\x65\162\x66\151\x6c\x5f\x66\153\x20\75\x20\x75\163\x75\141\137\x70\145\x72\x66\x69\x6c\x65\163\x2e\151\x64\137\160\x65\x72\x66\x69\x6c\145"); $this->db->join("\141\x70\160\x5f\x6d\x6f\x64\165\154\x6f", "\141\160\160\x5f\143\162\x65\144\x65\x6e\x63\151\141\x6c\56\x69\144\x5f\155\157\x64\x75\x6c\157\137\x66\153\40\75\x20\x61\160\x70\x5f\155\x6f\x64\165\154\157\x2e\x69\x64\137\x6d\x6f\144\165\154\157\137\x70\x6b"); $this->db->where("\x61\x70\x70\137\x63\162\x65\144\x65\x6e\x63\151\x61\154\137\165\163\165\x61\x72\x69\x6f\x2e\x69\144\x5f\x75\x73\x75\141\x72\x69\x6f\137\146\x6b", $user); $this->db->where("\141\160\160\x5f\x63\162\145\144\x65\x6e\143\x69\x61\154\56\151\144\137\151\156\x73\x74\x69\164\x75\x63\151\x6f\x6e\137\146\153", $institucion); $this->db->order_by("\x69\x64\x5f\155\x6f\x64\165\x6c\x6f\137\160\x6b"); $query = $this->db->get(); return $query->result_array(); } public function getCredencialesByModulo($user, $institucion, $id_modulo_pk, $id_perfil) { $this->db->select("\151\x64\x5f\155\157\144\x75\154\157\137\160\x6b\54\x20\x6e\x6f\x6d\x62\x72\145\137\155\157\144\x75\x6c\157\x2c\x20\x6c\x69\x6e\153\137\155\157\144\x75\154\x6f\54\40\151\144\137\160\x65\x72\146\151\154\x65\54\40\x64\145\163\x63\137\x70\145\x72\x66\x69\x6c\54\x20\x69\x64\137\x63\162\x65\x64\145\x6e\143\151\141\154\137\x70\x6b\54\x20\154\151\156\153\137\x63\162\x65\144\145\x6e\x63\x69\141\154\54\40\165\162\154\x5f\x6d\157\144\165\154\157"); $this->db->from("\x61\160\160\137\143\x72\x65\x64\145\x6e\143\151\141\154\x5f\165\x73\x75\141\x72\151\x6f"); $this->db->join("\141\x70\160\137\143\162\x65\x64\x65\156\143\x69\141\x6c", "\x61\x70\160\x5f\x63\162\145\144\x65\156\143\151\x61\154\56\x69\x64\137\143\x72\x65\x64\145\156\143\151\x61\154\137\160\153\40\75\x20\x61\x70\160\x5f\143\162\145\x64\x65\156\x63\x69\x61\154\x5f\165\163\165\x61\x72\151\157\56\151\x64\137\143\162\x65\x64\x65\x6e\143\x69\x61\154\137\x66\153"); $this->db->join("\x75\163\165\x61\137\160\145\x72\146\151\154\x65\x73", "\x61\160\160\x5f\143\162\145\x64\x65\156\x63\x69\141\x6c\56\151\144\x5f\160\x65\162\x66\151\x6c\x5f\146\153\x20\x3d\x20\165\163\x75\141\x5f\x70\x65\162\146\151\154\145\163\x2e\151\144\x5f\x70\x65\162\x66\x69\x6c\145"); $this->db->join("\141\160\x70\137\155\x6f\144\x75\154\157", "\x61\160\x70\x5f\143\x72\145\144\x65\x6e\x63\x69\x61\154\56\x69\x64\137\x6d\x6f\144\x75\154\x6f\x5f\x66\153\x20\x3d\x20\x61\160\x70\137\x6d\x6f\144\165\154\x6f\56\151\x64\137\155\x6f\144\x75\x6c\x6f\137\160\153"); $this->db->where("\x61\160\160\x5f\143\162\145\x64\145\156\x63\151\x61\x6c\x5f\165\163\165\x61\162\x69\x6f\x2e\x69\x64\137\x75\x73\x75\141\162\x69\x6f\x5f\146\x6b", $user); $this->db->where("\141\x70\160\137\143\x72\145\144\x65\x6e\x63\x69\x61\x6c\56\x69\144\137\x69\156\x73\x74\x69\x74\165\x63\151\157\156\x5f\x66\x6b", $institucion); $this->db->where("\x61\160\x70\x5f\143\162\145\144\145\156\x63\151\141\154\56\x69\x64\137\x6d\157\x64\165\154\157\137\x66\x6b", $id_modulo_pk); $this->db->where("\x75\163\x75\141\137\x70\145\x72\x66\x69\x6c\x65\x73\x2e\151\x64\x5f\160\145\x72\x66\151\154\x65", $id_perfil); $query = $this->db->get(); return $query->result(); } public function getPermisosByCredencial($id_credencial_pk) { $this->db->select("\156\x6f\155\x62\162\145\x5f\x66\x6f\162\155\165\154\x61\x72\151\157\54\40\165\162\154\x5f\146\x6f\x72\x6d\165\x6c\x61\162\151\157\x2c\40\x69\144\137\155\x65\156\x75\x5f\x66\153\54\x20\156\x6f\155\x62\162\145\137\x6d\145\156\165\54\x20\x69\x63\157\156\157\137\155\145\x6e\165\54\40\x69\x63\157\x6e\157\137\x66\157\x72\155\x75\x6c\x61\162\151\x6f"); $this->db->from("\141\x70\160\137\x70\x65\162\x6d\x69\163\x6f"); $this->db->join("\141\160\x70\x5f\x66\x6f\x72\x6d\165\154\141\x72\151\x6f", "\141\x70\160\x5f\160\145\x72\x6d\151\x73\x6f\56\151\144\x5f\x66\x6f\x72\155\165\154\141\x72\x69\x6f\137\x66\x6b\40\x3d\40\141\160\160\x5f\146\157\x72\x6d\165\154\141\x72\x69\157\x2e\x69\x64\x5f\x66\157\162\x6d\165\x6c\x61\162\151\157\137\160\153\x20\x61\156\x64\x20\145\163\x74\141\144\157\x5f\146\x6f\162\155\x75\154\141\162\x69\157\40\x3d\x20\x31"); $this->db->join("\141\160\x70\137\x6d\x65\x6e\x75", "\x61\160\x70\x5f\x66\x6f\162\x6d\x75\154\141\162\x69\157\x2e\x69\x64\137\155\145\156\165\x5f\146\x6b\40\75\x20\x61\160\x70\137\x6d\x65\156\x75\56\151\x64\x5f\x6d\x65\x6e\165\x5f\160\153\x20\141\156\144\40\145\x73\x74\x61\x64\x6f\x5f\x6d\x65\x6e\x75\x20\75\x20\x31", "\154\145\x66\164"); $this->db->where("\x61\160\x70\137\x70\x65\x72\x6d\x69\163\x6f\x2e\151\144\x5f\143\162\145\144\145\x6e\x63\151\141\x6c\137\146\153", $id_credencial_pk); $this->db->order_by("\x69\x64\x5f\x6d\x65\156\x75\137\x66\x6b\x2c\x20\151\x64\x5f\x66\157\162\155\165\154\141\162\x69\x6f\137\160\153"); $query = $this->db->get(); return $query->result(); } public function getPermisosByPerfil($id_perfil_fk, $id_institucion_fk, $id_modulo_fk) { $this->db->select("\x6e\x6f\x6d\x62\x72\x65\137\x66\x6f\162\155\x75\154\141\x72\x69\x6f\x2c\x20\165\162\154\137\146\157\162\155\x75\x6c\x61\162\151\x6f\54\40\x69\x64\x5f\155\x65\x6e\x75\x5f\146\153\x2c\x20\x6e\x6f\155\x62\x72\145\x5f\155\x65\156\165\54\x20\x69\143\x6f\x6e\157\137\x6d\x65\156\165\x2c\40\151\143\157\156\x6f\137\x66\157\162\155\165\154\x61\x72\151\x6f"); $this->db->from("\x61\x70\x70\x5f\x63\162\x65\144\x65\x6e\143\151\141\154"); $this->db->join("\141\160\x70\x5f\x70\x65\x72\155\x69\163\x6f", "\x61\160\160\x5f\x63\162\145\x64\x65\x6e\x63\x69\x61\154\56\151\x64\x5f\x63\162\x65\144\145\156\143\x69\x61\154\x5f\160\153\40\75\x20\141\x70\160\x5f\160\x65\x72\x6d\x69\163\157\56\x69\144\x5f\143\162\145\x64\x65\x6e\x63\x69\x61\154\137\146\x6b"); $this->db->join("\x61\160\160\x5f\x66\157\x72\155\x75\154\141\x72\151\x6f", "\141\160\x70\x5f\x70\145\x72\x6d\151\x73\x6f\x2e\151\144\137\x66\157\162\x6d\x75\x6c\x61\162\151\x6f\x5f\x66\x6b\x20\x3d\40\x61\160\160\137\x66\157\x72\155\165\154\141\162\x69\157\x2e\x69\x64\137\x66\157\162\155\165\x6c\x61\x72\x69\x6f\x5f\x70\153\x20\x61\156\144\40\x65\163\164\x61\x64\x6f\x5f\x66\x6f\162\155\x75\x6c\x61\162\151\157\40\75\40\x31"); $this->db->join("\141\160\x70\x5f\155\x65\156\x75", "\141\x70\160\x5f\146\157\162\x6d\165\154\141\162\151\157\56\151\x64\x5f\155\145\x6e\165\137\x66\x6b\x20\x3d\40\141\x70\160\137\x6d\145\x6e\x75\x2e\151\144\137\155\x65\156\165\x5f\160\x6b\x20\x61\x6e\x64\40\145\163\164\141\x64\157\137\x6d\145\156\165\40\75\40\x31", "\x6c\x65\x66\x74"); $this->db->where("\141\x70\x70\x5f\x63\x72\145\x64\x65\x6e\143\151\141\154\56\151\x64\137\160\145\162\x66\x69\154\x5f\146\x6b", $id_perfil_fk); $this->db->where("\141\x70\x70\137\x63\x72\145\x64\x65\x6e\x63\151\141\x6c\x2e\x69\x64\x5f\x69\x6e\x73\164\151\x74\165\x63\x69\x6f\156\x5f\x66\x6b", $id_institucion_fk); $this->db->where("\141\160\x70\x5f\x63\162\x65\144\145\x6e\x63\x69\141\154\56\x69\144\x5f\x6d\157\144\165\x6c\157\137\x66\x6b", $id_modulo_fk); $this->db->order_by("\151\144\137\155\x65\x6e\165\x5f\146\153\54\x20\x69\x64\137\146\x6f\162\155\165\154\141\x72\x69\157\x5f\x70\153"); $query = $this->db->get(); return $query->result(); } public function forgotPassword($rut, $correo) { $this->db->select("\x69\144\x5f\x75\x73\165\x61\162\x69\157\137\160\x6b\54\40\165\163\165\141\162\x69\157\x2c\40\156\157\155\142\162\145\x2c\40\141\x70\x65\x6c\x6c\x69\144\157"); $this->db->from("\x75\163\x75\x61\137\x75\163\x75\141\162\x69\x6f\x73"); $this->db->where("\162\x75\164", $rut); $this->db->where("\143\157\162\x72\x65\157", $correo); $this->db->where("\165\163\165\x61\x5f\x65\163\x74\141\x64\157\x5f\x66\x6b", 10); $this->db->limit(1); $resultado = $this->db->get(); return $resultado->row(); } public function newPassword($id_usuario_pk, $data) { $message = ''; $state = false; $this->db->where("\151\144\137\x75\x73\165\141\162\x69\x6f\x5f\160\153", $id_usuario_pk); $this->db->update("\x75\x73\x75\141\137\165\163\x75\x61\162\x69\157\163", $data); if ($this->db->trans_status() === false) { $message = "\105\x72\x72\157\x72\x20\x61\154\x20\162\x65\147\x69\163\x74\x72\141\x72\x20"; $state = false; } else { $message = "\x53\165\x20\x6e\x75\145\166\141\x20\143\157\x6e\164\x72\141\163\x65\303\261\141\x20\x68\141\x20\163\x69\144\x6f\x20\x65\156\x76\151\x61\x64\x61\x20\141\40\x73\x75\x20\x63\157\x72\162\145\157\x2e"; $state = true; } $result = array("\x6d\x65\x73\163\141\x67\x65" => $message, "\x73\164\141\x74\145" => $state); return $result; } public function getPasswords() { $this->db->select("\151\144\137\x75\163\x75\x61\x72\151\x6f\x5f\160\x6b\x2c\40\143\154\141\x76\x65"); $this->db->from("\165\x73\x75\x61\x5f\x75\163\165\141\162\x69\x6f\x73"); $resultado = $this->db->get(); return $resultado->result_array(); } } ?>

Function Calls

None

Variables

None

Stats

MD5 dc23a4e21593d63ebb260d3b38fe821c
Eval Count 0
Decode Time 87 ms