<?php

require 'header.php';
$permissao = verifica_permissao('EXPANSAO', $controle_id_departamento_p, $controle_id_departamento_s);
if ($permissao == 'FALSE' or $controle_id_empresa != '1') {
    echo '<br><br><strong>Você não tem permissão para acessar essa página</strong>';
    exit;
}
pt_register('GET', 'id');
$dt = new ExpansaoListaInteressadosDAO();
$dt1 = new ExpansaoStatusDAO();
$c = new stdClass();
$e = $dt->buscaFichaCadastros($id);
if (count($e) > 0) {
    foreach ($e as $cp => $valor) {
        $c->{$cp} = $valor;
    }
}
$e = $dt->buscaCadastroAdicionais($id);
if (count($e) > 0) {
    foreach ($e as $cp => $valor) {
        $c->{$cp} = $valor;
    }
}
$e = $dt->buscaConjuge($id);
if (count($e) > 0) {
    foreach ($e as $cp => $valor) {
        $c->{$cp} = $valor;
    }
}
$e = $dt->buscaEndereco2($id);
<?php

header("Content-Type: text/html; charset=ISO-8859-1", true);
require "../includes/funcoes.php";
require "../includes/verifica_logado_controle.inc.php";
require "../includes/global.inc.php";
$permissao = verifica_permissao('EXPANSAO', $controle_id_departamento_p, $controle_id_departamento_s);
if ($permissao == 'FALSE' or $controle_id_empresa != '1') {
    echo '<br><br><strong>Você não tem permissão para acessar essa página</strong>';
    exit;
}
pt_register('GET', 'id');
$cor = '#FFF';
$dt = new ExpansaoStatusDAO();
$dt1 = new ExpansaoListaInteressadosDAO();
$e = $dt->buscaHistorico($id);
$f = $dt1->buscaDataInclude($id);
if (count($e) > 0) {
    ?>
<p align="right"><a href="#historico" onclick="VisualizarHistorico(0, 0);">X FECHAR HISTÓRICO</a></p>
<table width="756" border="0" cellspacing="2" cellpadding="0" style="border:solid 1px #0071B6; margin-top:5px;">
      <tr style="font-weight: bold; background:#95D8FF; font-size:10px;">
        <td width="180" height="20" style="border-bottom:solid 1px #0071B6;">&nbsp;&nbsp;STATUS ANTERIOR</td>
        <td width="131" style="border-bottom:solid 1px #0071B6;">&nbsp;&nbsp;ALTERADO POR:</td>
        <td width="229" style="border-bottom:solid 1px #0071B6;">&nbsp;&nbsp;OBSERVA&Ccedil;&Otilde;ES</td>
        <td width="85" align="center" style="border-bottom:solid 1px #0071B6;">REUNIÃO</td>
        <td width="117" align="center" style="border-bottom:solid 1px #0071B6;">INCLUS&Atilde;O</td>
      </tr>
	<?php 
    foreach ($e as $j => $hst) {
        ?>
        case 26:
            $orgao_emissor = 'SSP-SP';
            break;
        case 27:
            $orgao_emissor = 'SSP-TO';
            break;
    }
    return $orgao_emissor;
}
pt_register('GET', 'aba');
if ($aba) {
    $aba = $aba;
} else {
    $aba = 1;
}
$dt = new ExpansaoListaInteressadosDAO();
$dt1 = new ExpansaoStatusDAO();
$dt2 = new ExpansaoFichaDAO();
pt_register('GET', 'id');
pt_register('POST', 'submit1');
pt_register('POST', 'submit2');
pt_register('POST', 'submit3');
$c = new stdClass();
if ($submit1) {
    require "expansao_edita_submit1.php";
} elseif ($submit2) {
    require "expansao_edita_submit2.php";
} elseif ($submit3) {
    require "expansao_edita_submit3.php";
} else {
    $e = $dt->buscaFichaCadastros($id);