<? include("conexao.php");
// include("globais.php");
?>
<html>
<head>
<title>Boleto Bancário</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<link href="css/boleto.css" rel="stylesheet" type="text/css">
<link href="css/bc.css" rel="stylesheet" type="text/css">
<link href="css/cn.css" rel="stylesheet" type="text/css">
<link href="css/ct.css" rel="stylesheet" type="text/css">
<link href="css/bcc.css" rel="stylesheet" type="text/css">
<link href="css/codbank.css" rel="stylesheet" type="text/css">
<!--[if IE]>
<style type="text/css">
html {
scrollbar-arrow-color:#009900;
scrollbar-track-color:;
scrollbar-face-color:#FFFFFF;
scrollbar-highlight-color:#D3EBDB;
scrollbar-3dlight-color:#00CC33;
scrollbar-darkshadow-color:#009933;
scrollbar-shadow-color:#00FF99;
}
</style>
<![endif]-->
<script language="JavaScript1.2">
<!--
function DoPrinting(){
if (!window.print){
alert("Use o Netscape ou Internet Explorer \n nas versões 4.0 ou superior!");
return
}
window.print()
}
//-->
</script>
<style type="text/css">
<!--
body {
margin-left: 0px;
}
.style2 {font-size: 10}
-->
</style></head>
<?php
$cod_unimed= $_POST["hiddenField"];
$carteira= $_POST["hiddenField2"];
$Dv= $_POST["hiddenField3"];
$mes_referencia= $_POST["hiddenField4"];
$ano= $_POST["hiddenField5"];
$dia_nasc = $_POST["hiddenField6"];
$mes_nasc = $_POST["hiddenField7"];
$ano_nasc = $_POST["hiddenField8"];
$CodBanco = $_POST["hiddenField9"];
$dg_banco = $_POST["hiddenField10"];
$NossoNum1 = $_POST["hiddenField11"];
$NossoNum4 = $_POST["hiddenField12"];
$Dv1 = $_POST["hiddenField13"];
$CodBancoBB = $_POST["hiddenField14"];
$NossoNumBBSDV = $_POST["hiddenField15"];
$DvFimBB2 = $_POST["hiddenField16"];
$NossoNumC2_P1 = $_POST["hiddenField17"];
$AgenciaFim = $_POST["hiddenField18"];
$Dg_Agencia = $_POST["hiddenField19"];
$DvFim2 = $_POST["hiddenField20"];
$NumContaBB = $_POST["hiddenField21"];
$DvFimBB3 = $_POST["hiddenField22"];
$Campo3_1 = $_POST["hiddenField23"];
$Campo3_2 = $_POST["hiddenField24"];
$DvFim3 = $_POST["hiddenField25"];
$Dc11 = $_POST["hiddenField26"];
$Campo5 = $_POST["hiddenField27"];
$cod_banco = $_POST["hiddenField28"];
$titular_conta = $_POST["hiddenField29"];
$cod_agencia = $_POST["hiddenField30"];
$cedente = $_POST["hiddenField31"];
$dv_cedente = $_POST["hiddenField32"];
$numero = $_POST["hiddenField33"];
$C = $_POST["hiddenField81"];
$cod_empresa = $_POST["hiddenField35"];
$cod_familia = $_POST["hiddenField36"];
$data_emissao = $_POST["hiddenField37"];
$data_vencimento = $_POST["hiddenField38"];
$ValorFormat3 = $_POST["hiddenField39"];
$ValorFormat1 = $_POST["hiddenField40"];
$ValorFormatadoF = $_POST["hiddenField41"];
$nome_beneficiario = $_POST["hiddenField42"];
$mensagem1 = $_POST["hiddenField43"];
$carteira_cobranca = $_POST["hiddenField44"];
$mensagem2 = $_POST["hiddenField45"];
$mensagem3 = $_POST["hiddenField46"];
$mensagem4 = $_POST["hiddenField47"];
$Juros = $_POST["hiddenField48"];
$endereco = $_POST["hiddenField49"];
$bairro = $_POST["hiddenField50"];
$cep = $_POST["hiddenField51"];
$cidade = $_POST["hiddenField52"];
$uf = $_POST["hiddenField53"];
$CodBar = $_POST["hiddenField54"];
$cod_situacao_agru = $_POST["hiddenField34"];
$data_nasc= "'".$dia_nasc."/".$mes_nasc."/".$ano_nasc."'";
$CodMoeda = '9';
$Linha_Dig_CEF_SIGCB = $_POST["hiddenField88"];
$Linha_Dig_CEF = $_POST["hiddenField89"];
$Linha_Dig_BB = $_POST["hiddenField90"];
if ($cod_agencia==747)
{$cod_agencia="0".$cod_agencia;}
?>
<body topmargin="0" marginheight="0">
<table width="671" border="1" align="center" cellpadding="0" cellspacing="0" bordercolor="#000000" class="boleto">
<tr>
<td><div align="right"><a href="#"></a>
<form>
<div align="center"><span class="boleto"> <strong>OBS: CONFIGURAR IMPRESSORA
PARA PAPEL CARTA(LETTER)</strong></span> </div>
</form>
</div></td>
</tr>
<tr>
<td align="left"><img src="imagens/logo.jpg" width="168" height="55"></td>
</tr>
<tr>
<td width="667" height="687"><table width="666" border="0" align="left" cellpadding="0" cellspacing="0" class="boleto">
<tr class="boleto">
<td width="666"><table width="664" border=0 cellpadding=0 cellspacing=0>
<tbody>
<tr>
<td height=13 colspan="6" valign=top class=cn><table width=664 border=0 cellpadding=0 cellspacing=0 class="boleto">
<!--DWLayoutTable-->
<tbody>
<tr>
<td width=113 height="31" align="center" valign="middle" class=cp><div align="center">
<p class="bc">
<? if ($cod_banco == 104)
{echo "<img src=imagens/logocaixa_30.jpg>"; }
if ($cod_banco == 1)
{echo "<img src=imagens/logobb_30.jpg>"; }?>
</p>
</div></td>
<td width=5> </td>
<td width=4 valign=bottom><img height=31 src=imagens/3.gif width=2 border=0></td>
<td width=60 align="center" valign=middle class=codbank><div align=center>
<p class="codbank"><? echo $CodBanco ?>-<? echo $dg_banco ?></p>
</div></td>
<td width=4 valign=bottom><img height=31 src=imagens/3.gif width=2 border=0></td>
<td width=480 align=right valign=middle class=bcc><strong><?
//////trecho modificado (linha digitavel) para o boleto de crateus - SIGCB
if (strlen($numero)<15)
{
echo $CodBanco.$CodMoeda.$NossoNum1.".".$NossoNum4.$Dv1." ";
if ($CodBancoBB==001) {echo $NossoNumBBSDV.$DvFimBB2." ";}
if ($CodBanco==104) {echo $NossoNumC2_P1.".".$AgenciaFim.substr($Dg_Agencia,0,1).$DvFim2." ";}
if ($CodBancoBB==001) {echo $NumContaBB.$DvFimBB3." ";}
if ($CodBanco==104) {echo $Campo3_1.$Campo3_2.$DvFim3." ";}
echo $Dc11." ".$Campo5;
}
if (strlen($numero)>15)
{
echo $Linha_Dig_CEF_SIGCB;
} ?> </strong></td>
</tr>
<tr>
<td colspan=6><img height=2 src=imagens/2.gif width=666 border=0></td>
</tr>
</tbody>
</table></td>
</tr>
<tr>
<td class=cn valign=top width=7 height=13><img height=13 src=imagens/1.gif width=1 border=0></td>
<td class=boleto valign=top width=300 height=13>Cedente</td>
<td class=cn valign=top width=10 height=13><img height=13 src=imagens/1.gif width=1 border=0></td>
<td class=boleto valign=top width=162 height=13>Agência/Código do Cedente</td>
<td class=cn valign=top width=7 height=13><img height=13 src=imagens/1.gif width=1 border=0></td>
<td class=boleto valign=top width=178 height=13>Nosso número</td>
</tr>
<tr class="boleto">
<td class=cn valign=top width=7 height=12><img height=18 src=imagens/1.gif width=1 border=0></td>
<td class=cn valign=top width=300 height=12><? echo $titular_conta ?> </td>
<td class=cn valign=top width=10 height=12><img height=18 src=imagens/1.gif width=1 border=0></td>
<td class=cn valign=top width=162 height=12><? echo $C ?>.<? echo $Dg_Agencia?>
/<? echo $cedente ?> - <? echo $dv_cedente ?></td>
<td class=cn valign=top width=7 height=12><img height=18 src=imagens/1.gif width=1 border=0></td>
<td class=cp valign=top align=right width=178 height=12><span class="cn">
<?
if (strlen($numero)==12){echo substr($numero,0,11)."-".substr($numero,11,1);}
if (strlen($numero)==11){echo substr($numero,0,10)."-".substr($numero,10,1);}
if (strlen($numero)>15){echo substr($numero,0,17)."-".substr($numero,17,1);}
?>
</span></td>
</tr>
<tr>
<td width=7 height=1 valign=top class="cn"><img height=1 src=imagens/2.gif width=7 border=0></td>
<td width=300 height=1 valign=top class="cn"><img height=1 src=imagens/2.gif width=298 border=0></td>
<td width=10 height=1 valign=top class="cn"><img height=1 src=imagens/2.gif width=7 border=0></td>
<td width=162 height=1 valign=top class="cn"><img height=1 src=imagens/2.gif width=162 border=0></td>
<td width=7 height=1 valign=top class="cn"><img height=1 src=imagens/2.gif width=7 border=0></td>
<td width=178 height=1 valign=top class="cn"><img height=1 src=imagens/2.gif width=178 border=0></td>
</tr>
</tbody>
</table>
<table cellspacing=0 cellpadding=0 border=0>
<!--DWLayoutTable-->
<tbody>
<tr class="boleto">
<td class=cn valign=top width=7 height=13><img height=13 src=imagens/1.gif width=1 border=0></td>
<td valign=top class=cn>Número do documento</td>
<td valign=top class=cn>Data do Documento</td>
<td class=cn valign=top width=7><img height=13 src=imagens/1.gif width=1 border=0></td>
<td class=cn valign=top width=134>Vencimento</td>
<td class=cn valign=top width=7><img height=13 src=imagens/1.gif width=1 border=0></td>
<td class=cn valign=top width=180>Valor documento</td>
</tr>
<tr class="boleto">
<td class=cn valign=top width=7 height=18><img height=18 src=imagens/1.gif width=1 border=0></td>
<td width="192" valign=top class=cp><span class="cn"><? echo $cod_unimed?>-<? echo $cod_empresa ?>-<? echo $cod_familia ?></span></td>
<td class=cp valign=top width=134><span class="cn"><? echo substr($data_emissao,0,6)."20".substr($data_emissao,6,2)?> </span></td>
<td class=cn valign=top width=7><img height=18 src=imagens/1.gif width=1 border=0></td>
<td class=cp valign=top width=131><span class="cn"><? echo substr($data_vencimento,0,6)."20".substr($data_vencimento,6,2)?></span></td>
<td class=cn valign=top width=7><img height=18 src=imagens/1.gif width=1 border=0></td>
<td class=cp valign=top align=right width=180><span class="cn">
<? if (strlen($ValorFormat3)==8){ echo substr($ValorFormat3,0,2).".".substr($ValorFormat3,2,3).".".substr($ValorFormat3,5,3).",".$ValorFormat1;}
if (strlen($ValorFormat3)==7){ echo substr($ValorFormat3,0,1).".".substr($ValorFormat3,1,3).".".substr($ValorFormat3,4,3).",".$ValorFormat1;}
if (strlen($ValorFormat3)==6){ echo substr($ValorFormat3,0,3).".".substr($ValorFormat3,3,3).",".$ValorFormat1;}
if (strlen($ValorFormat3)==5){ echo substr($ValorFormat3,0,2).".".substr($ValorFormat3,2,3).",".$ValorFormat1;}
if (strlen($ValorFormat3)==4){ echo substr($ValorFormat3,0,1).".".substr($ValorFormat3,1,3).",".$ValorFormat1;}
if ((strlen($ValorFormat3)==3) || (strlen($ValorFormat3)==2) || (strlen($ValorFormat3)==1)) {echo $ValorFormatadoF;}
?> </span></td>
</tr>
<tr class="boleto">
<td width=7 height=1 valign=top class="cn"><img height=1 src=imagens/2.gif width=7 border=0></td>
<td valign=top class="cn"><img height=1 src=imagens/2.gif width=192 border=0></td>
<td valign=top class="cn"><img height=1 src=imagens/2.gif width=139 border=0></td>
<td width=7 valign=top class="cn"><img height=1 src=imagens/2.gif width=7 border=0></td>
<td width=134 valign=top class="cn"><img height=1 src=imagens/2.gif width=134 border=0></td>
<td width=7 valign=top class="cn"><img height=1 src=imagens/2.gif width=7 border=0></td>
<td width=180 valign=top class="cn"><img height=1 src=imagens/2.gif width=180 border=0></td>
</tr>
</tbody>
</table>
<table cellspacing=0 cellpadding=0 border=0>
<tbody>
<tr class="boleto">
<td class=ct valign=top width=7 height=13><img height=13 src=imagens/1.gif width=1 border=0></td>
<td class=ct valign=top width=659 height=13>Sacado</td>
</tr>
<tr class="boleto">
<td class=cp valign=top width=7 height=12><img height=18 src=imagens/1.gif width=1 border=0></td>
<td class=cn valign=top width=659 height=12><? echo $nome_beneficiario?> </td>
</tr>
<tr>
<td valign=top width=7 height=1><img height=1 src=imagens/2.gif width=7 border=0></td>
<td valign=top width=659 height=1><img height=1 src=imagens/2.gif width=659 border=0></td>
</tr>
</tbody>
</table>
<table cellspacing=0 cellpadding=0 border=0>
<tbody>
<tr class="boleto">
<td class=ct width=7 height=12></td>
<td class=ct width=564 >Instruções</td>
<td class=ct width=7 height=12></td>
<td class=ct width=88 >Autenticação mecânica</td>
</tr>
<tr>
<td width=7 ></td>
<td width=564 ></td>
<td width=7 ></td>
<td width=88 ></td>
</tr>
</tbody>
</table>
<table cellspacing=0 cellpadding=0 width=666 border=0>
<tbody>
<tr class="boleto">
<td></td>
</tr>
<tr class="boleto">
<td><? echo $mensagem1?> </td>
</tr>
</tbody>
</table>
<table width=666 border=0 cellpadding=0 cellspacing=0 bordercolor="#000000">
<tr>
<td class=boleto width=666></td>
</tr>
<tbody>
<tr class="boleto">
<td ><span class="boleto">
<? if (($cod_situacao_agru)==2)
{
$query2 ="SELECT TO_CHAR(ma.DATA_AGRUPAMENTO, 'DD/MM/YY') AGRUPAMENTOS, ma.valor, ma.multa, ma.juros
from mov_agrupamentos ma
where ma.cod_unimed = $cod_unimed
and ma.cod_empresa = $cod_empresa
and ma.cod_familia = $cod_familia
AND TO_CHAR(ma.DATA_VENCIMENTO, 'MM') = $mes_referencia
AND TO_CHAR(ma.DATA_VENCIMENTO, 'YYYY') =$ano";
/* $query2 = OCIParse($conn,$query2) or die("Erro na análise da cláusula Select");
OCIExecute($query2,OCI_COMMIT_ON_SUCCES);
while (OCIFetch($query2))
{
$data_agrupamento = ociresult($query2,"DATA_AGRUPAMENTO");
$data_vencimento = ociresult($query2,"DATA_VENCIMENTO");
$valoragrup = ociresult($query2,"VALOR");
$multaagrup = ociresult($query2,"MULTA");
$jurosagrup = ociresult($query2,"JUROS");
}*/
//codigo para registros e pôr em um array
$queryarray = OCIParse($conn,$query2) or die("Erro na análise da clausula Select");
OCIExecute($queryarray);//,OCI_COMMIT_ON_SUCCESS);
$nrows = OCIFetchStatement($queryarray,$X);
if ( $nrows > 0 )
{
print "<TABLE BORDER=\"0\" class='boleto'>\n";
print "<TR>\n";
while ( list( $key, $val ) = each( $X) )
{
print "<TH>$key</TH>\n";
}
print "</TR>\n";
for ( $i = 0; $i < $nrows; $i++ )
{
reset($X);
print "<TR>\n";
while ( $column = each($X) )
{
$data = $column['value'];
print "<TD>$data[$i]</TD>\n";
}
print "</TR>\n";
}
print "</TABLE>\n";
}
else
{
// echo "No data found<BR>\n";
}
//print "$nrows Records Selected<BR>\n";
}
?>
</span>
<div align="right"><strong>Via do Usuário </strong></div></td>
</tr>
<tr class="boleto">
<td width=666 height="151" class=boleto><div align="center"><span class="cp">----------------------------------------------------------------------------------------------------------------------------------------------------------------------</span></div>
<table width="664" border=0 cellpadding=0 cellspacing=0>
<tbody>
<tr>
<td height=13 colspan="6" valign=top class=cn><table width=664 border=0 cellpadding=0 cellspacing=0 class="boleto">
<!--DWLayoutTable-->
<tbody>
<tr>
<td width=113 height="31" align="center" valign="middle" class=cp><div align="center">
<p class="bc">
<? if ($cod_banco == 104)
{echo "<img src=imagens/logocaixa_30.jpg>"; }
if ($cod_banco == 1)
{echo "<img src=imagens/logobb_30.jpg>"; }?>
</p>
</div></td>
<td width=5> </td>
<td width=4 valign=bottom><img height=31 src=imagens/3.gif width=2 border=0></td>
<td width=60 align="center" valign=middle class=codbank><div align=center>
<p class="codbank"><? echo $CodBanco ?>-<? echo $dg_banco ?></p>
</div></td>
<td width=4 valign=bottom><img height=31 src=imagens/3.gif width=2 border=0></td>
<td width=480 align=right valign=middle class=bcc><strong>
<?
//////trecho modificado (linha digitavel) para o boleto de crateus - SIGCB
if (strlen($numero)<15)
{
echo $CodBanco.$CodMoeda.$NossoNum1.".".$NossoNum4.$Dv1." "; if ($CodBancoBB==001) {echo $NossoNumBBSDV.$DvFimBB2." ";}
if ($CodBanco==104) {echo $NossoNumC2_P1.".".$AgenciaFim.substr($Dg_Agencia,0,1).$DvFim2." ";}
if ($CodBancoBB==001) {echo $NumContaBB.$DvFimBB3." ";} if($CodBanco==104) {echo $Campo3_1.$Campo3_2.$DvFim3." ";}echo $Dc11." ".$Campo5;
}
if (strlen($numero)>15)
{
echo $Linha_Dig_CEF_SIGCB;
} ?>
</strong></td>
</tr>
<tr>
<td height="2" colspan=6><img height=2 src=imagens/2.gif width=666 border=0></td>
</tr>
</tbody>
</table></td>
</tr>
<tr>
<td class=cn valign=top width=7 height=13><img height=13 src=imagens/1.gif width=1 border=0></td>
<td class=boleto valign=top width=300 height=13>Cedente</td>
<td class=cn valign=top width=10 height=13><img height=13 src=imagens/1.gif width=1 border=0></td>
<td class=boleto valign=top width=162 height=13>Agência/Código do Cedente</td>
<td class=cn valign=top width=7 height=13><img height=13 src=imagens/1.gif width=1 border=0></td>
<td class=boleto valign=top width=178 height=13>Nosso número</td>
</tr>
<tr class="boleto">
<td class=cn valign=top width=7 height=12><img height=18 src=imagens/1.gif width=1 border=0></td>
<td class=cn valign=top width=300 height=12><? echo $titular_conta ?> </td>
<td class=cn valign=top width=10 height=12><img height=18 src=imagens/1.gif width=1 border=0></td>
<td class=cn valign=top width=162 height=12><? echo $C ?>.<? echo $Dg_Agencia?> /<? echo $cedente ?> - <? echo $dv_cedente ?></td>
<td class=cn valign=top width=7 height=12><img height=18 src=imagens/1.gif width=1 border=0></td>
<td class=cp valign=top align=right width=178 height=12><span class="cn">
<?
if (strlen($numero)==12){echo substr($numero,0,11)."-".substr($numero,11,1);}
if (strlen($numero)==11){echo substr($numero,0,10)."-".substr($numero,10,1);}
if (strlen($numero)>15){echo substr($numero,0,17)."-".substr($numero,17,1);}
?>
</span></td>
</tr>
<tr>
<td width=7 height=1 valign=top class="cn"><img height=1 src=imagens/2.gif width=7 border=0></td>
<td width=300 height=1 valign=top class="cn"><img height=1 src=imagens/2.gif width=298 border=0></td>
<td width=10 height=1 valign=top class="cn"><img height=1 src=imagens/2.gif width=7 border=0></td>
<td width=162 height=1 valign=top class="cn"><img height=1 src=imagens/2.gif width=162 border=0></td>
<td width=7 height=1 valign=top class="cn"><img height=1 src=imagens/2.gif width=7 border=0></td>
<td width=178 height=1 valign=top class="cn"><img height=1 src=imagens/2.gif width=178 border=0></td>
</tr>
</tbody>
</table>
<table cellspacing=0 cellpadding=0 border=0>
<!--DWLayoutTable-->
<tbody>
<tr class="boleto">
<td class=cn valign=top width=7 height=13><img height=13 src=imagens/1.gif width=1 border=0></td>
<td valign=top class=cn>Número do documento</td>
<td valign=top class=cn>Data do Documento</td>
<td class=cn valign=top width=7><img height=13 src=imagens/1.gif width=1 border=0></td>
<td class=cn valign=top width=134>Vencimento</td>
<td class=cn valign=top width=7><img height=13 src=imagens/1.gif width=1 border=0></td>
<td class=cn valign=top width=180>Valor documento</td>
</tr>
<tr class="boleto">
<td class=cn valign=top width=7 height=18><img height=18 src=imagens/1.gif width=1 border=0></td>
<td width="192" valign=top class=cp><span class="cn"><? echo $cod_unimed?>-<? echo $cod_empresa ?>-<? echo $cod_familia ?></span></td>
<td class=cp valign=top width=134><span class="cn"><? echo substr($data_emissao,0,6)."20".substr($data_emissao,6,2)?> </span></td>
<td class=cn valign=top width=7><img height=18 src=imagens/1.gif width=1 border=0></td>
<td class=cp valign=top width=131><span class="cn"><? echo substr($data_vencimento,0,6)."20".substr($data_vencimento,6,2)?></span></td>
<td class=cn valign=top width=7><img height=18 src=imagens/1.gif width=1 border=0></td>
<td class=cp valign=top align=right width=180><span class="boleto">
<? if (strlen($ValorFormat3)==8){ echo substr($ValorFormat3,0,2).".".substr($ValorFormat3,2,3).".".substr($ValorFormat3,5,3).",".$ValorFormat1;}
if (strlen($ValorFormat3)==7){ echo substr($ValorFormat3,0,1).".".substr($ValorFormat3,1,3).".".substr($ValorFormat3,4,3).",".$ValorFormat1;}
if (strlen($ValorFormat3)==6){ echo substr($ValorFormat3,0,3).".".substr($ValorFormat3,3,3).",".$ValorFormat1;}
if (strlen($ValorFormat3)==5){ echo substr($ValorFormat3,0,2).".".substr($ValorFormat3,2,3).",".$ValorFormat1;}
if (strlen($ValorFormat3)==4){ echo substr($ValorFormat3,0,1).".".substr($ValorFormat3,1,3).",".$ValorFormat1;}
if ((strlen($ValorFormat3)==3) || (strlen($ValorFormat3)==2) || (strlen($ValorFormat3)==1)) {echo $ValorFormatadoF;}
?>
</span></td>
</tr>
<tr class="boleto">
<td width=7 height=1 valign=top class="cn"><img height=1 src=imagens/2.gif width=7 border=0></td>
<td valign=top class="cn"><img height=1 src=imagens/2.gif width=192 border=0></td>
<td valign=top class="cn"><img height=1 src=imagens/2.gif width=139 border=0></td>
<td width=7 valign=top class="cn"><img height=1 src=imagens/2.gif width=7 border=0></td>
<td width=134 valign=top class="cn"><img height=1 src=imagens/2.gif width=134 border=0></td>
<td width=7 valign=top class="cn"><img height=1 src=imagens/2.gif width=7 border=0></td>
<td width=180 valign=top class="cn"><img height=1 src=imagens/2.gif width=180 border=0></td>
</tr>
</tbody>
</table>
<br>
<div align="center"></div>
<div align="right" class="boleto"><strong>Via do Caixa </strong></div></td>
</tr>
</tbody>
</table>
<table width=664 border=0 cellpadding=0 cellspacing=0 class="boleto">
<!--DWLayoutTable-->
<tbody>
<tr>
<td height="14" colspan="6" align="center" valign="middle" class=cp>------------------------------------------------------------------------------------------------------------------------------------------------------------------</td>
</tr>
<tr>
<td width=113 height="31" align="center" valign="middle" class=cp>
<div align="center">
<p class="bc">
<? if ($cod_banco == 104)
{echo "<img src=imagens/logocaixa_30.jpg>"; }
if ($cod_banco == 1)
{echo "<img src=imagens/logobb_30.jpg>"; }?>
</p>
</div></td>
<td width=5> </td>
<td width=4 valign=bottom><img height=31 src=imagens/3.gif width=2 border=0></td>
<td width=60 align="center" valign=middle class=codbank> <div align=center>
<p class="codbank"><? echo $CodBanco ?>-<? echo $dg_banco ?></p>
</div></td>
<td width=4 valign=bottom><img height=31 src=imagens/3.gif width=2 border=0></td>
<td width=480 align=right valign=middle class=bcc><strong> <?
//////trecho modificado (linha digitavel) para o boleto de crateus - SIGCB
if (strlen($numero)<15)
{
echo $CodBanco.$CodMoeda.$NossoNum1.".".$NossoNum4.$Dv1." "; if ($CodBancoBB==001) {echo $NossoNumBBSDV.$DvFimBB2." ";}
if ($CodBanco==104) {echo $NossoNumC2_P1.".".$AgenciaFim.substr($Dg_Agencia,0,1).$DvFim2." ";}
if ($CodBancoBB==001) {echo $NumContaBB.$DvFimBB3." ";} if($CodBanco==104) {echo $Campo3_1.$Campo3_2.$DvFim3." ";}echo $Dc11." ".$Campo5;
}
if (strlen($numero)>15)
{
echo $Linha_Dig_CEF_SIGCB;
} ?> </strong></td>
</tr>
<tr>
<td colspan=6><img height=2 src=imagens/2.gif width=666 border=0></td>
</tr>
</tbody>
</table>
<table border=0 cellpadding=0 cellspacing=0 class="boleto">
<tbody>
<tr>
<td class=ct valign=top width=7 height=13><img height=13 src=imagens/1.gif width=1 border=0></td>
<td class=ct valign=top width=472 height=13>Local de pagamento</td>
<td class=ct valign=top width=7 height=13><img height=13 src=imagens/1.gif width=1 border=0></td>
<td class=ct valign=top width=180 height=13>Vencimento</td>
</tr>
<tr>
<td class=cp valign=top width=7 height=12><img height=25 src=imagens/1.gif width=1 border=0></td>
<td class=cn valign=top width=472 height=12>PAGAVEL EM QUALQUER AGÊNCIA
BANCARIA </td>
<td class=cp valign=top width=7 height=12><img height=25 src=imagens/1.gif width=1 border=0></td>
<td class=cn valign=top align=right width=180 height=12> <? echo substr($data_vencimento,0,6)."20".substr($data_vencimento,6,2)?> </td>
</tr>
<tr>
<td valign=top width=7 height=1><img height=1 src=imagens/2.gif width=7 border=0></td>
<td valign=top width=472 height=1><img height=1 src=imagens/2.gif width=472 border=0></td>
<td valign=top width=7 height=1><img height=1 src=imagens/2.gif width=7 border=0></td>
<td valign=top width=180 height=1><img height=1 src=imagens/2.gif width=180 border=0></td>
</tr>
</tbody>
</table>
<table border=0 cellpadding=0 cellspacing=0 class="boleto">
<tbody>
<tr>
<td class=ct valign=top width=7 height=13><img height=13 src=imagens/1.gif width=1 border=0></td>
<td class=ct valign=top width=472 height=13>Cedente</td>
<td class=ct valign=top width=7 height=13><img height=13 src=imagens/1.gif width=1 border=0></td>
<td class=ct valign=top width=180 height=13>Agência/Código cedente</td>
</tr>
<tr>
<td class=cp valign=top width=7 height=12><img height=18 src=imagens/1.gif width=1 border=0></td>
<td class=cp valign=top width=472 height=12><?echo $titular_conta?> </td>
<td class=cp valign=top width=7 height=12><img height=18 src=imagens/1.gif width=1 border=0></td>
<td class=cn valign=top align=right width=180 height=12><? echo $cod_agencia ?>
- <? echo $Dg_Agencia?>/<? echo $cedente ?> - <? echo $dv_cedente ?></td>
</tr>
<tr>
<td valign=top width=7 height=1><img height=1 src=imagens/2.gif width=7 border=0></td>
<td valign=top width=472 height=1><img height=1 src=imagens/2.gif width=472 border=0></td>
<td valign=top width=7 height=1><img height=1 src=imagens/2.gif width=7 border=0></td>
<td valign=top width=180 height=1><img height=1 src=imagens/2.gif width=180 border=0></td>
</tr>
</tbody>
</table>
<table width="666" border=0 cellpadding=0 cellspacing=0 class="boleto">
<tbody>
<tr>
<td class=ct valign=top width=7 height=13><img height=13 src=imagens/1.gif width=1 border=0></td>
<td class=ct valign=top width=113 height=13>Data do documento</td>
<td class=ct valign=top width=7 height=13><img height=13 src=imagens/1.gif width=1 border=0></td>
<td class=ct valign=top width=163 height=13>N<u>o</u> documento</td>
<td class=ct valign=top width=62 height=13>Espécie Moeda.</td>
<td class=ct valign=top width=39 height=13>Aceite</td>
<td class=ct valign=top width=7 height=13><img height=13 src=imagens/1.gif width=1 border=0></td>
<td class=ct valign=top width=91 height=13>Data processamento</td>
<td class=ct valign=top width=7 height=13><img height=13 src=imagens/1.gif width=1 border=0></td>
<td class=ct valign=top width=180 height=13>Nosso número</td>
</tr>
<tr>
<td class=cp valign=top width=7 height=12><img height=18 src=imagens/1.gif width=1 border=0></td>
<td class=cn valign=top width=113 height=12><div align=left> <? echo substr($data_emissao,0,6)."20".substr($data_emissao,6,2)?> </div></td>
<td class=cp valign=top width=7 height=12><img height=18 src=imagens/1.gif width=1 border=0></td>
<td class=cn valign=top width=163 height=12><? echo $cod_unimed?>-<? echo $cod_empresa ?> - <? echo $cod_familia ?></td>
<td width=62 height=12 align="center" valign=top class=cp><div align=left>
<p class="cn">R$</p>
</div></td>
<td class=cp valign=top width=39 height=12><div align=left class="cn">N</div></td>
<td class=cp valign=top width=7 height=12><img height=18 src=imagens/1.gif width=1 border=0></td>
<td class=cn valign=top width=91 height=12>
<div align=left>
<? echo substr($data_emissao,0,6)."20".substr($data_emissao,6,2)?>
</div></td>
<td class=cp valign=top width=7 height=12><img height=18 src=imagens/1.gif width=1 border=0></td>
<td class=cn valign=top align=right width=180 height=12><span class="cn">
<? if (strlen($numero)==12){ echo substr($numero,0,11)."-".substr($numero,11,1);}
if (strlen($numero)==11){ echo substr($numero,0,10)."-".substr($numero,10,1);}
if (strlen($numero)>15){echo substr($numero,0,17)."-".substr($numero,17,1);}?>
</span> </td>
</tr>
<tr>
<td valign=top width=7 height=1><img height=1 src=imagens/2.gif width=7 border=0></td>
<td valign=top width=113 height=1><img height=1 src=imagens/2.gif width=113 border=0></td>
<td valign=top width=7 height=1><img height=1 src=imagens/2.gif width=7 border=0></td>
<td valign=top width=163 height=1><img height=1 src=imagens/2.gif width=163 border=0></td>
<td valign=top width=62 height=1><img height=1 src=imagens/2.gif width=62 border=0></td>
<td valign=top width=39 height=1><img height=1 src=imagens/2.gif width=34 border=0></td>
<td valign=top width=7 height=1><img height=1 src=imagens/2.gif width=7 border=0></td>
<td valign=top width=91 height=1><img height=1 src=imagens/2.gif width=72 border=0></td>
<td valign=top width=7 height=1><img height=1 src=imagens/2.gif width=7 border=0></td>
<td valign=top width=180 height=1><img height=1 src=imagens/2.gif width=180 border=0></td>
</tr>
</tbody>
</table>
<table border=0 cellpadding=0 cellspacing=0 class="boleto">
<tbody>
<tr>
<td class=ct valign=top width=7 height=13><img height=13 src=imagens/1.gif width=1 border=0></td>
<td class=ct valign=top COLSPAN="3" height=13>N° da Conta/Resp.</td>
<td class=ct valign=top height=13 width=7><img height=13 src=imagens/1.gif width=1 border=0></td>
<td class=ct valign=top width=83 height=13>Carteira</td>
<td class=ct valign=top height=13 width=7><img height=13 src=imagens/1.gif width=1 border=0></td>
<td class=ct valign=top width=53 height=13>Espécie Doc.</td>
<td class=ct valign=top height=13 width=7><img height=13 src=imagens/1.gif width=1 border=0></td>
<td class=ct valign=top width=123 height=13>Quantidade</td>
<td class=ct valign=top height=13 width=7><img height=13 src=imagens/1.gif width=1 border=0></td>
<td class=ct valign=top width=72 height=13> Valor </td>
<td class=ct valign=top width=7 height=13><img height=13 src=imagens/1.gif width=1 border=0></td>
<td class=ct valign=top width=180 height=13>(=) Valor documento</td>
</tr>
<tr>
<td class=cp valign=top width=7 height=12><img height=18 src=imagens/1.gif width=1 border=0></td>
<td valign=top class=cp height=12 COLSPAN="3"><div align=left> </div></td>
<td class=cp valign=top width=7 height=12><img height=18 src=imagens/1.gif width=1 border=0></td>
<td class=cn valign=top width=83><div align=left> <? echo $carteira_cobranca?> </div></td>
<td class=cp valign=top width=7 height=12><img height=18 src=imagens/1.gif width=1 border=0></td>
<td width=53 align="center" valign=top class=cp><div align=left>
<p class="cn">DM</p>
</div></td>
<td class=cp valign=top width=7 height=12><img height=18 src=imagens/1.gif width=1 border=0></td>
<td class=cp valign=top width=123> </td>
<td class=cp valign=top width=7 height=12><img height=18 src=imagens/1.gif width=1 border=0></td>
<td class=cp valign=top width=72> </td>
<td class=cp valign=top width=7 height=12><img height=18 src=imagens/1.gif width=1 border=0></td>
<td class=cn valign=top align=right width=180 height=12><? if (strlen($ValorFormat3)==8){ echo substr($ValorFormat3,0,2).".".substr($ValorFormat3,2,3).".".substr($ValorFormat3,5,3).",".$ValorFormat1;}
if (strlen($ValorFormat3)==7){ echo substr($ValorFormat3,0,1).".".substr($ValorFormat3,1,3).".".substr($ValorFormat3,4,3).",".$ValorFormat1;}
if (strlen($ValorFormat3)==6){ echo substr($ValorFormat3,0,3).".".substr($ValorFormat3,3,3).",".$ValorFormat1;}
if (strlen($ValorFormat3)==5){ echo substr($ValorFormat3,0,2).".".substr($ValorFormat3,2,3).",".$ValorFormat1;}
if (strlen($ValorFormat3)==4){ echo substr($ValorFormat3,0,1).".".substr($ValorFormat3,1,3).",".$ValorFormat1;}
if ((strlen($ValorFormat3)==3) || (strlen($ValorFormat3)==2) || (strlen($ValorFormat3)==1)) {echo $ValorFormatadoF;}
?></td>
</tr>
<tr>
<td valign=top width=7 height=1><img height=1 src=imagens/2.gif width=7 border=0></td>
<td valign=top width=7 height=1><img height=1 src=imagens/2.gif width=75 border=0></td>
<td valign=top width=7 height=1><img height=1 src=imagens/2.gif width=7 border=0></td>
<td valign=top width=31 height=1><img height=1 src=imagens/2.gif width=31 border=0></td>
<td valign=top width=7 height=1><img height=1 src=imagens/2.gif width=7 border=0></td>
<td valign=top width=83 height=1><img height=1 src=imagens/2.gif width=83 border=0></td>
<td valign=top width=7 height=1><img height=1 src=imagens/2.gif width=7 border=0></td>
<td valign=top width=53 height=1><img height=1 src=imagens/2.gif width=53 border=0></td>
<td valign=top width=7 height=1><img height=1 src=imagens/2.gif width=7 border=0></td>
<td valign=top width=123 height=1><img height=1 src=imagens/2.gif width=123 border=0></td>
<td valign=top width=7 height=1><img height=1 src=imagens/2.gif width=7 border=0></td>
<td valign=top width=72 height=1><img height=1 src=imagens/2.gif width=72 border=0></td>
<td valign=top width=7 height=1><img height=1 src=imagens/2.gif width=7 border=0></td>
<td valign=top width=180 height=1><img height=1 src=imagens/2.gif width=180 border=0></td>
</tr>
</tbody>
</table>
<table cellspacing=0 cellpadding=0 width=666 border=0>
<tbody>
<tr>
<td align=right width=10><table cellspacing=0 cellpadding=0 border=0 align=left>
<tbody>
<tr>
<td class=ct valign=top width=7 height=13><img height=13 src=imagens/1.gif width=1 border=0></td>
</tr>
<tr>
<td class=cp valign=top width=7 height=12><img height=12 src=imagens/1.gif width=1 border=0></td>
</tr>
<tr>
<td valign=top width=7 height=1><img height=1 src=imagens/2.gif width=1 border=0></td>
</tr>
</tbody>
</table></td>
<td width=468 rowspan=5 valign=top class="boleto">Instruções (Texto de responsabilidade
do cedente)<br>
<? echo $mensagem1 ?><br>
<? echo $mensagem2 ?><br>
<? echo $mensagem3 ?><br>
<? echo $mensagem4 ?><span class=cp><br>
</span> APÓS O VENCIMENTO COBRAR JUROS DE R$ <? echo number_format(round($Juros, 2), 2, ',', '.');// str_replace('.',',',$Juros)?>
AO DIA E MULTA DE 2%.<br> </td>
<td width=188 align=right class="boleto"><table border=0 cellpadding=0 cellspacing=0 class="boleto">
<tbody>
<tr>
<td class=ct valign=top width=7 height=13><img height=13 src=imagens/1.gif width=1 border=0></td>
<td class=ct valign=top width=180 height=13>(-) Desconto / Abatimentos</td>
</tr>
<tr>
<td class=cp valign=top width=7 height=12><img height=12 src=imagens/1.gif width=1 border=0></td>
<td class=cp valign=top align=right width=180 height=12></td>
</tr>
<tr>
<td valign=top width=7 height=1><img height=1 src=imagens/2.gif width=7 border=0></td>
<td valign=top width=180 height=1><img height=1 src=imagens/2.gif width=180 border=0></td>
</tr>
</tbody>
</table></td>
</tr>
<tr>
<td align=right width=10><table cellspacing=0 cellpadding=0 border=0 align=left>
<tbody>
<tr>
<td class=ct valign=top width=7 height=13><img height=13 src=imagens/1.gif width=1 border=0></td>
</tr>
<tr>
<td class=cp valign=top width=7 height=12><img height=12 src=imagens/1.gif width=1 border=0></td>
</tr>
<tr>
<td valign=top width=7 height=1><img height=1 src=imagens/2.gif width=1 border=0></td>
</tr>
</tbody>
</table></td>
<td width=188 align=right class="boleto"><table cellspacing=0 cellpadding=0 border=0>
<tbody>
<tr>
<td class=ct valign=top width=7 height=13><img height=13 src=imagens/1.gif width=1 border=0></td>
<td class=boleto valign=top width=180 height=13>(-) Outras deduções</td>
</tr>
<tr>
<td class=cp valign=top width=7 height=12><img height=12 src=imagens/1.gif width=1 border=0></td>
<td class=cp valign=top align=right width=180 height=12></td>
</tr>
<tr>
<td valign=top width=7 height=1><img height=1 src=imagens/2.gif width=7 border=0></td>
<td valign=top width=180 height=1><img height=1 src=imagens/2.gif width=180 border=0></td>
</tr>
</tbody>
</table></td>
</tr>
<tr>
<td align=right width=10><table cellspacing=0 cellpadding=0 border=0 align=left>
<tbody>
<tr>
<td class=ct valign=top width=7 height=13><img height=13 src=imagens/1.gif width=1 border=0></td>
</tr>
<tr>
<td class=cp valign=top width=7 height=12><img height=12 src=imagens/1.gif width=1 border=0></td>
</tr>
<tr>
<td valign=top width=7 height=1><img height=1 src=imagens/2.gif width=1 border=0></td>
</tr>
</tbody>
</table></td>
<td width=188 align=right class="boleto"><table cellspacing=0 cellpadding=0 border=0>
<tbody>
<tr>
<td class=ct valign=top width=7 height=13><img height=13 src=imagens/1.gif width=1 border=0></td>
<td class=boleto valign=top width=180 height=13>(+) Mora / Multa</td>
</tr>
<tr>
<td class=cp valign=top width=7 height=12><img height=12 src=imagens/1.gif width=1 border=0></td>
<td class=cp valign=top align=right width=180 height=12></td>
</tr>
<tr>
<td valign=top width=7 height=1><img height=1 src=imagens/2.gif width=7 border=0></td>
<td valign=top width=180 height=1><img height=1 src=imagens/2.gif width=180 border=0></td>
</tr>
</tbody>
</table></td>
</tr>
<tr>
<td align=right width=10><table cellspacing=0 cellpadding=0 border=0 align=left>
<tbody>
<tr>
<td class=ct valign=top width=7 height=13><img height=13 src=imagens/1.gif width=1 border=0></td>
</tr>
<tr>
<td class=cp valign=top width=7 height=12><img height=12 src=imagens/1.gif width=1 border=0></td>
</tr>
<tr>
<td valign=top width=7 height=1><img height=1 src=imagens/2.gif width=1 border=0></td>
</tr>
</tbody>
</table></td>
<td width=188 align=right class="boleto"><table cellspacing=0 cellpadding=0 border=0>
<tbody>
<tr>
<td class=ct valign=top width=7 height=13><img height=13 src=imagens/1.gif width=1 border=0></td>
<td class=boleto valign=top width=180 height=13>(+) Outros acréscimos</td>
</tr>
<tr>
<td class=cp valign=top width=7 height=12><img height=12 src=imagens/1.gif width=1 border=0></td>
<td class=cp valign=top align=right width=180 height=12></td>
</tr>
<tr>
<td valign=top width=7 height=1><img height=1 src=imagens/2.gif width=7 border=0></td>
<td valign=top width=180 height=1><img height=1 src=imagens/2.gif width=180 border=0></td>
</tr>
</tbody>
</table></td>
</tr>
<tr>
<td align=right width=10><table cellspacing=0 cellpadding=0 border=0 align=left>
<tbody>
<tr>
<td class=ct valign=top width=7 height=13><img height=13 src=imagens/1.gif width=1 border=0></td>
</tr>
<tr>
<td class=cp valign=top width=7 height=12><img height=12 src=imagens/1.gif width=1 border=0></td>
</tr>
</tbody>
</table></td>
<td width=188 align=right class="boleto"><table cellspacing=0 cellpadding=0 border=0>
<tbody>
<tr>
<td class=ct valign=top width=7 height=13><img height=13 src=imagens/1.gif width=1 border=0></td>
<td class=boleto valign=top width=180 height=13>(=) Valor cobrado</td>
</tr>
<tr>
<td class=cp valign=top width=7 height=12><img height=12 src=imagens/1.gif width=1 border=0></td>
<td class=cp valign=top align=right width=180 height=12></td>
</tr>
</tbody>
</table></td>
</tr>
</tbody>
</table>
<table cellspacing=0 cellpadding=0 width=666 border=0>
<tbody>
<tr>
<td valign=top width=666 height=1><img height=1 src=imagens/2.gif width=666 border=0></td>
</tr>
</tbody>
</table>
<table width="665" border=0 cellpadding=0 cellspacing=0>
<tbody>
<tr>
<td class=ct valign=top width=4 height=13><img height=13 src=imagens/1.gif width=1 border=0></td>
<td class=boleto valign=top width=660 height=13>Sacado</td>
</tr>
<tr class="boleto">
<td class=cp valign=top width=4 height=12><img height=18 src=imagens/1.gif width=1 border=0></td>
<td class=cn valign=top width=660 height=12><? echo $nome_beneficiario; ?> </td>
</tr>
</tbody>
</table>
<table width="665" border=0 cellpadding=0 cellspacing=0>
<tbody>
<tr class="boleto">
<td class=cp valign=top width=4 height=12><img height=18 src=imagens/1.gif width=1 border=0></td>
<td class=cp valign=top width=528 height=12><? echo $endereco, $bairro ?> </td>
</tr>
</tbody>
</table>
<table cellspacing=0 cellpadding=0 border=0>
<tbody>
<tr class="boleto">
<td class=ct valign=top width=7 height=13><img height=18 src=imagens/1.gif width=1 border=0></td>
<td class=boleto valign=top width=472 height=13><? echo substr($cep,0,5)."-".substr($cep,5,3)?>
<? echo $cidade?> - <? echo $uf?></td>
<td class=boleto valign=top width=7 height=13><img height=18 src=imagens/1.gif width=1 border=0></td>
<td class=boleto valign=top width=180 height=13>Cód. baixa</td>
</tr>
<tr>
<td valign=top width=7 height=1><img height=1 src=imagens/2.gif width=7 border=0></td>
<td valign=top width=472 height=1><img height=1 src=imagens/2.gif width=472 border=0></td>
<td valign=top width=7 height=1><img height=1 src=imagens/2.gif width=7 border=0></td>
<td valign=top width=180 height=1><img height=1 src=imagens/2.gif width=180 border=0></td>
</tr>
</tbody>
</table>
<TABLE cellSpacing=0 cellPadding=0 border=0 width=666>
<TBODY>
<TR class="boleto">
<TD class=ct width=7 height=12></TD>
<TD class=boleto width=409 > </TD>
<TD class=boleto width=250 ><div align=right>Autenticação mecânica - <b class=cp>Ficha
de Compensaçã</b><b class=cp>o</b></div></TD>
</TR>
<TR>
<TD class=ct colspan=3 ></TD>
</tr>
</tbody>
</table>
<TABLE cellSpacing=0 cellPadding=0 width=666 border=0>
<TBODY>
<TR class="boleto"> </tr>
</tbody>
</table></td>
</tr>
</table></td>
</tr>
</table>
<br>
<table width="666" border="0" align="center" cellpadding="0" cellspacing="0" class="boleto">
<tr class="boleto">
<td><?php // Definimos as dimensões das imagens
$fino = 1;
$largo = 3;
$altura = 40;
// Criamos um array associativo com os binários
$Bar[0] = "00110";
$Bar[1] = "10001";
$Bar[2] = "01001";
$Bar[3] = "11000";
$Bar[4] = "00101";
$Bar[5] = "10100";
$Bar[6] = "01100";
$Bar[7] = "00011";
$Bar[8] = "10010";
$Bar[9] = "01010";
// Inicio padrão do Código de Barras
echo "<img src=imagens/preto.gif width=$fino height=$altura border=0>";
echo "<img src=imagens/branco.gif width=$fino height=$altura border=0>";
echo "<img src=imagens/preto.gif width=$fino height=$altura border=0>";
echo "<img src=imagens/branco.gif width=$fino height=$altura border=0>";
// Checando para saber se o conteúdo é impar
if (bcmod(strlen($CodBar),2) <> 0)
{ $CodBar = '0'.$CodBar; }
for ($a = 0; $a < strlen($CodBar); $a++)
{
$Preto = $CodBar[$a];
$CodPreto = $Bar[$Preto];
$a = $a+1;
// Sabemos que o Branco é um depois do Preto...
$Branco = $CodBar[$a];
$CodBranco = $Bar[$Branco];
// Encontrado o CodPreto e o CodBranco vamos fazer outro looping dentro do nosso
for ($y = 0; $y < 5; $y++) // O for vai pegar os binários
{
if ($CodPreto[$y] == '0') // Se o binario for preto e fino ecoa
{echo "<img src=imagens/preto.gif width=$fino height=$altura border=0>"; }
if ($CodPreto[$y] == '1')// Se o binario for preto e grosso ecoa
{echo "<img src=imagens/preto.gif width=$largo height=$altura border=0>"; }
if ($CodBranco[$y] == '0') // Se o binario for branco e fino ecoa
{echo "<img src=imagens/branco.gif width=$fino height=$altura border=0>";}
if($CodBranco[$y] == '1') // Se o binario for branco e grosso ecoa
{echo "<img src=imagens/branco.gif width=$largo height=$altura border=0>";}
}
} // Fechamos nosso looping maior
// Encerramos o código ecoando o final(encerramento)
// Final padrão do Codigo de Barras
echo "<img src=imagens/preto.gif width=$largo height=$altura border=0>";
echo "<img src=imagens/branco.gif width=$fino height=$altura border=0>";
echo "<img src=imagens/preto.gif width=$fino height=$altura border=0>";
//echo $CodBar;
?><? ocilogoff($conn);?>
</td>
</tr>
</table>
<p> </p>
</body>
</html>