<body leftmargin="0" topmargin="0" marginwidth="0" marginheight="0" bgcolor="<?php 
echo $w01_corbody;
?>
" onLoad="" <?php 
mens_OnHelp();
?>
>
<br>
<center>
<?php 
//verifica se está logado
if (isset($id_usuario) && !empty($id_usuario)) {
    $sCampos = "distinct cgm.z01_numcgm, cgm.z01_cgccpf, cgm.z01_nome, protprocesso.p58_codproc, ";
    $sCampos .= "protprocesso.p58_dtproc, protprocesso.p58_obs";
    $sSqlProtProcesso = $clprotprocesso->sql_query(null, $sCampos, "protprocesso.p58_dtproc desc", "cgm.z01_numcgm = {$id_usuario}");
    $result = $clprotprocesso->sql_record($sSqlProtProcesso);
    $linhas = $clprotprocesso->numrows;
    if ($linhas != 0) {
        db_fieldsmemory($result, 0);
        //11 14
        if (strlen($z01_cgccpf) > 11) {
            $cgc = $z01_cgccpf;
            $cpf = "";
        } else {
            $cgc = "";
            $cpf = $z01_cgccpf;
        }
        //mostra encontrados
        ?>
   <a href="digitaconsultahabitacao.php?outro='outro processo'">:: Pesquisar Outro Processo ::</a><br><br>
   <b><?php 
$rsResultado = pg_fetch_assoc($sRetorno);
$nomeinstabrev = $rsResultado["nomeinstabrev"];
if (isset($codproc) && $codproc != "") {
    $head3 = "Consulta de Processo ";
    $head4 = "Processo N° {$codproc}";
    $pdf = new PDF();
    $pdf->Open();
    $pdf->AliasNbPages();
    $pdf->addpage('L');
    $total = 0;
    $pdf->setfillcolor(235);
    $pdf->setfont('arial', 'b', 8);
    $troca = 1;
    $alt = 4;
    $total = 0;
    $result_protprocesso = $clprotprocesso->sql_record($clprotprocesso->sql_query($codproc));
    if ($clprotprocesso->numrows != 0) {
        db_fieldsmemory($result_protprocesso, 0);
        $pdf->cell(50, $alt, 'Número de Controle do Processo :', 0, 0, "R", 0);
        $pdf->cell(75, $alt, $codproc, 0, 1, "L", 0);
        $pdf->cell(50, $alt, 'Número do Processo :', 0, 0, "R", 0);
        $pdf->cell(75, $alt, $p58_numero . '/' . $p58_ano, 0, 0, "L", 0);
        $pdf->cell(50, $alt, 'Titular do Processo :', 0, 0, "R", 0);
        $pdf->cell(75, $alt, $z01_nome, 0, 1, "L", 0);
        $pdf->cell(50, $alt, 'Data :', 0, 0, "R", 0);
        $pdf->cell(75, $alt, db_formatar($p58_dtproc, 'd'), 0, 0, "L", 0);
        $pdf->cell(50, $alt, 'Hora :', 0, 0, "R", 0);
        $pdf->cell(75, $alt, $p58_hora, 0, 1, "L", 0);
        $pdf->cell(50, $alt, 'Tipo :', 0, 0, "R", 0);
        $pdf->cell(75, $alt, $p51_descr, 0, 0, "L", 0);
        $pdf->cell(50, $alt, 'Atendente :', 0, 0, "R", 0);
<script>
  document.getElementById('int_perc1').style.visibility='visible';
</script>
<body leftmargin="0" topmargin="0" marginwidth="0" marginheight="0" bgcolor="<?php 
echo $w01_corbody;
?>
" onLoad="" <?php 
mens_OnHelp();
?>
>
<br>
<center>
<?php 
//verifica se está logado
if (@$id_usuario != "") {
    $result = $clprotprocesso->sql_record($clprotprocesso->sql_query("", "distinct cgm.z01_numcgm,cgm.z01_cgccpf,cgm.z01_nome,protprocesso.p58_codproc,protprocesso.p58_dtproc,protprocesso.p58_obs", "protprocesso.p58_dtproc desc", "cgm.z01_numcgm = {$id_usuario}"));
    $linhas = $clprotprocesso->numrows;
    if ($linhas != 0) {
        db_fieldsmemory($result, 0);
        //11 14
        if (strlen($z01_cgccpf) > 11) {
            $cgc = $z01_cgccpf;
            $cpf = "";
        } else {
            $cgc = "";
            $cpf = $z01_cgccpf;
        }
        //mostra encontrados
        ?>
   <a href="digitaprocesso.php?outro='outro processo'">:: Pesquisar Outro Processo ::</a><br><br>
   <b><?php