X-Git-Url: https://git.llucax.com/mecon/samurai.git/blobdiff_plain/1fce1689d24ee6eed11644946bfa777a06d2ef8e..325ae567c29fec68d2be78712b3d85b2dc41a9e8:/lib/SAMURAI/Sistema/consultas.ini diff --git a/lib/SAMURAI/Sistema/consultas.ini b/lib/SAMURAI/Sistema/consultas.ini index 012b672..29869f8 100644 --- a/lib/SAMURAI/Sistema/consultas.ini +++ b/lib/SAMURAI/Sistema/consultas.ini @@ -1,7 +1,7 @@ ; ConfiguraciĆ³n de la base de datos. ; $Id$ -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 FROM samurai.sistema as s " +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 " obtener_datos_sistema2 = " WHERE s.id_sistema = ? " obtener_datos_sistema3 = " WHERE s.estado = 1" obtener_datos_sistema4 = " ORDER BY s.nombre_sistema" @@ -14,6 +14,9 @@ borrar_permisos = " DELETE FROM samurai.perm_sist WHERE id_sistema = ? " borrar_permisos2 = " AND observaciones = ?" borrar_permisos3 = " AND id_permiso = ?" +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, samurai.perm_perfil_sist AS pps WHERE psu.id_sistema = s.id_sistema AND psu.id_sistema = pps.id_sistema AND psu.id_perfil = pps.id_perfil AND s.estado = 1 AND psu.login = ? AND pps.id_permiso IN (?,?,?,?,?,?) ORDER BY s.nombre_sistema" +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 = ?" + ;BORRAR ASOCIACIONES ea_obt_idperfil = "SELECT id_perfil FROM samurai.perm_perfil_sist WHERE id_permiso = ? AND observaciones = ? AND id_sistema = ?" ea_del_perm_perfil_sist = "DELETE FROM samurai.perm_perfil_sist WHERE id_permiso = ? AND observaciones = ? AND id_sistema = ?"