*  02111-1307, USA.                                                  
 *  
 *  Copia da licenca no diretorio licenca/licenca_en.txt 
 *                                licenca/licenca_pt.txt 
 */
require_once "fpdf151/pdf.php";
require_once "libs/db_utils.php";
require_once "libs/JSON.php";
require_once "dbforms/db_funcoes.php";
require_once "classes/db_isssimulacalculo_classe.php";
require_once "classes/db_isssimulacalculoatividade_classe.php";
$oJson = new services_json();
$oIssSimulaCalculo = new cl_isssimulacalculo();
$oIssSimulaCalculoAtividade = new cl_isssimulacalculoatividade();
$oGet = db_utils::postMemory($_GET);
$oPost = db_utils::postMemory($_POST);
$sSqlMunic = "select munic from db_config where codigo = " . db_getsession("DB_instit");
$rsMunic = db_query($sSqlMunic);
$sMunic = db_utils::fieldsMemory($rsMunic, 0)->munic;
$sSqlSimulaCalculo = $oIssSimulaCalculo->sql_query($oGet->iSimulacao);
$rsSimulacaoCalculo = $oIssSimulaCalculo->sql_record($sSqlSimulaCalculo);
$iLinhasConsulta = $oIssSimulaCalculo->numrows;
if ($iLinhasConsulta == 0) {
    db_redireciona("db_erros.php?fechar=true&db_erro=Nenhum registro encontrado.");
}
$sSqlSimulaCalculoAtividade = $oIssSimulaCalculoAtividade->sql_query(null, "*", "q131_seq", "q131_issimulacalculo = {$oGet->iSimulacao}");
$rsSimulacaoCalculoAtividade = $oIssSimulaCalculoAtividade->sql_record($sSqlSimulaCalculoAtividade);
$iLinhasConsultaAtividade = $oIssSimulaCalculoAtividade->numrows;
$head4 = "BIC simulada de Alvara";
$pdf = new PDF();
$pdf->Open();
 *  Copia da licenca no diretorio licenca/licenca_en.txt 
 *                                licenca/licenca_pt.txt 
 */
require_once "libs/db_stdlib.php";
require_once "libs/db_utils.php";
require_once "dbforms/db_funcoes.php";
require_once "classes/db_ativid_classe.php";
db_postmemory($HTTP_POST_VARS);
parse_str($HTTP_SERVER_VARS["QUERY_STRING"]);
$clativid = new cl_ativid();
$clativid->rotulo->label("q03_ativ");
$clativid->rotulo->label("q03_descr");
$clrotulo = new rotulocampo();
$clrotulo->label('q71_estrutural');
$clrotulo->label('rh70_estrutural');
$oGet = db_utils::postMemory($_GET);
$tipo_pesquisa = $oGet->tipoPesquisa;
?>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<link href="estilos.css" rel="stylesheet" type="text/css">
<script language="JavaScript" type="text/javascript" src="scripts/scripts.js"></script>
<style>
  body *{
  	font-size: 11px
  }
  table {
  	margin: 0 auto;
  	width: 510px;
  }
include "classes/db_proctransferproc_classe.php";
include "classes/db_proctransand_classe.php";
include "classes/db_proctransferintand_classe.php";
include "classes/db_proctransferint_classe.php";
include "classes/db_procandamint_classe.php";
include "classes/db_procandamintand_classe.php";
include "classes/db_arqproc_classe.php";
include "classes/db_arqandam_classe.php";
include "dbforms/db_funcoes.php";
include "classes/db_protparam_classe.php";
//se $db21_usasisagua = 't' utiliza o modulo agua
db_sel_instit(null, "db21_usasisagua");
db_postmemory($HTTP_SERVER_VARS);
db_postmemory($HTTP_POST_VARS);
$utils = new db_utils();
$oPOST = $utils->postMemory($_POST);
$clprotprocesso = new cl_protprocesso();
$clprocandam = new cl_procandam();
$clproctransfer = new cl_proctransfer();
$clproctransferproc = new cl_proctransferproc();
$clproctransand = new cl_proctransand();
$clproctransferintand = new cl_proctransferintand();
$clproctransferint = new cl_proctransferint();
$clprocandamint = new cl_procandamint();
$clprocandamintand = new cl_procandamintand();
$clarqproc = new cl_arqproc();
$clarqandam = new cl_arqandam();
$clprotparam = new cl_protparam();
$cod_procandamint = 0;
$arquiv = false;
$arqant = false;