educar_disciplina_dependencia_det.php
5.76 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
168
169
170
171
172
173
174
175
176
<?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.
*
* @author Lucas Schmoeller da Silva <lucas@portabilis.com.br>
* @category i-Educar
* @license @@license@@
* @package iEd_Pmieducar
* @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";
require_once 'ComponenteCurricular/Model/ComponenteDataMapper.php';
/**
* clsIndexBase class.
*
* @author Lucas Schmoeller da Silva <lucas@portabilis.com.br>
* @category i-Educar
* @license @@license@@
* @package iEd_Pmieducar
* @since Classe disponível desde a versão 1.0.0
* @version @@package_version@@
*/
class clsIndexBase extends clsBase
{
function Formular()
{
$this->SetTitulo($this->_instituicao . ' i-Educar - Disciplina dependência');
$this->processoAp = 578;
}
}
/**
* indice class.
*
* @author Lucas Schmoeller da Silva <lucas@portabilis.com.br>
* @category i-Educar
* @license @@license@@
* @package iEd_Pmieducar
* @since Classe disponível desde a versão 1.0.0
* @version @@package_version@@
*/
class indice extends clsDetalhe
{
var $titulo;
var $ref_cod_matricula;
var $ref_cod_turma;
var $ref_cod_serie;
var $ref_cod_escola;
var $ref_cod_disciplina;
var $observacao;
function Gerar()
{
$this->titulo = 'Disciplina de dependência - Detalhe';
$this->addBanner('imagens/nvp_top_intranet.jpg', 'imagens/nvp_vert_intranet.jpg',
'Intranet');
$this->ref_cod_disciplina = $_GET['ref_cod_disciplina'];
$this->ref_cod_matricula = $_GET['ref_cod_matricula'];
$this->ref_cod_serie = $_GET['ref_cod_serie'];
$this->ref_cod_disciplina = $_GET['ref_cod_disciplina'];
$this->ref_cod_escola = $_GET['ref_cod_escola'];
$tmp_obj = new clsPmieducarDisciplinaDependencia($this->ref_cod_matricula,
$this->ref_cod_serie, $this->ref_cod_escola, $this->ref_cod_disciplina);
$registro = $tmp_obj->detalhe();
if (!$registro) {
$this->simpleRedirect('educar_disciplina_dependencia_lst.php?ref_cod_matricula=' . $this->ref_cod_matricula);
}
$obj_serie = new clsPmieducarSerie($this->ref_cod_serie);
$det_serie = $obj_serie->detalhe();
$registro['ref_ref_cod_serie'] = $det_serie['nm_serie'];
// Dados da matrícula
$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($obj_aluno->lista($detalhe_aluno['ref_cod_aluno'],
NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 1));
$obj_escola = new clsPmieducarEscola($this->ref_cod_escola, NULL, NULL,
NULL, NULL, NULL, NULL, NULL, NULL, NULL, 1);
$det_escola = $obj_escola->detalhe();
$nm_aluno = $det_aluno['nome_aluno'];
// Dados do curso
$obj_ref_cod_curso = new clsPmieducarCurso($detalhe_aluno['ref_cod_curso']);
$det_ref_cod_curso = $obj_ref_cod_curso->detalhe();
$registro['ref_cod_curso'] = $det_ref_cod_curso['nm_curso'];
if ($registro['ref_cod_matricula']) {
$this->addDetalhe(array('Matricula', $registro['ref_cod_matricula']));
}
if ($nm_aluno) {
$this->addDetalhe(array('Aluno', $nm_aluno));
}
if ($registro['ref_cod_curso']) {
$this->addDetalhe(array('Curso', $registro['ref_cod_curso']));
}
if ($registro['ref_ref_cod_serie']) {
$this->addDetalhe(array('Série', $registro['ref_ref_cod_serie']));
}
if ($registro['ref_cod_disciplina']) {
$componenteMapper = new ComponenteCurricular_Model_ComponenteDataMapper();
$componente = $componenteMapper->find($registro['ref_cod_disciplina']);
$this->addDetalhe(array('Componente Curricular', $componente->nome));
}
if ($registro['observacao']) {
$this->addDetalhe(array('Observação', $registro['observacao']));
}
$obj_permissoes = new clsPermissoes();
if ($obj_permissoes->permissao_cadastra(578, $this->pessoa_logada, 7)) {
$this->url_novo = sprintf('educar_disciplina_dependencia_cad.php?ref_cod_matricula=%d',
$this->ref_cod_matricula);
$this->url_editar = sprintf('educar_disciplina_dependencia_cad.php?ref_cod_matricula=%d&ref_cod_disciplina=%d',
$registro['ref_cod_matricula'], $registro['ref_cod_disciplina']);
}
$this->url_cancelar = 'educar_disciplina_dependencia_lst.php?ref_cod_matricula=' . $this->ref_cod_matricula;
$this->largura = '100%';
$this->breadcrumb('Disciplinas de dependência', [
url('intranet/educar_index.php') => 'Escola',
]);
}
}
// Instancia objeto de página
$pagina = new clsIndexBase();
// Instancia objeto de conteúdo
$miolo = new indice();
// Atribui o conteúdo à página
$pagina->addForm($miolo);
// Gera o código HTML
$pagina->MakeAll();