$rotulo->label("j13_descr");
$rotulo->label("z01_telef");
$rotulo->label("z01_numcgm");
$rotulo->label("j50_zona");
$rotulo->label("j50_descr");
$rotulo->label("q03_ativ");
$rotulo->label("q03_descr");
$rotulo->label("q86_numcgm");
$sCampos = 'mens, alinhamento';
$sWhereConfMensagem = "cod = 'simulacao_inscricao_cab' ";
$sSqlConfMensagem = $oDaoConfMensagem->sql_query(null, $sCampos, null, $sWhereConfMensagem);
$rsConfMensagem = $oDaoConfMensagem->sql_record($sSqlConfMensagem);
$oDadosConfMensagem = db_utils::fieldsMemory($rsConfMensagem, 0);
$sConfMensagem = $oDadosConfMensagem->mens;
$sAlinhamento = $oDadosConfMensagem->alinhamento;
db_logs(0, 0, 0, "Simulação de Inscrição ISS");
?>
<html>
<head>
<title>DBSeller Inform&aacute;tica Ltda - P&aacute;gina Inicial</title>
	<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
	<meta http-equiv="Expires" CONTENT="0">
	<script language="JavaScript" src="scripts/scripts.js"></script>
	<script language="JavaScript" src="scripts/strings.js"></script>
	<script language="JavaScript" src="scripts/prototype.js"></script>
	<script language="JavaScript" src="scripts/widgets/DBHint.widget.js"></script>
	<link rel="stylesheet" type="text/css" href="include/estilodai.css">
	<link rel="stylesheet" type="text/css" href="config/estilos.css">
	<style>
		body *{
			font-size: 11px
        onKeyPress="FormataCNPJ(this,event); return js_teclas(event);" size="18" maxlength="18"></td>
   </tr>
   <tr>
    <td width="50%" height="30" align="right">CPF:&nbsp;</td>
    <td width="50%" height="30"><input name="cpf" type="text" class="digitacgccpf" id="cpf" 
        onChange='js_teclas(event);'
        onKeyPress="FormataCPF(this,event); return js_teclas(event);" size="14" maxlength="14"></td>
   </tr>
   <tr>
    <td width="50%" height="30">&nbsp;</td>
    <td width="50%" height="30">
     <input type="hidden" name="opcao" value="n">
     <input class="botao" type="submit" name="pesquisa" value="Pesquisa" class="botaoconfirma">
    </td>
   </tr>
  </table>
 </form>
 <?php 
}
if (isset($funcao)) {
    echo "<script>alert('Código identificador dever ser preenchido')</script>";
}
db_logs("", "", 0, "Digita Codigo do Contribuinte.");
if (isset($erroscripts)) {
    echo "<script>\n         alert('" . $erroscripts . "');\n         location='digitacontribuinte.php?outro';\n        </script>";
}
?>
</center>
<script>
  document.getElementById('int_perc1').style.visibility='hidden';
</script>
}
//////////////////////////////////////////////////////////////
db_mensagem("opcoesfornecedor_cab", "opcoesfornecedor_rod");
mens_help();
?>
<html>
<head>
<title>opcoesimovel</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<script type="text/javascript" src="javascript/db_script.js"></script>
<script>
js_verificapagina("digitafornecedor.php,index.php");
</script>
</head>
<?php 
db_logs("", "", 0, "Fornecedor Pesquisado. CGCCPF: {$cgccpf}");
$dblink = "digitafornecedor.php";
?>
<body bgcolor="#00436e" text="#000000" leftmargin="0" topmargin="0" marginwidth="0" marginheight="0"   <?php 
mens_OnHelp();
?>
 >
<?php 
mens_div();
include "processando.php";
?>
<table width="657" height="100%" border="0" cellpadding="0" cellspacing="0" background="imagens/azul_ceu_O.jpg">
  <tr>
    <td height="13">
      <?php 
