public_uf_det.php
2.06 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
<?php
require_once 'include/clsBase.inc.php';
require_once 'include/clsDetalhe.inc.php';
require_once 'include/clsBanco.inc.php';
require_once 'include/public/geral.inc.php';
class clsIndexBase extends clsBase
{
public function Formular()
{
$this->SetTitulo("{$this->_instituicao} Uf");
$this->processoAp = 754;
}
}
class indice extends clsDetalhe
{
public $sigla_uf;
public $nome;
public $geom;
public $idpais;
public function Gerar()
{
$this->titulo = 'Uf - Detalhe';
$this->sigla_uf = $_GET['sigla_uf'];
$tmp_obj = new clsPublicUf($this->sigla_uf);
$registro = $tmp_obj->detalhe();
if (!$registro) {
$this->simpleRedirect('public_uf_lst.php');
}
$obj_idpais = new clsPais($registro['idpais']);
$det_idpais = $obj_idpais->detalhe();
$registro['idpais'] = $det_idpais['nome'];
if ($registro['sigla_uf']) {
$this->addDetalhe(['Sigla Uf', "{$registro['sigla_uf']}"]);
}
if ($registro['nome']) {
$this->addDetalhe(['Nome', "{$registro['nome']}"]);
}
if ($registro['geom']) {
$this->addDetalhe(['Geom', "{$registro['geom']}"]);
}
if ($registro['idpais']) {
$this->addDetalhe(['Pais', "{$registro['idpais']}"]);
}
if ($registro['cod_ibge']) {
$this->addDetalhe(['Código INEP', "{$registro['cod_ibge']}"]);
}
$obj_permissao = new clsPermissoes();
if ($obj_permissao->permissao_cadastra(754, $this->pessoa_logada, 7, null, true)) {
$this->url_novo = 'public_uf_cad.php';
$this->url_editar = "public_uf_cad.php?sigla_uf={$registro['sigla_uf']}";
}
$this->url_cancelar = 'public_uf_lst.php';
$this->largura = '100%';
$this->breadcrumb('Detalhe da UF', [
url('intranet/educar_enderecamento_index.php') => 'Endereçamento',
]);
}
}
$pagina = new clsIndexBase();
$miolo = new indice();
$pagina->addForm($miolo);
$pagina->MakeAll();