educar_projeto_det.php
2.09 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
78
79
80
81
82
83
84
<?php
require_once ("include/clsBase.inc.php");
require_once ("include/clsDetalhe.inc.php");
require_once ("include/clsBanco.inc.php");
require_once( "include/pmieducar/geral.inc.php" );
class clsIndexBase extends clsBase
{
function Formular()
{
$this->SetTitulo( "{$this->_instituicao} i-Educar - Projeto" );
$this->processoAp = "21250";
}
}
class indice extends clsDetalhe
{
/**
* Titulo no topo da pagina
*
* @var int
*/
var $titulo;
var $cod_projeto;
var $nome;
var $observacao;
function Gerar()
{
$this->titulo = "Projeto - Detalhe";
$this->cod_projeto=$_GET["cod_projeto"];
$tmp_obj = new clsPmieducarProjeto( $this->cod_projeto );
$registro = $tmp_obj->detalhe();
if( ! $registro )
{
$this->simpleRedirect('educar_projeto_lst.php');
}
if( $registro["cod_projeto"] )
{
$this->addDetalhe( array( "Código projeto", "{$registro["cod_projeto"]}") );
}
if( $registro["nome"] )
{
$this->addDetalhe( array( "Nome do projeto", "{$registro["nome"]}") );
}
if( $registro["observacao"] )
{
$this->addDetalhe( array( "Observação", nl2br("{$registro["observacao"]}")) );
}
//** Verificacao de permissao para cadastro
$obj_permissao = new clsPermissoes();
if($obj_permissao->permissao_cadastra(21250, $this->pessoa_logada,3))
{
$this->url_novo = "educar_projeto_cad.php";
$this->url_editar = "educar_projeto_cad.php?cod_projeto={$registro["cod_projeto"]}";
}
//**
$this->url_cancelar = "educar_projeto_lst.php";
$this->largura = "100%";
$this->breadcrumb('Detalhe do projeto', [
url('intranet/educar_index.php') => 'Escola',
]);
}
}
// cria uma extensao da classe base
$pagina = new clsIndexBase();
// cria o conteudo
$miolo = new indice();
// adiciona o conteudo na clsBase
$pagina->addForm( $miolo );
// gera o html
$pagina->MakeAll();
?>