forked from portabilis/i-educar
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy patheducar_acervo_colecao_cad_pop.php
107 lines (89 loc) · 3.13 KB
/
educar_acervo_colecao_cad_pop.php
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
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
<?php
require_once ("include/clsBase.inc.php");
require_once ("include/clsCadastro.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 - Coleção" );
$this->processoAp = "593";
$this->renderMenu = false;
$this->renderMenuSuspenso = false;
}
}
class indice extends clsCadastro
{
/**
* Referencia pega da session para o idpes do usuario atual
*
* @var int
*/
var $pessoa_logada;
var $cod_acervo_colecao;
var $ref_usuario_exc;
var $ref_usuario_cad;
var $nm_colecao;
var $descricao;
var $data_cadastro;
var $data_exclusao;
var $ativo;
var $ref_cod_biblioteca;
function Inicializar()
{
$retorno = "Novo";
$obj_permissoes = new clsPermissoes();
$obj_permissoes->permissao_cadastra( 593, $this->pessoa_logada, 11, "educar_acervo_colecao_lst.php" );
//$this->url_cancelar = "";
//$this->nome_url_cancelar = "Cancelar";
return $retorno;
}
function Gerar()
{
echo "<script>window.onload=function(){parent.EscondeDiv('LoadImprimir')}</script>";
$this->campoOculto("ref_cod_biblioteca", $this->ref_cod_biblioteca);
$this->campoTexto( "nm_colecao", "Coleção", $this->nm_colecao, 30, 255, true );
$this->campoMemo( "descricao", "Descrição", $this->descricao, 60, 5, false );
}
function Novo()
{
$obj_permissoes = new clsPermissoes();
$obj_permissoes->permissao_cadastra( 593, $this->pessoa_logada, 11, "educar_acervo_colecao_lst.php" );
$obj = new clsPmieducarAcervoColecao( $this->cod_acervo_colecao, $this->pessoa_logada, $this->pessoa_logada, $this->nm_colecao, $this->descricao, $this->data_cadastro, $this->data_exclusao, $this->ativo, $this->ref_cod_biblioteca );
$this->cod_acervo_colecao = $cadastrou = $obj->cadastra();
if( $cadastrou )
{
$obj->cod_acervo_colecao = $this->cod_acervo_colecao;
$this->mensagem .= "Cadastro efetuado com sucesso.<br>";
echo "<script>
parent.document.getElementById('colecao').value = '$cadastrou';
parent.document.getElementById('ref_cod_acervo_colecao').disabled = false;
parent.document.getElementById('tipoacao').value = '';
parent.document.getElementById('formcadastro').submit();
</script>";
die();
return true;
}
$this->mensagem = "Cadastro não realizado.<br>";
return false;
}
function Editar()
{
}
function Excluir()
{
}
}
// 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();
?>
<script>
document.getElementById('ref_cod_biblioteca').value = parent.document.getElementById('ref_cod_biblioteca').value;
</script>