<%@ page import="com.tarisan.control.*" %> <%@ page import="com.tarisan.data.*" %> <%@ page import="com.tarisan.excepcion.*" %> <%@ page import="com.tarisan.log.*" %> <%@ page import="com.tarisan.util.Utilidades" %> <%@ page import="java.sql.*" %> <%@ page import="java.util.Vector" %> <% LogTarisan.logger.log(NivelLog.INFO, "Inicio página de mantenimiento de niveles analíticos (adm/mto_niveless.jsp)"); response.setHeader("Expires", "0"); response.setHeader("Pragma", "no-cache"); response.setHeader("Cache-Control", "no-cache"); HttpSession sesion = request.getSession(true); if(sesion.isNew() || (sesion.getAttribute("USUARIO") == null)) { LogTarisan.logger.log(NivelLog.INFO, "Sesión invalidada"); response.sendRedirect("../../html/login.html"); } else { try { //Obtención del perfil del usuario conectado StringBuffer perfil = new StringBuffer(); perfil.append("|"); perfil.append(sesion.getAttribute("PERFIL")); perfil.append("|"); // Definicion de variables String strParametroMenu = ""; String strParametroEspe = "0"; String strParametroEspeSol = "0"; int intPagina = 0; //Obtenemos los valores de los parametros que se pasan a la pagina //En caso de que no se le pasen parametros, quedaram inicializados //a sus valores por defecto //parametro x para marcar la opcion del menu en la que se encuentra el usuario if (request.getParameter("x")!=null) strParametroMenu=(String)request.getParameter("x"); if (request.getParameter("especialidad")!=null) strParametroEspe=(String)request.getParameter("especialidad"); if (request.getParameter("especialidadSolicitada")!=null) strParametroEspeSol=(String)request.getParameter("especialidadSolicitada"); Tamensaje tamensaje = new Tamensaje(); PersistenciaTamensaje pertamensaje = new PersistenciaTamensaje(); boolean mostrarNoticia = true; PersistenciaTanoticias perTaNo = new PersistenciaTanoticias(); Vector vSeleccionNot = perTaNo.obtener_noticias_cabecera(); Vector vNoticias = new Vector(); String strNoticia = ""; String noticias =""; String separador = " ---//--- "; if(vSeleccionNot.size()==0){ mostrarNoticia = false; }else{ mostrarNoticia = true; Tanoticias tanoticia = null; for(int i = 0; i < vSeleccionNot.size(); i++) { tanoticia = (Tanoticias)vSeleccionNot.elementAt(i); if (i!=0){ strNoticia = strNoticia + separador + tanoticia.getNoticia(); }else{ strNoticia = tanoticia.getNoticia(); } strNoticia = strNoticia.replaceAll("
", " "); } } //Lo pongo a false para que no salga la noticia mostrarNoticia = false; %> Mantenimiento Niveles
<%= sesion.getAttribute("USUARIO") %>

<%=strNoticia %>


<% PersistenciaTanivelEspecialidadTanivelActo per = new PersistenciaTanivelEspecialidadTanivelActo(); Vector vSeleccion = per.obtenerEspecialidades(); if (vSeleccion.size() == 0) //No se han encontrado datos { %> <% }else{ %> <% } %>
  Especialidad: <% tamensaje = pertamensaje.obtenerMensaje(10); %><%=tamensaje.getMensaje() %>


<% if (Integer.parseInt(strParametroEspe)!=0){ %> <% Vector vTanivEspeSolicitada = new Vector(); vTanivEspeSolicitada = per.obtenerEspecialidadesSolicitadas(Integer.parseInt(strParametroEspe)); if (vTanivEspeSolicitada.size() == 0) //No se han encontrado datos { %> <% }else{ %> <% } %>
Especialidad Solicitada:
 
<%=tamensaje.getMensaje() %>


<% if (Integer.parseInt(strParametroEspeSol)!=0){ Vector vTanivEspe = new Vector(); vTanivEspe = per.ObtenerNiveles(Integer.parseInt(strParametroEspe),Integer.parseInt(strParametroEspeSol)); if (vTanivEspe.size() == 0) //No se han encontrado datos { %>
 
<%=tamensaje.getMensaje() %>
<% }else{ %>
<% TanivelEspecialidad TanivEsp = null; String estilo = ""; for(int i = 0; i < vTanivEspe.size(); i++){ TanivEsp = (TanivelEspecialidad)vTanivEspe.elementAt(i); if (i % 2 == 0) { estilo = "filaA"; } else { estilo = "filaB"; } %> <% } %>
Nivel Visibilidad
<%=TanivEsp.getNivel()%>
Aceptar
<% } } } %>
<% } catch(Exception ex) { LogTarisan.logger.log(NivelLog.ERROR, "Exception: " + ex); sesion.setAttribute("ERROR", "Error en la presentación de la página al usuario."); response.sendRedirect("../error.jsp"); } } LogTarisan.logger.log(NivelLog.INFO, "Final página de mantenimiento de niveles analíticos (adm/mto_niveles.jsp)"); %>