educar_categoria_nivel_det.php
5.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
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
<?php
/*
* i-Educar - Sistema de gestão escolar
*
* Copyright (C) 2006 Prefeitura Municipal de Itajaí
* <ctima@itajai.sc.gov.br>
*
* Este programa é software livre; você pode redistribuí-lo e/ou modificá-lo
* sob os termos da Licença Pública Geral GNU conforme publicada pela Free
* Software Foundation; tanto a versão 2 da Licença, como (a seu critério)
* qualquer versão posterior.
*
* Este programa é distribuído na expectativa de que seja útil, porém, SEM
* NENHUMA GARANTIA; nem mesmo a garantia implícita de COMERCIABILIDADE OU
* ADEQUAÇÃO A UMA FINALIDADE ESPECÍFICA. Consulte a Licença Pública Geral
* do GNU para mais detalhes.
*
* Você deve ter recebido uma cópia da Licença Pública Geral do GNU junto
* com este programa; se não, escreva para a Free Software Foundation, Inc., no
* endereço 59 Temple Street, Suite 330, Boston, MA 02111-1307 USA.
*/
/**
* Detalhes de um nível de categoria.
*
* @author Prefeitura Municipal de Itajaí <ctima@itajai.sc.gov.br>
* @license http://creativecommons.org/licenses/GPL/2.0/legalcode.pt CC GNU GPL
* @package Core
* @since Arquivo disponível desde a versão 1.0.0
* @version $Id$
*/
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
{
public function Formular() {
$this->SetTitulo($this->_instituicao . 'Servidores - Detalhe Categoria Nível');
$this->processoAp = "829";
}
}
class indice extends clsDetalhe
{
/**
* Titulo no topo da pagina
*
* @var int
*/
var $titulo;
var $cod_categoria_nivel;
var $ref_usuario_exc;
var $ref_usuario_cad;
var $nm_categoria_nivel;
var $data_cadastro;
var $data_exclusao;
var $ativo;
function Gerar()
{
$this->titulo = "Categoria Nivel - Detalhe";
$this->addBanner("imagens/nvp_top_intranet.jpg", "imagens/nvp_vert_intranet.jpg", "Intranet");
$this->cod_categoria_nivel=$_GET["cod_categoria_nivel"];
$tmp_obj = new clsPmieducarCategoriaNivel( $this->cod_categoria_nivel );
$registro = $tmp_obj->detalhe();
if( ! $registro )
{
$this->simpleRedirect('educar_categoria_nivel_lst.php');
}
if( $registro["cod_categoria_nivel"] )
{
$this->addDetalhe( array( "Categoria", "{$registro["cod_categoria_nivel"]}") );
}
if( $registro["nm_categoria_nivel"] )
{
$this->addDetalhe( array( "Nome Categoria", "{$registro["nm_categoria_nivel"]}") );
}
$tab_niveis = null;
$obj_nivel = new clsPmieducarNivel();
$lst_nivel = $obj_nivel->buscaSequenciaNivel($this->cod_categoria_nivel);
if($lst_nivel)
{
$tab_niveis .= "<table cellspacing='0' cellpadding='0' width='200' border='0'>";
$class2 = $class2 == "formlttd" ? "formmdtd" : "formlttd" ;
$tab_niveis .= " <tr>
<td bgcolor='#ccdce6' align='center'>Níveis</td>
<td bgcolor='#ccdce6' align='center'>Subníveis</td>
</tr>";
foreach ($lst_nivel as $nivel)
{
$tab_niveis .= " <tr class='$class2' align='center'>
<td align='left'>{$nivel['nm_nivel']}</td>
<td align='center'><a style='color:#0ac336;' href='javascript:popless(\"{$nivel['cod_nivel']}\")'><i class='fa fa-plus-square' aria-hidden='true'></i></a></td>
</tr>";
$class2 = $class2 == "formlttd" ? "formmdtd" : "formlttd" ;
}
$tab_niveis .= "</table>";
$this->addDetalhe(array("Níveis", "$tab_niveis"));
}
$obj_permissoes = new clsPermissoes();
if( $obj_permissoes->permissao_cadastra( 829, $this->pessoa_logada, 3, null, true ) )
{
$this->url_novo = "educar_categoria_nivel_cad.php";
$this->url_editar = "educar_categoria_nivel_cad.php?cod_categoria_nivel={$registro["cod_categoria_nivel"]}";
$this->array_botao[] = 'Adicionar Níveis';
$this->array_botao_url[] = "educar_nivel_cad.php?cod_categoria={$registro["cod_categoria_nivel"]}";
}
$this->url_cancelar = "educar_categoria_nivel_lst.php";
$this->largura = "100%";
$this->breadcrumb('Detalhes da categoria/nível', [
url('intranet/educar_servidores_index.php') => 'Servidores',
]);
}
}
// 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 type="text/javascript">
function popless(nivel)
{
var campoCategoria = <?=$_GET["cod_categoria_nivel"];?>;
pesquisa_valores_popless('educar_subniveis_cad.php?ref_cod_categoria='+campoCategoria+'&ref_cod_nivel='+nivel, '');
}
</script>