añado jsp
This commit is contained in:
@@ -0,0 +1,608 @@
|
||||
<%@ 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" %>
|
||||
<%@ page import="java.io.*" %>
|
||||
|
||||
<%
|
||||
LogTarisan.logger.log(NivelLog.INFO, "Inicio página de de mantenimiento de autorizaciones (adm/mto_taconaut.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 mensaje = "";
|
||||
int CampoMedico = 0;
|
||||
long CampoPoliza = 0;
|
||||
int CampoColectivo = 0;
|
||||
int CampoOrden = 0;
|
||||
int intPagina = 0;
|
||||
StringBuffer strSql = new StringBuffer();
|
||||
Object aCondiciones[] = null;
|
||||
|
||||
//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");
|
||||
|
||||
//parametro medico para las busquedas
|
||||
if (request.getParameter("medico")!=null){
|
||||
if (request.getParameter("medico").compareTo("")!=0){
|
||||
CampoMedico = Integer.parseInt(request.getParameter("medico"));
|
||||
}
|
||||
}
|
||||
|
||||
//parametro poliza para las busquedas
|
||||
if (request.getParameter("poliza")!=null)
|
||||
CampoPoliza = Long.parseLong(request.getParameter("poliza"));
|
||||
|
||||
//parametro medico para las busquedas
|
||||
if (request.getParameter("colectivo")!=null)
|
||||
CampoColectivo = Integer.parseInt(request.getParameter("colectivo"));
|
||||
|
||||
//parametro poliza para las busquedas
|
||||
if (request.getParameter("orden")!=null)
|
||||
CampoOrden = Integer.parseInt(request.getParameter("orden"));
|
||||
|
||||
//parametro pagina para realizar la paginacion
|
||||
if (request.getParameter("pagina")!=null)
|
||||
intPagina=Integer.parseInt(request.getParameter("pagina"));
|
||||
|
||||
if(sesion.getAttribute("MENSAJE")!=null)
|
||||
{
|
||||
mensaje=(String)sesion.getAttribute("MENSAJE");
|
||||
sesion.removeAttribute("MENSAJE");
|
||||
}
|
||||
|
||||
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("<br/>", " ");
|
||||
}
|
||||
}
|
||||
//Lo pongo a false para que no salga la noticia
|
||||
mostrarNoticia = false;
|
||||
%>
|
||||
|
||||
<html>
|
||||
<head>
|
||||
<title>Mantenimiento autorizaciones</title>
|
||||
<link rel="STYLESHEET" type="text/css" href="../../css/estilos.css">
|
||||
<script language="JavaScript" src="../../js/inicio_tarisan.js"></script>
|
||||
<script language="JavaScript" src="../../js/menu_adm.js"></script>
|
||||
<script language="JavaScript" src="../../js/bloques_tarisan.js"></script>
|
||||
<script language="JavaScript" src="../../js/funciones.js"></script>
|
||||
<script language="JavaScript" src="../../js/jquery-1.11.3.js"></script>
|
||||
<script language="JavaScript">pNG="<%= perfil.toString() %>";</script>
|
||||
|
||||
<script language="JavaScript" type="text/javascript">
|
||||
<!--
|
||||
function pasarAMayusculas(campo)
|
||||
{
|
||||
campo.value = campo.value.toUpperCase();
|
||||
}
|
||||
|
||||
function buscar()
|
||||
{
|
||||
/*if(document.frm_buscar.medico.value.length == 0)
|
||||
{
|
||||
alert("Introduce un numero de medico");
|
||||
document.frm_buscar.medico.focus();
|
||||
}
|
||||
else */ if (isNaN(document.frm_buscar.medico.value)){
|
||||
alert("Introduce un numero de medico válido. Sólo se permiten números");
|
||||
document.frm_buscar.medico.value = "";
|
||||
document.frm_buscar.medico.focus();
|
||||
}
|
||||
else if(document.frm_buscar.colectivo.value.length == 0)
|
||||
{
|
||||
alert("Introduce un numero de colectivo");
|
||||
document.frm_buscar.colectivo.focus();
|
||||
}
|
||||
else if (isNaN(document.frm_buscar.colectivo.value)){
|
||||
alert("Introduce un numero de colectivo válido. Sólo se permiten números");
|
||||
document.frm_buscar.colectivo.value = "";
|
||||
document.frm_buscar.colectivo.focus();
|
||||
}
|
||||
else if(document.frm_buscar.poliza.value.length == 0)
|
||||
{
|
||||
alert("Introduce un numero de poliza");
|
||||
document.frm_buscar.poliza.focus();
|
||||
}
|
||||
else if (isNaN(document.frm_buscar.poliza.value)){
|
||||
alert("Introduce un numero de poliza válido. Sólo se permiten números");
|
||||
document.frm_buscar.poliza.value = "";
|
||||
document.frm_buscar.poliza.focus();
|
||||
}
|
||||
else if(document.frm_buscar.orden.value.length == 0)
|
||||
{
|
||||
alert("Introduce un numero de orden");
|
||||
document.frm_buscar.orden.focus();
|
||||
}
|
||||
else if (isNaN(document.frm_buscar.orden.value)){
|
||||
alert("Introduce un numero de orden válido. Sólo se permiten números");
|
||||
document.frm_buscar.orden.value = "";
|
||||
document.frm_buscar.orden.focus();
|
||||
}
|
||||
else
|
||||
{
|
||||
document.frm_buscar.submit();
|
||||
}
|
||||
}
|
||||
|
||||
function actualizar()
|
||||
{
|
||||
if(document.actualizar_autorizacion.cantidad.value < 0)
|
||||
{
|
||||
alert("Introduce un numero de sesiones disponibles valido")
|
||||
document.actualizar_autorizacion.cantidad.focus();
|
||||
}
|
||||
else if (document.actualizar_autorizacion.cantidad.value.length < 1)
|
||||
{
|
||||
alert("Introduce un numero de sesiones disponibles valido")
|
||||
document.actualizar_autorizacion.cantidad.focus();
|
||||
}
|
||||
else
|
||||
{
|
||||
document.actualizar_autorizacion.submit();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
function paginacion(pagina)
|
||||
{
|
||||
document.frm_buscar.pagina.value = pagina;
|
||||
document.frm_buscar.submit();
|
||||
}
|
||||
|
||||
function enfocar()
|
||||
{
|
||||
if(document.actualizar_autorizacion === undefined)
|
||||
document.frm_buscar.medico.focus();
|
||||
else
|
||||
document.actualizar_autorizacion.cantidad.focus();
|
||||
}
|
||||
//-->
|
||||
</script>
|
||||
|
||||
</head>
|
||||
<body marginwidth="0" marginheight="0" leftmargin="0" topmargin="0" alink="#43881A" bgcolor="#FFFFFF" onload="javascript:enfocar()">
|
||||
<div class="marco">
|
||||
<table cellpadding="0" cellspacing="0" border="0" align="center" style="width:95%">
|
||||
<tr>
|
||||
<td class="tdLogoCabecera"><img src="<%=request.getContextPath()%>/img/logo.png" class="logoCabecera"></td>
|
||||
<td>
|
||||
<table width="100%">
|
||||
<tr><td class="tituloTablaMedico" align="center"><%= sesion.getAttribute("USUARIO") %></td></tr>
|
||||
<tr>
|
||||
<td>
|
||||
<div id="contenedorNoticia">
|
||||
<br>
|
||||
<div class="tituloNoticia">
|
||||
<p class="marquee"><%=strNoticia %></p>
|
||||
</div>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<!-- Cabecera de Navegaci�n superior //-->
|
||||
<table cellpadding="0" cellspacing="0" border="0" align="center" style="width:95%">
|
||||
<tr>
|
||||
<td><script language="JavaScript">bloques();</script></td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<br>
|
||||
|
||||
<!-- Cuerpo de la p�gina //-->
|
||||
<table cellpadding="0" cellspacing="0" border="0" align="center" style="width:95%">
|
||||
<tr valign="top">
|
||||
<!--<td width="180">//-->
|
||||
<td width="5%">
|
||||
<!-- Men� de navegaci�n del m�dulo de navegaci�n (zona izquierda) //-->
|
||||
<table cellpadding="0" cellspacing="0" border="0">
|
||||
<tr valign="top">
|
||||
<td colspan="2"><img src="../../img/sp.gif" width="180" height="12" border="0"></td>
|
||||
</tr>
|
||||
<tr valign="top">
|
||||
<td><script language="JavaScript">escribirMenuGst();</script></td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
<!--<td bgcolor="#CCCCCC"><img src="../../img/sp.gif" width="1" height="12" border="0"></td>//-->
|
||||
<td width="565">
|
||||
<!-- Tabla con el contenido de la p�gina (zona central-derecha) //-->
|
||||
<table cellpadding="0" cellspacing="0" border="0" width="100%">
|
||||
<tr>
|
||||
<!--<td><img src="../../img/sp.gif" width="4" height="261" border="0"></td>//-->
|
||||
<td width="1px" bgcolor="#CCCCCC" height="90px"></td>
|
||||
<td class="txt" valign="top">
|
||||
<img src="../../img/sp.gif" width="1" height="11" border="0"><br>
|
||||
<table border="0" align="center" width="100%">
|
||||
<form name="frm_buscar" action="descarga_pdfs_autorizaciones.jsp?x=<%=strParametroMenu%>" method="post" >
|
||||
<input type="hidden" name="pagina" value="1" />
|
||||
<table border="0" align="center">
|
||||
<tr>
|
||||
<td align="right">
|
||||
<span class="txtnegrita"><%=pertamensaje.obtenerMensaje(20).getMensaje() %></span>
|
||||
</td>
|
||||
<td>
|
||||
<input size="20" type="text" class="txt" id="medico" name="medico" <%if(CampoMedico!=0){%>value="<%=CampoMedico %>"<%}%>/>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align="right">
|
||||
<span class="txtnegrita"><%=pertamensaje.obtenerMensaje(21).getMensaje() %></span>
|
||||
</td>
|
||||
<td>
|
||||
<input size="20" type="text" class="txt" id="colectivo" name="colectivo" <%if(CampoPoliza!=0){%>value="<%=CampoColectivo %>"<%}%>/>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align="right">
|
||||
<label class="txtnegrita"><%=pertamensaje.obtenerMensaje(22).getMensaje() %></label>
|
||||
</td>
|
||||
<td>
|
||||
<input size="20" type="text" class="txt" id="poliza" name="poliza" <%if(CampoPoliza!=0){%>value="<%=CampoPoliza %>"<%}%>/>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align="right">
|
||||
<label class="txtnegrita"><%=pertamensaje.obtenerMensaje(23).getMensaje() %></label>
|
||||
</td>
|
||||
<td>
|
||||
<input size="20" type="text" class="txt" id="orden" name="orden" <%if(CampoPoliza!=0){%>value="<%=CampoOrden %>"<%}%>/>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="2" align="right">
|
||||
<a href="javascript:buscar()" class="enlace"><%=pertamensaje.obtenerMensaje(24).getMensaje() %></a>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="2" align="right"> </td>
|
||||
</tr>
|
||||
</table>
|
||||
</form>
|
||||
<%if(CampoMedico >= 0 && CampoPoliza > 0 && CampoColectivo >= 0 && CampoOrden >= 0)
|
||||
{
|
||||
PersistenciaTaconaut pertacon = new PersistenciaTaconaut();
|
||||
PersistenciaTTMovaut perttmov = new PersistenciaTTMovaut();
|
||||
Vector vSeleccion = pertacon.BuscarAutorizacionPorMedicoYPoliza(CampoMedico,CampoColectivo,CampoPoliza,CampoOrden,intPagina);
|
||||
if(vSeleccion.size()>0)
|
||||
{
|
||||
LogTarisan.logger.log(NivelLog.DEBUG, "La autorizacion del medico "+CampoMedico+" con poliza "+CampoPoliza+" esta en taconaut");
|
||||
%>
|
||||
<table border="0" align="center" width="100%">
|
||||
<%if (intPagina != 0){ %>
|
||||
<tr>
|
||||
<td colspan="2" align="right"><span class="txt">Página <%=pertacon.getPaginacion().getNumeroPagina()%> de <%=pertacon.getPaginacion().getNumeroPaginasTotales()%></span></td>
|
||||
</tr>
|
||||
<% }%>
|
||||
<tr>
|
||||
<td class="cabeceraTabla" align="center" bgcolor="#FFAAAA"><%=pertamensaje.obtenerMensaje(18).getMensaje() %></td>
|
||||
<td class="cabeceraTabla" align="center" bgcolor="#FFAAAA"><%=pertamensaje.obtenerMensaje(17).getMensaje() %></td>
|
||||
<td class="cabeceraTabla" align="center" bgcolor="#FFAAAA"><%=pertamensaje.obtenerMensaje(16).getMensaje() %></td>
|
||||
</tr>
|
||||
<%
|
||||
String estilo = "";
|
||||
for(int i=0;i<vSeleccion.size();i++)
|
||||
{
|
||||
if (i % 2 == 0)
|
||||
{
|
||||
estilo = "filaA";
|
||||
}
|
||||
else
|
||||
{
|
||||
estilo = "filaB";
|
||||
}
|
||||
%>
|
||||
<tr>
|
||||
<td class="<%=estilo%>" align="center"><%= vSeleccion.get(i)%></td>
|
||||
<td class="<%=estilo%>" align="center">
|
||||
<%
|
||||
//mostrar el bot�n de resultados
|
||||
%><form name="resultados" action="../adm/mto_taconaut.jsp?x=2" target="blank" method="post">
|
||||
<input type="hidden" name="autorizacion" value="<%=vSeleccion.get(i) %>" />
|
||||
<input type="submit" value="<%=pertamensaje.obtenerMensaje(65).getMensaje() %>" class="enlace"></input>
|
||||
</form><%
|
||||
%>
|
||||
</td>
|
||||
<td class="<%=estilo%>" colspan="2" align="center">
|
||||
<%
|
||||
String resultado = ""+vSeleccion.get(i).toString();
|
||||
//resultado = (resultado.length()<8)?"0"+resultado:resultado;
|
||||
File fichero = new File(ParametrosConfiguracion.ruta_pdf+resultado+".pdf");
|
||||
if(fichero.exists())
|
||||
{
|
||||
//mostrar el bot�n de resultados
|
||||
%><form name="resultados" action="../ver_peticiones_pdf.jsp" target="blank" method="post">
|
||||
<input type="hidden" name="fichero" value="<%=fichero.getName() %>" />
|
||||
<input type="submit" value="<%=pertamensaje.obtenerMensaje(64).getMensaje() %>" class="enlace"></input>
|
||||
</form><%
|
||||
}
|
||||
else
|
||||
{
|
||||
fichero = new File(ParametrosConfiguracion.ruta_pdf+vSeleccion.get(i).toString()+".PDF");
|
||||
if(fichero.exists())
|
||||
{
|
||||
//mostrar el bot�n de resultados
|
||||
%><form name="resultados" action="../ver_peticiones_pdf.jsp" target="blank" method="post">
|
||||
<input type="hidden" name="fichero" value="<%=fichero.getName() %>" />
|
||||
<input type="submit" value="<%=pertamensaje.obtenerMensaje(64).getMensaje() %>" class="enlace"></input>
|
||||
</form><%
|
||||
}
|
||||
else
|
||||
{
|
||||
%><p><%=pertamensaje.obtenerMensaje(6).getMensaje() %></p><%
|
||||
}
|
||||
}
|
||||
%>
|
||||
</td>
|
||||
</tr>
|
||||
<%
|
||||
}
|
||||
if (intPagina!=0){ //se tiene en cuenta la paginacion %>
|
||||
<tr><td colspan="2"></td></tr>
|
||||
<tr>
|
||||
<td colspan="2">
|
||||
<table border="0" align="center">
|
||||
<tr>
|
||||
<%if (pertacon.getPaginacion().esPrimeraPagina()){%>
|
||||
<td width="70" align="right"><span class="pagDesactivo">primero</span></td>
|
||||
<td></td>
|
||||
<td width="70" align="left"><span class="pagDesactivo">anterior</span></td>
|
||||
<%}else{%>
|
||||
<td width="70" align="right"><a href="javascript:paginacion(1)" class="enlace">primero</a></td>
|
||||
<td></td>
|
||||
<td width="70" align="left"><a href="javascript:paginacion(<%=pertacon.getPaginacion().getNumeroPagina() - 1%>)" class="enlace">anterior</a></td>
|
||||
<%}%>
|
||||
|
||||
<%if (pertacon.getPaginacion().esUltimaPagina()){%>
|
||||
<td width="70" align="right"><span class="pagDesactivo">siguiente</span></td>
|
||||
<td></td>
|
||||
<td width="70" align="left"><span class="pagDesactivo">último</span></td>
|
||||
<%}else{%>
|
||||
<td width="70" align="right"><a href="javascript:paginacion(<%=pertacon.getPaginacion().getNumeroPagina() + 1%>)" class="enlace">siguiente</a></td>
|
||||
<td></td>
|
||||
<td width="70" align="left"><a href="javascript:paginacion(<%=pertacon.getPaginacion().getNumeroPaginasTotales()%>)" class="enlace">último</a></td>
|
||||
<%}%>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
<%
|
||||
} //fin if(pagina!=0) %>
|
||||
</table>
|
||||
<%
|
||||
}
|
||||
else
|
||||
{
|
||||
boolean yaExisteEnTaconaut = false;
|
||||
LogTarisan.logger.log(NivelLog.DEBUG, "La autorizacion del medico "+CampoMedico+" con poliza "+CampoPoliza+" no esta en taconaut la buscamos en ttmovaut");
|
||||
vSeleccion = perttmov.BuscarAutorizacionPorMedicoYPoliza(CampoMedico,CampoColectivo,CampoPoliza,CampoOrden,intPagina);
|
||||
if(vSeleccion.size() > 0)
|
||||
{
|
||||
%>
|
||||
<table border="0" align="center" width="100%">
|
||||
<%if (intPagina != 0){ %>
|
||||
<tr>
|
||||
<td colspan="2" align="right"><span class="txt">Página <%=perttmov.getPaginacion().getNumeroPagina()%> de <%=perttmov.getPaginacion().getNumeroPaginasTotales()%></span></td>
|
||||
</tr>
|
||||
<% }%>
|
||||
<tr>
|
||||
<td class="cabeceraTabla" align="center" bgcolor="#FFAAAA"><%=pertamensaje.obtenerMensaje(18).getMensaje() %></td>
|
||||
<td class="cabeceraTabla" align="center" bgcolor="#FFAAAA"><%=pertamensaje.obtenerMensaje(17).getMensaje() %></td>
|
||||
<td class="cabeceraTabla" align="center" bgcolor="#FFAAAA"><%=pertamensaje.obtenerMensaje(16).getMensaje() %></td>
|
||||
</tr>
|
||||
<%
|
||||
String estilo = "";
|
||||
for(int i=0;i<vSeleccion.size();i++)
|
||||
{
|
||||
|
||||
if (i % 2 == 0)
|
||||
{
|
||||
estilo = "filaA";
|
||||
}
|
||||
else
|
||||
{
|
||||
estilo = "filaB";
|
||||
}
|
||||
Taconaut tacon = new Taconaut();
|
||||
tacon = (Taconaut)vSeleccion.get(i);
|
||||
//Vuelvo a buscar en taconaut por si la primera vez no ha encontrado la autorizacion porque tarjeta=0 y tarjeta_chipcard=nulll
|
||||
Vector vSeleccion2 = pertacon.ObtenerAutorizacionADM(Long.parseLong(tacon.getAutorizacion()));
|
||||
if (vSeleccion2.size()>0){
|
||||
tacon = (Taconaut)vSeleccion2.get(i);
|
||||
yaExisteEnTaconaut = true;
|
||||
}
|
||||
int gesigu = 0;
|
||||
if(tacon.getFromGesigu())
|
||||
gesigu = 1;
|
||||
|
||||
if (!yaExisteEnTaconaut){
|
||||
pertacon.CrearAutorizacionValida(Long.parseLong(tacon.getAutorizacion()), tacon.getMedico(), tacon.getEspecialidad(), tacon.getActo(), tacon.getCantidad(), gesigu, "");
|
||||
}
|
||||
|
||||
/*if(pertacon.CrearAutorizacionValida(Integer.parseInt(tacon.getAutorizacion()), tacon.getMedico(), tacon.getEspecialidad(), tacon.getActo(), tacon.getCantidad(), gesigu, ""))
|
||||
{*/
|
||||
%>
|
||||
<tr>
|
||||
<td class="<%=estilo%>" align="center"><%= tacon.getAutorizacion()%></td>
|
||||
<td class="<%=estilo%>" align="center">
|
||||
<%
|
||||
//mostrar el bot�n de resultados
|
||||
%><form name="resultados" action="../adm/mto_taconaut.jsp?x=2" target="blank" method="post">
|
||||
<input type="hidden" name="autorizacion" value="<%=tacon.getAutorizacion() %>" />
|
||||
<input type="submit" value="Ver Detalle" class="enlace"></input>
|
||||
</form><%
|
||||
%>
|
||||
</td>
|
||||
<td class="<%=estilo%>" align="center">
|
||||
<%
|
||||
String resultado = ""+vSeleccion.get(i).toString();
|
||||
//resultado = (resultado.length()<8)?"0"+resultado:resultado;
|
||||
File fichero = new File(ParametrosConfiguracion.ruta_pdf+resultado+".pdf");
|
||||
if(fichero.exists())
|
||||
{
|
||||
//mostrar el bot�n de resultados
|
||||
%><form name="resultados" action="../ver_peticiones_pdf.jsp" target="blank" method="post">
|
||||
<input type="hidden" name="fichero" value="<%=fichero.getName() %>" />
|
||||
<input type="submit" value="Ver Resultado" class="enlace"></input>
|
||||
</form><%
|
||||
}
|
||||
else
|
||||
{
|
||||
fichero = new File(ParametrosConfiguracion.ruta_pdf+vSeleccion.get(i).toString()+".PDF");
|
||||
if(fichero.exists())
|
||||
{
|
||||
//mostrar el bot�n de resultados
|
||||
%><form name="resultados" action="../ver_peticiones_pdf.jsp" target="blank" method="post">
|
||||
<input type="hidden" name="fichero" value="<%=fichero.getName() %>" />
|
||||
<input type="submit" value="Ver Resultado" class="enlace"></input>
|
||||
</form><%
|
||||
}
|
||||
else
|
||||
{
|
||||
%><p><%=pertamensaje.obtenerMensaje(6).getMensaje() %></p><%
|
||||
}
|
||||
}
|
||||
%>
|
||||
</td>
|
||||
</tr>
|
||||
<%
|
||||
/* }
|
||||
else
|
||||
{ */
|
||||
%>
|
||||
<!-- <tr><td class="txt"><%=pertamensaje.obtenerMensaje(14).getMensaje() %></td></tr> -->
|
||||
<%
|
||||
// }
|
||||
}
|
||||
%>
|
||||
<% if (intPagina!=0){ //se tiene en cuenta la paginacion %>
|
||||
<tr><td colspan="2"></td></tr>
|
||||
<tr>
|
||||
<td colspan="2">
|
||||
<table border="0" align="center">
|
||||
<tr>
|
||||
<%if (perttmov.getPaginacion().esPrimeraPagina()){%>
|
||||
<td width="70" align="right"><span class="pagDesactivo">primero</span></td>
|
||||
<td></td>
|
||||
<td width="70" align="left"><span class="pagDesactivo">anterior</span></td>
|
||||
<%}else{%>
|
||||
<td width="70" align="right"><a href="javascript:paginacion(1)" class="enlace">primero</a></td>
|
||||
<td></td>
|
||||
<td width="70" align="left"><a href="javascript:paginacion(<%=perttmov.getPaginacion().getNumeroPagina() - 1%>)" class="enlace">anterior</a></td>
|
||||
<%}%>
|
||||
|
||||
<%if (perttmov.getPaginacion().esUltimaPagina()){%>
|
||||
<td width="70" align="right"><span class="pagDesactivo">siguiente</span></td>
|
||||
<td></td>
|
||||
<td width="70" align="left"><span class="pagDesactivo">último</span></td>
|
||||
<%}else{%>
|
||||
<td width="70" align="right"><a href="javascript:paginacion(<%=perttmov.getPaginacion().getNumeroPagina() + 1%>)" class="enlace">siguiente</a></td>
|
||||
<td></td>
|
||||
<td width="70" align="left"><a href="javascript:paginacion(<%=perttmov.getPaginacion().getNumeroPaginasTotales()%>)" class="enlace">último</a></td>
|
||||
<%}%>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
<%
|
||||
} //fin if(pagina!=0) %>
|
||||
</table>
|
||||
<%
|
||||
}
|
||||
else
|
||||
{
|
||||
%>
|
||||
<table border="0" align="center">
|
||||
<tr><td class="txtnegrita"><%=pertamensaje.obtenerMensaje(13).getMensaje() %></td></tr>
|
||||
</table>
|
||||
<%
|
||||
}
|
||||
}
|
||||
}
|
||||
%>
|
||||
<tr><td class="txt"><%=mensaje %></td></tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
<script>
|
||||
var jsMostrarNoticia = <%=mostrarNoticia %>;
|
||||
if (!jsMostrarNoticia){
|
||||
document.getElementById('contenedorNoticia').style.display="none";
|
||||
}else{
|
||||
<% strNoticia = strNoticia.replaceAll("\"", "'"); %>
|
||||
var not = "<%=strNoticia %>";
|
||||
tamanioNoticia(not);
|
||||
marquee($('.tituloNoticia'), $('.marquee'),not);
|
||||
}
|
||||
</script>
|
||||
<%
|
||||
}
|
||||
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 autorizaciones (adm/mto_taconaut.jsp)");
|
||||
%>
|
||||
@@ -0,0 +1,309 @@
|
||||
<%@ page import="com.tarisan.control.*" %>
|
||||
<%@ page import="com.tarisan.data.*" %>
|
||||
<%@ page import="com.tarisan.excepcion.*" %>
|
||||
<%@ page import="com.tarisan.log.*" %>
|
||||
<%@ page import="com.tarisan.persistencia.PersistenciaParametros" %>
|
||||
<%@ page import="com.tarisan.util.Utilidades" %>
|
||||
<%@ page import="java.sql.*" %>
|
||||
<%@ page import="java.text.SimpleDateFormat" %>
|
||||
<%@ page import="java.util.Calendar" %>
|
||||
<%@ page import="java.util.Vector" %>
|
||||
|
||||
<%
|
||||
LogTarisan.logger.log(NivelLog.INFO, "Inicio página de detalle de usuario (adm/detalle_usuario.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
|
||||
{
|
||||
|
||||
// Definicion de variables
|
||||
String strParametroMenu = "";
|
||||
int intMedico = 0;
|
||||
String blo = "";
|
||||
SimpleDateFormat sdf = new SimpleDateFormat(PersistenciaParametros.formatoFechas);
|
||||
|
||||
//Obtención del perfil del usuario conectado
|
||||
StringBuffer perfil = new StringBuffer();
|
||||
perfil.append("|");
|
||||
perfil.append(sesion.getAttribute("PERFIL"));
|
||||
perfil.append("|");
|
||||
|
||||
//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");}
|
||||
|
||||
//parametro medico para la selección de los datos del mismo
|
||||
if (request.getParameter("medico")!=null){
|
||||
intMedico = Integer.parseInt(request.getParameter("medico"));}
|
||||
|
||||
//parametro bloqueo para combrobar despues si se ha modificado
|
||||
if (request.getParameter("bloqueado")!=null){
|
||||
blo = (String)request.getParameter("bloqueado");}
|
||||
|
||||
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("<br/>", " ");
|
||||
}
|
||||
}
|
||||
//Lo pongo a false para que no salga la noticia
|
||||
mostrarNoticia = false;
|
||||
%>
|
||||
|
||||
<html>
|
||||
<head>
|
||||
<title>Detalle de usuario</title>
|
||||
<link rel="STYLESHEET" type="text/css" href="../../css/estilos.css">
|
||||
|
||||
<script language="JavaScript" src="../../js/funciones.js"></script>
|
||||
<script language="JavaScript" src="../../js/jquery-1.11.3.js"></script>
|
||||
<script language="JavaScript" src="../../js/inicio_tarisan.js"></script>
|
||||
<script language="JavaScript" src="../../js/menu_adm.js"></script>
|
||||
<script language="JavaScript" src="../../js/bloques_tarisan.js"></script>
|
||||
<script language="JavaScript">pNG="<%= perfil.toString() %>"</script>
|
||||
<script language="JavaScript" type="text/javascript">
|
||||
|
||||
|
||||
|
||||
function enviar()
|
||||
{
|
||||
//comprobamos que el se haya modificado el combobox o el checkbox
|
||||
if ((document.frmUsuario.reset_clave.checked == true) || ((document.frmUsuario.bloqueado.value)!=(document.frmUsuario.valor_bloqueo_clave.value))){
|
||||
document.frmUsuario.submit();
|
||||
alert("Usuario modificado");
|
||||
} else{
|
||||
alert("No has modificado ningún valor");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
function pasarAMayusculas(campo)
|
||||
{
|
||||
campo.value = campo.value.toUpperCase();
|
||||
}
|
||||
|
||||
|
||||
</script>
|
||||
|
||||
</head>
|
||||
<body marginwidth="0" marginheight="0" leftmargin="0" topmargin="0" alink="#43881A" bgcolor="#FFFFFF" onload="javascript:document.frmUsuario.valor_password.focus()">
|
||||
<div class="marco">
|
||||
<table cellpadding="0" cellspacing="0" border="0" align="center" style="width:95%">
|
||||
<tr>
|
||||
<td class="tdLogoCabecera"><img src="<%=request.getContextPath()%>/img/logo.png" class="logoCabecera"></td>
|
||||
<td>
|
||||
<table width="100%">
|
||||
<tr><td class="tituloTablaMedico" align="center"><%= sesion.getAttribute("USUARIO") %></td></tr>
|
||||
<tr>
|
||||
<td>
|
||||
<div id="contenedorNoticia">
|
||||
<br>
|
||||
<div class="tituloNoticia">
|
||||
<p class="marquee"><%=strNoticia %></p>
|
||||
</div>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<!-- Cabecera de Navegación superior //-->
|
||||
<table cellpadding="0" cellspacing="0" border="0" align="center" style="width:95%">
|
||||
<tr>
|
||||
<td><script language="JavaScript">bloques();</script></td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<br>
|
||||
|
||||
<!-- Cuerpo de la página //-->
|
||||
<table cellpadding="0" cellspacing="0" border="0" align="center" style="width:95%">
|
||||
<tr valign="top">
|
||||
<!--<td width="180">//-->
|
||||
<td width="5%">
|
||||
<!-- Menú de navegación del módulo (zona izquierda) //-->
|
||||
<table cellpadding="0" cellspacing="0" border="0">
|
||||
<tr valign="top">
|
||||
<td colspan="2"><img src="../../img/sp.gif" width="180" height="12" border="0"></td>
|
||||
</tr>
|
||||
<tr valign="top">
|
||||
<td><script language="JavaScript">escribirMenuGst();</script></td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
<!--<td bgcolor="#CCCCCC"><img src="../../img/sp.gif" width="1" height="12" border="0"></td>//-->
|
||||
<td width="565">
|
||||
<!-- Tabla con el contenido de la página (zona central-derecha) //-->
|
||||
<table cellpadding="0" cellspacing="0" border="0" width="100%">
|
||||
<tr>
|
||||
<!--<td><img src="../../img/sp.gif" width="4" height="261" border="0"></td>//-->
|
||||
<td width="1px" bgcolor="#CCCCCC" height="90px"></td>
|
||||
<td class="txt" valign="top">
|
||||
<img src="../../img/sp.gif" width="1" height="11" border="0"><br>
|
||||
<table border="0" align="center" width="100%">
|
||||
|
||||
|
||||
<!-- Presentacion de los resultados -->
|
||||
<%
|
||||
PersistenciaTamedico per = new PersistenciaTamedico();
|
||||
Tamedico tamedico = per.seleccionar(intMedico);
|
||||
|
||||
|
||||
String bloqueo = "";
|
||||
String fechaUltAcceso = "";
|
||||
String fechaCaducidad = "";
|
||||
Calendar calCaducidad = Calendar.getInstance();
|
||||
|
||||
if (tamedico != null)
|
||||
{
|
||||
if(tamedico.getBloqueoClave() != null)
|
||||
{
|
||||
bloqueo = tamedico.getBloqueoClave().toUpperCase();
|
||||
}
|
||||
|
||||
if(tamedico.getFechaUltimoAcceso() != null)
|
||||
{
|
||||
fechaUltAcceso = sdf.format(tamedico.getFechaUltimoAcceso());
|
||||
}
|
||||
|
||||
if(tamedico.getFechaModifClave() != null)
|
||||
{
|
||||
calCaducidad.setTime((java.util.Date)tamedico.getFechaModifClave());
|
||||
}
|
||||
calCaducidad.add(Calendar.DATE, ParametrosConfiguracion.diasCaducidad);
|
||||
fechaCaducidad = sdf.format(calCaducidad.getTime());
|
||||
%>
|
||||
<tr><td colspan="2"> </td></tr>
|
||||
<tr>
|
||||
<form name="frmUsuario" action="../../servlet/GestorAdministracion" method="post">
|
||||
<td>
|
||||
<table border="0" align="center">
|
||||
<tr>
|
||||
<td align="right"><span class="txtnegrita">Código: </span></td></td>
|
||||
<td><input type="text" size="20" name="medico" class="txt" readonly="yes" value="<%=tamedico.getMedico()%>" maxlength="6"></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align="right"><span class="txtnegrita">Resetear clave: </span></td>
|
||||
<td><input name="reset_clave" type="checkbox" value="" /></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align="right"><span class="txtnegrita">Nombre: </span></td>
|
||||
<td><input type="text" size="80" name="nombre" class="txt" readonly="yes" value="<%=tamedico.getNombre()%>" maxlength="255"></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align="right"><span class="txtnegrita">Apellidos: </span></td>
|
||||
<td><input type="text" size="80" name="apellidos" class="txt" readonly="yes" value="<%=tamedico.getApellidos()%>" maxlength="255"></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align="right"><span class="txtnegrita">Especialidad: </span></td></td>
|
||||
<td><input type="text" size="4" name="especialidad" class="txt" readonly="yes" value="<%=tamedico.getEspecialidad()%>" maxlength="20"></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align="right"><span class="txtnegrita">Bloqueo: </span></td></td>
|
||||
<td><select name="valor_bloqueo_clave"><%if (bloqueo.equals("S")
|
||||
) {%>
|
||||
<option selected="selected" value="S">Si</option>
|
||||
<option value="N">No</option>
|
||||
<%
|
||||
}
|
||||
else
|
||||
{
|
||||
%>
|
||||
<option selected="selected" value="N">No</option>
|
||||
<option value="S">Si</option>
|
||||
<% } %>
|
||||
</select></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align="right"><span class="txtnegrita">Ultimo acceso: </span></td></td>
|
||||
<td><input type="text" size="15" name="fecha_ult_acceso" class="txt" readonly="yes" value="<%=fechaUltAcceso%>" maxlength="10"></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align="right"><span class="txtnegrita">Caducidad de clave: </span></td></td>
|
||||
<td><input type="text" size="15" name="valor_fecha_modif_clave" class="txt" value="<%=fechaCaducidad%>" maxlength="10" onblur="javascript:valorFecha(this)"></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="2" align="center"><a href="javascript:frmUsuario.reset();frmUsuario.valor_password.focus()" class="enlace">Deshacer</a> <a href="javascript:enviar()" class="enlace">Aceptar</a></td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
<input type="hidden" name="x" value="<%=strParametroMenu%>">
|
||||
<input type="hidden" name="OPCION" value="<%=Constantes.OPC_ADM_USUARIO_DETALLE%>">
|
||||
<input type="hidden" name="bloqueado" value="<%=bloqueo%>">
|
||||
</form>
|
||||
</tr>
|
||||
<%
|
||||
}
|
||||
%>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
<script>
|
||||
var jsMostrarNoticia = <%=mostrarNoticia %>;
|
||||
if (!jsMostrarNoticia){
|
||||
document.getElementById('contenedorNoticia').style.display="none";
|
||||
}else{
|
||||
<% strNoticia = strNoticia.replaceAll("\"", "'"); %>
|
||||
var not = "<%=strNoticia %>";
|
||||
tamanioNoticia(not);
|
||||
marquee($('.tituloNoticia'), $('.marquee'),not);
|
||||
}
|
||||
</script>
|
||||
<%
|
||||
}
|
||||
catch(ExcepcionTarisan ex)
|
||||
{
|
||||
LogTarisan.logger.log(NivelLog.ERROR, "ExcepcionTarisan: " + ex.getMensaje());
|
||||
sesion.setAttribute("ERROR", "ExcepcionTarisan: " + ex.getMensaje());
|
||||
response.sendRedirect("../error.jsp");
|
||||
}
|
||||
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 detalle de usuario (adm/detalle_usuario.jsp)");
|
||||
%>
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 86 B |
Binary file not shown.
|
After Width: | Height: | Size: 43 B |
Binary file not shown.
|
After Width: | Height: | Size: 43 B |
@@ -0,0 +1,330 @@
|
||||
<%@ 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 del listado de usuarios (adm/lista_usuarios.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 strCampoApellido = "";
|
||||
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");
|
||||
|
||||
//parametro apellido para las busquedas
|
||||
if (request.getParameter("apellido")!=null)
|
||||
strCampoApellido = (String)request.getParameter("apellido");
|
||||
|
||||
//parametro pagina para realizar la paginacion
|
||||
if (request.getParameter("pagina")!=null)
|
||||
intPagina=Integer.parseInt(request.getParameter("pagina"));
|
||||
|
||||
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("<br/>", " ");
|
||||
}
|
||||
}
|
||||
//Lo pongo a false para que no salga la noticia
|
||||
mostrarNoticia = false;
|
||||
%>
|
||||
|
||||
<html>
|
||||
<head>
|
||||
<title>Lista de Usuarios</title>
|
||||
<link rel="STYLESHEET" type="text/css" href="../../css/estilos.css">
|
||||
<script language="JavaScript" src="../../js/inicio_tarisan.js"></script>
|
||||
<script language="JavaScript" src="../../js/menu_adm.js"></script>
|
||||
<script language="JavaScript" src="../../js/bloques_tarisan.js"></script>
|
||||
<script language="JavaScript" src="../../js/funciones.js"></script>
|
||||
<script language="JavaScript" src="../../js/jquery-1.11.3.js"></script>
|
||||
<script language="JavaScript">pNG="<%= perfil.toString() %>";</script>
|
||||
|
||||
<script language="JavaScript" type="text/javascript">
|
||||
<!--
|
||||
function pasarAMayusculas(campo)
|
||||
{
|
||||
campo.value = campo.value.toUpperCase();
|
||||
}
|
||||
|
||||
function buscar()
|
||||
{
|
||||
document.frmListaUsuarios.pagina.value = 1;
|
||||
pasarAMayusculas(document.frmListaUsuarios.apellido);
|
||||
document.frmListaUsuarios.submit();
|
||||
}
|
||||
|
||||
function paginacion(pagina)
|
||||
{
|
||||
document.frmListaUsuarios.pagina.value = pagina;
|
||||
pasarAMayusculas(document.frmListaUsuarios.apellido);
|
||||
document.frmListaUsuarios.submit();
|
||||
}
|
||||
//-->
|
||||
</script>
|
||||
|
||||
</head>
|
||||
<body marginwidth="0" marginheight="0" leftmargin="0" topmargin="0" alink="#43881A" bgcolor="#FFFFFF" onload="document.frmListaUsuarios.apellido.focus();">
|
||||
<div class="marco">
|
||||
<table cellpadding="0" cellspacing="0" border="0" align="center" style="width:95%">
|
||||
<tr>
|
||||
<td class="tdLogoCabecera"><img src="<%=request.getContextPath()%>/img/logo.png" class="logoCabecera"></td>
|
||||
<td>
|
||||
<table width="100%">
|
||||
<tr><td class="tituloTablaMedico" align="center"><%= sesion.getAttribute("USUARIO") %></td></tr>
|
||||
<tr>
|
||||
<td>
|
||||
<div id="contenedorNoticia">
|
||||
<br>
|
||||
<div class="tituloNoticia">
|
||||
<p class="marquee"><%=strNoticia %></p>
|
||||
</div>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<!-- Cabecera de Navegación superior //-->
|
||||
<table cellpadding="0" cellspacing="0" border="0" align="center" style="width:95%">
|
||||
<tr>
|
||||
<td><script language="JavaScript">bloques();</script></td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<br>
|
||||
|
||||
<!-- Cuerpo de la página //-->
|
||||
<table cellpadding="0" cellspacing="0" border="0" align="center" style="width:95%">
|
||||
<tr valign="top">
|
||||
<!--<td width="180">//-->
|
||||
<td width="5%">
|
||||
<!-- Menú de navegación del módulo de navegación (zona izquierda) //-->
|
||||
<table cellpadding="0" cellspacing="0" border="0">
|
||||
<tr valign="top">
|
||||
<td colspan="2"><img src="../../img/sp.gif" width="180" height="12" border="0"></td>
|
||||
</tr>
|
||||
<tr valign="top">
|
||||
<td><script language="JavaScript">escribirMenuGst();</script></td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
<!--<td bgcolor="#CCCCCC"><img src="../../img/sp.gif" width="1" height="12" border="0"></td>//-->
|
||||
<td width="565">
|
||||
<!-- Tabla con el contenido de la página (zona central-derecha) //-->
|
||||
<table cellpadding="0" cellspacing="0" border="0" width="100%">
|
||||
<tr>
|
||||
<!--<td><img src="../../img/sp.gif" width="4" height="261" border="0"></td>//-->
|
||||
<td width="1px" bgcolor="#CCCCCC" height="90px"></td>
|
||||
<td class="txt" valign="top">
|
||||
<img src="../../img/sp.gif" width="1" height="11" border="0"><br>
|
||||
<table border="0" align="center" width="100%">
|
||||
|
||||
|
||||
<!-- Presentacion de los resultados -->
|
||||
<tr><td colspan="3"> </td></tr>
|
||||
<tr>
|
||||
<form name="frmListaUsuarios" action="lista_usuarios.jsp?x=<%=strParametroMenu%>" method="post" onSubmit="javascript:pasarAMayusculas(this.apellido)">
|
||||
<td colspan="3">
|
||||
<table border="0" align="center">
|
||||
<tr>
|
||||
<td><span class="txtnegrita">Apellido: </span></td>
|
||||
<td><input type="text" size="50" name="apellido" class="txt" value="<%=strCampoApellido%>"></td>
|
||||
<td> </td>
|
||||
<td><a href="javascript:buscar()" class="enlace"><%=pertamensaje.obtenerMensaje(24).getMensaje() %></a></td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
<input type="hidden" name="pagina" value="1">
|
||||
</form>
|
||||
</tr>
|
||||
<tr><td colspan="3"> </td></tr>
|
||||
|
||||
|
||||
<%
|
||||
|
||||
PersistenciaUsuario per = new PersistenciaUsuario();
|
||||
|
||||
Vector vSeleccion = per.listado_usuarios(intPagina, strCampoApellido);
|
||||
|
||||
if (vSeleccion.size() == 0) //No se han encontrado datos
|
||||
{
|
||||
%>
|
||||
|
||||
<!-- No hay registros -->
|
||||
<tr>
|
||||
<td colspan="3"> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="3" align="center"><span class="txt"><% tamensaje = pertamensaje.obtenerMensaje(10); %><%=tamensaje.getMensaje() %></span></td>
|
||||
</tr>
|
||||
<!-- No hay registros -->
|
||||
|
||||
<%
|
||||
}
|
||||
else
|
||||
{
|
||||
if (intPagina != 0){ //se tiene en cuenta la paginacion
|
||||
%>
|
||||
<!-- Hay registros -->
|
||||
<tr>
|
||||
<td colspan="3" align="right"><span class="txt">Página <%=per.getPaginacion().getNumeroPagina()%> de <%=per.getPaginacion().getNumeroPaginasTotales()%></span></td>
|
||||
</tr>
|
||||
<%
|
||||
}
|
||||
%>
|
||||
<tr>
|
||||
<td class="cabeceraTabla" align="center" bgcolor="#FFAAAA">Apellidos</td>
|
||||
<td class="cabeceraTabla" align="center" bgcolor="#FFAAAA">Nombre</td>
|
||||
<td class="cabeceraTabla" align="center" bgcolor="#FFAAAA">Código</td>
|
||||
</tr>
|
||||
|
||||
|
||||
<%
|
||||
Tamedico tamedico = null;
|
||||
String estilo = "";
|
||||
for(int i = 0; i < vSeleccion.size(); i++)
|
||||
{
|
||||
if (i % 2 == 0)
|
||||
{
|
||||
estilo = "filaA";
|
||||
}
|
||||
else
|
||||
{
|
||||
estilo = "filaB";
|
||||
}
|
||||
tamedico = (Tamedico)vSeleccion.elementAt(i);
|
||||
%>
|
||||
<tr>
|
||||
<td class="<%=estilo%>" align="left"><a href="./detalle_usuario.jsp?x=0&medico=<%= tamedico.getMedico() %>" class="enlace"><%=tamedico.getApellidos()%></a></td>
|
||||
<td class="<%=estilo%>" align="left"><%=tamedico.getNombre()%></td>
|
||||
<td class="<%=estilo%>" align="center"><%=tamedico.getMedico()%></td>
|
||||
</tr>
|
||||
<%
|
||||
}
|
||||
%>
|
||||
|
||||
<% if (intPagina!=0){ //se tiene en cuenta la paginacion %>
|
||||
<tr><td colspan="3"></td></tr>
|
||||
<tr>
|
||||
<td colspan="3">
|
||||
<table border="0" align="center">
|
||||
<tr>
|
||||
<%if (per.getPaginacion().esPrimeraPagina()){%>
|
||||
<td width="70" align="right"><span class="pagDesactivo">primero</span></td>
|
||||
<td></td>
|
||||
<td width="70" align="left"><span class="pagDesactivo">anterior</span></td>
|
||||
<%}else{%>
|
||||
<td width="70" align="right"><a href="javascript:paginacion(1)" class="enlace">primero</a></td>
|
||||
<td></td>
|
||||
<td width="70" align="left"><a href="javascript:paginacion(<%=per.getPaginacion().getNumeroPagina() - 1%>)" class="enlace">anterior</a></td>
|
||||
<%}%>
|
||||
|
||||
<%if (per.getPaginacion().esUltimaPagina()){%>
|
||||
<td width="70" align="right"><span class="pagDesactivo">siguiente</span></td>
|
||||
<td></td>
|
||||
<td width="70" align="left"><span class="pagDesactivo">último</span></td>
|
||||
<%}else{%>
|
||||
<td width="70" align="right"><a href="javascript:paginacion(<%=per.getPaginacion().getNumeroPagina() + 1%>)" class="enlace">siguiente</a></td>
|
||||
<td></td>
|
||||
<td width="70" align="left"><a href="javascript:paginacion(<%=per.getPaginacion().getNumeroPaginasTotales()%>)" class="enlace">último</a></td>
|
||||
<%}%>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
<%
|
||||
} //fin if(pagina!=0)
|
||||
%>
|
||||
<%
|
||||
} //fin else (vSeleccion.size()!=0)
|
||||
%>
|
||||
|
||||
<!-- Hay registros -->
|
||||
|
||||
|
||||
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
<script>
|
||||
var jsMostrarNoticia = <%=mostrarNoticia %>;
|
||||
if (!jsMostrarNoticia){
|
||||
document.getElementById('contenedorNoticia').style.display="none";
|
||||
}else{
|
||||
<% strNoticia = strNoticia.replaceAll("\"", "'"); %>
|
||||
var not = "<%=strNoticia %>";
|
||||
tamanioNoticia(not);
|
||||
marquee($('.tituloNoticia'), $('.marquee'),not);
|
||||
}
|
||||
</script>
|
||||
<%
|
||||
}
|
||||
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 listado de usuarios (adm/lista_usuarios.jsp)");
|
||||
%>
|
||||
@@ -0,0 +1,235 @@
|
||||
<%@ 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 de mantenimiento actos imputados (adm/movimientos_tamovext.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
|
||||
{
|
||||
StringBuffer perfil = new StringBuffer();
|
||||
perfil.append("|");
|
||||
perfil.append(sesion.getAttribute("PERFIL"));
|
||||
perfil.append("|");
|
||||
|
||||
// Definicion de variables
|
||||
String strParametroMenu = "";
|
||||
String mensaje = "";
|
||||
long CampoAutorizacion = 0;
|
||||
int intPagina = 0;
|
||||
StringBuffer strSql = new StringBuffer();
|
||||
Object aCondiciones[] = null;
|
||||
//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");
|
||||
|
||||
//parametro apellido para las busquedas
|
||||
if (request.getParameter("num_aut")!=null)
|
||||
CampoAutorizacion = Long.parseLong(request.getParameter("num_aut"));
|
||||
|
||||
//parametro pagina para realizar la paginacion
|
||||
if (request.getParameter("pagina")!=null)
|
||||
intPagina=Integer.parseInt(request.getParameter("pagina"));
|
||||
|
||||
if(sesion.getAttribute("MENSAJE")!=null)
|
||||
{
|
||||
mensaje=(String)sesion.getAttribute("MENSAJE");
|
||||
sesion.removeAttribute("MENSAJE");
|
||||
}
|
||||
LogTarisan.logger.log(NivelLog.DEBUG, "Llega 62");
|
||||
|
||||
|
||||
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("<br/>", " ");
|
||||
}
|
||||
}
|
||||
//Lo pongo a false para que no salga la noticia
|
||||
mostrarNoticia = false;
|
||||
%>
|
||||
|
||||
<html>
|
||||
<head>
|
||||
<title>Mantenimiento actos imputados</title>
|
||||
<link rel="STYLESHEET" type="text/css" href="../../css/estilos.css">
|
||||
<script language="JavaScript" src="../../js/inicio_tarisan.js"></script>
|
||||
<script language="JavaScript" src="../../js/menu_adm.js"></script>
|
||||
<script language="JavaScript" src="../../js/bloques_tarisan.js"></script>
|
||||
<script language="JavaScript" src="../../js/funciones.js"></script>
|
||||
<script language="JavaScript" src="../../js/jquery-1.11.3.js"></script>
|
||||
<script language="JavaScript">pNG="<%= perfil.toString() %>";</script>
|
||||
|
||||
<script language="JavaScript" type="text/javascript">
|
||||
<!--
|
||||
function buscar()
|
||||
{
|
||||
document.frm_buscar.submit();
|
||||
}
|
||||
|
||||
//-->
|
||||
</script>
|
||||
|
||||
</head>
|
||||
<body marginwidth="0" marginheight="0" leftmargin="0" topmargin="0" alink="#43881A" bgcolor="#FFFFFF" onload="">
|
||||
<div class="marco">
|
||||
<table cellpadding="0" cellspacing="0" border="0" align="center" style="width:95%">
|
||||
<tr>
|
||||
<td class="tdLogoCabecera"><img src="<%=request.getContextPath()%>/img/logo.png" class="logoCabecera"></td>
|
||||
<td>
|
||||
<table width="100%">
|
||||
<tr><td class="tituloTablaMedico" align="center"><%= sesion.getAttribute("USUARIO") %></td></tr>
|
||||
<tr>
|
||||
<td>
|
||||
<div id="contenedorNoticia">
|
||||
<br>
|
||||
<div class="tituloNoticia">
|
||||
<p class="marquee"><%=strNoticia %></p>
|
||||
</div>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<!-- Cabecera de Navegación superior //-->
|
||||
<table cellpadding="0" cellspacing="0" border="0" align="center" style="width:95%">
|
||||
<tr>
|
||||
<td><script language="JavaScript">bloques();</script></td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<br>
|
||||
|
||||
<!-- Cuerpo de la página //-->
|
||||
<table cellpadding="0" cellspacing="0" border="0" align="center" style="width:95%">
|
||||
<tr valign="top">
|
||||
<!--<td width="180">//-->
|
||||
<td width="5%">
|
||||
<!-- Menú de navegación del módulo de navegación (zona izquierda) //-->
|
||||
<table cellpadding="0" cellspacing="0" border="0">
|
||||
<tr valign="top">
|
||||
<td colspan="2"><img src="../../img/sp.gif" width="180" height="12" border="0"></td>
|
||||
</tr>
|
||||
<tr valign="top">
|
||||
<td><script language="JavaScript">escribirMenuGst();</script></td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
<!--<td bgcolor="#CCCCCC"><img src="../../img/sp.gif" width="1" height="12" border="0"></td>//-->
|
||||
<td width="565">
|
||||
<!-- Tabla con el contenido de la página (zona central-derecha) //-->
|
||||
<table cellpadding="0" cellspacing="0" border="0" width="100%">
|
||||
<tr>
|
||||
<!--<td><img src="../../img/sp.gif" width="4" height="261" border="0"></td>//-->
|
||||
<td width="1px" bgcolor="#CCCCCC" height="90px"></td>
|
||||
<td class="txt" valign="top">
|
||||
<img src="../../img/sp.gif" width="1" height="11" border="0"><br>
|
||||
<%PersistenciaTTMovaut perttmov = new PersistenciaTTMovaut();
|
||||
TTMovaut ttmov = perttmov.ObtenerAutorizacionTTmovaut(CampoAutorizacion);
|
||||
PersistenciaTamovext pertamo = new PersistenciaTamovext();
|
||||
Vector resul = pertamo.ObtenerMovimientosMismaPolizaYMedico(ttmov.get_medico(), ttmov.get_especialidad1(), ttmov.get_acto1(), ttmov.get_entidad(), ttmov.get_colectivo(), ttmov.get_poliza(), ttmov.get_orden());
|
||||
%>
|
||||
<table border="0" align="center" width="100%">
|
||||
<%
|
||||
if(resul != null)
|
||||
{
|
||||
if(resul.size()>0)
|
||||
{
|
||||
%>
|
||||
<tr><td class="txt">Fecha</td><td class="txt">Acto</td><td class="txt">Especialidad</td><td class="txt">Médico</td></tr>
|
||||
<%
|
||||
for(int i=0; i<resul.size();i++)
|
||||
{
|
||||
Tamovext tamo = new Tamovext();
|
||||
tamo = (Tamovext)resul.get(i);
|
||||
%>
|
||||
<tr><td class="txt"><%=Utilidades.formatear_fecha(tamo.getFecha()) %></td><td class="txt"><%=tamo.getActo() %></td><td class="txt"><%=tamo.getEspecialidad() %></td><td class="txt"><%=tamo.getMedico() %></td></tr>
|
||||
<%
|
||||
}
|
||||
%>
|
||||
<tr><td class="txt"><form name="frm_buscar" action="mto_taconaut.jsp?x=<%=strParametroMenu%>" method="post" ><input type="hidden" class="txt" id="autorizacion" name="autorizacion" value="<%=CampoAutorizacion %>"/><a href="javascript:buscar()" class="enlace"><%=pertamensaje.obtenerMensaje(30).getMensaje() %></a></form></td></tr>
|
||||
<%
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
%>
|
||||
<tr><td class="txt">No se han encontrado movimientos <br/>imputados a esa autorización</td></tr>
|
||||
<%
|
||||
}
|
||||
%>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
<script>
|
||||
var jsMostrarNoticia = <%=mostrarNoticia %>;
|
||||
if (!jsMostrarNoticia){
|
||||
document.getElementById('contenedorNoticia').style.display="none";
|
||||
}else{
|
||||
<% strNoticia = strNoticia.replaceAll("\"", "'"); %>
|
||||
var not = "<%=strNoticia %>";
|
||||
tamanioNoticia(not);
|
||||
marquee($('.tituloNoticia'), $('.marquee'),not);
|
||||
}
|
||||
</script>
|
||||
<%
|
||||
}
|
||||
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 autorizaciones (adm/movimientos_tamovext.jsp)");
|
||||
%>
|
||||
@@ -0,0 +1,411 @@
|
||||
<%@ 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_actos.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 strDescripcionActo = "";
|
||||
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");
|
||||
|
||||
//Parametro especialidad para saber si el combo tiene seleccionada una especialidad y mostrar los actos de cada especialidad o no
|
||||
if (request.getParameter("especialidad")!=null)
|
||||
strParametroEspe=(String)request.getParameter("especialidad");
|
||||
|
||||
//parametro pagina para realizar la paginacion
|
||||
if (request.getParameter("pagina")!=null)
|
||||
intPagina=Integer.parseInt(request.getParameter("pagina"));
|
||||
|
||||
//parametro acto para las busquedas
|
||||
if (request.getParameter("hiddenActo")!=null)
|
||||
strDescripcionActo = (String)request.getParameter("hiddenActo");
|
||||
|
||||
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("<br/>", " ");
|
||||
}
|
||||
}
|
||||
//Lo pongo a false para que no salga la noticia
|
||||
mostrarNoticia = false;
|
||||
|
||||
%>
|
||||
|
||||
<html>
|
||||
<head>
|
||||
<title>Mantenimiento Actos</title>
|
||||
<link rel="STYLESHEET" type="text/css" href="../../css/estilos.css">
|
||||
<script language="JavaScript" src="../../js/inicio_tarisan.js"></script>
|
||||
<script language="JavaScript" src="../../js/menu_adm.js"></script>
|
||||
<script language="JavaScript" src="../../js/bloques_tarisan.js"></script>
|
||||
<script language="JavaScript" src="../../js/funciones.js"></script>
|
||||
<script language="JavaScript" src="../../js/jquery-1.11.3.js"></script>
|
||||
<script language="JavaScript">pNG="<%= perfil.toString() %>";</script>
|
||||
|
||||
<script language="JavaScript" type="text/javascript">
|
||||
<!--
|
||||
var modificado = 0;
|
||||
|
||||
function pasarAMayusculas(campo)
|
||||
{
|
||||
campo.value = campo.value.toUpperCase();
|
||||
}
|
||||
|
||||
function MostrarActos(especialidad){
|
||||
if (document.getElementById("mto_esp").value != 0){
|
||||
document.getElementById("hiddenEspecialidad").value = document.getElementById("mto_esp").value;
|
||||
document.getElementById("hiddenActo").value = "";
|
||||
document.frmActos.submit();
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
function enviar(){
|
||||
if (modificado == 1){
|
||||
for (i=0;i<document.getElementById("nElementos").value;i++){
|
||||
document.getElementById("hiddenNivel"+(i+1)).value = document.getElementById("mto_nivel"+(i+1)).value;
|
||||
}
|
||||
document.frmActosNiveles.submit();
|
||||
alert("Nivel modificado");
|
||||
} else{
|
||||
alert("No has modificado ningun valor");
|
||||
}
|
||||
}
|
||||
|
||||
function paginacion(pagina){
|
||||
document.getElementById("pagina").value = pagina;
|
||||
document.getElementById("hiddenEspecialidad").value = document.getElementById("mto_esp").value;
|
||||
document.frmActos.submit();
|
||||
}
|
||||
|
||||
function buscar()
|
||||
{
|
||||
document.getElementById("pagina").value = 1;
|
||||
pasarAMayusculas(document.getElementById("acto"));
|
||||
document.getElementById("hiddenActo").value = document.getElementById("acto").value;
|
||||
document.frmActos.submit();
|
||||
}
|
||||
|
||||
-->
|
||||
</script>
|
||||
|
||||
</head>
|
||||
<body marginwidth="0" marginheight="0" leftmargin="0" topmargin="0" alink="#43881A" bgcolor="#FFFFFF">
|
||||
<div class="marco">
|
||||
<table cellpadding="0" cellspacing="0" border="0" align="center" style="width:95%">
|
||||
<tr>
|
||||
<td class="tdLogoCabecera"><img src="<%=request.getContextPath()%>/img/logo.png" class="logoCabecera"></td>
|
||||
<td>
|
||||
<table width="100%">
|
||||
<tr><td class="tituloTablaMedico" align="center"><%= sesion.getAttribute("USUARIO") %></td></tr>
|
||||
<tr>
|
||||
<td>
|
||||
<div id="contenedorNoticia">
|
||||
<br>
|
||||
<div class="tituloNoticia">
|
||||
<p class="marquee"><%=strNoticia %></p>
|
||||
</div>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<!-- Cabecera de Navegación superior //-->
|
||||
<table cellpadding="0" cellspacing="0" border="0" align="center" style="width:95%">
|
||||
<tr>
|
||||
<td><script language="JavaScript">bloques();</script></td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<br>
|
||||
|
||||
<!-- Cuerpo de la página //-->
|
||||
<table cellpadding="0" cellspacing="0" border="0" align="center" style="width:95%">
|
||||
<tr valign="top">
|
||||
<!--<td width="180">//-->
|
||||
<td width="5%">
|
||||
<!-- Menú de navegación del módulo de navegación (zona izquierda) //-->
|
||||
<table cellpadding="0" cellspacing="0" border="0">
|
||||
<tr valign="top">
|
||||
<td colspan="2"><img src="../../img/sp.gif" width="180" height="12" border="0"></td>
|
||||
</tr>
|
||||
<tr valign="top">
|
||||
<td><script language="JavaScript">escribirMenuGst();</script></td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
<!--<td bgcolor="#CCCCCC"><img src="../../img/sp.gif" width="1" height="12" border="0"></td>//-->
|
||||
<!-- Zona central //-->
|
||||
<td width="565">
|
||||
<table cellpadding="0" cellspacing="0" border="0" width="100%">
|
||||
<tr>
|
||||
<td width="1px" bgcolor="#CCCCCC" height="190px"></td>
|
||||
<td>
|
||||
<table cellpadding="0" cellspacing="0" border="0" width="100%">
|
||||
<tr>
|
||||
<td colspan="3">
|
||||
<table border="0" align="center">
|
||||
<tr>
|
||||
<td align="right"><span class="txtnegrita">Especialidad: </span></td>
|
||||
|
||||
<% PersistenciaTanivelEspecialidadTanivelActo per = new PersistenciaTanivelEspecialidadTanivelActo();
|
||||
Vector vSeleccion = per.obtenerEspecialidades();
|
||||
|
||||
if (vSeleccion.size() == 0) //No se han encontrado datos
|
||||
{
|
||||
%>
|
||||
<!-- No hay registros -->
|
||||
<tr>
|
||||
<td colspan="3"> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="3" align="center"><span class="txt"><% tamensaje = pertamensaje.obtenerMensaje(10); %><%=tamensaje.getMensaje() %></span></td>
|
||||
</tr>
|
||||
<!-- No hay registros -->
|
||||
<%
|
||||
}else{
|
||||
|
||||
%>
|
||||
<td><select id="mto_esp" name="especialidades" onchange="MostrarActos()">
|
||||
<option value=0>-- Seleccionar --</option>
|
||||
<%
|
||||
TanivelEspecialidad TanivEsp = null;
|
||||
for(int i = 0; i < vSeleccion.size(); i++)
|
||||
{
|
||||
TanivEsp = (TanivelEspecialidad)vSeleccion.elementAt(i);
|
||||
String descripcion = "";
|
||||
descripcion = per.ObtenerDescripcion(TanivEsp.getEspecialidad());
|
||||
%>
|
||||
<option value="<%=TanivEsp.getEspecialidad()%>" <%=(strParametroEspe.compareTo(String.valueOf(TanivEsp.getEspecialidad()))==0)?"selected=selected":"" %>><%=descripcion %></option>
|
||||
<%
|
||||
}
|
||||
%>
|
||||
</select></td>
|
||||
<% }
|
||||
|
||||
%>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
|
||||
</tr>
|
||||
<tr><td colspan="3"> </td></tr>
|
||||
<tr>
|
||||
<% if (Integer.parseInt(strParametroEspe)!=0){
|
||||
Vector vTanivAct = new Vector();
|
||||
vTanivAct = per.ObtenerActos(Integer.parseInt(strParametroEspe),intPagina,strDescripcionActo);
|
||||
if (vTanivAct.size() == 0) //No se han encontrado datos
|
||||
{
|
||||
%>
|
||||
<!-- No hay registros -->
|
||||
<table>
|
||||
<tr>
|
||||
<td colspan="3"> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="3" align="center"><span class="txt"><% tamensaje = pertamensaje.obtenerMensaje(10); %><%=tamensaje.getMensaje() %></span></td>
|
||||
</tr>
|
||||
</table>
|
||||
<!-- No hay registros -->
|
||||
<%
|
||||
}else{
|
||||
if (intPagina != 0){ //se tiene en cuenta la paginacion
|
||||
%>
|
||||
<!-- Hay registros -->
|
||||
<tr>
|
||||
<td colspan="3">
|
||||
<table border="0" align="center">
|
||||
<tr>
|
||||
<td><span class="txtnegrita">Descripcion Acto: </span></td>
|
||||
<td><input type="text" size="50" name="acto" id="acto" class="txt" value="<%=strDescripcionActo%>"></td>
|
||||
<td> </td>
|
||||
<td><a href="javascript:buscar()" class="enlace"><%=pertamensaje.obtenerMensaje(24).getMensaje() %></a></td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
<table cellpadding="0" border="0" width="90%" align="center">
|
||||
<tr>
|
||||
<td colspan="3" align="right"><span class="txt">Página <%=per.getPaginacion().getNumeroPagina()%> de <%=per.getPaginacion().getNumeroPaginasTotales()%></span></td>
|
||||
</tr>
|
||||
<%
|
||||
}
|
||||
%>
|
||||
<tr><form name="frmActosNiveles" action="../../servlet/GestorAdministracion" method="post">
|
||||
<td class="cabeceraTabla" align="center" bgcolor="#FFAAAA">Codigo</td>
|
||||
<td class="cabeceraTabla" align="center" bgcolor="#FFAAAA">Acto</td>
|
||||
<td class="cabeceraTabla" align="center" bgcolor="#FFAAAA">Nivel</td>
|
||||
</tr>
|
||||
<%
|
||||
TanivelActo TanivAct = null;
|
||||
String estilo = "";
|
||||
for(int i = 0; i < vTanivAct.size(); i++){
|
||||
TanivAct = (TanivelActo)vTanivAct.elementAt(i);
|
||||
String descripcionActo = "";
|
||||
descripcionActo = per.ObtenerDescripcionActo(TanivAct.getActo(),Integer.parseInt(strParametroEspe));
|
||||
if (i % 2 == 0)
|
||||
{
|
||||
estilo = "filaA";
|
||||
}
|
||||
else
|
||||
{
|
||||
estilo = "filaB";
|
||||
}
|
||||
%>
|
||||
|
||||
<tr>
|
||||
<td class="<%=estilo%>" align="center"><span class="txtnegrita"><%=TanivAct.getActo()%> </span></td>
|
||||
<td class="<%=estilo%>" align="center"><span class="txtnegrita"><%=descripcionActo%> </span></td>
|
||||
<td class="<%=estilo%>" align="center"><select id="mto_nivel<%=(i+1) %>" name="mto_visibilidad" onchange="modificado=1">
|
||||
<option value=1 <%=(1==TanivAct.getNivel())?"selected=selected":"" %>>1</option>
|
||||
<option value=2 <%=(2==TanivAct.getNivel())?"selected=selected":"" %>>2</option>
|
||||
<option value=3 <%=(3==TanivAct.getNivel())?"selected=selected":"" %>>3</option>
|
||||
</td>
|
||||
|
||||
<td><input type="hidden" name="hiddenActo<%=(i+1) %>" id="hiddenActo<%=(i+1) %>" value="<%=TanivAct.getActo()%>"></td>
|
||||
<td><input type="hidden" name="hiddenNivel<%=(i+1)%>" id="hiddenNivel<%=(i+1)%>" value=""></td>
|
||||
<td><input type="hidden" name="nElementos" id="nElementos" value="<%=vTanivAct.size()%>"></td>
|
||||
</tr>
|
||||
<%
|
||||
}
|
||||
if (intPagina!=0){ //se tiene en cuenta la paginacion %>
|
||||
<tr><td colspan="3"></td></tr>
|
||||
<tr>
|
||||
<td colspan="3">
|
||||
<table border="0" align="center">
|
||||
<tr>
|
||||
<%if (per.getPaginacion().esPrimeraPagina()){%>
|
||||
<td width="70" align="right"><span class="pagDesactivo">primero</span></td>
|
||||
<td></td>
|
||||
<td width="70" align="left"><span class="pagDesactivo">anterior</span></td>
|
||||
<%}else{%>
|
||||
<td width="70" align="right"><a href="javascript:paginacion(1)" class="enlace">primero</a></td>
|
||||
<td></td>
|
||||
<td width="70" align="left"><a href="javascript:paginacion(<%=per.getPaginacion().getNumeroPagina() - 1%>)" class="enlace">anterior</a></td>
|
||||
<%}%>
|
||||
|
||||
<%if (per.getPaginacion().esUltimaPagina()){%>
|
||||
<td width="70" align="right"><span class="pagDesactivo">siguiente</span></td>
|
||||
<td></td>
|
||||
<td width="70" align="left"><span class="pagDesactivo">último</span></td>
|
||||
<%}else{%>
|
||||
<td width="70" align="right"><a href="javascript:paginacion(<%=per.getPaginacion().getNumeroPagina() + 1%>)" class="enlace">siguiente</a></td>
|
||||
<td></td>
|
||||
<td width="70" align="left"><a href="javascript:paginacion(<%=per.getPaginacion().getNumeroPaginasTotales()%>)" class="enlace">último</a></td>
|
||||
<%}%>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
<%
|
||||
} //fin if(pagina!=0)
|
||||
%>
|
||||
<input type="hidden" name="hiddenEspe" value="<%=strParametroEspe%>">
|
||||
<tr>
|
||||
<td><input type="hidden" name="OPCION" value="<%=Constantes.OPC_ADM_GES_ACT_NIVEL_ACTO%>"></td>
|
||||
<td colspan="2" align="right"><a href="javascript:enviar()" class="enlace">Aceptar</a></td>
|
||||
</tr>
|
||||
</form>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<%
|
||||
}
|
||||
}
|
||||
|
||||
%>
|
||||
<form name="frmActos" action="../../servlet/GestorAdministracion" method="post">
|
||||
<input type="hidden" name="pagina" id="pagina" value="1">
|
||||
<input type="hidden" id="hiddenEspecialidad" name="hiddenEspecialidad" value="<%=Integer.parseInt(strParametroEspe)%>">
|
||||
<input type="hidden" id="hiddenActo" name="hiddenActo" value="<%=strDescripcionActo%>">
|
||||
<input type="hidden" name="OPCION" value="<%=Constantes.OPC_ADM_GES_NIVELES_ACT%>">
|
||||
</form>
|
||||
</table>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
<script>
|
||||
var jsMostrarNoticia = <%=mostrarNoticia %>;
|
||||
if (!jsMostrarNoticia){
|
||||
document.getElementById('contenedorNoticia').style.display="none";
|
||||
}else{
|
||||
<% strNoticia = strNoticia.replaceAll("\"", "'"); %>
|
||||
var not = "<%=strNoticia %>";
|
||||
tamanioNoticia(not);
|
||||
marquee($('.tituloNoticia'), $('.marquee'),not);
|
||||
}
|
||||
</script>
|
||||
<%
|
||||
}
|
||||
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_actos.jsp)");
|
||||
%>
|
||||
@@ -0,0 +1,176 @@
|
||||
<%@ 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_analiticas.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 = "";
|
||||
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");
|
||||
|
||||
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("<br/>", " ");
|
||||
}
|
||||
}
|
||||
//Lo pongo a false para que no salga la noticia
|
||||
mostrarNoticia = false;
|
||||
%>
|
||||
|
||||
<html>
|
||||
<head>
|
||||
<title>Mantenimiento de Analíticas</title>
|
||||
<link rel="STYLESHEET" type="text/css" href="../../css/estilos.css">
|
||||
<script language="JavaScript" src="../../js/inicio_tarisan.js"></script>
|
||||
<script language="JavaScript" src="../../js/menu_adm.js"></script>
|
||||
<script language="JavaScript" src="../../js/bloques_tarisan.js"></script>
|
||||
<script language="JavaScript" src="../../js/funciones.js"></script>
|
||||
<script language="JavaScript" src="../../js/jquery-1.11.3.js"></script>
|
||||
<script language="JavaScript">pNG="<%= perfil.toString() %>";</script>
|
||||
|
||||
<script language="JavaScript" type="text/javascript">
|
||||
<!--
|
||||
function pasarAMayusculas(campo)
|
||||
{
|
||||
campo.value = campo.value.toUpperCase();
|
||||
}
|
||||
|
||||
//-->
|
||||
</script>
|
||||
|
||||
</head>
|
||||
<body marginwidth="0" marginheight="0" leftmargin="0" topmargin="0" alink="#43881A" bgcolor="#FFFFFF">
|
||||
<div class="marco">
|
||||
<table cellpadding="0" cellspacing="0" border="0" align="center" style="width:95%">
|
||||
<tr>
|
||||
<td class="tdLogoCabecera"><img src="<%=request.getContextPath()%>/img/logo.png" class="logoCabecera"></td>
|
||||
<td>
|
||||
<table width="100%">
|
||||
<tr><td class="tituloTablaMedico" align="center"><%= sesion.getAttribute("USUARIO") %></td></tr>
|
||||
<tr>
|
||||
<td>
|
||||
<div id="contenedorNoticia">
|
||||
<br>
|
||||
<div class="tituloNoticia">
|
||||
<p class="marquee"><%=strNoticia %></p>
|
||||
</div>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<!-- Cabecera de Navegación superior //-->
|
||||
<table cellpadding="0" cellspacing="0" border="0" align="center" style="width:95%">
|
||||
<tr>
|
||||
<td><script language="JavaScript">bloques();</script></td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<br>
|
||||
|
||||
<!-- Cuerpo de la página //-->
|
||||
<table cellpadding="0" cellspacing="0" border="0" align="center" style="width:95%">
|
||||
<tr valign="top">
|
||||
<!--<td width="180">//-->
|
||||
<td width="5%">
|
||||
<!-- Menú de navegación del módulo de navegación (zona izquierda) //-->
|
||||
<table cellpadding="0" cellspacing="0" border="0">
|
||||
<tr valign="top">
|
||||
<td colspan="2"><img src="../../img/sp.gif" width="180" height="12" border="0"></td>
|
||||
</tr>
|
||||
<tr valign="top">
|
||||
<td><script language="JavaScript">escribirMenuGst();</script></td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
<!--<td bgcolor="#CCCCCC"><img src="../../img/sp.gif" width="1" height="12" border="0"></td>//-->
|
||||
<!-- Zona central //-->
|
||||
<td width="565">
|
||||
<table cellpadding="0" cellspacing="0" border="0" width="100%">
|
||||
<tr>
|
||||
<td width="1px" bgcolor="#CCCCCC" height="190px"></td>
|
||||
<td colspan="2" align="center"><a href="mto_niveles.jsp?x=3" class="enlace">Mantenimiento de niveles</a></td>
|
||||
<td colspan="2" align="center"><a href="mto_actos.jsp?x=3" class="enlace">Mantenimiento de actos</a></td>
|
||||
</tr>
|
||||
</table>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
<script>
|
||||
var jsMostrarNoticia = <%=mostrarNoticia %>;
|
||||
if (!jsMostrarNoticia){
|
||||
document.getElementById('contenedorNoticia').style.display="none";
|
||||
}else{
|
||||
<% strNoticia = strNoticia.replaceAll("\"", "'"); %>
|
||||
var not = "<%=strNoticia %>";
|
||||
tamanioNoticia(not);
|
||||
marquee($('.tituloNoticia'), $('.marquee'),not);
|
||||
}
|
||||
</script>
|
||||
<%
|
||||
}
|
||||
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_analiticas.jsp)");
|
||||
%>
|
||||
@@ -0,0 +1,383 @@
|
||||
<%@ 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("<br/>", " ");
|
||||
}
|
||||
}
|
||||
//Lo pongo a false para que no salga la noticia
|
||||
mostrarNoticia = false;
|
||||
|
||||
%>
|
||||
|
||||
<html>
|
||||
<head>
|
||||
<title>Mantenimiento Niveles</title>
|
||||
<link rel="STYLESHEET" type="text/css" href="../../css/estilos.css">
|
||||
<script language="JavaScript" src="../../js/inicio_tarisan.js"></script>
|
||||
<script language="JavaScript" src="../../js/menu_adm.js"></script>
|
||||
<script language="JavaScript" src="../../js/bloques_tarisan.js"></script>
|
||||
<script language="JavaScript" src="../../js/funciones.js"></script>
|
||||
<script language="JavaScript" src="../../js/jquery-1.11.3.js"></script>
|
||||
<script language="JavaScript">pNG="<%= perfil.toString() %>";</script>
|
||||
|
||||
<script language="JavaScript" type="text/javascript">
|
||||
<!--
|
||||
var modificado = 0;
|
||||
function pasarAMayusculas(campo)
|
||||
{
|
||||
campo.value = campo.value.toUpperCase();
|
||||
}
|
||||
|
||||
function MostrarNiveles(especialidad){
|
||||
if (document.getElementById("mto_esp").value != 0){
|
||||
document.getElementById("hiddenEspecialidad").value = document.getElementById("mto_esp").value;
|
||||
document.getElementById("hiddenEspecialidadSolicitada").value = 0;
|
||||
document.frmNiveles.submit();
|
||||
}
|
||||
}
|
||||
|
||||
function MostrarEspecialidadesSolicitadas(){
|
||||
if (document.getElementById("mto_esp_sol").value != 0){
|
||||
document.getElementById("hiddenEspecialidadSolicitada").value = document.getElementById("mto_esp_sol").value;
|
||||
document.frmNiveles.submit();
|
||||
}
|
||||
}
|
||||
|
||||
function enviar()
|
||||
{
|
||||
if (modificado == 1){
|
||||
document.getElementById("hiddenVisi1").value = document.getElementById("mto_visibilidad1").value;
|
||||
document.getElementById("hiddenVisi2").value = document.getElementById("mto_visibilidad2").value;
|
||||
document.getElementById("hiddenVisi3").value = document.getElementById("mto_visibilidad3").value;
|
||||
document.frmNivVis.submit();
|
||||
alert("Visibilidad modificada");
|
||||
} else{
|
||||
alert("No has modificado ningun valor");
|
||||
}
|
||||
}
|
||||
|
||||
//-->
|
||||
</script>
|
||||
|
||||
</head>
|
||||
<body marginwidth="0" marginheight="0" leftmargin="0" topmargin="0" alink="#43881A" bgcolor="#FFFFFF">
|
||||
<div class="marco">
|
||||
<table cellpadding="0" cellspacing="0" border="0" align="center" style="width:95%">
|
||||
<tr>
|
||||
<td class="tdLogoCabecera"><img src="<%=request.getContextPath()%>/img/logo.png" class="logoCabecera"></td>
|
||||
<td>
|
||||
<table width="100%">
|
||||
<tr><td class="tituloTablaMedico" align="center"><%= sesion.getAttribute("USUARIO") %></td></tr>
|
||||
<tr>
|
||||
<td>
|
||||
<div id="contenedorNoticia">
|
||||
<br>
|
||||
<div class="tituloNoticia">
|
||||
<p class="marquee"><%=strNoticia %></p>
|
||||
</div>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<!-- Cabecera de Navegación superior //-->
|
||||
<table cellpadding="0" cellspacing="0" border="0" align="center" style="width:95%">
|
||||
<tr>
|
||||
<td><script language="JavaScript">bloques();</script></td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<br>
|
||||
|
||||
<!-- Cuerpo de la página //-->
|
||||
<table cellpadding="0" cellspacing="0" border="0" align="center" style="width:95%">
|
||||
<tr valign="top">
|
||||
<!--<td width="180">//-->
|
||||
<td width="5%">
|
||||
<!-- Menú de navegación del módulo de navegación (zona izquierda) //-->
|
||||
<table cellpadding="0" cellspacing="0" border="0">
|
||||
<tr valign="top">
|
||||
<td colspan="2"><img src="../../img/sp.gif" width="180" height="12" border="0"></td>
|
||||
</tr>
|
||||
<tr valign="top">
|
||||
<td><script language="JavaScript">escribirMenuGst();</script></td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
<!--<td bgcolor="#CCCCCC"><img src="../../img/sp.gif" width="1" height="12" border="0"></td>//-->
|
||||
<!-- Zona central //-->
|
||||
<td width="565">
|
||||
<table cellpadding="0" cellspacing="0" border="0" width="100%">
|
||||
<tr>
|
||||
<td width="1px" bgcolor="#CCCCCC" height="190px"></td>
|
||||
<td>
|
||||
<table cellpadding="0" cellspacing="0" border="0" width="100%">
|
||||
<tr>
|
||||
<td colspan="3">
|
||||
<table border="0" align="center">
|
||||
<tr>
|
||||
<td> </td>
|
||||
<td align="right"><span class="txtnegrita">Especialidad: </span></td>
|
||||
|
||||
<% PersistenciaTanivelEspecialidadTanivelActo per = new PersistenciaTanivelEspecialidadTanivelActo();
|
||||
Vector vSeleccion = per.obtenerEspecialidades();
|
||||
|
||||
if (vSeleccion.size() == 0) //No se han encontrado datos
|
||||
{
|
||||
%>
|
||||
<!-- No hay registros -->
|
||||
<td colspan="3" align="center"><span class="txt"><% tamensaje = pertamensaje.obtenerMensaje(10); %><%=tamensaje.getMensaje() %></span></td>
|
||||
<%
|
||||
}else{
|
||||
|
||||
%>
|
||||
<td><select id="mto_esp" name="especialidades" onchange="MostrarNiveles()">
|
||||
<option value=0>-- Seleccionar --</option>
|
||||
<%
|
||||
TanivelEspecialidad TanivEsp = null;
|
||||
for(int i = 0; i < vSeleccion.size(); i++)
|
||||
{
|
||||
TanivEsp = (TanivelEspecialidad)vSeleccion.elementAt(i);
|
||||
String descripcion = "";
|
||||
descripcion = per.ObtenerDescripcion(TanivEsp.getEspecialidad());
|
||||
%>
|
||||
<option value="<%=TanivEsp.getEspecialidad()%>" <%=(strParametroEspe.compareTo(String.valueOf(TanivEsp.getEspecialidad()))==0)?"selected=selected":"" %>><%=descripcion %></option>
|
||||
<%
|
||||
}
|
||||
%>
|
||||
</select></td>
|
||||
<% }
|
||||
|
||||
%>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<br/>
|
||||
<br/>
|
||||
<% if (Integer.parseInt(strParametroEspe)!=0){
|
||||
%>
|
||||
<table cellpadding="0" cellspacing="0" border="0" width="100%">
|
||||
<tr>
|
||||
<td align="right"><span class="txtnegrita">Especialidad Solicitada: </span></td>
|
||||
<%
|
||||
Vector vTanivEspeSolicitada = new Vector();
|
||||
vTanivEspeSolicitada = per.obtenerEspecialidadesSolicitadas(Integer.parseInt(strParametroEspe));
|
||||
if (vTanivEspeSolicitada.size() == 0) //No se han encontrado datos
|
||||
{
|
||||
%>
|
||||
<!-- No hay registros -->
|
||||
<tr>
|
||||
<td colspan="3"> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="3" align="center"><span class="txt"><%=tamensaje.getMensaje() %></span></td>
|
||||
</tr>
|
||||
<!-- No hay registros -->
|
||||
<%
|
||||
}else{
|
||||
|
||||
%>
|
||||
<td><select id="mto_esp_sol" name="mto_esp_sol" onchange="MostrarEspecialidadesSolicitadas()">
|
||||
<option value=0>-- Seleccionar --</option>
|
||||
<%
|
||||
TanivelEspecialidad TanivEspe = null;
|
||||
for(int i = 0; i < vTanivEspeSolicitada.size(); i++)
|
||||
{
|
||||
TanivEspe = (TanivelEspecialidad)vTanivEspeSolicitada.elementAt(i);
|
||||
String descripcionEspSol = "";
|
||||
descripcionEspSol = per.ObtenerDescripcion(TanivEspe.getEspecialidad());
|
||||
%>
|
||||
<option value="<%=TanivEspe.getEspecialidad()%>"<%=(strParametroEspeSol.compareTo(String.valueOf(TanivEspe.getEspecialidad()))==0)?"selected=selected":"" %>><%=descripcionEspSol %></option>
|
||||
<%
|
||||
}
|
||||
%>
|
||||
</select></td>
|
||||
<% }
|
||||
|
||||
%>
|
||||
</tr>
|
||||
</table>
|
||||
<br/>
|
||||
<br/>
|
||||
<% 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
|
||||
{
|
||||
%>
|
||||
<!-- No hay registros -->
|
||||
<table>
|
||||
<tr>
|
||||
<td colspan="3"> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="3" align="center"><span class="txt"><%=tamensaje.getMensaje() %></span></td>
|
||||
</tr>
|
||||
</table>
|
||||
<!-- No hay registros -->
|
||||
<%
|
||||
}else{
|
||||
%>
|
||||
<form name="frmNivVis" action="../../servlet/GestorAdministracion" method="post">
|
||||
<table cellpadding="0" border="0" width="90%" align="center">
|
||||
<tr>
|
||||
<td class="cabeceraTabla" align="center" bgcolor="#FFAAAA">Nivel</td>
|
||||
<td class="cabeceraTabla" align="center" bgcolor="#FFAAAA">Visibilidad</td>
|
||||
</tr>
|
||||
<%
|
||||
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";
|
||||
}
|
||||
%>
|
||||
|
||||
<tr>
|
||||
<td class="<%=estilo%>" align="center"><span class="txtnegrita"><%=TanivEsp.getNivel()%> </span></td>
|
||||
<td class="<%=estilo%>" align="center"><select id="mto_visibilidad<%=(i+1) %>" name="mto_visibilidad" onchange="modificado=1">
|
||||
<option value=0 <%=(0==TanivEsp.getVisibilidad())?"selected=selected":"" %>>0 - Invisible</option>
|
||||
<option value=1 <%=(1==TanivEsp.getVisibilidad())?"selected=selected":"" %>>1 - Permitido</option>
|
||||
<option value=2 <%=(2==TanivEsp.getVisibilidad())?"selected=selected":"" %>>2 - Justificable</option>
|
||||
</td>
|
||||
|
||||
<td><input type="hidden" name="hiddenNivel<%=(i+1) %>" id="hiddenNivel<%=(i+1) %>" value="<%=TanivEsp.getNivel()%>"></td>
|
||||
<td><input type="hidden" name="hiddenVisi<%=(i+1)%>" id="hiddenVisi<%=(i+1)%>" value=""></td>
|
||||
</tr>
|
||||
<%
|
||||
}
|
||||
%>
|
||||
<input type="hidden" name="hiddenEspe" value="<%=strParametroEspe%>">
|
||||
<input type="hidden" name="hiddenEspeS" value="<%=strParametroEspeSol%>">
|
||||
<tr>
|
||||
<td><input type="hidden" name="OPCION" value="<%=Constantes.OPC_ADM_GES_ACT_VISIBILI%>"></td>
|
||||
<td colspan="2" align="right"><a href="javascript:enviar()" class="enlace">Aceptar</a></td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
</form>
|
||||
<%
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
%>
|
||||
<form name="frmNiveles" action="../../servlet/GestorAdministracion" method="post">
|
||||
<input type="hidden" id="hiddenEspecialidad" name="hiddenEspecialidad" value="<%=strParametroEspe%>">
|
||||
<input type="hidden" id="hiddenEspecialidadSolicitada" name="hiddenEspecialidadSolicitada" value="<%=strParametroEspeSol%>">
|
||||
<input type="hidden" name="OPCION" value="<%=Constantes.OPC_ADM_GES_NIVELES_ESPE%>">
|
||||
</form>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
<script>
|
||||
var jsMostrarNoticia = <%=mostrarNoticia %>;
|
||||
if (!jsMostrarNoticia){
|
||||
document.getElementById('contenedorNoticia').style.display="none";
|
||||
}else{
|
||||
<% strNoticia = strNoticia.replaceAll("\"", "'"); %>
|
||||
var not = "<%=strNoticia %>";
|
||||
tamanioNoticia(not);
|
||||
marquee($('.tituloNoticia'), $('.marquee'),not);
|
||||
}
|
||||
</script>
|
||||
<%
|
||||
}
|
||||
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)");
|
||||
%>
|
||||
@@ -0,0 +1,465 @@
|
||||
<%@ 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" %>
|
||||
<%@ page import="java.io.*" %>
|
||||
|
||||
<%
|
||||
LogTarisan.logger.log(NivelLog.INFO, "Inicio página de de mantenimiento de autorizaciones (adm/mto_taconaut.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 mensaje = "";
|
||||
int CampoMedico = 0;
|
||||
long CampoPoliza = 0;
|
||||
int CampoColectivo = 0;
|
||||
int CampoOrden = 0;
|
||||
int intPagina = 0;
|
||||
StringBuffer strSql = new StringBuffer();
|
||||
Object aCondiciones[] = null;
|
||||
|
||||
//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");
|
||||
|
||||
//parametro medico para las busquedas
|
||||
if (request.getParameter("medico")!=null){
|
||||
if (request.getParameter("medico").compareTo("")==0){
|
||||
CampoMedico = 0;
|
||||
}else{
|
||||
CampoMedico = Integer.parseInt(request.getParameter("medico"));
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
//parametro poliza para las busquedas
|
||||
if (request.getParameter("poliza")!=null)
|
||||
CampoPoliza = Integer.parseInt(request.getParameter("poliza"));
|
||||
|
||||
//parametro medico para las busquedas
|
||||
if (request.getParameter("colectivo")!=null)
|
||||
CampoColectivo = Integer.parseInt(request.getParameter("colectivo"));
|
||||
|
||||
//parametro poliza para las busquedas
|
||||
if (request.getParameter("orden")!=null)
|
||||
CampoOrden = Integer.parseInt(request.getParameter("orden"));
|
||||
|
||||
//parametro pagina para realizar la paginacion
|
||||
if (request.getParameter("pagina")!=null)
|
||||
intPagina=Integer.parseInt(request.getParameter("pagina"));
|
||||
|
||||
if(sesion.getAttribute("MENSAJE")!=null)
|
||||
{
|
||||
mensaje=(String)sesion.getAttribute("MENSAJE");
|
||||
sesion.removeAttribute("MENSAJE");
|
||||
}
|
||||
|
||||
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("<br/>", " ");
|
||||
}
|
||||
}
|
||||
//Lo pongo a false para que no salga la noticia
|
||||
mostrarNoticia = false;
|
||||
%>
|
||||
|
||||
<html>
|
||||
<head>
|
||||
<title>Mantenimiento autorizaciones</title>
|
||||
<link rel="STYLESHEET" type="text/css" href="../../css/estilos.css">
|
||||
<script language="JavaScript" src="../../js/inicio_tarisan.js"></script>
|
||||
<script language="JavaScript" src="../../js/menu_adm.js"></script>
|
||||
<script language="JavaScript" src="../../js/bloques_tarisan.js"></script>
|
||||
<script language="JavaScript" src="../../js/funciones.js"></script>
|
||||
<script language="JavaScript" src="../../js/jquery-1.11.3.js"></script>
|
||||
<script language="JavaScript">pNG="<%= perfil.toString() %>";</script>
|
||||
|
||||
<script language="JavaScript" type="text/javascript">
|
||||
<!--
|
||||
function pasarAMayusculas(campo)
|
||||
{
|
||||
campo.value = campo.value.toUpperCase();
|
||||
}
|
||||
|
||||
function buscar()
|
||||
{
|
||||
/*if(document.frm_buscar.medico.value.length == 0)
|
||||
{
|
||||
alert("Introduce un numero de medico");
|
||||
document.frm_buscar.medico.focus();
|
||||
}
|
||||
else */ if(isNaN(document.frm_buscar.medico.value))
|
||||
{
|
||||
alert("Solo puede introducir números en el campo médico");
|
||||
document.frm_buscar.medico.value = "";
|
||||
document.frm_buscar.medico.focus();
|
||||
}
|
||||
else if(document.frm_buscar.colectivo.value.length == 0)
|
||||
{
|
||||
alert("Introduce un numero de colectivo");
|
||||
document.frm_buscar.colectivo.focus();
|
||||
}
|
||||
else if(isNaN(document.frm_buscar.colectivo.value))
|
||||
{
|
||||
alert("Solo puede introducir números en el campo colectivo");
|
||||
document.frm_buscar.colectivo.value = "";
|
||||
document.frm_buscar.colectivo.focus();
|
||||
}
|
||||
else if(document.frm_buscar.poliza.value.length == 0)
|
||||
{
|
||||
alert("Introduce un numero de poliza");
|
||||
document.frm_buscar.poliza.focus();
|
||||
}
|
||||
else if(isNaN(document.frm_buscar.poliza.value))
|
||||
{
|
||||
alert("Solo puede introducir números en el campo poliza");
|
||||
document.frm_buscar.poliza.value = "";
|
||||
document.frm_buscar.poliza.focus();
|
||||
}
|
||||
else if(document.frm_buscar.orden.value.length == 0)
|
||||
{
|
||||
alert("Introduce un numero de orden");
|
||||
document.frm_buscar.orden.focus();
|
||||
}
|
||||
else if(isNaN(document.frm_buscar.orden.value))
|
||||
{
|
||||
alert("Solo puede introducir números en el campo orden");
|
||||
document.frm_buscar.orden.value = "";
|
||||
document.frm_buscar.orden.focus();
|
||||
}
|
||||
else
|
||||
{
|
||||
document.frm_buscar.submit();
|
||||
}
|
||||
}
|
||||
|
||||
function actualizar()
|
||||
{
|
||||
if(document.actualizar_autorizacion.cantidad.value < 0)
|
||||
{
|
||||
alert("Introduce un numero de sesiones disponibles valido")
|
||||
document.actualizar_autorizacion.cantidad.focus();
|
||||
}
|
||||
else if (document.actualizar_autorizacion.cantidad.value.length < 1)
|
||||
{
|
||||
alert("Introduce un numero de sesiones disponibles valido")
|
||||
document.actualizar_autorizacion.cantidad.focus();
|
||||
}
|
||||
else
|
||||
{
|
||||
document.actualizar_autorizacion.submit();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
function paginacion(pagina)
|
||||
{
|
||||
document.frm_buscar.pagina.value = pagina;
|
||||
document.frm_buscar.submit();
|
||||
}
|
||||
|
||||
function enfocar()
|
||||
{
|
||||
if(document.actualizar_autorizacion === undefined)
|
||||
document.frm_buscar.medico.focus();
|
||||
else
|
||||
document.actualizar_autorizacion.cantidad.focus();
|
||||
}
|
||||
//-->
|
||||
</script>
|
||||
|
||||
</head>
|
||||
<body marginwidth="0" marginheight="0" leftmargin="0" topmargin="0" alink="#43881A" bgcolor="#FFFFFF" onload="javascript:enfocar()">
|
||||
<div class="marco">
|
||||
<table cellpadding="0" cellspacing="0" border="0" align="center" style="width:95%">
|
||||
<tr>
|
||||
<td class="tdLogoCabecera"><img src="<%=request.getContextPath()%>/img/logo.png" class="logoCabecera"></td>
|
||||
<td>
|
||||
<table width="100%">
|
||||
<tr><td class="tituloTablaMedico" align="center"><%= sesion.getAttribute("USUARIO") %></td></tr>
|
||||
<tr>
|
||||
<td>
|
||||
<div id="contenedorNoticia">
|
||||
<br>
|
||||
<div class="tituloNoticia">
|
||||
<p class="marquee"><%=strNoticia %></p>
|
||||
</div>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<!-- Cabecera de Navegación superior //-->
|
||||
<table cellpadding="0" cellspacing="0" border="0" align="center" style="width:95%">
|
||||
<tr>
|
||||
<td><script language="JavaScript">bloques();</script></td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<br>
|
||||
|
||||
<!-- Cuerpo de la página //-->
|
||||
<table cellpadding="0" cellspacing="0" border="0" align="center" style="width:95%">
|
||||
<tr valign="top">
|
||||
<!--<td width="180">//-->
|
||||
<td width="5%">
|
||||
<!-- Menú de navegación del módulo de navegación (zona izquierda) //-->
|
||||
<table cellpadding="0" cellspacing="0" border="0">
|
||||
<tr valign="top">
|
||||
<td colspan="2"><img src="../../img/sp.gif" width="180" height="12" border="0"></td>
|
||||
</tr>
|
||||
<tr valign="top">
|
||||
<td><script language="JavaScript">escribirMenuGst();</script></td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
<!--<td bgcolor="#CCCCCC"><img src="../../img/sp.gif" width="1" height="12" border="0"></td>//-->
|
||||
<td width="565">
|
||||
<!-- Tabla con el contenido de la página (zona central-derecha) //-->
|
||||
<table cellpadding="0" cellspacing="0" border="0" width="100%">
|
||||
<tr>
|
||||
<!--<td><img src="../../img/sp.gif" width="4" height="261" border="0"></td>//-->
|
||||
<td width="1px" bgcolor="#CCCCCC" height="190px"></td>
|
||||
<td class="txt" valign="top">
|
||||
<img src="../../img/sp.gif" width="1" height="11" border="0"><br>
|
||||
<table border="0" align="center" width="100%">
|
||||
<form name="frm_buscar" action="mto_peticiones.jsp?x=<%=strParametroMenu%>" method="post" >
|
||||
<input type="hidden" name="pagina" value="1" />
|
||||
<table border="0" align="center">
|
||||
<tr>
|
||||
<td align="right">
|
||||
<span class="txtnegrita"><%=pertamensaje.obtenerMensaje(20).getMensaje() %></span>
|
||||
</td>
|
||||
<td>
|
||||
<input size="20" type="text" class="txt" id="medico" name="medico" <%if(CampoMedico!=0){%>value="<%=CampoMedico %>"<%}%>/>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align="right">
|
||||
<span class="txtnegrita"><%=pertamensaje.obtenerMensaje(21).getMensaje() %></span>
|
||||
</td>
|
||||
<td>
|
||||
<input size="20" type="text" class="txt" id="colectivo" name="colectivo" <%if(CampoPoliza!=0 ){%>value="<%=CampoColectivo %>"<%}%>/>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align="right">
|
||||
<label class="txtnegrita"><%=pertamensaje.obtenerMensaje(22).getMensaje() %></label>
|
||||
</td>
|
||||
<td>
|
||||
<input size="20" type="text" class="txt" id="poliza" name="poliza" <%if(CampoPoliza!=0){%>value="<%=CampoPoliza %>"<%}%>/>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align="right">
|
||||
<label class="txtnegrita"><%=pertamensaje.obtenerMensaje(23).getMensaje() %></label>
|
||||
</td>
|
||||
<td>
|
||||
<input size="20" type="text" class="txt" id="orden" name="orden" <%if(CampoPoliza!=0){%>value="<%=CampoOrden %>"<%}%>/>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="2" align="right">
|
||||
<a href="javascript:buscar()" class="enlace"><%=pertamensaje.obtenerMensaje(24).getMensaje() %></a>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="2" align="right"> </td>
|
||||
</tr>
|
||||
</table>
|
||||
</form>
|
||||
<%if(CampoMedico >= 0 && CampoPoliza > 0 && CampoColectivo >= 0 && CampoOrden >= 0)
|
||||
{
|
||||
PersistenciaTapresca per = new PersistenciaTapresca();
|
||||
Vector vSeleccion = per.obtenerPeticiones(CampoMedico,CampoColectivo,CampoPoliza,CampoOrden,intPagina);
|
||||
if(vSeleccion.size()>0)
|
||||
{
|
||||
LogTarisan.logger.log(NivelLog.DEBUG, "La peticion del medico "+CampoMedico+" con poliza "+CampoPoliza+" esta en tapreca_tarisan");
|
||||
%>
|
||||
<table border="0" align="center" width="100%">
|
||||
<%if (intPagina != 0){ %>
|
||||
<tr>
|
||||
<td colspan="2" align="right"><span class="txt">Página <%=per.getPaginacion().getNumeroPagina()%> de <%=per.getPaginacion().getNumeroPaginasTotales()%></span></td>
|
||||
</tr>
|
||||
<% }%>
|
||||
<tr>
|
||||
<td class="cabeceraTabla" align="center" bgcolor="#FFAAAA">Peticiones</td>
|
||||
<td class="cabeceraTabla" align="center" bgcolor="#FFAAAA">Ver PDF</td>
|
||||
</tr>
|
||||
<%
|
||||
String estilo = "";
|
||||
for(int i=0;i<vSeleccion.size();i++)
|
||||
{
|
||||
if (i % 2 == 0)
|
||||
{
|
||||
estilo = "filaA";
|
||||
}
|
||||
else
|
||||
{
|
||||
estilo = "filaB";
|
||||
}
|
||||
%>
|
||||
<tr>
|
||||
<td class="<%=estilo%>" align="center"><%= vSeleccion.get(i)%></td>
|
||||
<td class="<%=estilo%>" align="center">
|
||||
<%
|
||||
String resultado = ""+vSeleccion.get(i).toString();
|
||||
//resultado = (resultado.length()<8)?"0"+resultado:resultado;
|
||||
File fichero = new File(ParametrosConfiguracion.ruta_pdf+resultado+".pdf");
|
||||
if(fichero.exists())
|
||||
{
|
||||
//mostrar el botón de resultados
|
||||
%><form name="resultados" action="../ver_peticiones_pdf.jsp" target="blank" method="post">
|
||||
<input type="hidden" name="fichero" value="<%=fichero.getName() %>" />
|
||||
<input type="submit" value="Ver Resultado" class="enlace"></input>
|
||||
</form><%
|
||||
}
|
||||
else
|
||||
{
|
||||
fichero = new File(ParametrosConfiguracion.ruta_pdf+vSeleccion.get(i).toString()+".PDF");
|
||||
if(fichero.exists())
|
||||
{
|
||||
//mostrar el botón de resultados
|
||||
%><form name="resultados" action="../ver_peticiones_pdf.jsp" target="blank" method="post">
|
||||
<input type="hidden" name="fichero" value="<%=fichero.getName() %>" />
|
||||
<input type="submit" value="Ver Resultado" class="enlace"></input>
|
||||
</form><%
|
||||
}
|
||||
else
|
||||
{
|
||||
%><p><%=pertamensaje.obtenerMensaje(6).getMensaje() %></p><%
|
||||
}
|
||||
}
|
||||
%>
|
||||
</td>
|
||||
</tr>
|
||||
<%
|
||||
}
|
||||
if (intPagina!=0){ //se tiene en cuenta la paginacion %>
|
||||
<tr><td colspan="2"></td></tr>
|
||||
<tr>
|
||||
<td colspan="2">
|
||||
<table border="0" align="center">
|
||||
<tr>
|
||||
<%if (per.getPaginacion().esPrimeraPagina()){%>
|
||||
<td width="70" align="right"><span class="pagDesactivo">primero</span></td>
|
||||
<td></td>
|
||||
<td width="70" align="left"><span class="pagDesactivo">anterior</span></td>
|
||||
<%}else{%>
|
||||
<td width="70" align="right"><a href="javascript:paginacion(1)" class="enlace">primero</a></td>
|
||||
<td></td>
|
||||
<td width="70" align="left"><a href="javascript:paginacion(<%=per.getPaginacion().getNumeroPagina() - 1%>)" class="enlace">anterior</a></td>
|
||||
<%}%>
|
||||
|
||||
<%if (per.getPaginacion().esUltimaPagina()){%>
|
||||
<td width="70" align="right"><span class="pagDesactivo">siguiente</span></td>
|
||||
<td></td>
|
||||
<td width="70" align="left"><span class="pagDesactivo">último</span></td>
|
||||
<%}else{%>
|
||||
<td width="70" align="right"><a href="javascript:paginacion(<%=per.getPaginacion().getNumeroPagina() + 1%>)" class="enlace">siguiente</a></td>
|
||||
<td></td>
|
||||
<td width="70" align="left"><a href="javascript:paginacion(<%=per.getPaginacion().getNumeroPaginasTotales()%>)" class="enlace">último</a></td>
|
||||
<%}%>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
<%
|
||||
} //fin if(pagina!=0) %>
|
||||
</table>
|
||||
<%
|
||||
}else{
|
||||
%>
|
||||
<table border="0" align="center" width="100%">
|
||||
<tr>
|
||||
<td class="txtnegrita">No hay peticiones para los datos introducidos</td>
|
||||
</tr>
|
||||
</table>
|
||||
<%
|
||||
}
|
||||
}
|
||||
%>
|
||||
<tr><td class="txt"><%=mensaje %></td></tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
<script>
|
||||
var jsMostrarNoticia = <%=mostrarNoticia %>;
|
||||
if (!jsMostrarNoticia){
|
||||
document.getElementById('contenedorNoticia').style.display="none";
|
||||
}else{
|
||||
<% strNoticia = strNoticia.replaceAll("\"", "'"); %>
|
||||
var not = "<%=strNoticia %>";
|
||||
tamanioNoticia(not);
|
||||
marquee($('.tituloNoticia'), $('.marquee'),not);
|
||||
}
|
||||
</script>
|
||||
<%
|
||||
}
|
||||
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 autorizaciones (adm/mto_taconaut.jsp)");
|
||||
%>
|
||||
@@ -0,0 +1,404 @@
|
||||
<%@ 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" %>
|
||||
<%@ page import="java.io.*" %>
|
||||
|
||||
<%
|
||||
LogTarisan.logger.log(NivelLog.INFO, "Inicio página de de mantenimiento de autorizaciones (adm/mto_taconaut.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 mensaje = "";
|
||||
long CampoAutorizacion = 0;
|
||||
int intPagina = 0;
|
||||
StringBuffer strSql = new StringBuffer();
|
||||
Object aCondiciones[] = null;
|
||||
|
||||
//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");
|
||||
|
||||
//parametro apellido para las busquedas
|
||||
if (request.getParameter("autorizacion")!=null)
|
||||
CampoAutorizacion = Long.parseLong(request.getParameter("autorizacion"));
|
||||
|
||||
//parametro pagina para realizar la paginacion
|
||||
if (request.getParameter("pagina")!=null)
|
||||
intPagina=Integer.parseInt(request.getParameter("pagina"));
|
||||
|
||||
if(sesion.getAttribute("MENSAJE")!=null)
|
||||
{
|
||||
mensaje=(String)sesion.getAttribute("MENSAJE");
|
||||
sesion.removeAttribute("MENSAJE");
|
||||
}
|
||||
|
||||
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("<br/>", " ");
|
||||
}
|
||||
}
|
||||
//Lo pongo a false para que no salga la noticia
|
||||
mostrarNoticia = false;
|
||||
%>
|
||||
|
||||
<html>
|
||||
<head>
|
||||
<title>Mantenimiento autorizaciones</title>
|
||||
<link rel="STYLESHEET" type="text/css" href="../../css/estilos.css">
|
||||
<script language="JavaScript" src="../../js/inicio_tarisan.js"></script>
|
||||
<script language="JavaScript" src="../../js/menu_adm.js"></script>
|
||||
<script language="JavaScript" src="../../js/bloques_tarisan.js"></script>
|
||||
<script language="JavaScript" src="../../js/funciones.js"></script>
|
||||
<script language="JavaScript" src="../../js/jquery-1.11.3.js"></script>
|
||||
<script language="JavaScript">pNG="<%= perfil.toString() %>";</script>
|
||||
|
||||
<script language="JavaScript" type="text/javascript">
|
||||
<!--
|
||||
function pasarAMayusculas(campo)
|
||||
{
|
||||
campo.value = campo.value.toUpperCase();
|
||||
}
|
||||
|
||||
function buscar()
|
||||
{
|
||||
if(document.frm_buscar.autorizacion.value.length < 3)
|
||||
{
|
||||
alert("Introduce un numero de autorizacion valido");
|
||||
}
|
||||
else
|
||||
{
|
||||
document.frm_buscar.submit();
|
||||
}
|
||||
}
|
||||
|
||||
function actualizar()
|
||||
{
|
||||
if(document.actualizar_autorizacion.cantidad.value < 0)
|
||||
{
|
||||
alert("Introduce un numero de sesiones disponibles valido")
|
||||
document.actualizar_autorizacion.cantidad.focus();
|
||||
}
|
||||
else if (document.actualizar_autorizacion.cantidad.value.length < 1)
|
||||
{
|
||||
alert("Introduce un numero de sesiones disponibles valido")
|
||||
document.actualizar_autorizacion.cantidad.focus();
|
||||
}
|
||||
else
|
||||
{
|
||||
document.actualizar_autorizacion.submit();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
function paginacion(pagina)
|
||||
{
|
||||
document.frm_buscar.pagina.value = pagina;
|
||||
document.frm_buscar.submit();
|
||||
}
|
||||
|
||||
function enfocar()
|
||||
{
|
||||
if(document.actualizar_autorizacion === undefined)
|
||||
document.frm_buscar.autorizacion.focus();
|
||||
else
|
||||
document.actualizar_autorizacion.cantidad.focus();
|
||||
}
|
||||
//-->
|
||||
</script>
|
||||
|
||||
</head>
|
||||
<body marginwidth="0" marginheight="0" leftmargin="0" topmargin="0" alink="#43881A" bgcolor="#FFFFFF" onload="javascript:enfocar()">
|
||||
<div class="marco">
|
||||
<table cellpadding="0" cellspacing="0" border="0" align="center" style="width:95%">
|
||||
<tr>
|
||||
<td class="tdLogoCabecera"><img src="<%=request.getContextPath()%>/img/logo.png" class="logoCabecera"></td>
|
||||
<td>
|
||||
<table width="100%">
|
||||
<tr><td class="tituloTablaMedico" align="center"><%= sesion.getAttribute("USUARIO") %></td></tr>
|
||||
<tr>
|
||||
<td>
|
||||
<div id="contenedorNoticia">
|
||||
<br>
|
||||
<div class="tituloNoticia">
|
||||
<p class="marquee"><%=strNoticia %></p>
|
||||
</div>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<!-- Cabecera de Navegación superior //-->
|
||||
<table cellpadding="0" cellspacing="0" border="0" align="center" style="width:95%">
|
||||
<tr>
|
||||
<td><script language="JavaScript">bloques();</script></td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<br>
|
||||
|
||||
<!-- Cuerpo de la página //-->
|
||||
<table cellpadding="0" cellspacing="0" border="0" align="center" style="width:95%">
|
||||
<tr valign="top">
|
||||
<!--<td width="180">//-->
|
||||
<td width="5%">
|
||||
<!-- Menú de navegación del módulo de navegación (zona izquierda) //-->
|
||||
<table cellpadding="0" cellspacing="0" border="0">
|
||||
<tr valign="top">
|
||||
<td colspan="2"><img src="../../img/sp.gif" width="180" height="12" border="0"></td>
|
||||
</tr>
|
||||
<tr valign="top">
|
||||
<td><script language="JavaScript">escribirMenuGst();</script></td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
<!--<td bgcolor="#CCCCCC"><img src="../../img/sp.gif" width="1" height="12" border="0"></td>//-->
|
||||
<td width="565">
|
||||
<!-- Tabla con el contenido de la página (zona central-derecha) //-->
|
||||
<table cellpadding="0" cellspacing="0" border="0" width="100%">
|
||||
<tr>
|
||||
<!--<td><img src="../../img/sp.gif" width="4" height="261" border="0"></td>//-->
|
||||
<td width="1px" bgcolor="#CCCCCC" height="190px"></td>
|
||||
<td class="txt" valign="top">
|
||||
<img src="../../img/sp.gif" width="1" height="11" border="0"><br>
|
||||
<table border="0" align="center" width="100%">
|
||||
<tr><td><a href="<%=request.getContextPath()%>/jsp/adm/descarga_pdfs_autorizaciones.jsp?x=<%=strParametroMenu%>" class="enlace"><%=pertamensaje.obtenerMensaje(31).getMensaje() %></a></td></tr>
|
||||
<tr><td> </td></tr>
|
||||
<form name="frm_buscar" action="mto_taconaut.jsp?x=<%=strParametroMenu%>" method="post" >
|
||||
<tr><td class="txt"><label>Número autorización:</label><input type="text" class="txt" id="autorizacion" name="autorizacion"/><a href="javascript:buscar()" class="enlace"><%=pertamensaje.obtenerMensaje(24).getMensaje() %></a></td></tr>
|
||||
</form>
|
||||
<tr><td> </td></tr>
|
||||
<%if(CampoAutorizacion > 0)
|
||||
{
|
||||
PersistenciaTaconaut pertacon = new PersistenciaTaconaut();
|
||||
PersistenciaTTMovaut perttmov = new PersistenciaTTMovaut();
|
||||
if(pertacon.BuscarAutorizacion(CampoAutorizacion))
|
||||
{
|
||||
LogTarisan.logger.log(NivelLog.DEBUG, "La autorizacion "+CampoAutorizacion+" esta en taconaut");
|
||||
Vector vSeleccion = pertacon.ObtenerAutorizacionADM(CampoAutorizacion);
|
||||
if(vSeleccion.size()>0)
|
||||
{
|
||||
%>
|
||||
<table>
|
||||
<tr><td class="txt">Autorización</td><td class="txt">Acto</td><td class="txt">Especialidad</td><td class="txt">Cantidad</td></tr>
|
||||
<%
|
||||
for(int i=0;i<vSeleccion.size();i++)
|
||||
{
|
||||
Taconaut tacon = (Taconaut)vSeleccion.get(i);
|
||||
%>
|
||||
<form name="actualizar_autorizacion" action="<%=request.getContextPath()%>/servlet/GestorAdministracion?x=<%=strParametroMenu%>&pagina=1&imp=0" method="post">
|
||||
<tr><td class="txt"><%=tacon.getAutorizacion() %></td><td class="txt"><%=tacon.getActo() %></td><td class="txt"><%=tacon.getEspecialidad() %></td><td class="txt"><input type="text" name="cantidad" id="cantidad" value="<%=tacon.getCantidad() %>"/></td><td class="txt"><a href="javascript:actualizar()" class="enlace">Actualizar</a></td></tr>
|
||||
<input type="hidden" name="OPCION" value="<%=Constantes.OPC_ADM_ACT_AUTORIZACION %>"/>
|
||||
<input type="hidden" name="num_aut" value="<%=tacon.getAutorizacion() %>"/>
|
||||
<input type="hidden" name="acto" value="<%=tacon.getActo() %>"/>
|
||||
<input type="hidden" name="especialidad" value="<%=tacon.getEspecialidad() %>"/>
|
||||
</form>
|
||||
<tr><td></td><td></td><td></td><td></td><td class="txt"><form name="movimientos_autorizacion" action="movimientos_tamovext.jsp?x=<%=strParametroMenu%>" method="post"><input type="hidden" name="num_aut" value="<%=tacon.getAutorizacion() %>" /><input type="submit" value="Movimientos imputados a esta autorizacion" class="enlace"></form></td></tr>
|
||||
<tr><td></td><td></td><td></td><td></td><td class="txt"><form name="otras_autorizaciones" action="otras_autorizaciones.jsp?x=<%=strParametroMenu%>" method="post"><input type="hidden" name="num_aut" value="<%=tacon.getAutorizacion() %>" /><input type="submit" value="Otras Autorizaciones del asegurado" class="enlace"></form></td></tr>
|
||||
<tr><td></td><td></td><td></td><td></td>
|
||||
<td class="txt">
|
||||
<%
|
||||
String resultado = ""+tacon.getAutorizacion();
|
||||
//resultado = (resultado.length()<8)?"0"+resultado:resultado;
|
||||
File fichero = new File(ParametrosConfiguracion.ruta_pdf+resultado+".pdf");
|
||||
if(fichero.exists())
|
||||
{
|
||||
%><form name="resultados" action="../ver_peticiones_pdf.jsp" target="blank" method="post">
|
||||
<input type="hidden" name="fichero" value="<%=fichero.getName() %>" />
|
||||
<input type="submit" value="Imprimir Petición" class="enlace"></input>
|
||||
</form><%
|
||||
}
|
||||
else
|
||||
{
|
||||
fichero = new File(ParametrosConfiguracion.ruta_pdf+Integer.valueOf(tacon.getAutorizacion()).toString()+".PDF");
|
||||
if(fichero.exists())
|
||||
{
|
||||
%><form name="resultados" action="../ver_peticiones_pdf.jsp" target="blank" method="post">
|
||||
<input type="hidden" name="fichero" value="<%=fichero.getName() %>" />
|
||||
<input type="submit" value="Imprimir Petición" class="enlace"></input>
|
||||
</form><%
|
||||
}
|
||||
else
|
||||
{
|
||||
%><p><%=pertamensaje.obtenerMensaje(15).getMensaje() %></p><%
|
||||
}
|
||||
}
|
||||
|
||||
%>
|
||||
</td>
|
||||
</tr>
|
||||
<%
|
||||
}
|
||||
%>
|
||||
</table>
|
||||
<%
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
LogTarisan.logger.log(NivelLog.DEBUG, "La autorizacion "+CampoAutorizacion+" no esta en taconaut la buscamos en ttmovaut");
|
||||
Vector vSeleccion = perttmov.ObtenerAutorizacionADM(CampoAutorizacion);
|
||||
if(vSeleccion.size() > 0)
|
||||
{
|
||||
%>
|
||||
<table>
|
||||
<tr><td class="txt">Autorización</td><td class="txt">Acto</td><td class="txt">Especialidad</td><td class="txt">Cantidad</td></tr>
|
||||
<%
|
||||
for(int i=0;i<vSeleccion.size();i++)
|
||||
{
|
||||
Taconaut tacon = new Taconaut();
|
||||
tacon = (Taconaut)vSeleccion.get(i);
|
||||
int gesigu = 0;
|
||||
if(tacon.getFromGesigu())
|
||||
gesigu = 1;
|
||||
|
||||
if(pertacon.CrearAutorizacionValida(Long.parseLong(tacon.getAutorizacion()), tacon.getMedico(), tacon.getEspecialidad(), tacon.getActo(), tacon.getCantidad(), gesigu, ""))
|
||||
{
|
||||
%>
|
||||
<form name="actualizar_autorizacion" action="<%=request.getContextPath()%>/servlet/GestorAdministracion?x=<%=strParametroMenu%>&pagina=1&imp=0" method="post">
|
||||
<tr><td class="txt"><%=tacon.getAutorizacion() %></td><td class="txt"><%=tacon.getActo() %></td><td class="txt"><%=tacon.getEspecialidad() %></td><td class="txt"><input type="text" name="cantidad" id="cantidad" value="<%=tacon.getCantidad() %>"/></td><td class="txt"><a href="javascript:actualizar()" class="enlace">Actualizar</as></td></tr>
|
||||
<input type="hidden" name="OPCION" value="<%=Constantes.OPC_ADM_ACT_AUTORIZACION %>"/>
|
||||
<input type="hidden" name="num_aut" value="<%=tacon.getAutorizacion() %>"/>
|
||||
<input type="hidden" name="acto" value="<%=tacon.getActo() %>"/>
|
||||
<input type="hidden" name="especialidad" value="<%=tacon.getEspecialidad() %>"/>
|
||||
</form>
|
||||
<tr><td></td><td></td><td></td><td></td><td class="txt"><form name="movimientos_autorizacion" action="movimientos_tamovext.jsp?x=<%=strParametroMenu%>" method="post"><input type="hidden" name="num_aut" value="<%=tacon.getAutorizacion() %>" /><input type="submit" value="Movimientos imputados a esta autorizacion" class="enlace"></form></td></tr>
|
||||
<tr><td></td><td></td><td></td><td></td><td class="txt"><form name="otras_autorizaciones" action="otras_autorizaciones.jsp?x=<%=strParametroMenu%>" method="post"><input type="hidden" name="num_aut" value="<%=tacon.getAutorizacion() %>" /><input type="submit" value="Otras Autorizaciones del asegurado" class="enlace"></form></td></tr>
|
||||
<tr><td></td><td></td><td></td><td></td>
|
||||
<td class="txt">
|
||||
<%
|
||||
String resultado = ""+tacon.getAutorizacion();
|
||||
//resultado = (resultado.length()<8)?"0"+resultado:resultado;
|
||||
File fichero = new File(ParametrosConfiguracion.ruta_pdf+resultado+".pdf");
|
||||
if(fichero.exists())
|
||||
{
|
||||
%><form name="resultados" action="../ver_peticiones_pdf.jsp" target="blank" method="post">
|
||||
<input type="hidden" name="fichero" value="<%=fichero.getName() %>" />
|
||||
<input type="submit" value="Imprimir Petición" class="enlace"></input>
|
||||
</form><%
|
||||
}
|
||||
else
|
||||
{
|
||||
fichero = new File(ParametrosConfiguracion.ruta_pdf+Integer.valueOf(tacon.getAutorizacion()).toString()+".PDF");
|
||||
if(fichero.exists())
|
||||
{
|
||||
%><form name="resultados" action="../ver_peticiones_pdf.jsp" target="blank" method="post">
|
||||
<input type="hidden" name="fichero" value="<%=fichero.getName() %>" />
|
||||
<input type="submit" value="Imprimir Petición" class="enlace"></input>
|
||||
</form><%
|
||||
}
|
||||
else
|
||||
{
|
||||
%><p><%=pertamensaje.obtenerMensaje(15).getMensaje() %></p><%
|
||||
}
|
||||
}
|
||||
|
||||
%>
|
||||
</td>
|
||||
</tr>
|
||||
<%
|
||||
}
|
||||
else
|
||||
{
|
||||
%>
|
||||
<tr><td class="txt"><%=pertamensaje.obtenerMensaje(14).getMensaje() %></td></tr>
|
||||
<%
|
||||
}
|
||||
}
|
||||
%>
|
||||
</table>
|
||||
<%
|
||||
}
|
||||
else
|
||||
{
|
||||
%>
|
||||
<tr><td class="txt"><%=pertamensaje.obtenerMensaje(13).getMensaje() %></td></tr>
|
||||
<%
|
||||
}
|
||||
}
|
||||
}
|
||||
%>
|
||||
<tr><td class="txt"><%=mensaje %></td></tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
<script>
|
||||
var jsMostrarNoticia = <%=mostrarNoticia %>;
|
||||
if (!jsMostrarNoticia){
|
||||
document.getElementById('contenedorNoticia').style.display="none";
|
||||
}else{
|
||||
<% strNoticia = strNoticia.replaceAll("\"", "'"); %>
|
||||
var not = "<%=strNoticia %>";
|
||||
tamanioNoticia(not);
|
||||
marquee($('.tituloNoticia'), $('.marquee'),not);
|
||||
}
|
||||
</script>
|
||||
<%
|
||||
}
|
||||
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 autorizaciones (adm/mto_taconaut.jsp)");
|
||||
%>
|
||||
@@ -0,0 +1,453 @@
|
||||
<%@ 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" %>
|
||||
<%@ page import="java.io.*" %>
|
||||
|
||||
|
||||
<%
|
||||
LogTarisan.logger.log(NivelLog.INFO, "Inicio página de de mantenimiento de actos imputados (adm/mto_tamovext.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 = "";
|
||||
int CampoMedico = 0;
|
||||
String CampoFecha = "";
|
||||
String CampoApellido1 = "";
|
||||
String CampoApellido2 = "";
|
||||
String CampoNombre = "";
|
||||
int intPagina = 0;
|
||||
int intEliminar = 0;
|
||||
StringBuffer strSql = new StringBuffer();
|
||||
Object aCondiciones[] = null;
|
||||
|
||||
//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");
|
||||
|
||||
//parametro medico para las busquedas
|
||||
if (request.getParameter("medico")!=null)
|
||||
CampoMedico = Integer.parseInt(request.getParameter("medico"));
|
||||
|
||||
//parametro fecha para las busquedas
|
||||
if (request.getParameter("fecha")!=null)
|
||||
CampoFecha = (String)request.getParameter("fecha");
|
||||
|
||||
//parametro apellido1 para las busquedas
|
||||
if (request.getParameter("apellido1")!=null)
|
||||
CampoApellido1 = (String)request.getParameter("apellido1");
|
||||
|
||||
//parametro apellido2 para las busquedas
|
||||
if (request.getParameter("apellido2")!=null)
|
||||
CampoApellido2 = (String)request.getParameter("apellido2");
|
||||
|
||||
//parametro nombre para las busquedas
|
||||
if (request.getParameter("nombre")!=null)
|
||||
CampoNombre = (String)request.getParameter("nombre");
|
||||
|
||||
//parametro pagina para realizar la paginacion
|
||||
if (request.getParameter("pagina")!=null)
|
||||
intPagina=Integer.parseInt(request.getParameter("pagina"));
|
||||
|
||||
//parametro eliminar para eliminar un movimiento de tamovext
|
||||
if (request.getParameter("eliminar")!=null)
|
||||
intEliminar=Integer.parseInt(request.getParameter("eliminar"));
|
||||
|
||||
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("<br/>", " ");
|
||||
}
|
||||
}
|
||||
//Lo pongo a false para que no salga la noticia
|
||||
mostrarNoticia = false;
|
||||
%>
|
||||
|
||||
<html>
|
||||
<head>
|
||||
<title>Mantenimiento autorizaciones</title>
|
||||
<link rel="STYLESHEET" type="text/css" href="../../css/estilos.css">
|
||||
<script language="JavaScript" src="../../js/inicio_tarisan.js"></script>
|
||||
<script language="JavaScript" src="../../js/funciones.js"></script>
|
||||
<script language="JavaScript" src="../../js/jquery-1.11.3.js"></script>
|
||||
<script language="JavaScript" src="../../js/menu_adm.js"></script>
|
||||
<script language="JavaScript" src="../../js/bloques_tarisan.js"></script>
|
||||
<script language="JavaScript">pNG="<%= perfil.toString() %>";</script>
|
||||
|
||||
<script language="JavaScript" type="text/javascript">
|
||||
<!--
|
||||
function pasarAMayusculas(campo)
|
||||
{
|
||||
campo.value = campo.value.toUpperCase();
|
||||
}
|
||||
|
||||
function buscar()
|
||||
{
|
||||
pasarAMayusculas(document.frm_buscar.apellido1);
|
||||
pasarAMayusculas(document.frm_buscar.apellido2);
|
||||
pasarAMayusculas(document.frm_buscar.nombre);
|
||||
var fechaBuena = true;
|
||||
|
||||
if(document.frm_buscar.medico.value.length == 0)
|
||||
{
|
||||
alert("Introduce un numero de medico");
|
||||
document.frm_buscar.medico.focus();
|
||||
fechaBuena = false;
|
||||
}
|
||||
else if(isNaN(document.frm_buscar.medico.value))
|
||||
{
|
||||
alert("Solo puede introducir números en el campo médico");
|
||||
document.frm_buscar.medico.value = "";
|
||||
document.frm_buscar.medico.focus();
|
||||
fechaBuena = false;
|
||||
}
|
||||
else if (document.frm_buscar.fecha.value!="")
|
||||
{
|
||||
fechaBuena = valorFecha(document.frm_buscar.fecha);
|
||||
}
|
||||
|
||||
if (fechaBuena){
|
||||
document.frm_buscar.submit();
|
||||
}
|
||||
}
|
||||
|
||||
function paginacion(pagina)
|
||||
{
|
||||
document.frm_buscar.pagina.value = pagina;
|
||||
document.frm_buscar.submit();
|
||||
}
|
||||
|
||||
function enfocar()
|
||||
{
|
||||
document.frm_buscar.medico.focus();
|
||||
}
|
||||
|
||||
function eliminar(medico,fecha,acto,ape1,ape2,nom,espe,numseq,col,pol,orden)
|
||||
{
|
||||
if (confirm("Desea eliminaar el acto seleccionado? \n Medico: "+ medico +" -- Acto: "+ acto +" -- Fecha: "+ fecha +" \n Asegurado: "+ ape1.trim() +" "+ ape2.trim() +", "+ nom.trim())) {
|
||||
document.frm_buscar.eliminar.value=1;
|
||||
document.frm_buscar.hiddenMedico.value=medico;
|
||||
document.frm_buscar.hiddenEspecialidad.value=espe;
|
||||
document.frm_buscar.hiddenActo.value=acto;
|
||||
document.frm_buscar.hiddenNumseq.value=numseq;
|
||||
document.frm_buscar.hiddenColectivo.value=col;
|
||||
document.frm_buscar.hiddenPoliza.value=pol;
|
||||
document.frm_buscar.hiddenOrden.value=orden;
|
||||
document.frm_buscar.hiddenFecha.value=fecha;
|
||||
document.frm_buscar.submit();
|
||||
}
|
||||
}
|
||||
|
||||
//-->
|
||||
</script>
|
||||
|
||||
</head>
|
||||
<body marginwidth="0" marginheight="0" leftmargin="0" topmargin="0" alink="#43881A" bgcolor="#FFFFFF" onload="javascript:enfocar()">
|
||||
<div class="marco">
|
||||
<table cellpadding="0" cellspacing="0" border="0" align="center" style="width:95%">
|
||||
<tr>
|
||||
<td class="tdLogoCabecera"><img src="<%=request.getContextPath()%>/img/logo.png" class="logoCabecera"></td>
|
||||
<td>
|
||||
<table width="100%">
|
||||
<tr><td class="tituloTablaMedico" align="center"><%= sesion.getAttribute("USUARIO") %></td></tr>
|
||||
<tr>
|
||||
<td>
|
||||
<div id="contenedorNoticia">
|
||||
<br>
|
||||
<div class="tituloNoticia">
|
||||
<p class="marquee"><%=strNoticia %></p>
|
||||
</div>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<!-- Cabecera de Navegación superior //-->
|
||||
<table cellpadding="0" cellspacing="0" border="0" align="center" style="width:95%">
|
||||
<tr>
|
||||
<td><script language="JavaScript">bloques();</script></td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<br>
|
||||
|
||||
<!-- Cuerpo de la página //-->
|
||||
<table cellpadding="0" cellspacing="0" border="0" align="center" style="width:95%">
|
||||
<tr valign="top">
|
||||
<!--<td width="180">//-->
|
||||
<td width="5%">
|
||||
<!-- Menú de navegación del módulo de navegación (zona izquierda) //-->
|
||||
<table cellpadding="0" cellspacing="0" border="0">
|
||||
<tr valign="top">
|
||||
<td colspan="2"><img src="../../img/sp.gif" width="180" height="12" border="0"></td>
|
||||
</tr>
|
||||
<tr valign="top">
|
||||
<td><script language="JavaScript">escribirMenuGst();</script></td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
<!--<td bgcolor="#CCCCCC"><img src="../../img/sp.gif" width="1" height="12" border="0"></td>//-->
|
||||
<td width="565">
|
||||
<!-- Tabla con el contenido de la página (zona central-derecha) //-->
|
||||
<table cellpadding="0" cellspacing="0" border="0" width="100%">
|
||||
<tr>
|
||||
<!--<td><img src="../../img/sp.gif" width="4" height="261" border="0"></td>//-->
|
||||
<td width="1px" bgcolor="#CCCCCC" height="190px"></td>
|
||||
<td class="txt" valign="top">
|
||||
<img src="../../img/sp.gif" width="1" height="11" border="0"><br>
|
||||
<table border="0" align="center" width="100%">
|
||||
<%
|
||||
if (intEliminar == 1)
|
||||
{
|
||||
int intMedico=Integer.parseInt(request.getParameter("hiddenMedico"));
|
||||
int intActo=Integer.parseInt(request.getParameter("hiddenActo"));
|
||||
int intEspe=Integer.parseInt(request.getParameter("hiddenEspecialidad"));
|
||||
int intNumseq=Integer.parseInt(request.getParameter("hiddenNumseq"));
|
||||
int intColec=Integer.parseInt(request.getParameter("hiddenColectivo"));
|
||||
int intPoliza=Integer.parseInt(request.getParameter("hiddenPoliza"));
|
||||
int intOrden=Integer.parseInt(request.getParameter("hiddenOrden"));
|
||||
String strFecha=(String)(request.getParameter("hiddenFecha"));
|
||||
|
||||
PersistenciaTamovext pert = new PersistenciaTamovext();
|
||||
boolean resultado = false;
|
||||
resultado = pert.EliminarMovimientoImputado(intMedico, intEspe, intActo, intNumseq, intColec, intPoliza, intOrden, strFecha);
|
||||
intEliminar=0;
|
||||
}
|
||||
|
||||
%>
|
||||
<form name="frm_buscar" action="mto_tamovext.jsp?x=<%=strParametroMenu%>" method="post" >
|
||||
<input type="hidden" name="pagina" value="1" />
|
||||
<input type="hidden" name="eliminar" value="0" />
|
||||
<input type="hidden" name="hiddenMedico" value="0" />
|
||||
<input type="hidden" name="hiddenEspecialidad" value="0" />
|
||||
<input type="hidden" name="hiddenActo" value="0" />
|
||||
<input type="hidden" name="hiddenNumseq" value="0" />
|
||||
<input type="hidden" name="hiddenColectivo" value="0" />
|
||||
<input type="hidden" name="hiddenPoliza" value="0" />
|
||||
<input type="hidden" name="hiddenOrden" value="0" />
|
||||
<input type="hidden" name="hiddenFecha" value="0" />
|
||||
<table border="0" align="center">
|
||||
<tr>
|
||||
<td align="right">
|
||||
<span class="txtnegrita"><%=pertamensaje.obtenerMensaje(20).getMensaje() %></span>
|
||||
</td>
|
||||
<td>
|
||||
<input size="20" type="text" class="txt" id="medico" name="medico" <%if(CampoMedico!=0){%>value="<%=CampoMedico %>"<%}%>/>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align="right">
|
||||
<span class="txtnegrita"><%=pertamensaje.obtenerMensaje(25).getMensaje() %></span>
|
||||
</td>
|
||||
<td>
|
||||
<input size="20" type="text" class="txt" id="fecha" name="fecha" <%if(CampoFecha!="" ){%>value="<%=CampoFecha %>"<%}%>/>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align="right">
|
||||
<label class="txtnegrita"><%=pertamensaje.obtenerMensaje(26).getMensaje() %></label>
|
||||
</td>
|
||||
<td>
|
||||
<input size="20" type="text" class="txt" id="apellido1" name="apellido1" <%if(CampoApellido1!=""){%>value="<%=CampoApellido1 %>"<%}%>/>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align="right">
|
||||
<label class="txtnegrita"><%=pertamensaje.obtenerMensaje(27).getMensaje() %></label>
|
||||
</td>
|
||||
<td>
|
||||
<input size="20" type="text" class="txt" id="apellido2" name="apellido2" <%if(CampoApellido2!=""){%>value="<%=CampoApellido2 %>"<%}%>/>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align="right">
|
||||
<label class="txtnegrita"><%=pertamensaje.obtenerMensaje(28).getMensaje() %></label>
|
||||
</td>
|
||||
<td>
|
||||
<input size="20" type="text" class="txt" id="nombre" name="nombre" <%if(CampoNombre!=""){%>value="<%=CampoNombre %>"<%}%>/>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="2" align="right">
|
||||
<a href="javascript:buscar()" class="enlace"><%=pertamensaje.obtenerMensaje(24).getMensaje() %></a>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="2" align="right"> </td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<%if(CampoMedico > 0)
|
||||
{
|
||||
PersistenciaTamovext per = new PersistenciaTamovext();
|
||||
Vector<Object[]> vSeleccion = per.MovimientosImputados(intPagina,CampoMedico,CampoFecha,CampoApellido1,CampoApellido2,CampoNombre);
|
||||
if(vSeleccion.size()>0)
|
||||
{
|
||||
LogTarisan.logger.log(NivelLog.DEBUG, "Los movimientos del medico "+CampoMedico+" estan en tamovext");
|
||||
%>
|
||||
<table border="0" align="center" width="100%">
|
||||
<%if (intPagina != 0){ %>
|
||||
<tr>
|
||||
<td colspan="5" align="right"><span class="txt">Página <%=per.getPaginacion().getNumeroPagina()%> de <%=per.getPaginacion().getNumeroPaginasTotales()%></span></td>
|
||||
</tr>
|
||||
<% }%>
|
||||
<tr>
|
||||
<td class="cabeceraTabla" align="center" bgcolor="#FFAAAA">Médico</td>
|
||||
<td class="cabeceraTabla" align="center" bgcolor="#FFAAAA">Fecha</td>
|
||||
<td class="cabeceraTabla" align="center" bgcolor="#FFAAAA">Acto</td>
|
||||
<td class="cabeceraTabla" align="center" bgcolor="#FFAAAA">Asegurado</td>
|
||||
<td class="cabeceraTabla" align="center" bgcolor="#FFAAAA">Eliminar</td>
|
||||
</tr>
|
||||
<%
|
||||
String estilo = "";
|
||||
for(int i=0;i<vSeleccion.size();i++)
|
||||
{
|
||||
if (i % 2 == 0)
|
||||
{
|
||||
estilo = "filaA";
|
||||
}
|
||||
else
|
||||
{
|
||||
estilo = "filaB";
|
||||
}
|
||||
|
||||
Object[] aResultados = vSeleccion.elementAt(i);
|
||||
%>
|
||||
<tr>
|
||||
<td class="<%=estilo%>" align="center"><%= aResultados[0] %></td>
|
||||
<td class="<%=estilo%>" align="center"><%= aResultados[1] %> </td>
|
||||
<td class="<%=estilo%>" align="center"><%= aResultados[2] %></td>
|
||||
<td class="<%=estilo%>" align="center"><%= aResultados[4] +" "+ aResultados[5] +", "+ aResultados[6]%> </td>
|
||||
<%if ((Integer.valueOf(aResultados[3].toString())) != 32){ %>
|
||||
<td class="<%=estilo%>" align="center"><a href="javascript:eliminar(<%= aResultados[0] %>,'<%= aResultados[1] %>',<%= aResultados[2] %>,'<%= aResultados[4] %>','<%= aResultados[5] %>','<%= aResultados[6] %>',<%= aResultados[7] %>,<%= aResultados[8] %>,<%= aResultados[9] %>,<%= aResultados[10] %>,<%= aResultados[11] %>)" class="enlace">Eliminar</a></td>
|
||||
<% }else { %>
|
||||
<td class="<%=estilo%>" align="center">Adeslas</td>
|
||||
<%} %>
|
||||
</tr>
|
||||
</form>
|
||||
<%
|
||||
}
|
||||
if (intPagina!=0){ //se tiene en cuenta la paginacion %>
|
||||
<tr><td colspan="5"></td></tr>
|
||||
<tr>
|
||||
<td colspan="5">
|
||||
<table border="0" align="center">
|
||||
<tr>
|
||||
<%if (per.getPaginacion().esPrimeraPagina()){%>
|
||||
<td width="70" align="right"><span class="pagDesactivo">primero</span></td>
|
||||
<td></td>
|
||||
<td width="70" align="left"><span class="pagDesactivo">anterior</span></td>
|
||||
<%}else{%>
|
||||
<td width="70" align="right"><a href="javascript:paginacion(1)" class="enlace">primero</a></td>
|
||||
<td></td>
|
||||
<td width="70" align="left"><a href="javascript:paginacion(<%=per.getPaginacion().getNumeroPagina() - 1%>)" class="enlace">anterior</a></td>
|
||||
<%}%>
|
||||
<%if (per.getPaginacion().esUltimaPagina()){%>
|
||||
<td width="70" align="right"><span class="pagDesactivo">siguiente</span></td>
|
||||
<td></td>
|
||||
<td width="70" align="left"><span class="pagDesactivo">último</span></td>
|
||||
<%}else{%>
|
||||
<td width="70" align="right"><a href="javascript:paginacion(<%=per.getPaginacion().getNumeroPagina() + 1%>)" class="enlace">siguiente</a></td>
|
||||
<td></td>
|
||||
<td width="70" align="left"><a href="javascript:paginacion(<%=per.getPaginacion().getNumeroPaginasTotales()%>)" class="enlace">último</a></td>
|
||||
<%}%>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
<%
|
||||
} //fin if(pagina!=0) %>
|
||||
</table>
|
||||
<%
|
||||
}else{
|
||||
%>
|
||||
<table border="0" align="center" width="100%">
|
||||
<tr>
|
||||
<td class="txtnegrita"><%=pertamensaje.obtenerMensaje(29).getMensaje() %></td>
|
||||
</tr>
|
||||
</table>
|
||||
<%
|
||||
}
|
||||
}
|
||||
%>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
<script>
|
||||
var jsMostrarNoticia = <%=mostrarNoticia %>;
|
||||
if (!jsMostrarNoticia){
|
||||
document.getElementById('contenedorNoticia').style.display="none";
|
||||
}else{
|
||||
<% strNoticia = strNoticia.replaceAll("\"", "'"); %>
|
||||
var not = "<%=strNoticia %>";
|
||||
tamanioNoticia(not);
|
||||
marquee($('.tituloNoticia'), $('.marquee'),not);
|
||||
}
|
||||
</script>
|
||||
<%
|
||||
}
|
||||
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 actos imputados (adm/mto_tamovext.jsp)");
|
||||
%>
|
||||
@@ -0,0 +1,233 @@
|
||||
<%@ 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 de mantenimiento de autorizaciones (adm/movimientos_tamovext.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
|
||||
LogTarisan.logger.log(NivelLog.DEBUG, "Llega 27");
|
||||
StringBuffer perfil = new StringBuffer();
|
||||
perfil.append("|");
|
||||
perfil.append(sesion.getAttribute("PERFIL"));
|
||||
perfil.append("|");
|
||||
|
||||
// Definicion de variables
|
||||
String strParametroMenu = "";
|
||||
String mensaje = "";
|
||||
long CampoAutorizacion = 0;
|
||||
int intPagina = 0;
|
||||
StringBuffer strSql = new StringBuffer();
|
||||
Object aCondiciones[] = null;
|
||||
LogTarisan.logger.log(NivelLog.DEBUG, "Llega 40");
|
||||
//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");
|
||||
|
||||
//parametro apellido para las busquedas
|
||||
if (request.getParameter("num_aut")!=null)
|
||||
CampoAutorizacion = Long.parseLong(request.getParameter("num_aut"));
|
||||
|
||||
//parametro pagina para realizar la paginacion
|
||||
if (request.getParameter("pagina")!=null)
|
||||
intPagina=Integer.parseInt(request.getParameter("pagina"));
|
||||
|
||||
if(sesion.getAttribute("MENSAJE")!=null)
|
||||
{
|
||||
mensaje=(String)sesion.getAttribute("MENSAJE");
|
||||
sesion.removeAttribute("MENSAJE");
|
||||
}
|
||||
LogTarisan.logger.log(NivelLog.DEBUG, "Llega 62");
|
||||
|
||||
boolean mostrarNoticia = true;
|
||||
PersistenciaTanoticias perTaNo = new PersistenciaTanoticias();
|
||||
Vector vSeleccionNot = perTaNo.obtener_noticias_cabecera();
|
||||
Vector vNoticias = new Vector();
|
||||
String strNoticia = "";
|
||||
String noticias ="";
|
||||
String espacio = "";
|
||||
for(int x = 0; x < 100; x++){
|
||||
espacio = espacio + " ";
|
||||
}
|
||||
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 + espacio + tanoticia.getNoticia();
|
||||
}else{
|
||||
strNoticia = tanoticia.getNoticia();
|
||||
}
|
||||
strNoticia = strNoticia.replaceAll("<br/>", " ");
|
||||
}
|
||||
}
|
||||
//Lo pongo a false para que no salga la noticia
|
||||
mostrarNoticia = false;
|
||||
%>
|
||||
|
||||
<html>
|
||||
<head>
|
||||
<title>Mantenimiento autorizaciones</title>
|
||||
<link rel="STYLESHEET" type="text/css" href="../../css/estilos.css">
|
||||
<script language="JavaScript" src="../../js/inicio_tarisan.js"></script>
|
||||
<script language="JavaScript" src="../../js/menu_adm.js"></script>
|
||||
<script language="JavaScript" src="../../js/bloques_tarisan.js"></script>
|
||||
<script language="JavaScript" src="../../js/funciones.js"></script>
|
||||
<script language="JavaScript" src="../../js/jquery-1.11.3.js"></script>
|
||||
<script language="JavaScript">pNG="<%= perfil.toString() %>";</script>
|
||||
|
||||
<script language="JavaScript" type="text/javascript">
|
||||
<!--
|
||||
function buscar(aut)
|
||||
{
|
||||
document.frm_buscar.autorizacion.value = aut;
|
||||
document.frm_buscar.submit();
|
||||
}
|
||||
//-->
|
||||
</script>
|
||||
|
||||
</head>
|
||||
<body marginwidth="0" marginheight="0" leftmargin="0" topmargin="0" alink="#43881A" bgcolor="#FFFFFF" onload="">
|
||||
<div class="marco">
|
||||
<table cellpadding="0" cellspacing="0" border="0" align="center" style="width:95%">
|
||||
<tr>
|
||||
<td class="tdLogoCabecera"><img src="<%=request.getContextPath()%>/img/logo.png" class="logoCabecera"></td>
|
||||
<td>
|
||||
<table width="100%">
|
||||
<tr><td class="tituloTablaMedico" align="center"><%= sesion.getAttribute("USUARIO") %></td></tr>
|
||||
<tr>
|
||||
<td>
|
||||
<div id="contenedorNoticia">
|
||||
<br>
|
||||
<div class="tituloNoticia">
|
||||
<p class="marquee"><%=strNoticia %></p>
|
||||
</div>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<!-- Cabecera de Navegación superior //-->
|
||||
<table cellpadding="0" cellspacing="0" border="0" align="center" style="width:95%">
|
||||
<tr>
|
||||
<td><script language="JavaScript">bloques();</script></td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<br>
|
||||
|
||||
<!-- Cuerpo de la página //-->
|
||||
<table cellpadding="0" cellspacing="0" border="0" align="center" style="width:95%">
|
||||
<tr valign="top">
|
||||
<!--<td width="180">//-->
|
||||
<td width="5%">
|
||||
<!-- Menú de navegación del módulo de navegación (zona izquierda) //-->
|
||||
<table cellpadding="0" cellspacing="0" border="0">
|
||||
<tr valign="top">
|
||||
<td colspan="2"><img src="../../img/sp.gif" width="180" height="12" border="0"></td>
|
||||
</tr>
|
||||
<tr valign="top">
|
||||
<td><script language="JavaScript">escribirMenuGst();</script></td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
<!--<td bgcolor="#CCCCCC"><img src="../../img/sp.gif" width="1" height="12" border="0"></td>//-->
|
||||
<td width="565">
|
||||
<!-- Tabla con el contenido de la página (zona central-derecha) //-->
|
||||
<table cellpadding="0" cellspacing="0" border="0" width="100%">
|
||||
<tr>
|
||||
<!--<td><img src="../../img/sp.gif" width="4" height="261" border="0"></td>//-->
|
||||
<td width="1px" bgcolor="#CCCCCC" height="190px"></td>
|
||||
<td class="txt" valign="top">
|
||||
<img src="../../img/sp.gif" width="1" height="11" border="0"><br>
|
||||
<%PersistenciaTTMovaut perttmov = new PersistenciaTTMovaut();
|
||||
Vector resul = perttmov.ObtenerAutorizacionesPoliza(CampoAutorizacion);
|
||||
%>
|
||||
<form name="frm_buscar" action="mto_taconaut.jsp?x=<%=strParametroMenu%>" method="post" ><input type="hidden" class="txt" id="autorizacion" name="autorizacion" value=""/></form>
|
||||
<table border="0" align="center" width="100%">
|
||||
<%
|
||||
if(resul != null)
|
||||
{
|
||||
if(resul.size()>0)
|
||||
{
|
||||
%>
|
||||
<tr><td class="txt">Autorizacion</td><td class="txt">Fecha</td><td class="txt">Especialidad</td><td class="txt">Médico</td><td class="txt">Detalles</td></tr>
|
||||
<%
|
||||
for(int i=0; i<resul.size();i++)
|
||||
{
|
||||
TTMovaut ttmov = new TTMovaut();
|
||||
ttmov = perttmov.ObtenerAutorizacionTTmovaut((Integer)resul.get(i));
|
||||
%>
|
||||
<tr><td class="txt"><%=ttmov.get_autorizacion() %></td><td class="txt"><%=Utilidades.formatear_fecha(ttmov.get_fecha_autorizacion()) %></td><td class="txt"><%=ttmov.get_especialidad1() %></td><td class="txt"><%=ttmov.get_medico() %></td><td class="txt"><a href="javascript:buscar(<%=ttmov.get_autorizacion() %>)" class="enlace">Ver</a></td></tr>
|
||||
<%
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
%>
|
||||
<tr><td class="txt">No se han encontrado autorizaciones <br/>para este asegurado</td></tr>
|
||||
<%
|
||||
}
|
||||
%>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
<script>
|
||||
var jsMostrarNoticia = <%=mostrarNoticia %>;
|
||||
if (!jsMostrarNoticia){
|
||||
document.getElementById('contenedorNoticia').style.display="none";
|
||||
}else{
|
||||
<% strNoticia = strNoticia.replaceAll("\"", "'"); %>
|
||||
var not = "<%=strNoticia %>";
|
||||
tamanioNoticia(not);
|
||||
marquee($('.tituloNoticia'), $('.marquee'),not);
|
||||
}
|
||||
</script>
|
||||
<%
|
||||
}
|
||||
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 autorizaciones (adm/movimientos_tamovext.jsp)");
|
||||
%>
|
||||
@@ -0,0 +1,236 @@
|
||||
<%@ 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" %>
|
||||
<%@ page import="java.io.BufferedWriter" %>
|
||||
<%@ page import="java.io.File" %>
|
||||
<%@ page import="java.io.FileWriter" %>
|
||||
<%@ page import="java.io.IOException" %>
|
||||
|
||||
|
||||
<%
|
||||
LogTarisan.logger.log(NivelLog.INFO, "Inicio página de poner cambios en producción (adm/poner_en_produccion.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 = "";
|
||||
int intCrearArchivo = 0;
|
||||
int intPagina = 0;
|
||||
int intMensaje = 0;
|
||||
String strMensaje = "";
|
||||
|
||||
//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");
|
||||
|
||||
//parametro crearArchivo
|
||||
if (request.getParameter("crearArchivo")!=null)
|
||||
intCrearArchivo=Integer.parseInt(request.getParameter("crearArchivo"));
|
||||
|
||||
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("<br/>", " ");
|
||||
}
|
||||
}
|
||||
//Lo pongo a false para que no salga la noticia
|
||||
mostrarNoticia = false;
|
||||
|
||||
if (intCrearArchivo==1){
|
||||
|
||||
String ruta = "/tmp/ponerCambios/semaforo.txt";
|
||||
File archivo = new File(ruta);
|
||||
BufferedWriter bw;
|
||||
if(archivo.exists()) {
|
||||
intMensaje = 1;
|
||||
strMensaje = "¡El archivo ya existe!";
|
||||
} else {
|
||||
bw = new BufferedWriter(new FileWriter(archivo));
|
||||
bw.write("Este archivo indica que hay cambios para poner en Tarisan. ");
|
||||
bw.write("Por la noche se ejecutará un corntab que subirá los cambios a producción. ");
|
||||
bw.write("El crontab ejecuta /root/tarisan_en_produccion_crontab.sh");
|
||||
bw.close();
|
||||
intMensaje = 1;
|
||||
strMensaje = "¡Archivo creado correctamente!";
|
||||
}
|
||||
|
||||
}
|
||||
%>
|
||||
|
||||
<html>
|
||||
<head>
|
||||
<title>Mantenimiento de Analíticas</title>
|
||||
<link rel="STYLESHEET" type="text/css" href="../../css/estilos.css">
|
||||
<script language="JavaScript" src="../../js/inicio_tarisan.js"></script>
|
||||
<script language="JavaScript" src="../../js/menu_adm.js"></script>
|
||||
<script language="JavaScript" src="../../js/bloques_tarisan.js"></script>
|
||||
<script language="JavaScript" src="../../js/funciones.js"></script>
|
||||
<script language="JavaScript" src="../../js/jquery-1.11.3.js"></script>
|
||||
<script language="JavaScript">pNG="<%= perfil.toString() %>";</script>
|
||||
|
||||
<script language="JavaScript" type="text/javascript">
|
||||
<!--
|
||||
function pasarAMayusculas(campo)
|
||||
{
|
||||
campo.value = campo.value.toUpperCase();
|
||||
}
|
||||
function ponerCambios()
|
||||
{
|
||||
document.frmCrearArchivo.crearArchivo.value=1;
|
||||
document.frmCrearArchivo.submit();
|
||||
}
|
||||
|
||||
//-->
|
||||
</script>
|
||||
|
||||
</head>
|
||||
<body marginwidth="0" marginheight="0" leftmargin="0" topmargin="0" alink="#43881A" bgcolor="#FFFFFF">
|
||||
<div class="marco">
|
||||
<table cellpadding="0" cellspacing="0" border="0" align="center" style="width:95%">
|
||||
<tr>
|
||||
<td class="tdLogoCabecera"><img src="<%=request.getContextPath()%>/img/logo.png" class="logoCabecera"></td>
|
||||
<td>
|
||||
<table width="100%">
|
||||
<tr><td class="tituloTablaMedico" align="center"><%= sesion.getAttribute("USUARIO") %></td></tr>
|
||||
<tr>
|
||||
<td>
|
||||
<div id="contenedorNoticia">
|
||||
<br>
|
||||
<div class="tituloNoticia">
|
||||
<p class="marquee"><%=strNoticia %></p>
|
||||
</div>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<!-- Cabecera de Navegación superior //-->
|
||||
<table cellpadding="0" cellspacing="0" border="0" align="center" style="width:95%">
|
||||
<tr>
|
||||
<td><script language="JavaScript">bloques();</script></td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<br>
|
||||
|
||||
<!-- Cuerpo de la página //-->
|
||||
<table cellpadding="0" cellspacing="0" border="0" align="center" style="width:95%">
|
||||
<tr valign="top">
|
||||
<td width="5%">
|
||||
<!-- Menú de navegación del módulo de navegación (zona izquierda) //-->
|
||||
<table cellpadding="0" cellspacing="0" border="0">
|
||||
<tr valign="top">
|
||||
<td colspan="2"><img src="../../img/sp.gif" width="180" height="12" border="0"></td>
|
||||
</tr>
|
||||
<tr valign="top">
|
||||
<td><script language="JavaScript">escribirMenuGst();</script></td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
|
||||
<td width="565">
|
||||
<form name="frmCrearArchivo" action="<%=request.getContextPath()%>/jsp/adm/poner_en_produccion.jsp?x=<%=strParametroMenu%>" method="post">
|
||||
<input type="hidden" name="crearArchivo" value="">
|
||||
</form>
|
||||
<table cellpadding="0" cellspacing="0" border="0" width="100%">
|
||||
<tr>
|
||||
<td width="1px" bgcolor="#CCCCCC" height="50px"></td>
|
||||
<td colspan="2" align="center"><h4 style="color:#43881A"><b>PONER CAMBIOS EN PRODUCCIÓN</b></h4></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="1px" bgcolor="#CCCCCC" height="30px"></td>
|
||||
<td colspan="2" align="center"><p style="color:#666666;font-size: small;">Genera el archivo <b>/tmp/ponerCambios/semaforo.txt</b>. Hay un crontab que se ejecuta cada noche y sube los cambios simepre que encuentre el archivo.</p></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="1px" bgcolor="#CCCCCC"></td>
|
||||
<td colspan="2" align="center"><p style="color:#666666;font-size: small;">El crontab ejecuta el archivo <b>/root/tarisan_en_produccion_crontab.sh</b></p></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="1px" bgcolor="#CCCCCC" height="80px"></td>
|
||||
<td colspan="2" align="center"><input type="button" name="btnPonerCambios" value='Activar Semáforo' onclick="javascript:ponerCambios()"></td>
|
||||
</tr>
|
||||
<%
|
||||
if (intMensaje == 1){
|
||||
%>
|
||||
<tr>
|
||||
<td width="1px" bgcolor="#CCCCCC" height="80px"></td>
|
||||
<td colspan="2" align="center"><p class="franquicias"><%=strMensaje %></p></td>
|
||||
</tr>
|
||||
<%
|
||||
}
|
||||
%>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
<script>
|
||||
var jsMostrarNoticia = <%=mostrarNoticia %>;
|
||||
if (!jsMostrarNoticia){
|
||||
document.getElementById('contenedorNoticia').style.display="none";
|
||||
}else{
|
||||
<% strNoticia = strNoticia.replaceAll("\"", "'"); %>
|
||||
var not = "<%=strNoticia %>";
|
||||
tamanioNoticia(not);
|
||||
marquee($('.tituloNoticia'), $('.marquee'),not);
|
||||
}
|
||||
</script>
|
||||
<%
|
||||
}
|
||||
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 poner cambios en producción (adm/poner_en_produccion.jsp)");
|
||||
%>
|
||||
@@ -0,0 +1,131 @@
|
||||
<%@ 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" %>
|
||||
<%@ page import="java.io.*" %>
|
||||
|
||||
<%
|
||||
response.setHeader("Expires", "0");
|
||||
response.setHeader("Pragma", "no-cache");
|
||||
response.setHeader("Cache-Control", "no-cache");
|
||||
HttpSession sesion = request.getSession(true);
|
||||
int usuario = 0;
|
||||
String strusu = "";
|
||||
|
||||
//parametro usuario
|
||||
strusu = sesion.getAttribute("U").toString();
|
||||
usuario = Integer.parseInt(strusu);
|
||||
|
||||
%>
|
||||
|
||||
<html>
|
||||
<head>
|
||||
<title>Simulación usuarios</title>
|
||||
<link rel="shortcut icon" href="../../img/logo.ico" />
|
||||
<link rel="STYLESHEET" type="text/css" href="../../css/estilos.css">
|
||||
<link rel="STYLESHEET" type="text/css" href="<%=request.getContextPath() %>/css/jquery.modal.css">
|
||||
<script language="JavaScript" src="../../js/inicio_tarisan.js"></script>
|
||||
<script language="JavaScript" src="../../js/menu_adm.js"></script>
|
||||
<script language="JavaScript" src="../../js/bloques_tarisan.js"></script>
|
||||
<script language="JavaScript" src="../../js/jquery-1.11.3.js"></script>
|
||||
<script language="JavaScript" src="<%=request.getContextPath()%>/js/jquery.modal.min.js"></script>
|
||||
|
||||
<script language="JavaScript" type="text/javascript">
|
||||
<!--
|
||||
|
||||
function entrar()
|
||||
{
|
||||
if(document.frm_simular.USUARIO.value.length == 0)
|
||||
{
|
||||
//alert("Introduce un numero de medico o pulse en Cancelar");
|
||||
modal({type:'error',title:'¡Atención!',text:'Introduce un numero de medico o pulse en Cancelar.',});
|
||||
document.frm_simular.USUARIO.focus();
|
||||
}
|
||||
else
|
||||
{
|
||||
document.frm_simular.SIMULADO.value=1;
|
||||
document.frm_simular.submit();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
function cancelar()
|
||||
{
|
||||
document.frm_simular.USUARIO.value=<%= usuario%>;
|
||||
document.frm_simular.SIMULADO.value=0;
|
||||
document.frm_simular.submit();
|
||||
}
|
||||
|
||||
function volver()
|
||||
{
|
||||
document.frm_volver.submit();
|
||||
}
|
||||
|
||||
function SePulsaEnter(event) {
|
||||
if (event.which == 13 && !event.shiftKey) {
|
||||
event.preventDefault();
|
||||
entrar();
|
||||
}
|
||||
}
|
||||
|
||||
//-->
|
||||
</script>
|
||||
|
||||
</head>
|
||||
<body alink="#43881A" bgcolor="#FFFFFF" onload="javascript:document.frm_simular.USUARIO.focus();" style="background-color:#FFFFFF">
|
||||
<div style="width:250px; margin:0 auto; margin-top:30px; border:1px solid rgb(192, 35, 49);">
|
||||
<table border="0" align="center" width="100%" >
|
||||
<tr>
|
||||
<td></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="tituloTabla" align="center">SIMULACIÓN DE USUARIOS</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<form name="frm_simular" action="../../servlet/Login" method="post" >
|
||||
<input type="hidden" name="SIMULADO" id="SIMULADO" value="1">
|
||||
<table border="0" align="center">
|
||||
<tr>
|
||||
<td align="right">
|
||||
<span class="txtnegrita">Usuario:</span>
|
||||
</td>
|
||||
<td>
|
||||
<input size="20" type="text" class="txt" id="USUARIO" name="USUARIO" value="" onkeypress="SePulsaEnter(event)"/>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align="right"></td>
|
||||
<td align="right">
|
||||
<a href="javascript:entrar()" class="enlace">Entrar</a> <a href="javascript:volver()" class="enlace">Cancelar</a>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</form>
|
||||
<form name="frm_volver" action="../../html/login.html" method="post" >
|
||||
</form>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td></td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
Reference in New Issue
Block a user