include "retornar.php";
Ejemplo n.º 4
0
    // sem estar logado
    if (!isset($DB_LOGADO)) {
        // entra aqui tb
        session_destroy();
    } else {
        session_register("DB_acesso");
    }
} else {
    session_register("DB_acesso");
}
db_mensagem("corpoprincipal", "mensagemsenha");
parse_str(base64_decode($HTTP_SERVER_VARS["QUERY_STRING"]));
if (isset($again)) {
    $cgm = $_SESSION['CGM'];
    setcookie("cookie_codigo_cgm");
    db_logs("", "", "{$cgm}", "index.php - usuario fez log-off.");
    db_redireciona("index.php");
}
if (isset($DB_login)) {
    //echo" entra aqui qd  o usuario esta logado no sistema";
    /**
     * Adicionada verificação para usuário externo
     */
    $sqllog = "select db_usuarios.id_usuario, senha, u.cgmlogin, usuarioativo         ";
    $sqllog .= "  from db_usuarios                                                     ";
    $sqllog .= "       inner join db_usuacgm u on u.id_usuario = db_usuarios.id_usuario";
    $sqllog .= " where login        = '******'                                      ";
    //$sqllog .= "   and usuext       = 1                                                ";
    $base = @$_SESSION["BASE"];
    if ($base != "") {
        $DB_BASEDADOS = $base;
                $sSenha = $oPost->senhasrv;
                //verifica se email
                if (isset($sEmailServ) && $sEmailServ != '') {
                    $sMsg = "Entre em contato com a Prefeitura para atualizar seu cadastrado.";
                    msgbox($sMsg);
                } else {
                    $mensagemDestinatario = "\n\t\t\t\t                         {$nomeinst}\n\t\t\t\t                         Esqueci Minha Senha - Prefeitura On-Line\n\t\t\t\t                         --------------------------------------------------------\n\t\t\t\t                         Nome:     {$z01_nome}\n\t\t\t\t                         CPF:      {$sCpf}\n\t\t\t\t                         E-mail:   {$sEmailServ}\n\n\t\t\t\t                         Atenção!\n\t\t\t\t                         Alguém tentou realizar um novo pedido de senha com seus dados.\n\t\t\t\t                         " . date("d/m/Y - H:i:s") . " - " . getenv("REMOTE_ADDR") . "\n\t\t\t\t                         Uma nova senha foi gerada para acesso ao Portal.\n\n\t\t\t\t                         Login Internet: {$z01_numcgm}\n\t\t\t\t                         Senha Internet: {$sSenha}\n\n\t\t\t\t                         Utilize Login e Senha para acessar suas informações no Portal da Prefeitura na Internet.\n\n\t\t\t\t                         {$url}/dbpref/\n\n\t\t\t\t                         Não responda este e-mail, ele foi gerado automaticamente pelo Servidor.\n\n\t\t\t\t                         --------------------------------------------------------\n\t\t\t\t";
                    $sTring = $clconfigdbpref->sql_record($clconfigdbpref->sql_query_file(db_getsession('DB_instit'), "w13_emailadmin"));
                    $rsConsultaConfigDBPref = $sTring;
                    db_fieldsmemory($rsConsultaConfigDBPref, 0);
                    if (isset($sEmailServ) && $sEmailServ != '') {
                        $oMail = new Smtp();
                        $oMail->Send($mailpref, $w13_emailadmin, 'Prefeitura On-Line - Esqueci Minha Senha', $mensagemDestinatario);
                        msgbox("Uma mensagem foi encaminhada para o e-mail: {$sEmailServ}");
                    }
                    db_logs("", "", 0, "Esqueci minha senha: cgc ou cpf - {$sCgcCpf}");
                }
            } else {
                $sMsg = "Dados informados NÃO encontrados no cadastro da Prefeitura!\\n\n                   Procure o balcão da Prefeitura para realizar seu cadastro.";
                msgbox($sMsg);
                db_redireciona("centro_pref.php");
            }
        } else {
            $sMsg = "Dados informados NÃO encontrados no cadastro da Prefeitura!\\n\n                 Procure o balcão da Prefeitura para realizar seu cadastro.";
            msgbox($sMsg);
            db_redireciona("centro_pref.php");
        }
    }
}
function formataDataNascBanco($sData)
{
session_start();
include "libs/db_conecta.php";
include "libs/db_stdlib.php";
include "libs/db_sql.php";
$result = db_query("SELECT distinct m_publico,m_arquivo,m_descricao\n                   FROM db_menupref\n                   WHERE m_arquivo = 'digitadae.php'\n                   ORDER BY m_descricao\n                   ");
db_fieldsmemory($result, 0);
if ($m_publico != 't') {
    if (!session_is_registered("DB_acesso")) {
        echo "<script>location.href='index.php?" . base64_encode('erroscripts=3') . "'</script>";
    }
    echo "<script>location.href='opcoesdae.php?nova=1'</script>";
}
$db_verifica_ip = db_verifica_ip();
mens_help();
$dblink = "digitadae.php";
db_logs("", "", 0, "Digita inscricao do Contribuinte.");
postmemory($HTTP_POST_VARS);
$clquery = new cl_query();
if (isset($nova)) {
    $clquery->sql_query("issbase", " q02_numcgm ", "", "q02_inscr  = {$inscricaow}");
    $clquery->sql_record($clquery->sql);
    $num = $clquery->numrows;
    if ($num != 0) {
        db_fieldsmemory($clquery->result, 0);
        $clquery->sql_query("cgm", "z01_nome, z01_numcgm", "", " z01_numcgm = {$q02_numcgm}");
        // select z01_nome, z01_numcgm from cgm where z01_numcgm = q02_numcgm
        $clquery->sql_record($clquery->sql);
        // conta as linhas no banco
        db_fieldsmemory($clquery->result, 0);
        // cria variaveis (z01_nome, z01_numcgm) apartir dos campos
    } else {
</form>
<?php 
}
?>
<table width="100%" border="0" cellspacing="0" cellpadding="0" class="texto">
 <tr>
  <td height="60" align="<?php 
echo $DB_align2;
?>
">
   <?php 
echo $DB_mens2;
?>
  </td>
 </tr>
</table>
</center>
</body>
</html>
<?php 
db_logs("", "", 0, "Digita Consulta da Habitação.");
if (isset($erroscripts)) {
    echo "<script> \n";
    echo "  alert('" . $erroscripts . "'); \n";
    echo "  location='digitaconsultahabitacao.php'; \n";
    echo "</script> \n";
}
?>
<script>
  document.getElementById('int_perc1').style.visibility='hidden';
</script>
        <input class="botao" type="submit" name="pesquisa" value="Pesquisa"
               onclick="return js_num_processo();" class="botaoconfirma">
      </td>
    </tr>
  </table>
</form>
<?php 
}
?>

<table width="100%" border="0" cellspacing="0" cellpadding="0" class="texto">
 <tr>
  <td height="60" align="<?php 
echo $DB_align2;
?>
">
   <?php 
echo $DB_mens2;
?>
  </td>
 </tr>
</table>
<?php 
db_logs("", "", 0, "Digita Codigo do Processo.");
if (isset($erroscripts)) {
    echo "<script>\n         alert('" . $erroscripts . "');\n         location='digitaprocesso.php';\n        </script>";
}
?>
<script>
  document.getElementById('int_perc1').style.visibility='hidden';
</script>
        db_fieldsmemory($result2, $x);
        if ($imobil == 0 && $iptubase == 1) {
            $redireciona = "opcoesdebitospendentes.php?" . base64_encode("matricula1={$j01_matric}&cgc={$z01_cgccpf}&opcao=m&id_usuario=" . @$id_usuario);
            if (!isset($DB_LOGADO)) {
                @(include $redireciona);
            } else {
                db_redireciona($redireciona);
            }
        }
        echo "<tr height=\"20\"><td><img src=\"imagens/seta.gif\" border=\"0\"></td><td align=\"right\"><a class=\"links\" href=\"opcoesdebitospendentes.php?" . base64_encode("matricula1={$j01_matric}&cgc={$z01_cgccpf}&opcao=m&id_usuario=" . @$id_usuario) . "\"><b>" . $j01_matric . "</b></a></td><td><a class='links' href=\"opcoesdebitospendentes.php?" . base64_encode("matricula1={$j01_matric}&cgc={$z01_cgccpf}&cpf={$z01_cgccpf}&opcao=m&id_usuario=" . @$id_usuario) . "\"> " . $z01_nome . " - " . $proprietario . "</a></td></tr>";
        echo "<tr height=\"1\" bgcolor=\"{$w01_corfundomenu}\"><td colspan=\"3\"></td></tr>";
    }
    ?>
