no message

git-svn-id: https://svn.coded.pt/svn/SIPRP@442 bb69d46d-e84e-40c8-a05a-06db0d633741
lxbfYeaa
Frederico Palma 21 years ago
parent cefbb454ba
commit 675fc4d830

@ -67,7 +67,8 @@ HashMap hmValues = new HashMap();
session.setAttribute( sessionEmpresaId, userRole ); session.setAttribute( sessionEmpresaId, userRole );
if( userRole.equals( "manager" ) ) if( userRole.equals( "manager" ) )
{ {
session.setAttribute( sessionCompanyName, nomeEmpresa( con, "" + session.getAttribute( sessionEmpresaId ) ) ); // session.setAttribute( sessionCompanyName, nomeEmpresa( con, "" + session.getAttribute( sessionEmpresaId ) ) );
session.setAttribute( sessionCompanyName, null );
session.setAttribute( sessionEstabelecimentoId, null ); session.setAttribute( sessionEstabelecimentoId, null );
hmValues.put( templateQuery, super.queryStringEmpresas ); hmValues.put( templateQuery, super.queryStringEmpresas );
} }

@ -63,7 +63,7 @@ public static final String errorTemplate = "error.html";
public static final String sessionCompanyName = "sessionCompanyName"; public static final String sessionCompanyName = "sessionCompanyName";
public static final int sessionTimeout =300; // segundos public static final int sessionTimeout =300; // segundos
public static final String servletName="siprpServlet"; public static final String servletName="siprpWeb";
public static final String superUserRole="manager"; public static final String superUserRole="manager";
// BD // BD
@ -102,6 +102,7 @@ public static final String errorTemplate = "error.html";
try { try {
String TEMPLATE_DIR = this.getServletContext().getRealPath( "/" ) + "html/"; String TEMPLATE_DIR = this.getServletContext().getRealPath( "/" ) + "html/";
System.out.println( "DIR: " + TEMPLATE_DIR );
Properties props = new Properties(); Properties props = new Properties();
props.setProperty( "file.resource.loader.path", TEMPLATE_DIR ); props.setProperty( "file.resource.loader.path", TEMPLATE_DIR );
Velocity.init( props ); Velocity.init( props );

@ -125,14 +125,14 @@ class="menu" href="html/links.html" target="_ifrm">links</a></td>
<td class="title">user</td> <td class="title">user</td>
</tr> </tr>
<tr valign="top"> <tr valign="top">
<td><input size="17" name="user" type="text" disabled></td> <td><input size="17" name="user" type="text" ></td>
</tr> </tr>
<tr valign="top"> <tr valign="top">
<td class="title">password</td> <td class="title">password</td>
</tr> </tr>
<tr valign="top"> <tr valign="top">
<td><input size="17" name="password" <td><input size="17" name="password"
onfocus="onkeypress = s" type="password" disabled></td> onfocus="onkeypress = s" type="password" ></td>
</tr> </tr>
</tbody> </tbody>
</table> </table>

@ -163,20 +163,20 @@ td.box6
<tr> <tr>
<td> <td>
#if( $userRole == "manager" ) #if( $userRole == "manager" )
<a class='text' href="/siprpServlet/?empresas">Empresa:</a> $!empresa_nome <a class='text' href="/siprpWeb/?empresas">Empresa:</a> $!empresa_nome
#else #else
Empresa: $empresa_nome Empresa: $empresa_nome
#end #end
</td> </td>
<td class='text' style='text-align: right; background: url(images/logout.gif) no-repeat;' width='140' height='45' rowspan='3'> <td class='text' style='text-align: right; background: url(images/logout.gif) no-repeat;' width='140' height='45' rowspan='3'>
$userName&nbsp;&nbsp;&nbsp;<br> $userName&nbsp;&nbsp;&nbsp;<br>
<a href="/siprpServlet/">Logout »&nbsp;&nbsp;&nbsp;</a><br> <a href="/siprpWeb/">Logout »&nbsp;&nbsp;&nbsp;</a><br>
</td> </td>
</tr> </tr>
<tr> <tr>
<td> <td>
#if( $estabelecimento_id ) #if( $estabelecimento_id )
<a class='text' href="/siprpServlet/?$empresa_id">Estabelecimento</a>: $!estabelecimento_nome <a class='text' href="/siprpWeb/?$empresa_id">Estabelecimento</a>: $!estabelecimento_nome
#else #else
Estabelecimento: Estabelecimento:
#end #end
@ -185,7 +185,7 @@ td.box6
<tr> <tr>
<td> <td>
#if( $query == "trabalhador" ) #if( $query == "trabalhador" )
<a class='text' href='/siprpServlet/?$empresa_id/$estabelecimento_id'>Funcion&aacute;rio</a>: $v2.get( 0 ) N&ordm;: $v2.get( 1 ) <a class='text' href='/siprpWeb/?$empresa_id/$estabelecimento_id'>Funcion&aacute;rio</a>: $v2.get( 0 ) N&ordm;: $v2.get( 1 )
#else #else
Funcion&aacute;rio: Funcion&aacute;rio:
#end #end
@ -259,7 +259,7 @@ td.box6
</td> </td>
</tr> </tr>
<tr> <tr>
<td class='footer' style="width: 740px; height: 33px; background-image: url(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">Evolute - Consultoria Inform&aacute;tica</a> e <a class="copy" href="http://www.2-3design.com/">2/3 Design</a>&nbsp;&nbsp;</td> <td class='footer' style="width: 740px; height: 33px; background-image:url(/siprpWeb/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">Evolute - Consultoria Inform&aacute;tica</a> e <a class="copy" href="http://www.2-3design.com/">2/3 Design</a>&nbsp;&nbsp;</td>
</tr> </tr>
</tbody> </tbody>
</table> </table>

Loading…
Cancel
Save