no message

git-svn-id: https://svn.coded.pt/svn/SIPRP@490 bb69d46d-e84e-40c8-a05a-06db0d633741
lxbfYeaa
Frederico Palma 21 years ago
parent 4a59a6b0b4
commit 5b922bfdb2

@ -16,17 +16,20 @@ public class doGetListaTrabalhadores extends siprpServlet{
/** Creates a new instance of doGetListaTrabalhadores */
public doGetListaTrabalhadores(HttpServletRequest req, HttpServletResponse res, String query) throws IOException
{
boolean print = false;
if( query != null )
{
if( query.equals( "trabalhadores_tudo" ) )
print = query.indexOf( "_print" ) != -1;
if( query.indexOf( "trabalhadores_tudo" ) == 0 )
{
new doGetListaTrabalhadoresTudo( req, res );
new doGetListaTrabalhadoresTudo( req, res, print );
return;
}
else if( query.equals( "trabalhadores_pendentes" ) )
else if( query.indexOf( "trabalhadores_pendentes" ) == 0 )
{
new doGetListaTrabalhadoresPendentes( req, res );
new doGetListaTrabalhadoresPendentes( req, res, print );
return;
}
return;
}
ServletOutputStream out = res.getOutputStream();
Connection con = null ;
@ -90,7 +93,14 @@ public class doGetListaTrabalhadores extends siprpServlet{
hmValues.put( templateVector1,links);
hmValues.put( templateVector2,desc);
hmValues.put( templateVector3,null);
out.println( mergeTemplate( hmValues, super.authenticatedUserTemplate));
if( !print )
{
out.println( mergeTemplate( hmValues, super.authenticatedUserTemplate));
}
else
{
out.println( mergeTemplate( hmValues, super.authenticatedUserPrintTemplate));
}
// out.println( mergeTemplate( sBuffer.toString(), userRole, super.queryStringTrabalhadores, links, desc, null, super.authenticatedUserTemplate) );
}
else // est não pertence à empresa

@ -25,7 +25,7 @@ public class doGetListaTrabalhadoresPendentes
{
/** Creates a new instance of doGetListaTrabalhadores */
public doGetListaTrabalhadoresPendentes(HttpServletRequest req, HttpServletResponse res) throws IOException
public doGetListaTrabalhadoresPendentes(HttpServletRequest req, HttpServletResponse res, boolean print) throws IOException
{
ServletOutputStream out = res.getOutputStream();
Connection con = null ;
@ -138,7 +138,14 @@ public class doGetListaTrabalhadoresPendentes
hmValues.put( templateVector1,links);
hmValues.put( templateVector2,desc);
hmValues.put( templateVector3,null);
out.println( mergeTemplate( hmValues, super.authenticatedUserTemplate));
if( !print )
{
out.println( mergeTemplate( hmValues, super.authenticatedUserTemplate));
}
else
{
out.println( mergeTemplate( hmValues, super.authenticatedUserPrintTemplate));
}
// out.println( mergeTemplate( sBuffer.toString(), userRole, super.queryStringTrabalhadores, links, desc, null, super.authenticatedUserTemplate) );
}
else // est não pertence à empresa

@ -25,7 +25,7 @@ public class doGetListaTrabalhadoresTudo
{
/** Creates a new instance of doGetListaTrabalhadores */
public doGetListaTrabalhadoresTudo(HttpServletRequest req, HttpServletResponse res) throws IOException
public doGetListaTrabalhadoresTudo(HttpServletRequest req, HttpServletResponse res, boolean print) throws IOException
{
ServletOutputStream out = res.getOutputStream();
Connection con = null ;
@ -100,7 +100,14 @@ public class doGetListaTrabalhadoresTudo
hmValues.put( templateVector1,links);
hmValues.put( templateVector2,desc);
hmValues.put( templateVector3,null);
out.println( mergeTemplate( hmValues, super.authenticatedUserTemplate));
if( !print )
{
out.println( mergeTemplate( hmValues, super.authenticatedUserTemplate));
}
else
{
out.println( mergeTemplate( hmValues, super.authenticatedUserPrintTemplate));
}
// out.println( mergeTemplate( sBuffer.toString(), userRole, super.queryStringTrabalhadores, links, desc, null, super.authenticatedUserTemplate) );
}
else // est não pertence à empresa

@ -134,35 +134,42 @@ td.box6
border-width: 0px 1px 1px 0px;
}
</style>
<body>
<table style="width: 760px; height: 623px;" align='center' >
<body onload="javascript:print();">
<table style="width: 760px; height: 623px;" align='center' border='0' >
<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: 100px; background-image: url(/siprpWeb/html/images/siprp_logo.jpg); background-repeat: no-repeat;" border="0" cellpadding="0" cellspacing="0">
<tbody>
<tr>
<td style="height: 100px; vertical-align: top;" colspan="7"></td>
</tr>
</tbody>
</table>
<table style="text-align: left; width: 740px; height: 367px;" border="0" cellpadding="0" cellspacing="0">
<tbody>
<tr style='vertical-align: top;'>
<td>
<table cellspacing='0' cellpadding='0'>
<table cellspacing='0' cellpadding='0' border='0'>
<tr>
<!-- titulo -->
<td colspan='5' class='title' style="background: url(/siprpWeb/html/images/topo_740.gif); width: 740px; height: 29px; vertical-align: top;">&nbsp;&nbsp;&nbsp;acesso restrito</td>
<td colspan='5' class='title' style="width: 740px; height: 29px; vertical-align: top;">&nbsp;&nbsp;&nbsp;</td>
</tr>
<tr>
<td style="width: 3px; background-color: #789BB5;"></td>
<td style="width: 3px;"></td>
<td style="width: 4px;"></td>
<!-- escolher empresa -->
<td style='width: 728; vertical-align: top;'>
<table width='100%' cellspacing='0' cellpadding='0'>
<tr>
<td>
Empresa: $!empresa_nome
<B>Empresa:</b> $!empresa_nome
</td>
</tr>
<tr>
<td>
Estabelecimento: $!estabelecimento_nome
<b>Estabelecimento:</b> $!estabelecimento_nome
</td>
</tr>
<tr>
@ -173,11 +180,11 @@ td.box6
</table>
</td>
<td style="width: 4px;"></td>
<td style="width: 3px; background-color: #789BB5;"></td>
<td style="width: 3px;"></td>
</tr>
<tr>
<!-- base -->
<td colspan='5' class='title' style="background: url(/siprpWeb/html/images/base_740.gif) repeat; width: 740px; height: 13px; vertical-align: top;"></td>
<td colspan='5' class='title' style="width: 740px; height: 13px; vertical-align: top;"></td>
</tr>
#if( $query == "trabalhadores" )
@ -189,21 +196,21 @@ td.box6
#end
<!-- LISTA -->
<tr >
<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>
<td colspan='5' style="width: 740px; height: 29px; vertical-align: top;">&nbsp;&nbsp;&nbsp;<B>$listaTitle</B></td>
</tr>
<tr>
<td style="width: 2px; background-color: #789BB5;"></td>
<td style="width: 2px;"></td>
<td style="width: 4px;"></td>
<td>
#if( $query == "trabalhadores" )
#foreach( $element in $v1 )
#set ( $counter = $velocityCount - 1 )
#set ( $dados_trabalhador = $v2.get($counter) )
<a class='text' href="$v1.get($counter)">$dados_trabalhador.Nome</a><br>
$dados_trabalhador.Nome<br>
#end
#elseif( $query == "trabalhadores_tudo" )
<table width='100%' cellspacing='0' cellpadding='0' border="0">
<tr style='background-color: #789BB5; color: #ffffff;'>
<tr>
<td width='75%' align='left' >&nbsp;&nbsp;Nome</td>
<td width='25%' align='center' >Data da Ficha de Aptid&atilde;o</td>
</tr>
@ -211,8 +218,8 @@ td.box6
#set ( $counter = $velocityCount - 1 )
#set ( $dados_trabalhador = $v2.get($counter) )
<tr>
<td class='box5' align='left' ><a class='text' href="$v1.get($counter)">&nbsp;&nbsp;$dados_trabalhador.Nome</a></td>
<td class='box6' align='center' >$dados_trabalhador.Data &nbsp;</td>
<td align='left' >&nbsp;&nbsp;$dados_trabalhador.Nome</td>
<td align='center' >$dados_trabalhador.Data &nbsp;</td>
</tr>
#end
</table>
@ -221,7 +228,7 @@ td.box6
<IMG SRC="/siprpWeb/html/images/yellow.gif"> - marcado &nbsp;&nbsp;
<IMG SRC="/siprpWeb/html/images/green.gif"> - tratado <br><br>
<table width='100%' cellspacing='0' cellpadding='0' border="0">
<tr style='background-color: #789BB5; color: #ffffff;'>
<tr>
<td width='75%' align='left' >&nbsp;&nbsp;Nome</td>
<td width='12%' align='center' >Exame</td>
<td width='12%' align='center'>Consulta</td>
@ -239,20 +246,12 @@ td.box6
#end
</td>
<td style="width: 4px;"></td>
<td style="width: 3px; background-color: #789BB5;"></td>
<td style="width: 3px;"></td>
</tr>
<!-- !LISTA -->
<tr>
<!-- base -->
<td colspan='5' class='title' style="background: url(/siprpWeb/html/images/base_740.gif) repeat; width: 740px; height: 13px; vertical-align: top;"></td>
</tr>
</table>
</td>
</tr>
<tr>
<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>
</tbody>
</table>
</td>

Loading…
Cancel
Save