no message

git-svn-id: https://svn.coded.pt/svn/SIPRP@461 bb69d46d-e84e-40c8-a05a-06db0d633741
lxbfYeaa
Frederico Palma 21 years ago
parent f1f07abf5a
commit f3f17f83f6

@ -64,34 +64,32 @@ System.out.println( "doPostLogin()" );
session.setAttribute(sessionUserRole, userRole);
session.setAttribute(sessionPassword, password);
HashMap hmValues = new HashMap();
session.setAttribute( sessionEmpresaId, userRole );
if( userRole.equals( "manager" ) )
{
// session.setAttribute( sessionCompanyName, nomeEmpresa( con, "" + session.getAttribute( sessionEmpresaId ) ) );
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 );
}
stmt.close();
con.close();
HashMap hmValues = new HashMap();
session.setAttribute( sessionEmpresaId, userRole );
if( userRole.equals( "manager" ) )
{
// session.setAttribute( sessionCompanyName, nomeEmpresa( con, "" + session.getAttribute( sessionEmpresaId ) ) );
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 );
}
stmt.close();
con.close();
hmValues.put( "empresa_nome", session.getAttribute( sessionCompanyName ) );
hmValues.put( "empresa_id", session.getAttribute( sessionEmpresaId ) );
hmValues.put( "estabelecimento_id", session.getAttribute( sessionEstabelecimentoId ) );
hmValues.put( "userRole", userRole );
hmValues.put( "userName", user );
//out.println( mergeTemplate( hmValues, super.authenticatedUserTemplate));
hmValues.put( "empresa_nome", session.getAttribute( sessionCompanyName ) );
hmValues.put( "empresa_id", session.getAttribute( sessionEmpresaId ) );
hmValues.put( "estabelecimento_id", session.getAttribute( sessionEstabelecimentoId ) );
hmValues.put( "userRole", userRole );
hmValues.put( "userName", user );
//out.println( mergeTemplate( hmValues, super.authenticatedUserTemplate));
//out.println( mergeTemplate( user, userRole, super.authenticatedUserTemplate));
}

@ -24,14 +24,15 @@ public class siprpServlet extends HttpServlet
public static final String msgLogin = "Login";
public static final String msgNovaPasswordErrada="Erro ao criar a nova password, nova password inv\u00E1lida";
public static final String msgButtonNotSuported = "funcionalidade ainda n\u00E3o suportada" ;
public static final String msgSessionTimeout = "Sess\u00E3o expirou, por favor fa\u00E7a login de novo";
public static final String msgSessionTimeout = "ERRO 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>";
// Templates - Nomes e valores
//public static final String loginTemplate = "login.html";
public static final String indexTemplate = "index.html";
public static final String authenticatedUserTemplate = "user.html";
public static final String errorTemplate = "frame_erro.html";
public static final String indexTemplate = "index.html";
public static final String authenticatedUserTemplate = "user.html";
public static final String errorTemplate = "frame_erro.html";
public static final String mainTemplate = "main.html";
//public static final String criticalErrorTemplate = "critical.html";
@ -275,7 +276,6 @@ System.out.println( "DIR: " + TEMPLATE_DIR );
public String mergeTemplate (String msg, String template ) // #1
{
VelocityContext context = new VelocityContext();
StringWriter output = new StringWriter();

@ -27,7 +27,7 @@ Cornell
University Ergonomics Web &#8211; <a
href="http://www.ergo.human.cornell.edu/" target="_blank">www.ergo.human.cornell.edu</a><br>
Direc&ccedil;&atilde;o
Geral de Eestudos Estat&iacute;stica e Planeamento &#8211;
Geral de Estudos Estat&iacute;stica e Planeamento &#8211;
<a href="http://www.deep.msst.gov.pt/" target="_blank">www.deep.msst.gov.pt</a><br>
Direc&ccedil;&atilde;o
Geral de Sa&uacute;de &#8211; <a href="http://www.dgsaude.pt/"

@ -22,8 +22,7 @@
<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>
$msg
</td>
<td style="width: 2px;"><br>
</td>

@ -71,9 +71,43 @@ class="menu" href="html/links.html" target="_ifrm">links</a></td>
<tr>
<td colspan="1" rowspan="3" style="vertical-align: top;"><!-- INICIO -->
<!-- $!msg -->
<iframe name="_ifrm" src="html/erro.html" marginwidth="0" marginheight="0"
<table style="width: 588px; text-align: left;" border="0"
cellpadding="0" cellspacing="0">
<tbody>
<tr>
<td class="title" style="background: transparent url(html/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">
$msg
</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(html/images/texto_base.gif); background-repeat: no-repeat;"><br>
</td>
</tr>
</tbody>
</table>
<!--<iframe name="_ifrm" src="html/erro.html" marginwidth="0" marginheight="0"
frameborder="0" height="100%" width="588" allowtransparency='true'>
</iframe><!--
</iframe>--><!--
<table style="width: 588px; text-align: left;" border="0" cellpadding="0" cellspacing="0">
<tbody>
<tr>

@ -151,7 +151,8 @@ td.box6
<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 style="width: 120px; vertical-align: top;"><a href="html/frame_relatorio.html" target="_blank">relat&oacute;rio</a></td>
<!-- <td style="width: 120px; vertical-align: top;"><a href="html/frame_relatorio.html" target="_blank">relat&oacute;rio</a></td>-->
<td style="width: 120px; vertical-align: top;">&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>

Loading…
Cancel
Save