</table><?php 
}
db_logs("", "", 0, "Digita Codigo da Matrícula.");
if (isset($erroscripts)) {
    echo "<script>alert('" . $erroscripts . "');</script>";
}
?>

<iframe src='captcha/pesquisa_captcha.php?code=<?php 
@$code;
?>
' name="pesquisacaptcha" style="visibility:hidden"></iframe>

<br><br>
</center>
</body>
</html>
  <td>                                                                                                                                                                                                          

<?php 
        $sUrlNome = base64_encode("matricula1={$j01_matric}&cgc={$z01_cgccpf}&cpf={$z01_cgccpf}&opcao=m&id_usuario=" . @$id_usuario);
        echo " <a class=\"links\" href=\"opcoescertidao.php?" . $sUrlNome . "\"> \n           " . $z01_nome . " - " . $proprietario . "\n         </a> ";
        ?>
  </td>                                                                                                                                                                                                        
</tr>                                             
<tr height="1" bgcolor="<?php 
        echo $w01_corfundomenu;
        ?>
">  
  <td colspan="3"></td>                                                                                                                                                                                                        
</tr>
<?php 
    }
    ?>
</table>
</center>
<?php 
}
db_logs("", "", 0, "Tela da Certidoo por Matricula.");
if (isset($erroscripts)) {
    echo "<script>alert('" . $erroscripts . "');</script>";
}
?>
<script>
   js_carregando(false);
