include "dbforms/db_funcoes.php";
include "classes/db_itbi_classe.php";
include "classes/db_itburbano_classe.php";
include "classes/db_itbimatric_classe.php";
include "classes/db_itbipropriold_classe.php";
include "classes/db_propri_classe.php";
include "classes/db_itbidadosimovel_classe.php";
include "classes/db_itbinome_classe.php";
include "classes/db_itbinomecgm_classe.php";
$clitbi = new cl_itbi();
$clitburbano = new cl_itburbano();
$clitbimatric = new cl_itbimatric();
$clitbipropriold = new cl_itbipropriold();
$clpropri = new cl_propri();
$clitbidadosimovel = new cl_itbidadosimovel();
$clitbinome = new cl_itbinome();
$clitbinomecgm = new cl_itbinomecgm();
parse_str($HTTP_SERVER_VARS["QUERY_STRING"]);
postmemory($HTTP_POST_VARS);
//echo "tipo = $tipo ";
if ($cod != "") {
    echo "\n\t\t\t<script>\n           \t\tparent.document.form1.disabilitado.value='nao';\n\t\t\t\tparent.trocacor('1');\n\t\t\t</script>\n\t\t";
}
if (isset($incluir)) {
    if ($incluir == "Incluir") {
        db_inicio_transacao();
        // inclui na itbi..................................................
        $sqlerro = false;
        $clitbi->it01_data = date("Y-m-d");
        $clitbi->it01_hora = date("H:i");
        $clitbi->it01_tipotransacao = $it01_tipotransacao;
include "classes/db_itburbano_classe.php";
include "classes/db_itbimatric_classe.php";
include "classes/db_itbipropriold_classe.php";
include "classes/db_propri_classe.php";
include "classes/db_itbidadosimovel_classe.php";
include "classes/db_itbinome_classe.php";
include "classes/db_itbinomecgm_classe.php";
include "classes/db_itbirural_classe.php";
include "classes/db_itbiruralcaract_classe.php";
$clitbi = new cl_itbi();
$clitburbano = new cl_itburbano();
$clitbimatric = new cl_itbimatric();
$clitbipropriold = new cl_itbipropriold();
$clpropri = new cl_propri();
$clitbidadosimovel = new cl_itbidadosimovel();
$clitbinome = new cl_itbinome();
$clitbinomecgm = new cl_itbinomecgm();
$clitbirural = new cl_itbirural();
$clitbiruralcaract = new cl_itbiruralcaract();
parse_str($HTTP_SERVER_VARS["QUERY_STRING"]);
postmemory($HTTP_POST_VARS);
//echo "tipo22 = $tipo sol= $sol";
if ($cod != "") {
    echo "\n\t\t\t<script>\n           \t\tparent.document.form1.disabilitado.value='nao';\n\t\t\t\tparent.trocacor('1');\n\t\t\t</script>\n\t\t";
}
if (isset($incluir)) {
    if ($incluir == "Incluir") {
        db_inicio_transacao();
        // inclui na itbi..................................................
        $sqlerro = false;
        $clitbi->it01_data = date("Y-m-d");
 *  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 
 */
session_start();
include "libs/db_stdlib.php";
include "libs/db_sql.php";
include "classes/db_itbinome_classe.php";
$clitbinome = new cl_itbinome();
parse_str($HTTP_SERVER_VARS["QUERY_STRING"]);
postmemory($HTTP_POST_VARS);
$cod = $_SESSION["itbi"];
if (isset($incluir)) {
    if ($incluir == "Incluir") {
        $clitbinome->it03_guia = $cod;
        $clitbinome->it03_tipo = 'c';
        $clitbinome->it03_princ = $it03_princ;
        $clitbinome->it03_nome = $it03_nome;
        $clitbinome->it03_sexo = $it03_sexo;
        $clitbinome->it03_cpfcnpj = $it03_cpfcnpj;
        $clitbinome->it03_endereco = $it03_endereco;
        $clitbinome->it03_numero = $it03_numero;
        $clitbinome->it03_compl = $it03_compl;
        $clitbinome->it03_cxpostal = $it03_cxpostal;
include "classes/db_itbiconstrespecie_classe.php";
include "classes/db_itbiconstrtipo_classe.php";
include "classes/db_parreciboitbi_classe.php";
include "classes/db_recibo_classe.php";
include "classes/db_arrenumcgm_classe.php";
parse_str($HTTP_SERVER_VARS['QUERY_STRING']);
//db_postmemory($HTTP_SERVER_VARS,2);
$clitbiavalia = new cl_itbiavalia();
$clitbi = new cl_itbi();
$clitbirural = new cl_itbirural();
$clitbiruralcaract = new cl_itbiruralcaract();
$clitbimatric = new cl_itbimatric();
$clitbilogin = new cl_itbilogin();
$clitburbano = new cl_itburbano();
$clitbinumpre = new cl_itbinumpre();
$clitbinome = new cl_itbinome();
$clitbinomecgm = new cl_itbinomecgm();
$clitbicgm = new cl_itbicgm();
$clitbiconstr = new cl_itbiconstr();
$clitbipropriold = new cl_itbipropriold();
$clitbiconstrespecie = new cl_itbiconstrespecie();
$clitbiconstrtipo = new cl_itbiconstrtipo();
$clnumpref = new cl_numpref();
$clparreciboitbi = new cl_parreciboitbi();
$clrecibo = new cl_recibo();
$clarrenumcgm = new cl_arrenumcgm();
$compradoresm = 0;
$compradoresf = 0;
$transmitentesm = 0;
$transmitentesf = 0;
$outroscompradores = "";