educar_matricula_ocorrencia_disciplinar_det.php
6.55 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
158
159
160
161
162
163
164
165
166
167
<?php
/**
*
* @version SVN: $Id$
* @author Prefeitura Municipal de Itajaí
* @updated 29/03/2007
* Pacote: i-PLB Software Público Livre e Brasileiro
*
* Copyright (C) 2006 PMI - 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 mais nova.
*
* Este programa é distribuído na expectativa de ser útil, mas SEM
* QUALQUER GARANTIA. Sem mesmo a garantia implícita de COMERCIALI-
* ZAÇÃO ou de ADEQUAÇÃO A QUALQUER PROPÓSITO EM PARTICULAR. Con-
* sulte a Licença Pública Geral GNU para obter mais detalhes.
*
* Você deve ter recebido uma cópia da Licença Pública Geral GNU
* junto com este programa. Se não, escreva para a Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
* 02111-1307, USA.
*
*/
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 - Ocorrência Disciplinar" );
$this->processoAp = "578";
}
}
class indice extends clsDetalhe
{
/**
* Titulo no topo da pagina
*
* @var int
*/
var $titulo;
var $ref_cod_matricula;
var $ref_cod_tipo_ocorrencia_disciplinar;
var $sequencial;
var $ref_usuario_exc;
var $ref_usuario_cad;
var $observacao;
var $data_cadastro;
var $data_exclusao;
var $ativo;
function Gerar()
{
$this->titulo = "Matricula Ocorrencia Disciplinar - Detalhe";
$this->sequencial=$_GET["sequencial"];
$this->ref_cod_matricula=$_GET["ref_cod_matricula"];
$this->ref_cod_tipo_ocorrencia_disciplinar=$_GET["ref_cod_tipo_ocorrencia_disciplinar"];
$tmp_obj = new clsPmieducarMatriculaOcorrenciaDisciplinar( $this->ref_cod_matricula, $this->ref_cod_tipo_ocorrencia_disciplinar, $this->sequencial,null,null,null,null,null,1 );
$registro = $tmp_obj->detalhe();
if( ! $registro )
{
$this->simpleRedirect("educar_matricula_ocorrencia_disciplinar_lst.php?ref_cod_matricula={$this->ref_cod_matricula}");
}
$obj_ref_cod_matricula = new clsPmieducarMatricula( $registro["ref_cod_matricula"] );
$det_ref_cod_matricula = $obj_ref_cod_matricula->detalhe();
//$registro["ref_cod_matricula"] = $det_ref_cod_matricula["ref_cod_matricula"];
$obj_serie = new clsPmieducarSerie( $det_ref_cod_matricula["ref_ref_cod_serie"] );
$det_serie = $obj_serie->detalhe();
$registro["ref_ref_cod_serie"] = $det_serie["nm_serie"];
$obj_ref_cod_tipo_ocorrencia_disciplinar = new clsPmieducarTipoOcorrenciaDisciplinar( $registro["ref_cod_tipo_ocorrencia_disciplinar"] );
$det_ref_cod_tipo_ocorrencia_disciplinar = $obj_ref_cod_tipo_ocorrencia_disciplinar->detalhe();
$registro["nm_tipo"] = $det_ref_cod_tipo_ocorrencia_disciplinar["nm_tipo"];
$obj_mat_turma = new clsPmieducarMatriculaTurma();
$det_mat_turma = $obj_mat_turma->lista($registro["ref_cod_matricula"],null,null,null,null,null,null,null,1);
if($det_mat_turma)
$det_mat_turma = array_shift($det_mat_turma);
$obj_ref_cod_tipo_ocorrencia_disciplinar = new clsPmieducarTipoOcorrenciaDisciplinar( $registro["ref_cod_tipo_ocorrencia_disciplinar"] );
$det_ref_cod_tipo_ocorrencia_disciplinar = $obj_ref_cod_tipo_ocorrencia_disciplinar->detalhe();
$registro["nm_tipo"] = $det_ref_cod_tipo_ocorrencia_disciplinar["nm_tipo"];
if( $registro["ref_cod_matricula"] )
{
$this->addDetalhe( array( "Matrícula", "{$registro["ref_cod_matricula"]}") );
}
$obj_ref_cod_matricula = new clsPmieducarMatricula();
$detalhe_aluno = array_shift($obj_ref_cod_matricula->lista($this->ref_cod_matricula));
$obj_aluno = new clsPmieducarAluno();
$det_aluno = array_shift($det_aluno = $obj_aluno->lista($detalhe_aluno['ref_cod_aluno'],null,null,null,null,null,null,null,null,null,1));
$this->addDetalhe(array("Nome do Aluno",$det_aluno['nome_aluno']));
if( $registro["ref_ref_cod_serie"] )
{
$this->addDetalhe( array( "Série", "{$registro["ref_ref_cod_serie"]}") );
}
if( $det_mat_turma["det_turma"] )
{
$this->addDetalhe( array( "Turma", "{$det_mat_turma["det_turma"]}") );
}
if( $registro["sequencial"] )
{
$this->addDetalhe( array( "Número da Ocorrência", "{$registro["sequencial"]}") );
}
if( $registro["data_cadastro"] )
{
if($hora = dataFromPgToBr("{$registro["data_cadastro"]}",'H:i') )
$this->addDetalhe( array( "Hora Ocorrência", $hora ));
$this->addDetalhe( array( "Data Ocorrência", dataFromPgToBr("{$registro["data_cadastro"]}",'d/m/Y') ));
}
if( $registro["ref_cod_tipo_ocorrencia_disciplinar"] )
{
$this->addDetalhe( array( "Tipo Ocorrência", "{$registro["nm_tipo"]}") );
}
if( $registro["observacao"] )
{
$this->addDetalhe( array( "Observação", nl2br("{$registro["observacao"]}")) );
}
$obj_permissoes = new clsPermissoes();
if( $obj_permissoes->permissao_cadastra( 578, $this->pessoa_logada, 7 ) )
{
$this->url_novo = "educar_matricula_ocorrencia_disciplinar_cad.php?ref_cod_matricula={$registro["ref_cod_matricula"]}";
$this->url_editar = "educar_matricula_ocorrencia_disciplinar_cad.php?ref_cod_matricula={$registro["ref_cod_matricula"]}&ref_cod_tipo_ocorrencia_disciplinar={$registro["ref_cod_tipo_ocorrencia_disciplinar"]}&sequencial={$registro["sequencial"]}";
}
$this->url_cancelar = "educar_matricula_ocorrencia_disciplinar_lst.php?ref_cod_matricula={$registro["ref_cod_matricula"]}";
$this->largura = "100%";
$this->breadcrumb('Ocorrências disciplinares da matrícula', [
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();
?>