</script>
</body>
</html>
    }
}
if (!isset($DB_LOGADO) && $m_publico != 't') {
    $sql = "select fc_permissaodbpref(" . db_getsession("DB_login") . ",2,{$inscricao})";
    $result = pg_exec($sql);
    if (pg_numrows($result) == 0) {
        db_redireciona("digitaissqn.php?" . base64_encode("erroscripts=Acesso não Permitido. Contate a Prefeitura."));
        exit;
    }
    $result = pg_result($result, 0, 0);
    if ($result == "0") {
        db_redireciona("digitaissqn.php?" . base64_encode("erroscripts=Acesso não Permitido. Contate a Prefeitura."));
        exit;
    }
}
db_logs("{$matricula}", "", 0, "Matricula Pesquisada. Numero : {$matricula}");
?>
<html>
<head>
<title><?php 
echo $w01_titulo;
?>
</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<script language="JavaScript" src="scripts/db_script.js"></script>
<script>
js_verificapagina("digitaitbi.php,listabicimovel.php,listaitbisolicitacao.php,listaitbiverifica.php");
</script>
<style type="text/css">
<?php 
db_estilosite();
//    echo"<script>location.href='index.php?".base64_encode('erroscripts=3')."'</script>";
//}
if (@$_COOKIE["cookie_codigo_cgm"] == "") {
    // issbase
    if ($inscricaow != "") {
        $result = $clissbase->sql_record($clissbase->sql_query("", "cgm.z01_numcgm,cgm.z01_nome", "", "issbase.q02_inscr = {$inscricaow}"));
        $linhas1 = $clissbase->numrows;
        db_fieldsmemory($result, 0);
        setcookie("cookie_codigo_cgm", $z01_numcgm);
        setcookie("cookie_nome_cgm", $z01_nome);
    }
}
$db_verifica_ip = db_verifica_ip();
//mens_help();
$dblink = "digitaaidof.php";
db_logs("", "", 0, "Digita Aidof.");
postmemory($HTTP_POST_VARS);
$clquery = new cl_query();
$inscricaow != "" ? "" : ($inscricaow = 0);
if (!empty($cgc)) {
    $cgccpf = $cgc;
} else {
    if (!empty($cpf)) {
        $cgccpf = $cpf;
    } else {
        $cgccpf = "";
    }
}
$cgccpf = str_replace(".", "", $cgccpf);
$cgccpf = str_replace("/", "", $cgccpf);
$cgccpf = str_replace("-", "", $cgccpf);
include "libs/db_stdlib.php";
include "libs/db_sql.php";
include "classes/db_issplan_classe.php";
include "classes/db_issplanit_classe.php";
include "classes/db_issplaninscr_classe.php";
include "classes/db_issplanitinscr_classe.php";
parse_str(base64_decode($HTTP_SERVER_VARS["QUERY_STRING"]));
$result = pg_exec("SELECT distinct m_publico,m_arquivo,m_descricao\n                   FROM db_menupref\n                   WHERE m_arquivo = 'digitaissqn.php'\n                   ORDER BY m_descricao\n                  ");
db_fieldsmemory($result, 0);
if ($m_publico != 't') {
    if (!session_is_registered("DB_acesso")) {
        echo "<script>location.href='index.php?" . base64_encode("erroscripts=3") . "'</script>";
    }
}
mens_help();
db_logs("", "", 0, "Digita Codigo da Inscricao.");
db_mensagem("alvara_cab", "alvara_rod");
postmemory($HTTP_POST_VARS);
$clquery = new cl_query();
$alterando = false;
$matri = array("1" => "janeiro", "2" => "Fevereiro", "3" => "Março", "4" => "Abril", "5" => "Maio", "6" => "Junho", "7" => "Julho", "8" => "Agosto", "9" => "Setembro", "10" => "Outubro", "11" => "Novembro", "12" => "Dezembro");
$mesx = $matri[$mes];
$clquery->sql_query("issplan", "q20_nomecontri,q20_planilha, q20_numcgm, q20_ano, q20_mes,q20_numpre", "q20_mes", "q20_ano = {$ano} and q20_mes={$mes} and q20_numcgm= {$numcgm} or q20_ano = {$ano} and q20_numpre is null and q20_numcgm= {$numcgm}");
//die("$clquery->sql");  // traz todos do ano e mes selecionado ou ano e numpre = nada pelo cgc.
$clquery->sql_record($clquery->sql);
$numrows = $clquery->numrows;
$result = $clquery->result;
for ($x = 0; $x < $numrows; $x++) {
    $alterar = "alterar_" . $x;
    if (isset(${$alterar})) {
        $alterando = true;
include "libs/db_conecta.php";
include "libs/db_stdlib.php";
include "libs/db_sql.php";
include "classes/db_db_daitomador_classe.php";
include "classes/db_db_daitomadorpaga_classe.php";
parse_str(base64_decode($HTTP_SERVER_VARS["QUERY_STRING"]));
$result = pg_exec("SELECT distinct m_publico,m_arquivo,m_descricao\n                       FROM db_menupref \n\t\t       WHERE m_arquivo = 'digitadae.php'\n\t\t       ORDER BY m_descricao\n\t\t       ");
db_fieldsmemory($result, 0);
if ($m_publico != 't') {
    if (!session_is_registered("DB_acesso")) {
        echo "<script>location.href='index.php?" . base64_encode('erroscripts=3') . "'</script>";
    }
}
mens_help();
$dblink = "index.php";
db_logs("", "", 0, "valores da DAI.");
postmemory($HTTP_POST_VARS);
parse_str(base64_decode($HTTP_SERVER_VARS["QUERY_STRING"]));
?>

<html>
<head>
<title><?php 
echo $w01_titulo;
?>
</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<link rel="stylesheet" type="text/css" href="include/estilodai.css" >
<script language="JavaScript" src="scripts/db_script.js"></script>
<script>
	
 *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA          
 *  02111-1307, USA.                                                  
 *  
 *  Copia da licenca no diretorio licenca/licenca_en.txt 
 *                                licenca/licenca_pt.txt 
 */
session_start();
include "libs/db_conecta.php";
include "libs/db_stdlib.php";
include "libs/db_sql.php";
include "classes/db_cgm_classe.php";
include "classes/db_empempenho_classe.php";
$clcgm = new cl_cgm();
$clempempenho = new cl_empempenho();
parse_str(base64_decode($HTTP_SERVER_VARS["QUERY_STRING"]));
db_logs("", "", 0, "Consulta Fornecedor.");
db_postmemory($_GET);
?>
<html>
<head>
<title>digitafornecedor.php</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<link href="estilos.css" rel="stylesheet" type="text/css">
<link href="config/estilos.css" rel="stylesheet" type="text/css">
</head>
<body bgcolor="#FFFFFF" text="#000000" leftmargin="5" topmargin="5" marginwidth="0" marginheight="0">
<div id='int_perc1' align="left" style="position:absolute;top:60%;left:35%; float:left; width:200; background-color:#ECEDF2; padding:5px; margin:0px; border:1px #C2C7CB solid; margin-left:10px; font-size:80%; visibility:hidden">
  <div style="border:1px #ffffff solid; margin:8px 3px 3px 3px;">
   <div id='int_perc2' style="width:0%; background-color:#888888;" align="center">&nbsp;</div>
   </div>
  </div>
                $str = str_replace($lei, "<font style=\"background-color:red\">{$lei}</font>", $str);
                $str = str_replace(strtoupper($lei), "<font style=\"background-color:red\">" . strtoupper($lei) . "</font>", $str);
            }
            if (trim(@$ementa) != "") {
                $str = str_replace($ementa, "<font style=\"background-color:blue\">{$ementa}</font>", $str);
                $str = str_replace(strtoupper($ementa), "<font style=\"background-color:blue\">" . strtoupper($ementa) . "</font>", $str);
            }
            echo "<br><br><br><a class=\"links\" href=\"#TOPO\"> << Voltar</a><a name=\"lei{$i}\">" . $str;
        }
    } else {
        echo "<tr><td width=\"100%\" align=\"center\" valign=\"middle\" height=\"100%\"><h3>Nenhuma lei encontrada</h3><input type=\"button\" onclick=\"window.close()\" value=\"Fechar\"></td></tr></table>\n";
    }
    echo "\n    </body>\n    </html>\n";
} else {
    mens_help();
    db_logs("", "", 0, "Digita argumento de pesquisa de leis.");
    db_mensagem("leis_cab", "leis_rod");
    ?>
<html>
<head>
<title><?php 
    echo $w01_titulo;
    ?>
</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<script language="JavaScript" src="scripts/db_script.js"></script>
<script>
function js_pesquisar() {
  jan = window.open('','procurar','width=770,height=490,scrollbars=1,menubar=1,resizable=1');
  jan.moveTo(10,2);
}
Ejemplo n.º 17
0
                  </td>
                </tr>
                <tr> 
                  <td height="60" align="<?php 
echo $DB_align2;
?>
">
                    <?php 
echo $DB_mens2;
?>
                  </td>
                </tr>
              </table>
              	
            </td>
      </tr>
      </table>
	</td>
  </tr>
</table>
</center>
<?php 
db_rodape();
?>
</body>
<!-- InstanceEnd --></html>


<?php 
db_logs("", "", 0, "este é um log de teste, que será gravado toda vez que tu entrar nesta pagina.");
//aqui é o log do sistema
                for ($x = 0; $x < $linhas2; $x++) {
                    @db_fieldsmemory($result2, $x);
                    echo "\n           <tr align=\"center\"> \n             <td height=\"28\">\n               <a class=\"links\" href=\"cai3_certidao.php?matricula=" . $j01_matric . "\">\n                 <img src=\"imagens/folder4.gif\" border=\"0\">Emite Certid&atilde;o da Matrícula " . $j01_matric . "\n               </a>\n             </td>\n           </tr>        \n         ";
                }
            }
            if (isset($linhas1) && $linhas1 != 0) {
                $bForm = false;
                for ($i = 0; $i < $linhas1; $i++) {
                    @db_fieldsmemory($result1, $i);
                    echo "\n           <tr align=\"center\"> \n             <td height=\"28\"> \n               <a class=\"links\" href=\"cai3_certidao.php?inscricao=" . $q02_inscr . "\">\n                 <img src=\"imagens/folder4.gif\" border=\"0\">Emite Certid&atilde;o da Inscrição " . $q02_inscr . "\n               </a>\n             </td>\n           </tr>        \n         ";
                }
            }
        }
        ?>
