educar_coffebreak_tipo_det.php
2.39 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
85
86
87
88
89
90
91
92
<?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 - Coffebreak Tipo" );
$this->processoAp = "564";
}
}
class indice extends clsDetalhe
{
/**
* Titulo no topo da pagina
*
* @var int
*/
var $titulo;
var $cod_coffebreak_tipo;
var $ref_usuario_exc;
var $ref_usuario_cad;
var $nm_tipo;
var $desc_tipo;
var $custo_unitario;
var $data_cadastro;
var $data_exclusao;
var $ativo;
function Gerar()
{
$this->titulo = "Coffebreak Tipo - Detalhe";
$this->cod_coffebreak_tipo=$_GET["cod_coffebreak_tipo"];
$tmp_obj = new clsPmieducarCoffebreakTipo( $this->cod_coffebreak_tipo );
$registro = $tmp_obj->detalhe();
if( ! $registro || !$registro["ativo"] )
{
$this->simpleRedirect('educar_coffebreak_tipo_lst.php');
}
if( $registro["cod_coffebreak_tipo"] )
{
$this->addDetalhe( array( "Coffebreak Tipo", "{$registro["cod_coffebreak_tipo"]}") );
}
if( $registro["nm_tipo"] )
{
$this->addDetalhe( array( "Nome Tipo", "{$registro["nm_tipo"]}") );
}
if( $registro["desc_tipo"] )
{
$this->addDetalhe( array( "Desc Tipo", "{$registro["desc_tipo"]}") );
}
if( $registro["custo_unitario"] )
{
$this->addDetalhe( array( "Custo Unitario", str_replace(".",",",$registro["custo_unitario"])) );
}
//** Verificacao de permissao para cadastro
$obj_permissao = new clsPermissoes();
if($obj_permissao->permissao_cadastra(554, $this->pessoa_logada,7))
{
$this->url_novo = "educar_coffebreak_tipo_cad.php";
$this->url_editar = "educar_coffebreak_tipo_cad.php?cod_coffebreak_tipo={$registro["cod_coffebreak_tipo"]}";
}
//**
$this->url_cancelar = "educar_coffebreak_tipo_lst.php";
$this->largura = "100%";
}
}
// 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();
?>