Files
2025-06-09 13:55:08 +02:00

224 lines
6.2 KiB
Plaintext

<%@ page import="com.tarisan.data.Usuario" %>
<%@ page import="com.tarisan.log.*" %>
<%@ page import="com.tarisan.util.Utilidades" %>
<%@ page import="com.tarisan.control.*" %>
<%@ page import="com.tarisan.data.*" %>
<%@ page import="java.util.Vector" %>
<%
//LogTarisan.logger.log(NivelLog.INFO, "Inicio página de error (errorIguala.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("ERROR") == null))
{
LogTarisan.logger.log(NivelLog.INFO, "Sesión invalidada");
response.sendRedirect("../html/login.html");
}
else
{
LogTarisan.logger.log(NivelLog.INFO, ((Usuario)sesion.getAttribute("USUARIO")).getMedico() + " -Inicio página de error (errorIguala.jsp)");
String mensaje = null;
Tamensaje tamensaje = new Tamensaje();
PersistenciaTamensaje pertamensaje = new PersistenciaTamensaje();
mensaje = (String)sesion.getAttribute("ERROR");
if(mensaje == null || (mensaje.trim().compareTo("") == 0))
{
mensaje = pertamensaje.obtenerMensaje(12).getMensaje() ;
}
sesion.removeAttribute("ERROR");
Usuario usuario = (Usuario)sesion.getAttribute("USUARIO");
boolean mostrarNoticia = true;
String strNoticia = "";
if(usuario == null)
{
mostrarNoticia = false;
}else{
PersistenciaTanoticias perTaNo = new PersistenciaTanoticias();
Vector vSeleccionNot = perTaNo.obtener_noticias_cabecera();
Vector vNoticias = new Vector();
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/>", " ");
}
}
}
%>
<html>
<head>
<title>Error en Tarisan</title>
<link rel="shortcut icon" href="../img/logo.ico" />
<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/bloques_tarisan.js"></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>
<%
if(usuario == null)
{
%>
<td class="tituloTablaMedico" align="center">&nbsp;</td>
<%
}
else
{
%>
<td class="tituloTablaMedico" align="center"><%= 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>
<!-- Logotipo de IMQ de Navarra
<table cellpadding="0" cellspacing="0" border="0" width="100%">
<tr valign="bottom">
<td align="center"><img src="../img/Logo_rosca.jpg" border="0"></td>
</tr>
</table>
<br>//-->
<!-- Datos del usuario conectado
<table cellpadding="0" cellspacing="0" border="0" align="center" style="width:95%">
<tr>
<%
if(usuario == null)
{
%>
<td class="tituloTabla" align="center">&nbsp;</td>
<%
}
else
{
%>
<td class="tituloTabla" align="center"><%= usuario %></td>
<%
}
%>
</tr>
<tr>
<td bgcolor="#C02331"><img src="img/sp.gif" width="746" height="1" border="0"></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>
<table cellpadding="0" cellspacing="0" border="0" width="165">
<tr valign="top">
<td width="16" class="menuBack"><img src="../img/gen_bullet_cerrado.gif" name="bullet" width="16" height="12" border="0"></td>
<td width="150" class="menuOff"><b>MENSAJE</b></td>
</tr>
</table>
</td>
<td><img src="../img/sp.gif" width="14" height="261" border="0"></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 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>&nbsp;</td></tr>
<tr><td class="txtnegrita" align="center"><%= mensaje %></td></tr>
<tr>
<td>&nbsp;</td>
</tr>
<tr>
<td class="txt" align="center"><%=pertamensaje.obtenerMensaje(32).getMensaje() %></td>
</tr>
<tr>
<td>&nbsp;</td>
</tr>
<tr>
<td align="center"><a href="javascript:history.back();" class="enlace"><%=pertamensaje.obtenerMensaje(30).getMensaje() %></a></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>
<%
}
LogTarisan.logger.log(NivelLog.INFO, "Final página de error (errorIguala.jsp)");
%>