</table>
<?php 
    }
}
?>
</body>
</html>
<?php 
db_logs("", "", 0, "Tela da Certidoo por Nome.");
function formata_cgccpf($sCgcCpf)
{
    $cgccpf = $sCgcCpf;
    if (isset($cgccpf) && $cgccpf != "") {
        $cgccpf = ereg_replace("[./-]", "", $cgccpf);
    }
    return $cgccpf;
}
            </td>
          </tr>
          <tr>
            <td width="50%" height="30">&nbsp;</td>
            <td width="50%" height="30">
             <input class="botao" type="submit" name="pesquisa" value="Pesquisa" class="botaoconfirma">
             <input type="hidden" name="opcao" value="i" ><br><br>
             <a align="center" href="digitaaidof.php?outro">Pesquisar Outra Inscrição</a><br><br>
            </td>
          </tr>
        </table>
      </form>
    </td>
  </tr>
  <tr>
    <td height="60" align="<?php 
echo $DB_align2;
?>
">
      <?php 
echo $DB_mens2;
?>
    </td>
  </tr>
</table>
</center>
<?php 
db_logs("", "", 0, "Digita Codigo da Inscricao para solicitacao AIDOF.");
if (isset($erroscripts)) {
    echo "<script>alert('" . $erroscripts . "');</script>";
}
         $sql = "update issvar set q05_vlrinf = " . $valores[$i] . " where q05_numpre = {$numpre} and q05_numpar = {$numpar}";
         db_query($sql) or die("Erro(37) atualizando issvar: " . pg_errormessage());
     }
     db_query("COMMIT");
     $tipo = 3;
 }
 //fim do issqn variavel
 //mens_help();
 if (!isset($tipo)) {
     msgbox("Acesso a Rotina Inválido.");
     db_logs("", "", 0, "Acesso a Rotina Invalida. - Variavel tipo nao setada");
     redireciona("index.php");
 }
 if (!isset($opcao)) {
     msgbox("Acesso a Rotina Inválido.");
     db_logs("", "", 0, "Acesso a Rotina Invalida. - Variavel tipo nao setada");
     redireciona("index.php");
 }
 if ($opcao == "n") {
     $Caminho = "&nbsp;<a href=\"digitacontribuinte.php\" class=\"links\">Contribuinte &gt;</a>\n               &nbsp;<a href=\"opcoesdebitospendentes.php?" . base64_encode("opcao=n&numcgm=" . $numcgm) . "\" class=\"links\">Opções Contribuinte &gt;</a>\n               &nbsp;<font class=\"links\">Lista Contribuinte({$descricaotipo}) &gt;</font>\n";
 } else {
     if ($opcao == "m") {
         $Caminho = "&nbsp;<a href=\"digitamatricula.php\" class=\"links\">Imóvel &gt;</a>\n               &nbsp;<a href=\"opcoesdebitospendentes.php?" . base64_encode("opcao=m&matricula=" . $matricula) . "\" class=\"links\">Opções Imóvel &gt;</a>\n               &nbsp;<font class=\"links\">Lista Imóvel({$descricaotipo}) &gt;</font>\n";
     } else {
         if ($opcao == "i") {
             $Caminho = "&nbsp;<a href=\"digitainscricao.php\" class=\"links\">Alvará &gt;</a>\n              &nbsp;<a href=\"opcoesdebitospendentes.php?" . base64_encode("opcao=i&inscricao=" . @$inscricao) . "\" class=\"links\">Opções Alvará &gt;</a>\n               &nbsp;<font class=\"links\">Lista Alvará({$descricaotipo}) &gt;</font>\n";
         }
     }
 }
 //verifica o tipo e da o select dependendo se é numcgm, matric numpre ou inscr
 if (isset($tipo)) {
                         from issbase
				              inner join cgm on q02_numcgm = z01_numcgm
                              left outer join ruas on q02_lograd = j14_codigo
                              left outer join bairro on q02_bairro = j13_codi
						      left outer join escrito on q02_inscr = q10_inscr
                         where q02_inscr = $inscricao) 
						 as issbase
						    left outer join cgm on  q10_numcgm = cgm.z01_numcgm
				   ") or die("Sql : ".pg_ErrorMessage($result));
