1 ; ConfiguraciĆ³n de la base de datos.
4 obtener_datos_sistema = " SELECT s.id_sistema as id_sistema, s.nombre_sistema as nombre_sistema, s.desc_sistema as desc_sistema, s.fecha_inicio as fecha_inicio, s.fecha_fin as fecha_fin, s.fecha_implementacion as fecha_implementacion, s.contacto as contacto, s.responsable as responsable, s.estado as estado FROM samurai.sistema as s "
5 obtener_datos_sistema2 = " WHERE s.id_sistema = ? "
6 obtener_datos_sistema3 = " WHERE s.estado = 1"
7 obtener_datos_sistema4 = " ORDER BY s.nombre_sistema"
8 obtener_permisos = " SELECT ps.id_permiso, ps.observaciones, p.desc_permiso FROM samurai.perm_sist as ps, samurai.permiso as p WHERE ps.id_sistema = ? AND ps.id_permiso = p.id_permiso"
9 obtener_permisos2 = " ORDER BY p.desc_permiso"
10 obtener_permisos3 = " AND ps.id_permiso = ?"
11 obtener_permisos4 = " AND ps.observaciones = ?"
12 obtener_max_id_sistemas = " SELECT IFNULL(max(id_sistema), 1) as id_sistema FROM samurai.sistema"
13 borrar_permisos = " DELETE FROM samurai.perm_sist WHERE id_sistema = ? "
14 borrar_permisos2 = " AND observaciones = ?"
15 borrar_permisos3 = " AND id_permiso = ?"
17 sistemas_seleccionar = "SELECT DISTINCT psu.id_sistema AS id_sistema, s.nombre_sistema AS nombre_sistema FROM samurai.perfil_sist_usuario AS psu, samurai.sistema AS s WHERE psu.id_sistema = s.id_sistema AND s.estado = 1 AND psu.login = ? ORDER BY s.nombre_sistema"
18 sistemas_seleccionar2 = "SELECT count(psu.id_sistema) AS cuenta FROM samurai.perfil_sist_usuario AS psu, samurai.perm_perfil_sist AS pps WHERE psu.id_sistema = ? AND login = ? AND psu.id_perfil = pps.id_perfil AND psu.id_sistema = pps.id_sistema AND pps.id_permiso = ?"
21 ea_obt_idperfil = "SELECT id_perfil FROM samurai.perm_perfil_sist WHERE id_permiso = ? AND observaciones = ? AND id_sistema = ?"
22 ea_del_perm_perfil_sist = "DELETE FROM samurai.perm_perfil_sist WHERE id_permiso = ? AND observaciones = ? AND id_sistema = ?"
23 ea_obt_cuenta_perfil = "SELECT IF(0,0,count(*)) as cuenta FROM samurai.perm_perfil_sist WHERE id_perfil = ? AND id_sistema = ?"
24 ea_obt_cuenta_perfil_sist = "SELECT IF(0,0,count(*)) as cuenta FROM samurai.perfil_sist WHERE id_perfil = ?"
25 ea_del_perfil_sist = "DELETE FROM samurai.perfil_sist WHERE id_perfil = ? AND id_sistema = ?"
26 ea_del_perfil_sist_usuario = "DELETE FROM samurai.perfil_sist_usuario WHERE id_perfil = ? AND id_sistema = ?"
27 ea_del_perfil = "DELETE FROM samurai.perfil WHERE id_perfil = ?"