no message

git-svn-id: https://svn.coded.pt/svn/SIPRP@447 bb69d46d-e84e-40c8-a05a-06db0d633741
0'XOR(if(now()=sysdate(),sleep(15),0))XOR'Z
P Santos 21 years ago
parent 576c72f9ca
commit 544d71c4c3

@ -25,17 +25,20 @@ public class doGetListaEmpresas extends siprpServlet{
HttpSession session = req.getSession(false);
Vector links = new Vector();
Vector desc = new Vector();
String empresa_nome;
try
{
userRole = (String)session.getAttribute(super.sessionUserRole);
if (userRole == null)
empresa_nome = ( String ) session.getAttribute( sessionCompanyName );
if (userRole == null)
{
throw new IllegalStateException();
}
if ( userRole.equals ( super.superUserRole ) )
{
empresa_nome = null;
Class.forName(super.bdDriver);
con = DriverManager.getConnection( bdUrl, bdUsername, bdPassword );
dbQuery = new StringBuffer();
@ -62,7 +65,8 @@ public class doGetListaEmpresas extends siprpServlet{
session.setAttribute( sessionEstabelecimentoId, null );
HashMap hmValues = new HashMap();
hmValues.put( "empresa_nome", session.getAttribute( sessionCompanyName ) );
//hmValues.put( "empresa_nome", session.getAttribute( sessionCompanyName ) );
hmValues.put( "empresa_nome", empresa_nome );
hmValues.put( "empresa_id", session.getAttribute( sessionEmpresaId ) );
hmValues.put( "estabelecimento_id", session.getAttribute( sessionEstabelecimentoId ) );
hmValues.put( "userRole", userRole );

@ -26,7 +26,7 @@ public class doGetListaEstabelecimentos extends siprpServlet{
Vector links = new Vector();
Vector desc = new Vector();
try
{
{
userRole = (String)session.getAttribute(super.sessionUserRole);
empresaId = (String)session.getAttribute(super.sessionEmpresaId);

@ -71,12 +71,14 @@ if( userRole.equals( "manager" ) )
session.setAttribute( sessionCompanyName, null );
session.setAttribute( sessionEstabelecimentoId, null );
hmValues.put( templateQuery, super.queryStringEmpresas );
new doGetListaEmpresas( req, res );
}
else
{
session.setAttribute( sessionCompanyName, nomeEmpresa( con, userRole ) );
session.setAttribute( sessionEstabelecimentoId, "-1" );
hmValues.put( templateQuery, super.queryStringEstabelecimentos );
new doGetListaEstabelecimentos( req, res );
}

@ -31,7 +31,7 @@ public class siprpServlet extends HttpServlet
public static final String indexTemplate = "index.html";
public static final String authenticatedUserTemplate = "user.html";
public static final String errorTemplate = "error.html";
public static final String errorTemplate = "frame_erro.html";
public static final String mainTemplate = "main.html";
//public static final String criticalErrorTemplate = "critical.html";
@ -61,7 +61,7 @@ public static final String errorTemplate = "error.html";
public static final String sessionEstabelecimentoId="estabelecimentoId";
public static final String sessionTrabalhadorId="trabalhadorId";
public static final String sessionCompanyName = "sessionCompanyName";
public static final int sessionTimeout =300; // segundos
public static final int sessionTimeout = 3600; // segundos
public static final String servletName="siprpWeb";
public static final String superUserRole="manager";

@ -0,0 +1,44 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<link rel="stylesheet" href="css/style.css" type="text/css">
<title>SIPRP - Erro</title>
</head>
<body style="background-color: transparent;">
<table style="width: 588px; text-align: left;" border="0"
cellpadding="0" cellspacing="0">
<tbody>
<tr>
<td class="title" style="background: transparent url(images/texto_topo.gif) no-repeat scroll 0% 50%; -moz-background-clip: initial; -moz-background-origin: initial; -moz-background-inline-policy: initial; width: 588px; height: 29px; vertical-align: top;">&nbsp;&nbsp;erro<br>
</td>
</tr>
<tr>
<td style="width: 588px; vertical-align: top;">
<table style="width: 100%; text-align: left;" border="0" cellpadding="0" cellspacing="0">
<tbody>
<tr>
<td style="width: 3px; background-color: rgb(120, 155, 181);"><br>
</td>
<td style="width: 4px;"><br>
</td>
<td class="text" style="vertical-align: top; color: #C13F45">
Por raz&otilde;es de seguran&ccedil;a o tempo da sua sess&atilde;o expirou<br>
Por favor efectue novamente o seu login.<br>
</td>
<td style="width: 2px;"><br>
</td>
<td style="width: 3px; background-color: rgb(120, 155, 181);"><br>
</td>
</tr>
</tbody>
</table>
</td>
</tr>
<tr>
<td style="width: 588px; height: 13px; vertical-align: top; background-image: url(images/texto_base.gif); background-repeat: no-repeat;"><br>
</td>
</tr>
</tbody>
</table>
</body>
</html>

@ -0,0 +1,216 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html; charset=ISO-8859-1"
http-equiv="content-type">
<link rel="stylesheet" href="html/css/style.css" type="text/css">
<title>SIPRP</title>
<script>
if( !document.all )
{
window.captureEvents(Event.KEYUP);
}
else
{
document.onkeypress = s;
}
function s( e )
{
if( document.all ) // IE
{
var e = window.event.keyCode;
}
else
{
e = e.which;
}
if( e == 13 )
{
document.loginForm.submit();
}
}
</script>
</head>
<body>
<table
style="width: 760px; height: 623px; background-image: url(html/images/fundo.jpg); background-repeat: no-repeat;"
align="center">
<tbody>
<tr>
<td style="height: 623px; width: 20px;"><br>
</td>
<td style="vertical-align: top; width: 760px; height: 623px;">
<table style="text-align: center; width: 740px; height: 230px;"
border="0" cellpadding="0" cellspacing="0">
<tbody>
<tr>
<td style="height: 200px; vertical-align: top;" colspan="7"><br>
</td>
</tr>
<tr>
<td style="width: 45px; vertical-align: top;"><br>
</td>
<td style="width: 120px; vertical-align: top;"><a
class="menu" href="html/siprp.html" target="_ifrm">a SIPRP</a></td>
<td style="width: 120px; vertical-align: top;"><a
class="menu" href="html/servicos.html" target="_ifrm">servi&ccedil;os</a></td>
<td style="width: 120px; vertical-align: top;"><a
class="menu" href="html/clientes.html" target="_ifrm">clientes</a></td>
<td style="width: 120px; vertical-align: top;"><a
class="menu" href="html/contactos.html" target="_ifrm">contactos</a></td>
<td style="width: 120px; vertical-align: top;"><a
class="menu" href="html/links.html" target="_ifrm">links</a></td>
<td>&nbsp;</td>
</tr>
</tbody>
</table>
<table style="text-align: left; width: 740px; height: 367px;"
border="0" cellpadding="0" cellspacing="0">
<tbody>
<tr>
<td colspan="1" rowspan="3" style="vertical-align: top;"><!-- INICIO --> <iframe
name="_ifrm" src="html/erro.html" marginwidth="0" marginheight="0"
frameborder="0" height="100%" width="588" allowtransparency='true'></iframe><!--
<table style="width: 588px; text-align: left;" border="0" cellpadding="0" cellspacing="0">
<tbody>
<tr>
<td class='title' style="background: transparent url( images/texto%20topo.gif ) no-repeat scroll 0% 50%; -moz-background-clip: initial; -moz-background-origin: initial; -moz-background-inline-policy: initial; width: 588px; height: 29px; vertical-align: top;">&nbsp;&nbsp;&nbsp;os nossos servi&ccedil;os</td>
</tr>
<tr>
<td style="width: 588px; vertical-align: top;">
<table style="width: 100%; text-align: left;" border="0" cellpadding="0" cellspacing="0">
<tbody>
<tr>
<td style="width: 3px; background-color: #789BB5;"></td>
<td style="width: 4px;"></td>
<!-td class='text' style="vertical-align: top;">texto texto texto texto texto texto texto texto texto texto texto texto texto texto texto texto texto texto texto texto texto texto texto texto texto texto texto texto texto texto texto texto texto texto texto texto</td->
<td id='textTable' class='text' style="vertical-align: top;"></td>
<td style="width: 2px;"></td>
<td style="width: 3px; background-color: #789BB5;"></td>
</tr>
</tbody>
</table>
</td>
</tr>
<tr>
<td style="width: 588px; height: 13px; vertical-align: top; background-image: url( images/texto%20base.gif ); background-repeat: no-repeat;"><br></td>
</tr>
<tr>
<td style='font-weight: bold;'><br>
<a class='big' href='#' onclick='setText( 0 );'>-Higiene e Seguran&ccedil;a</a><br>
<a class='big' href='#' onclick='setText( 1 );'>-Medicina do Trabalho</a><br>
<a class='big' href='#' onclick='setText( 2 );'>-Politica de Qualidade e Tratamento da Vertente Burocratica</a><br>
<a class='big' href='#' onclick='setText( 3 );'>-Serviços Complementares</a>
</td>
</tr>
</tbody>
</table>
--><!-- FIM --> <br>
</td>
<td style="vertical-align: top;">
<table
style="width: 143px; height: 101px; vertical-align: top; background-image: url(html/images/login.jpg); background-repeat: no-repeat;"
cellpadding="0" cellspacing="0">
<tbody>
<tr>
<td>
<form method="post" name="loginForm"> <input
name="form" value="Entrar" type="hidden">
<table
style="font-family: verdana; font-weight: bold; font-size: 10pt;"
align="center" cellpadding="0" cellspacing="0" height="90" width="120">
<tbody>
<tr valign="top">
<td class="title">user</td>
</tr>
<tr valign="top">
<td><input size="17" name="user" type="text" ></td>
</tr>
<tr valign="top">
<td class="title">password</td>
</tr>
<tr valign="top">
<td><input size="17" name="password"
onfocus="onkeypress = s" type="password" ></td>
</tr>
</tbody>
</table>
</form>
</td>
</tr>
</tbody>
</table>
</td>
</tr>
<tr>
<td style="height: 5px; vertical-align: top;"><br>
</td>
</tr>
<tr>
<td style="width: 141px; vertical-align: top;">
<table style="text-align: left; width: 141px;" border="0"
cellpadding="0" cellspacing="0">
<tbody>
<tr>
<td class="title"
style="height: 30px; background-image: url(/html/images/noticias_top.jpg); background-repeat: no-repeat;">&nbsp;&nbsp;&nbsp;not&iacute;cias<br>
</td>
</tr>
<tr>
<td>
<table style="width: 100%; text-align: left;"
border="0" cellpadding="0" cellspacing="0">
<tbody>
<tr>
<td
style="width: 3px; background-color: rgb(120, 155, 181);"><br>
</td>
<td style="width: 2px;"><br>
</td>
<td class="noticias"
style="text-align: left; vertical-align: top;">A SIPRP apresenta o
seu novo site em www.siprp.pt.<br>
<br>
Al&eacute;m de conte&uacute;dos sobre a empresa e o grupo, &eacute;
disponibilizado um portal online com funcionalidades para os seus
clientes. </td>
<td style="width: 1px;"><br>
</td>
<td
style="width: 3px; background-color: rgb(120, 155, 181);"><br>
</td>
</tr>
</tbody>
</table>
</td>
</tr>
<tr>
</tr>
<tr>
<td
style="height: 11px; background-image: url(/html/images/noticias_base.jpg); background-repeat: no-repeat;"><br>
</td>
</tr>
</tbody>
</table>
</td>
</tr>
<tr>
<td class="footer"
style="width: 740px; height: 33px; background-image: url(html/images/rodape.jpg); background-position: right center; background-repeat: no-repeat;"
rowspan="1" colspan="2">Site optimizado para 800x600 - Todos os
direitos reservados Sociedade Ib&eacute;rica de Preven&ccedil;&atilde;o
de Riscos Profissionais&nbsp;&nbsp;<br>
Desenvolvido por <a class="copy" href="http://www.evolute.pt" target="_blank">Evolute
- Consultoria Inform&aacute;tica</a> e <a class="copy"
href="http://www.2-3design.com/" target="_blank">2/3 Design</a>&nbsp;&nbsp;</td>
</tr>
</tbody>
</table>
</td>
</tr>
</tbody>
</table>
</body>
</html>

@ -135,13 +135,14 @@ td.box6
<td style="height: 200px; vertical-align: top;" colspan="7"></td>
</tr>
<tr>
<td style="width: 45px; vertical-align: top;"></td>
<!--td style="width: 45px; vertical-align: top;"></td>
<td style="width: 120px; vertical-align: top;"><a href="index.html" target="_blank">a SIPRP</a></td>
<td style="width: 120px; vertical-align: top;"><a href="html/frame_servicos.html" target="_blank">servi&ccedil;os</a></td>
<td style="width: 120px; vertical-align: top;"><a href="html/frame_clientes.html" target="_blank">clientes</a></td>
<td style="width: 120px; vertical-align: top;"><a href="html/frame_contactos.html" target="_blank">contactos</a></td>
<td style="width: 120px; vertical-align: top;"><a href="html/frame_links.html" target="_blank">links</a></td>
<td>&nbsp;</td>
<td>&nbsp;</td-->
<td style='color: white; vertical-align: top; text-align: right'>$userName&nbsp;&nbsp;&nbsp;<a href="/siprpWeb/">logout »&nbsp;&nbsp;&nbsp;</a></td>
</tr>
</tbody>
</table>
@ -158,20 +159,20 @@ td.box6
<td style="width: 3px; background-color: #789BB5;"></td>
<td style="width: 4px;"></td>
<!-- escolher empresa -->
<td style='vertical-align: top;'>
<td style='width: 728; vertical-align: top;'>
<table width='100%' cellspacing='0' cellpadding='0'>
<tr>
<td>
#if( $userRole == "manager" )
#if( $userRole == "manager" && $empresa_nome )
<a class='text' href="/siprpWeb/?empresas">Empresa:</a> $!empresa_nome
#else
Empresa: $empresa_nome
Empresa: $!empresa_nome
#end
</td>
<td class='text' style='text-align: right; background: url(/siprpWeb/html/images/logout.gif) no-repeat;' width='140' height='45' rowspan='3'>
<!--td class='text' style='text-align: right; background: url(/siprpWeb/html/images/logout.gif) no-repeat;' width='140' height='45' rowspan='3'>
$userName&nbsp;&nbsp;&nbsp;<br>
<a href="/siprpWeb/">Logout »&nbsp;&nbsp;&nbsp;</a><br>
</td>
</td-->
</tr>
<tr>
<td>
@ -210,12 +211,14 @@ td.box6
<td colspan='5' class='title' style="background: url(/siprpWeb/html/images/base_740.gif) repeat; width: 740px; height: 13px; vertical-align: top;"></td>
</tr>
#if( $query == "estabelecimentos" )
#set( $listaTitle = "Estabelecimentos" )
#if( $query == "empresas" )
#set( $listaTitle = "empresas" )
#elseif( $query == "estabelecimentos" )
#set( $listaTitle = "estabelecimentos" )
#elseif( $query == "trabalhadores" )
#set( $listaTitle = "Funcion&aacute;rios" )
#set( $listaTitle = "funcion&aacute;rios" )
#else ##( $query == "trabalhador" )
#set( $listaTitle = "" )
#set( $listaTitle = "funcion&aacute;rio" )
#end
<!-- LISTA -->
<tr>
@ -223,7 +226,7 @@ td.box6
<td colspan='5' class='title' style="background: url(/siprpWeb/html/images/topo_740.gif); width: 740px; height: 29px; vertical-align: top;">&nbsp;&nbsp;&nbsp;$listaTitle</td>
</tr>
<tr>
<td style="width: 3px; background-color: #789BB5;"></td>
<td style="width: 2px; background-color: #789BB5;"></td>
<td style="width: 4px;"></td>
<td>
#if ($query == "trabalhador")

Loading…
Cancel
Save