*/
if (pg_numrows($result) == 0) {
    msgbox("Verifique Cadastro com a Prefeitura. (1)");
    db_logs("", "{$inscricao}", 0, "Inscricao nao Cadastrada. Numero: {$inscricao} ");
    db_redireciona("centro_pref.php");
}
db_logs("", "{$inscricao}", 0, "Inscricao Pesquisada. Numero: {$inscricao} ");
db_fieldsmemory($result, 0);
if (empty($escritorio)) {
    $escritorio = 'O PRÓPRIO';
}
/*
$result = pg_exec("select v29_cep
                   from logcep
				   where v29_codigo = '$q02_lograd' and
				         '$q02_numero' >= v29_inicio and '$q02_numero' <= v29_final") or die("Sql : ".pg_ErrorMessage($result));
if (pg_numrows($result) == 0 ){
   $v29_cep = '';
}else{
  db_fieldsmemory($result,0);
}
$result = pg_exec("select *
                                                                   left outer join iptucalc on iptucalc.v23_matric = ctmbase.v11_matric and iptucalc.v23_anoexe = 2002
                                                                           , cgm
                                  where ctmbase.v11_matric = $cod_matricula and ctmbase.v11_numcgm = cgm.z01_numcgm
                                                                  ) as ctmbase
                                  left outer join zona on zona.v07_zona = ctmbase.v04_zona and zona.v07_setor = ctmbase.v04_setor
                                  left outer join cgm on ctmbase.v28_numcgm = cgm.z01_numcgm");
*/
$result = pg_exec("select p.*,pm.z01_nome as promitente, m.z01_nome as imobiliaria\n                   from proprietario p\n                   left outer join promitente o \n                     on o.j41_matric = p.j01_matric\n                   left outer join cgm pm \n                     on pm.z01_numcgm = o.j41_numcgm\n                   left outer join imobil i \n                     on i.j44_matric = p.j01_matric\n                   left outer join cgm m\n                     on m.z01_numcgm = i.j44_numcgm\n                   where j01_matric = {$cod_matricula}");
if (pg_numrows($result) == 0) {
    msgbox("Matrícula não Cadastrada.");
    db_logs("{$cod_matricula}", "", 0, "Matrícula não Cadastrada. Numero: {$cod_matricula}");
    redireciona("index.php");
    exit;
}
db_fieldsmemory($result, 0);
db_logs("{$cod_matricula}", "", 0, "Solicitacao de Guia. Numero: {$cod_matricula}");
?>
<html>
<head>
<title><?php 
echo $w01_titulo;
?>
</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<script language="JavaScript" src="scripts/db_script.js"></script>
<script>
js_verificapagina("opcoesitbi.php");
function jsss_verificadados() {
/*  for(contador = 0; contador < document.form1.elements.length; contador++) {
    if(document.form1.elements[contador].type != "hidden" && 
       document.form1.elements[contador].name != "tipotransacao" && 
 *  Copia da licenca no diretorio licenca/licenca_en.txt 
 *                                licenca/licenca_pt.txt 
 */
error_reporting('** CONSULTA FUNCIONAL! **');
session_start();
include "libs/db_conecta.php";
include "libs/db_stdlib.php";
include "libs/db_sql.php";
include "libs/db_utils.php";
include "dbforms/db_funcoes.php";
parse_str(base64_decode($HTTP_SERVER_VARS["QUERY_STRING"]));
$oGet = db_utils::postMemory($_GET);
$numcgm = db_getsession("DB_login");
$anoFolha = db_anofolha();
$mesFolha = db_mesfolha();
db_logs("", "", 0, "Consulta Funcional.");
?>
<html>
<head>
<title><?php 
echo $w01_titulo;
?>
</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<link href="config/estilos.css" rel="stylesheet" type="text/css">
<script language="JavaScript" src="scripts/db_script.js"></script>
</head>
<body leftmargin="0" topmargin="0" marginwidth="0" marginheight="0" bgcolor="<?php 
echo $w01_corbody;
?>
">
 *  COMERCIALIZACAO ou de ADEQUACAO A QUALQUER PROPOSITO EM           
 *  PARTICULAR. Consulte a Licenca Publica Geral GNU para obter mais  
 *  detalhes.                                                         
 *                                                                    
 *  Voce deve ter recebido uma copia da Licenca Publica Geral GNU     
 *  junto com este programa; se nao, escreva para a Free Software     
 *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA          
 *  02111-1307, USA.                                                  
 *  
 *  Copia da licenca no diretorio licenca/licenca_en.txt 
 *                                licenca/licenca_pt.txt 
 */
include "libs/db_conecta.php";
include "libs/db_stdlib.php";
include "libs/db_sql.php";
db_logs("", "", 0, "cadastro de socios do dai.");
postmemory($HTTP_POST_VARS);
parse_str(base64_decode($HTTP_SERVER_VARS["QUERY_STRING"]));
?>
<html>
<head>
<title><?php 
echo $w01_titulo;
?>
</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<link rel="stylesheet" type="text/css" href="include/estilodai.css" >
<script language="JavaScript" src="scripts/db_script.js"></script>
<script>
function js_maiusculo(obj) {
  var maiusc = new String(obj.value);
 if (!isset($sConfig["w13_permconscgm"]) or @$sConfig["w13_permconscgm"] == "f") {
     //inner join iptubase on j01_numcgm = z01_numcgm
     $sql_exe = "select * from cgm\n\t\t\t\t                   where trim(z01_cgccpf) = '{$cgccpf}'";
 } else {
     //inner join iptubase on j01_numcgm = z01_numcgm
     $sql_exe = "select * from cgm\n\t\t\t\t                   where z01_numcgm = {$codigo_cgm}";
     /**
      * Removida validacao de IP do usuario
      */
     //if ($db_verifica_ip == "0") {
     $sql_exe .= "  and trim(z01_cgccpf) = '{$cgccpf}'";
     //}
 }
 $result = @db_query($sql_exe);
 if (pg_num_rows($result) == 0) {
     db_logs("", "", 0, "Contribuinte não Cadastrado ou dados não conferem.");
     db_redireciona("certidaonome003.php?" . base64_encode("id_usuario=''&erroscripts=Contribuinte não cadastrado ou dados não conferem."));
     $script = false;
 } elseif (pg_result($result, 0, "z01_cgccpf") == "00000000000000" || pg_result($result, 0, "z01_cgccpf") == "              " || trim(pg_result($result, 0, "z01_cgccpf")) != "{$cgccpf}") {
     $script = true;
 } elseif (pg_numrows($result) == 1) {
     db_fieldsmemory($result, 0);
     //$sql2 = "select * from iptubase where j01_numcgm = $z01_numcgm";
     //$result2 = @db_query($sql2);
     //if(pg_numrows($result2)==0){
     //  db_redireciona("certidao.php");
     //}else{
     // db_redireciona("digitamatricula.php");
     //}
     //exit;
 } else {
          <td width="58%" align="left">
            <input id="verificador" name="verificador" type="text" value="" size="50" maxlength="50">
          </td>
        </tr>
        <tr>
          <td align="center">&nbsp; </td>
          <td align="left">
            <input class="botao" type="submit" id="verificar" name="submit" value="Verificar">
          </td>
        </tr>
      </table>
      </form>
    </td>
  </tr>
  <tr>
    <td height="60" align="<?php 
echo $DB_align2;
?>
">
      <?php 
echo $DB_mens2;
?>
    </td>
  </tr>
</table>
</center>
<?php 
db_logs("", "", 0, "Verifica Codigo Autenticidade de Certidão.");
?>
</body>
</html>
if (isset($outro)) {
    setcookie("cookie_codigo_cgm");
    header("location:digitainscricao.php");
}
include "libs/db_conecta.php";
include "libs/db_stdlib.php";
include "libs/db_sql.php";
include "classes/db_cgm_classe.php";
include "classes/db_empempenho_classe.php";
include "classes/db_issbase_classe.php";
$clcgm = new cl_cgm();
$clissbase = new cl_issbase();
$clempempenho = new cl_empempenho();
parse_str(base64_decode($HTTP_SERVER_VARS["QUERY_STRING"]));
$dblink = "corpoprincipal.php";
db_logs("", "", 0, "Digita Codigo do Fornecedor.");
$db_verificaip = db_verifica_ip();
if ($db_verificaip == "0") {
    $onsubmit = "onsubmit=\"return js_verificaCGCCPF((this.cgc.value==''?'':this.cgc),this.cpf);\"";
} else {
    $onsubmit = "";
}
?>
<html>
<head>
<title><?php 
echo $w01_titulo;
?>
</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<link href="estilos.css" rel="stylesheet" type="text/css">
" 
                 onKeyPress="FormataCNPJ(this,event); return js_teclas(event);"></td>
  </tr>
  <tr><td></td>
  	<td>
  	<select  name="ano" >
	    	<option value="2004">2004</option>
	    	<option value="2005" selected>2005</option>
	    	
	</select>
  	</td>
  </tr>
  <tr>
   <td colspan="2" align="center">
    <input name="first" type="hidden">
    <input class="botao" type="submit" name="pesquisa" value="Pesquisa"  onclick="return js_vericampos()">
   </td>
  </tr>
  <tr height="50" align="center">
   <td colspan="2"><?php 
    echo $DB_mens2;
    ?>
</td>
  </tr>
</table>
</form>

<?php 
}
db_logs("", "", 0, "Digita Codigo da Inscricao para acessar a DAI.");
    $sSql .= "       inner join db_usuacgm u on u.id_usuario = db_usuarios.id_usuario";
    $sSql .= " where login        = '******'                                      ";
    $sSql .= "   and usuext       = 1                                                ";
    $result = db_query($conn, $sSql);
    if (pg_numrows($result) == 0) {
        $erroscripts = "1";
    } elseif (Encriptacao::hash($DB_senha) != pg_result($result, 0, "senha")) {
        $erroscripts = "2";
    } elseif (pg_result($result, 0, "usuarioativo") != 1) {
        $erroscripts = "5";
    } else {
        session_register("DB_login");
        db_fieldsmemory($result, 0, true, true);
        $HTTP_SESSION_VARS["DB_login"] = $cgmlogin;
        $DB_LOGADO = "";
        db_logs("", "", "0", "index.php - Usuário fez login.");
        $sql = "select fc_permissaodbpref({$cgmlogin},0,0)";
        $result = db_query($sql);
        if (pg_numrows($result) == 0) {
            //db_redireciona("index.php?".base64_encode("erroscripts='4'"));
            ?>
<script>parent.location="index.php?".base64_encode("erroscripts='4'";</script><?php 
        }
        $HTTP_SESSION_VARS["DB_acesso"] = pg_result($result, 0, 0);
        $HTTP_SESSION_VARS["hora"] = date("H:i:s");
    }
}
?>
<html>
<head>
<title><?php 
require_once "libs/db_utils.php";
?>
<html>
<head>
<title>Licitações</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<script language="JavaScript" src="scripts/db_script.js"></script>
<style type="text/css">
<?php 
db_estilosite();
?>
</style>
</head>

<?php 
db_logs(0, 0, 0, "Licitações em Aberto.");
/*
 * T. 43860
 * Separar as Licit. Julgadas, e indicar o numero do empenho
 * 
 */
$sSqlParam = " select l12_tipoliberacaoweb,    ";
$sSqlParam .= "        l12_qtdediasliberacaoweb ";
$sSqlParam .= "   from licitaparam              ";
$sSqlParam .= "  where l12_instit = " . db_getsession('DB_instit');
$rsSqlParam = db_query($sSqlParam);
$iNumRows = pg_num_rows($rsSqlParam);
if ($iNumRows > 0) {
    $l12_tipoliberacaoweb = db_utils::fieldsmemory($rsSqlParam, 0)->l12_tipoliberacaoweb;
    $l12_qtdediasliberacaoweb = db_utils::fieldsmemory($rsSqlParam, 0)->l12_qtdediasliberacaoweb;
}