Commit 6dfd264a454928319a3e736c6964c6df7d221dc5

Authored by Eriksen Costa Paixão
1 parent 5c5d4668
Exists in master

Refactoring para coding standards

ieducar/intranet/educar_relatorio_diario_classe_avaliacao.php
1 1 <?php
2   -/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
3   - * *
4   - * @author Prefeitura Municipal de Itajaí *
5   - * @updated 29/03/2007 *
6   - * Pacote: i-PLB Software Público Livre e Brasileiro *
7   - * *
8   - * Copyright (C) 2006 PMI - Prefeitura Municipal de Itajaí *
9   - * ctima@itajai.sc.gov.br *
10   - * *
11   - * Este programa é software livre, você pode redistribuí-lo e/ou *
12   - * modificá-lo sob os termos da Licença Pública Geral GNU, conforme *
13   - * publicada pela Free Software Foundation, tanto a versão 2 da *
14   - * Licença como (a seu critério) qualquer versão mais nova. *
15   - * *
16   - * Este programa é distribuído na expectativa de ser útil, mas SEM *
17   - * QUALQUER GARANTIA. Sem mesmo a garantia implícita de COMERCIALI- *
18   - * ZAÇÃO ou de ADEQUAÇÃO A QUALQUER PROPÓSITO EM PARTICULAR. Con- *
19   - * sulte a Licença Pública Geral GNU para obter mais detalhes. *
20   - * *
21   - * Você deve ter recebido uma cópia da Licença Pública Geral GNU *
22   - * junto com este programa. Se não, escreva para a Free Software *
23   - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA *
24   - * 02111-1307, USA. *
25   - * *
26   - * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
27   -require_once ("include/clsBase.inc.php");
28   -require_once ("include/clsCadastro.inc.php");
29   -require_once ("include/clsBanco.inc.php");
30   -require_once( "include/pmieducar/geral.inc.php" );
31   -require_once ("include/clsPDF.inc.php");
32 2  
  3 +/**
  4 + * i-Educar - Sistema de gestão escolar
  5 + *
  6 + * Copyright (C) 2006 Prefeitura Municipal de Itajaí
  7 + * <ctima@itajai.sc.gov.br>
  8 + *
  9 + * Este programa é software livre; você pode redistribuí-lo e/ou modificá-lo
  10 + * sob os termos da Licença Pública Geral GNU conforme publicada pela Free
  11 + * Software Foundation; tanto a versão 2 da Licença, como (a seu critério)
  12 + * qualquer versão posterior.
  13 + *
  14 + * Este programa é distribuí­do na expectativa de que seja útil, porém, SEM
  15 + * NENHUMA GARANTIA; nem mesmo a garantia implí­cita de COMERCIABILIDADE OU
  16 + * ADEQUAÇÃO A UMA FINALIDADE ESPECÍFICA. Consulte a Licença Pública Geral
  17 + * do GNU para mais detalhes.
  18 + *
  19 + * Você deve ter recebido uma cópia da Licença Pública Geral do GNU junto
  20 + * com este programa; se não, escreva para a Free Software Foundation, Inc., no
  21 + * endereço 59 Temple Street, Suite 330, Boston, MA 02111-1307 USA.
  22 + *
  23 + * @author Prefeitura Municipal de Itajaí <ctima@itajai.sc.gov.br>
  24 + * @category i-Educar
  25 + * @license @@license@@
  26 + * @package iEd_Pmieducar
  27 + * @since Arquivo disponível desde a versão 1.0.0
  28 + * @version $Id$
  29 + */
  30 +
  31 +require_once 'include/clsBase.inc.php';
  32 +require_once 'include/clsCadastro.inc.php';
  33 +require_once 'include/clsBanco.inc.php';
  34 +require_once 'include/pmieducar/geral.inc.php';
  35 +require_once 'include/clsPDF.inc.php';
  36 +
  37 +/**
  38 + * clsIndexBase class.
  39 + *
  40 + * @author Prefeitura Municipal de Itajaí <ctima@itajai.sc.gov.br>
  41 + * @category i-Educar
  42 + * @license @@license@@
  43 + * @package iEd_Pmieducar
  44 + * @since Classe disponível desde a versão 1.0.0
  45 + * @version @@package_version@@
  46 + */
33 47 class clsIndexBase extends clsBase
34 48 {
35   - function Formular()
36   - {
37   - $this->SetTitulo( "{$this->_instituicao} i-Educar - Diário de Classe - Avalia&ccedil;&otilde;es" );
38   - $this->processoAp = "670";
39   - }
  49 + function Formular()
  50 + {
  51 + $this->SetTitulo($this->_instituicao . ' i-Educar - Diário de Classe - Avaliações');
  52 + $this->processoAp = 670;
  53 + }
40 54 }
41 55  
  56 +/**
  57 + * indice class.
  58 + *
  59 + * @author Prefeitura Municipal de Itajaí <ctima@itajai.sc.gov.br>
  60 + * @category i-Educar
  61 + * @license @@license@@
  62 + * @package iEd_Pmieducar
  63 + * @since Classe disponível desde a versão 1.0.0
  64 + * @version @@package_version@@
  65 + */
42 66 class indice extends clsCadastro
43 67 {
44   -
45   -
46   - /**
47   - * Referencia pega da session para o idpes do usuario atual
48   - *
49   - * @var int
50   - */
51   - var $pessoa_logada;
52   -
53   -
54   - var $ref_cod_instituicao;
55   - var $ref_cod_escola;
56   - var $ref_cod_serie;
57   - var $ref_cod_turma;
58   -
59   - var $ano;
60   - var $mes;
61   -
62   - var $nm_escola;
63   - var $nm_instituicao;
64   - var $ref_cod_curso;
65   - var $sequencial;
66   - var $pdf;
67   - var $pagina_atual = 1;
68   - var $total_paginas = 1;
69   - var $nm_professor;
70   - var $nm_turma;
71   - var $nm_serie;
72   - var $nm_disciplina;
73   - var $avaliacao_globalizada;
74   -
75   - var $page_y = 139;
76   -
77   - var $get_file;
78   -
79   - var $cursos = array();
80   -
81   - var $get_link;
82   -
83   - var $total;
84   -
85   - //var $array_disciplinas = array();
86   -
87   - var $ref_cod_modulo;
88   -
89   - var $meses_do_ano = array(
90   - "1" => "JANEIRO"
91   - ,"2" => "FEVEREIRO"
92   - ,"3" => "MAR&Ccedil;O"
93   - ,"4" => "ABRIL"
94   - ,"5" => "MAIO"
95   - ,"6" => "JUNHO"
96   - ,"7" => "JULHO"
97   - ,"8" => "AGOSTO"
98   - ,"9" => "SETEMBRO"
99   - ,"10" => "OUTUBRO"
100   - ,"11" => "NOVEMBRO"
101   - ,"12" => "DEZEMBRO"
102   - );
103   -
104   -
105   - function Inicializar()
106   - {
107   - $retorno = "Novo";
108   - @session_start();
109   - $this->pessoa_logada = $_SESSION['id_pessoa'];
110   - @session_write_close();
111   -
112   - //$obj_permissoes = new clsPermissoes();
113   - //if($obj_permissoes->nivel_acesso($this->pessoa_logada) > 7)
114   - //header("location: index.php");
115   -
116   - return $retorno;
117   - }
118   -
119   - function Gerar()
120   - {
121   -
122   - $obj_permissoes = new clsPermissoes();
123   - $nivel_usuario = $obj_permissoes->nivel_acesso($this->pessoa_logada);
124   -
125   - //if(!$nivel_usuario)
126   - //header("location: index.php");
127   - @session_start();
128   - $this->pessoa_logada = $_SESSION['id_pessoa'];
129   - @session_write_close();
130   -
131   - if($_POST){
132   - foreach ($_POST as $key => $value) {
133   - $this->$key = $value;
134   -
135   - }
136   - }
137   -
138   -
139   -
140   - $this->ano = $ano_atual = date("Y");
141   - //$this->mes = $mes_atual = date("n");
142   - /*
143   - $lim = 5;
144   - for($a = date('Y') ; $a < $ano_atual + $lim ; $a++ )
145   - $anos["{$a}"] = "{$a}";
146   -
147   - $this->campoLista( "ano", "Ano",$anos, $this->ano,"",false );
148   - */
149   - $this->campoNumero( "ano", "Ano", $this->ano, 4, 4, true );
150   -
151   - $this->campoRadio("tipo_relatorio","Tipo Relat&oacute;rio",array('c' => 'Conceitual','p' => 'Padrão'),'p');
152   -
153   - $this->campoCheck("em_branco","Relatório em branco","");
154   - $this->campoNumero("numero_registros","N&uacute;mero de linhas","",3,3);
155   - //$this->campoLista( "mes", "M&ecirc;s",$this->meses_do_ano, $this->mes,"",false );
156   -
157   - $get_escola = true;
158   - $obrigatorio = true;
159   - $exibe_nm_escola = true;
160   -// $get_escola_curso = true;
161   - $get_curso = true;
162   - $get_escola_curso_serie = true;
163   - //$get_turma = true;
164   - //$curso_padrao_ano_escolar = 1;
165   - //$exibe_campo_lista_curso_escola = true;
166   - include("include/pmieducar/educar_campo_lista.php");
167   -
168   - /*$db = new clsBanco();
169   - $consulta ="SELECT distinct
170   - m.cod_turma
171   - ,m.nm_turma
172   - ,s.cod_serie
173   - ,s.nm_serie
174   - ,m.ref_ref_cod_escola
175   - FROM pmieducar.turma m
176   - ,pmieducar.serie s
177   - WHERE m.ref_ref_cod_serie = s.cod_serie";
178   -
179   - $db->Consulta($consulta);
180   -
181   - $script = "<script>turma = new Array();\n";
182   - while ($db->ProximoRegistro()) {
183   - $tupla = $db->Tupla();
184   - $script .= "turma[turma.length] = new Array('{$tupla['cod_turma']}','{$tupla['nm_turma']}','{$tupla['cod_serie']}','{$tupla['nm_serie']}','{$tupla['ref_ref_cod_escola']}');\n";
185   - }
186   - echo $script .= "</script>";
187   -*/
188   - $opcoes_turma = array('' => 'Selecione');
189   - if ( ($this->ref_ref_cod_serie && $this->ref_cod_escola) || $this->ref_cod_curso )
190   - {
191   - $obj_turma = new clsPmieducarTurma();
192   - $obj_turma->setOrderby("nm_turma ASC");
193   - $lst_turma = $obj_turma->lista( null, null, null, $this->ref_ref_cod_serie, $this->ref_cod_escola, null, null, null, null, null, null, null, null, null, 1, null, null, null, null, null, null, null, null, null, $this->ref_cod_curso );
194   - if ( is_array( $lst_turma ) && count( $lst_turma ) )
195   - {
196   - foreach ( $lst_turma as $turma )
197   - {
198   - $opcoes_turma["{$turma['cod_turma']}"] = "{$turma['nm_turma']}";
199   - }
200   - }
201   - }
202   - $this->campoLista("ref_cod_turma","Turma",$opcoes_turma,$this->ref_cod_turma);
203   -
204   - $this->campoLista("ref_cod_modulo","M&oacute;dulo",array('' => 'Selecione'),"");
205   -
206   - //$this->campoCheck("avaliacao_globalizada","Avalia&ccedil;&atilde;o Globalizada",$this->avaliacao_globalizada);
207   -
208   -
209   - if($this->ref_cod_escola)
210   - $this->ref_ref_cod_escola = $this->ref_cod_escola;
211   -
212   - if($this->get_link)
213   - $this->campoRotulo("rotulo11", "-", "<a href='$this->get_link' id='tt' target='_blank'>Baixar Relatório</a>");
214   -
215   - $this->url_cancelar = "educar_index.php";
216   - $this->nome_url_cancelar = "Cancelar";
217   -
218   - $this->acao_enviar = 'acao2()';
219   - $this->acao_executa_submit = false;
220   -
221   - }
222   -
223   -
224   -
  68 + var $pessoa_logada;
  69 +
  70 + var $ref_cod_instituicao;
  71 + var $ref_cod_escola;
  72 + var $ref_cod_serie;
  73 + var $ref_cod_turma;
  74 +
  75 + var $ano;
  76 + var $mes;
  77 +
  78 + var $nm_escola;
  79 + var $nm_instituicao;
  80 + var $ref_cod_curso;
  81 + var $sequencial;
  82 + var $pdf;
  83 + var $pagina_atual = 1;
  84 + var $total_paginas = 1;
  85 + var $nm_professor;
  86 + var $nm_turma;
  87 + var $nm_serie;
  88 + var $nm_disciplina;
  89 + var $avaliacao_globalizada;
  90 +
  91 + var $page_y = 139;
  92 + var $get_file;
  93 + var $cursos = array();
  94 + var $get_link;
  95 + var $total;
  96 +
  97 + var $ref_cod_modulo;
  98 +
  99 + var $meses_do_ano = array(
  100 + 1 => 'JANEIRO',
  101 + 2 => 'FEVEREIRO',
  102 + 3 => 'MARÇO',
  103 + 4 => 'ABRIL',
  104 + 5 => 'MAIO',
  105 + 6 => 'JUNHO',
  106 + 7 => 'JULHO',
  107 + 8 => 'AGOSTO',
  108 + 9 => 'SETEMBRO',
  109 + 10 => 'OUTUBRO',
  110 + 11 => 'NOVEMBRO',
  111 + 12 => 'DEZEMBRO'
  112 + );
  113 +
  114 + function Inicializar()
  115 + {
  116 + $retorno = 'Novo';
  117 +
  118 + @session_start();
  119 + $this->pessoa_logada = $_SESSION['id_pessoa'];
  120 + @session_write_close();
  121 +
  122 + return $retorno;
  123 + }
  124 +
  125 + function Gerar()
  126 + {
  127 + $obj_permissoes = new clsPermissoes();
  128 + $nivel_usuario = $obj_permissoes->nivel_acesso($this->pessoa_logada);
  129 +
  130 + @session_start();
  131 + $this->pessoa_logada = $_SESSION['id_pessoa'];
  132 + @session_write_close();
  133 +
  134 + if ($_POST){
  135 + foreach ($_POST as $key => $value) {
  136 + $this->$key = $value;
  137 + }
  138 + }
  139 +
  140 + $this->ano = $ano_atual = date('Y');
  141 + $this->campoNumero('ano', 'Ano', $this->ano, 4, 4, TRUE);
  142 +
  143 + $this->campoRadio('tipo_relatorio', 'Tipo Relatório',
  144 + array(
  145 + 'c' => 'Conceitual',
  146 + 'p' => 'Padrão'
  147 + ), 'p');
  148 +
  149 + $this->campoCheck('em_branco', 'Relatório em branco', '');
  150 + $this->campoNumero('numero_registros', 'Número de linhas', '', 3, 3);
  151 +
  152 + $get_escola = true;
  153 + $obrigatorio = true;
  154 + $exibe_nm_escola = true;
  155 + $get_curso = true;
  156 + $get_escola_curso_serie = true;
  157 +
  158 + include 'include/pmieducar/educar_campo_lista.php';
  159 +
  160 + $opcoes_turma = array('' => 'Selecione');
  161 +
  162 + if (($this->ref_ref_cod_serie && $this->ref_cod_escola) || $this->ref_cod_curso) {
  163 + $obj_turma = new clsPmieducarTurma();
  164 + $obj_turma->setOrderby('nm_turma ASC');
  165 + $lst_turma = $obj_turma->lista(NULL, NULL, NULL, $this->ref_ref_cod_serie,
  166 + $this->ref_cod_escola, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
  167 + NULL, 1, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
  168 + $this->ref_cod_curso);
  169 +
  170 + if (is_array($lst_turma) && count($lst_turma)) {
  171 + foreach ($lst_turma as $turma) {
  172 + $opcoes_turma[$turma['cod_turma']] = $turma['nm_turma'];
  173 + }
  174 + }
  175 + }
  176 +
  177 + $this->campoLista('ref_cod_turma','Turma',$opcoes_turma,$this->ref_cod_turma);
  178 + $this->campoLista('ref_cod_modulo','Módulo', array('' => 'Selecione'), '');
  179 +
  180 + if ($this->ref_cod_escola) {
  181 + $this->ref_ref_cod_escola = $this->ref_cod_escola;
  182 + }
  183 +
  184 + if ($this->get_link) {
  185 + $this->campoRotulo('rotulo11', '-',
  186 + sprintf('<a href="%s" id="tt" target="_blank">Baixar Relatório</a>', $this->get_link)
  187 + );
  188 + }
  189 +
  190 + $this->url_cancelar = 'educar_index.php';
  191 + $this->nome_url_cancelar = 'Cancelar';
  192 +
  193 + $this->acao_enviar = 'acao2()';
  194 + $this->acao_executa_submit = FALSE;
  195 + }
225 196 }
226 197  
227   -// cria uma extensao da classe base
  198 +// Instancia objeto de página
228 199 $pagina = new clsIndexBase();
229   -// cria o conteudo
  200 +
  201 +// Instancia objeto de conteúdo
230 202 $miolo = new indice();
231   -// adiciona o conteudo na clsBase
232   -$pagina->addForm( $miolo );
233   -// gera o html
234   -$pagina->MakeAll();
235 203  
  204 +// Atribui o conteúdo à página
  205 +$pagina->addForm($miolo);
236 206  
  207 +// Gera o código HTML
  208 +$pagina->MakeAll();
237 209 ?>
238   -<script>
239   -
240   -/*
241   -function getModulos()
242   -{
243   -
244   -
245   - var campoEscola = document.getElementById( 'ref_cod_escola' ).value;
246   - var campoCurso= document.getElementById( 'ref_cod_curso' ).value;
247   - var campoModulo = document.getElementById( 'ref_cod_modulo' );
248   - var campoAno = document.getElementById( 'ano' ).value;
249   -
250   - campoModulo.length = 1;
251   - campoModulo.options[0] = new Option( 'Selecione um módulo', '', false, false );
252   - for ( var j = 0; j < modulos.length; j++ )
253   - {
254   - if ( modulos[j][2] == campoEscola && modulos[j][3] == campoAno)
255   - {
256   - campoModulo.options[campoModulo.options.length] = new Option( modulos[j][1], modulos[j][0], false, false );
257   - }
258   - }
259   - if ( campoModulo.length == 1 ) {
260   - campoModulo.options[0] = new Option( 'O curso não possui nenhum módulo', '', false, false );
261   - }
262   -
263   -
264   -}
265   -
266   -after_getEscolaCurso = function () {getModulos()};
267   -getEscolaCurso();
268   -after_getEscola = function(){getEscolaCurso()};
269   -document.getElementById('ref_cod_escola').onchange = function(){getEscolaCurso()};
270   -*/
271   -
  210 +<script type="text/javascript">
272 211 document.getElementById('ref_cod_turma').onchange = function()
273 212 {
274   - document.getElementById( 'ref_cod_modulo' ).length = 1;
275   - getModulos();
  213 + document.getElementById('ref_cod_modulo').length = 1;
  214 + getModulos();
276 215 }
277 216  
278 217 document.getElementById('ref_cod_escola').onchange = function()
279 218 {
280   - getEscolaCurso();
  219 + getEscolaCurso();
281 220 }
282 221  
283 222 document.getElementById('ref_cod_curso').onchange = function()
284 223 {
285   - getEscolaCursoSerie();
286   - getModulos();
  224 + getEscolaCursoSerie();
  225 + getModulos();
287 226 }
288 227  
289 228 document.getElementById('ref_ref_cod_serie').onchange = function()
290 229 {
291   - var campoEscola = document.getElementById( 'ref_cod_escola' ).value;
292   - var campoSerie = document.getElementById( 'ref_ref_cod_serie' ).value;
  230 + var campoEscola = document.getElementById('ref_cod_escola').value;
  231 + var campoSerie = document.getElementById('ref_ref_cod_serie').value;
293 232  
294   - var xml1 = new ajax(getTurma_XML);
295   - strURL = "educar_turma_xml.php?esc="+campoEscola+"&ser="+campoSerie;
296   - xml1.envia(strURL);
  233 + var xml1 = new ajax(getTurma_XML);
  234 +
  235 + strURL = 'educar_turma_xml.php?esc=' + campoEscola + '&ser=' + campoSerie;
  236 + xml1.envia(strURL);
297 237 }
298 238  
299 239 function getTurma_XML(xml)
300 240 {
  241 + var campoSerie = document.getElementById('ref_ref_cod_serie').value;
  242 + var campoTurma = document.getElementById('ref_cod_turma');
  243 + var turma = xml.getElementsByTagName('turma');
301 244  
  245 + campoTurma.length = 1;
  246 + campoTurma.options[0] = new Option('Selecione uma Turma', '', false, false);
302 247  
303   - var campoSerie = document.getElementById( 'ref_ref_cod_serie' ).value;
304   -
305   - var campoTurma = document.getElementById( 'ref_cod_turma' );
306   -
307   - var turma = xml.getElementsByTagName( "turma" );
308   -
309   - campoTurma.length = 1;
310   - campoTurma.options[0] = new Option( 'Selecione uma Turma', '', false, false );
311   - for ( var j = 0; j < turma.length; j++ )
312   - {
313   -
314   - campoTurma.options[campoTurma.options.length] = new Option( turma[j].firstChild.nodeValue, turma[j].getAttribute('cod_turma'), false, false );
315   -
316   - }
317   - if ( campoTurma.length == 1 && campoSerie != '' ) {
318   - campoTurma.options[0] = new Option( 'A série não possui nenhuma turma', '', false, false );
319   - }
  248 + for (var j = 0; j < turma.length; j++) {
  249 + campoTurma.options[campoTurma.options.length] = new Option( turma[j].firstChild.nodeValue, turma[j].getAttribute('cod_turma'), false, false );
  250 + }
320 251  
  252 + if (campoTurma.length == 1 && campoSerie != '') {
  253 + campoTurma.options[0] = new Option('A série não possui nenhuma turma', '', false, false);
  254 + }
321 255 }
322 256  
323 257 function acao2()
324 258 {
  259 + if (!acao()) {
  260 + return false;
  261 + }
325 262  
326   - if(!acao())
327   - return false;
  263 + showExpansivelImprimir(400, 200, '', [], 'Diário de Classe - Avaliações');
328 264  
329   - showExpansivelImprimir(400, 200,'',[], "Diário de Classe - Avalia&ccedil;&otilde;es");
  265 + document.formcadastro.target = 'miolo_' + (DOM_divs.length - 1);
330 266  
331   - document.formcadastro.target = 'miolo_'+(DOM_divs.length-1);
  267 + if (document.formcadastro.tipo_relatorio[0].checked) {
  268 + document.formcadastro.action = 'educar_relatorio_diario_classe_avaliacao_conceitual_proc.php';
  269 + }
  270 + else {
  271 + document.formcadastro.action = 'educar_relatorio_diario_classe_avaliacao_proc.php';
  272 + }
332 273  
333   - if(document.formcadastro.tipo_relatorio[0].checked)
334   - document.formcadastro.action = 'educar_relatorio_diario_classe_avaliacao_conceitual_proc.php';
335   - else
336   - document.formcadastro.action = 'educar_relatorio_diario_classe_avaliacao_proc.php';
337   -
338   - document.formcadastro.submit();
  274 + document.formcadastro.submit();
339 275 }
340 276  
341 277 function getModulos()
342 278 {
343   - var campoEscola = document.getElementById( 'ref_cod_escola' ).value;
344   - var campoCurso = document.getElementById( 'ref_cod_curso' ).value;
345   - var campoAno = document.getElementById( 'ano' ).value;
346   - var campoTurma = document.getElementById('ref_cod_turma').value;
347   - var xml1 = new ajax(getModulos_XML);
348   - strURL = "educar_modulo_xml.php?esc="+campoEscola+"&ano="+campoAno+"&curso="+campoCurso+"&turma="+campoTurma;
349   - xml1.envia(strURL);
  279 + var campoEscola = document.getElementById('ref_cod_escola').value;
  280 + var campoCurso = document.getElementById('ref_cod_curso').value;
  281 + var campoAno = document.getElementById('ano').value;
  282 + var campoTurma = document.getElementById('ref_cod_turma').value;
  283 + var xml1 = new ajax(getModulos_XML);
  284 +
  285 + strURL = 'educar_modulo_xml.php?esc=' + campoEscola + '&ano=' + campoAno + '&curso=' + campoCurso + '&turma=' + campoTurma;
  286 + xml1.envia(strURL);
350 287 }
351 288  
352 289 function getModulos_XML(xml)
353 290 {
354 291  
355   - var modulos = xml.getElementsByTagName( "ano_letivo_modulo" );
  292 + var modulos = xml.getElementsByTagName('ano_letivo_modulo');
356 293  
357   - var campoEscola = document.getElementById( 'ref_cod_escola' ).value;
358   - var campoCurso= document.getElementById( 'ref_cod_curso' ).value;
359   - var campoModulo = document.getElementById( 'ref_cod_modulo' );
360   - var campoAno = document.getElementById( 'ano' ).value;
  294 + var campoEscola = document.getElementById('ref_cod_escola').value;
  295 + var campoCurso= document.getElementById('ref_cod_curso').value;
  296 + var campoModulo = document.getElementById('ref_cod_modulo');
  297 + var campoAno = document.getElementById('ano').value;
361 298  
362   - campoModulo.length = 1;
363   - campoModulo.options[0] = new Option( 'Selecione um módulo', '', false, false );
364   - for ( var j = 0; j < modulos.length; j++ )
365   - {
366   - //if ( modulos[j][2] == campoEscola && modulos[j][3] == campoAno)
367   - //{
368   - campoModulo.options[campoModulo.options.length] = new Option( modulos[j].firstChild.nodeValue, modulos[j].getAttribute('cod_modulo') + "-" +modulos[j].getAttribute('sequencial') , false, false );
369   - //}
370   - }
371   - if ( campoModulo.length == 1 ) {
372   - campoModulo.options[0] = new Option( 'O curso não possui nenhum módulo', '', false, false );
373   - }
  299 + campoModulo.length = 1;
  300 + campoModulo.options[0] = new Option('Selecione um módulo', '', false, false);
374 301  
  302 + for (var j = 0; j < modulos.length; j++) {
  303 + campoModulo.options[campoModulo.options.length] = new Option(
  304 + modulos[j].firstChild.nodeValue,
  305 + modulos[j].getAttribute('cod_modulo') + '-' +modulos[j].getAttribute('sequencial'),
  306 + false, false
  307 + );
  308 + }
375 309  
  310 + if (campoModulo.length == 1) {
  311 + campoModulo.options[0] = new Option('O curso não possui módulos.', '', false, false);
  312 + }
376 313 }
377 314  
378 315 document.getElementById('ano').onchange = function()
379 316 {
380   - getModulos();
381   -
  317 + getModulos();
382 318 }
383 319 -</script>
  320 +</script>
384 321 \ No newline at end of file
... ...
ieducar/intranet/educar_relatorio_diario_classe_avaliacao_conceitual_proc.php
1 1 <?php
2 2  
3   -/*
  3 +/**
4 4 * i-Educar - Sistema de gestão escolar
5 5 *
6 6 * Copyright (C) 2006 Prefeitura Municipal de Itajaí
... ... @@ -19,17 +19,13 @@
19 19 * Você deve ter recebido uma cópia da Licença Pública Geral do GNU junto
20 20 * com este programa; se não, escreva para a Free Software Foundation, Inc., no
21 21 * endereço 59 Temple Street, Suite 330, Boston, MA 02111-1307 USA.
22   - */
23   -
24   -/**
25   - * Diário de classe - avaliação conceitual.
26 22 *
27   - * @author Prefeitura Municipal de Itajaí <ctima@itajai.sc.gov.br>
28   - * @license http://creativecommons.org/licenses/GPL/2.0/legalcode.pt CC GNU GPL
29   - * @package Core
30   - * @subpackage Relatório
31   - * @since Arquivo disponível desde a versão 1.0.0
32   - * @version $Id$
  23 + * @author Prefeitura Municipal de Itajaí <ctima@itajai.sc.gov.br>
  24 + * @category i-Educar
  25 + * @license @@license@@
  26 + * @package iEd_Pmieducar
  27 + * @since Arquivo disponível desde a versão 1.0.0
  28 + * @version $Id$
33 29 */
34 30  
35 31 require_once 'include/clsBase.inc.php';
... ... @@ -38,259 +34,254 @@ require_once &#39;include/clsBanco.inc.php&#39;;
38 34 require_once 'include/pmieducar/geral.inc.php';
39 35 require_once 'include/clsPDF.inc.php';
40 36  
41   -
  37 +/**
  38 + * clsIndexBase class.
  39 + *
  40 + * @author Prefeitura Municipal de Itajaí <ctima@itajai.sc.gov.br>
  41 + * @category i-Educar
  42 + * @license @@license@@
  43 + * @package iEd_Pmieducar
  44 + * @since Classe disponível desde a versão 1.0.0
  45 + * @version @@package_version@@
  46 + */
42 47 class clsIndexBase extends clsBase
43 48 {
44   - function Formular()
45   - {
46   - $this->SetTitulo( "{$this->_instituicao} i-Educar - Diário de Classe - Avalia&ccedil;&otilde;es" );
47   - $this->processoAp = "670";
48   - $this->renderMenu = false;
49   - $this->renderMenuSuspenso = false;
50   - }
  49 + function Formular()
  50 + {
  51 + $this->SetTitulo($this->_instituicao . ' i-Educar - Diário de Classe - Avaliações');
  52 + $this->processoAp = 670;
  53 + $this->renderMenu = FALSE;
  54 + $this->renderMenuSuspenso = FALSE;
  55 + }
51 56 }
52 57  
  58 +/**
  59 + * indice class.
  60 + *
  61 + * @author Prefeitura Municipal de Itajaí <ctima@itajai.sc.gov.br>
  62 + * @category i-Educar
  63 + * @license @@license@@
  64 + * @package iEd_Pmieducar
  65 + * @since Classe disponível desde a versão 1.0.0
  66 + * @version @@package_version@@
  67 + */
53 68 class indice extends clsCadastro
54 69 {
  70 + var $pessoa_logada;
  71 +
  72 + var $ref_cod_instituicao;
  73 + var $ref_cod_escola;
  74 + var $ref_cod_serie;
  75 + var $ref_cod_turma;
  76 +
  77 + var $ano;
  78 + var $mes;
  79 +
  80 + var $nm_escola;
  81 + var $nm_instituicao;
  82 + var $ref_cod_curso;
  83 + var $sequencial;
  84 + var $pdf;
  85 + var $pagina_atual = 1;
  86 + var $total_paginas = 1;
  87 + var $nm_professor;
  88 + var $nm_turma;
  89 + var $nm_serie;
  90 + var $nm_disciplina;
  91 + var $avaliacao_globalizada;
  92 +
  93 + var $page_y = 139;
  94 + var $get_file;
  95 + var $cursos = array();
  96 + var $get_link;
  97 + var $total;
  98 + var $ref_cod_modulo;
  99 + var $numero_registros;
  100 + var $em_branco;
  101 +
  102 + var $meses_do_ano = array(
  103 + 1 => 'JANEIRO',
  104 + 2 => 'FEVEREIRO',
  105 + 3 => 'MARÇO',
  106 + 4 => 'ABRIL',
  107 + 5 => 'MAIO',
  108 + 6 => 'JUNHO',
  109 + 7 => 'JULHO',
  110 + 8 => 'AGOSTO',
  111 + 9 => 'SETEMBRO',
  112 + 10 => 'OUTUBRO',
  113 + 11 => 'NOVEMBRO',
  114 + 12 => 'DEZEMBRO'
  115 + );
  116 +
  117 + function renderHTML()
  118 + {
  119 + if ($_POST) {
  120 + foreach ($_POST as $key => $value) {
  121 + $this->$key = $value;
  122 + }
  123 + }
55 124  
  125 + $this->ref_cod_modulo = explode('-', $this->ref_cod_modulo);
  126 + $this->ref_cod_modulo = $this->ref_cod_modulo[1];
56 127  
57   - /**
58   - * Referencia pega da session para o idpes do usuario atual
59   - *
60   - * @var int
61   - */
62   - var $pessoa_logada;
63   -
64   -
65   - var $ref_cod_instituicao;
66   - var $ref_cod_escola;
67   - var $ref_cod_serie;
68   - var $ref_cod_turma;
69   -
70   - var $ano;
71   - var $mes;
72   -
73   - var $nm_escola;
74   - var $nm_instituicao;
75   - var $ref_cod_curso;
76   - var $sequencial;
77   - var $pdf;
78   - var $pagina_atual = 1;
79   - var $total_paginas = 1;
80   - var $nm_professor;
81   - var $nm_turma;
82   - var $nm_serie;
83   - var $nm_disciplina;
84   - var $avaliacao_globalizada;
85   -
86   - var $page_y = 139;
87   -
88   - var $get_file;
89   -
90   - var $cursos = array();
91   -
92   - var $get_link;
93   -
94   - var $total;
95   -
96   - //var $array_disciplinas = array();
97   -
98   - var $ref_cod_modulo;
99   -
100   - var $numero_registros;
101   - var $em_branco;
102   -
103   - var $meses_do_ano = array(
104   - "1" => "JANEIRO"
105   - ,"2" => "FEVEREIRO"
106   - ,"3" => "MARÇO"
107   - ,"4" => "ABRIL"
108   - ,"5" => "MAIO"
109   - ,"6" => "JUNHO"
110   - ,"7" => "JULHO"
111   - ,"8" => "AGOSTO"
112   - ,"9" => "SETEMBRO"
113   - ,"10" => "OUTUBRO"
114   - ,"11" => "NOVEMBRO"
115   - ,"12" => "DEZEMBRO"
116   - );
117   -
118   -
119   -
120   -
121   - function renderHTML()
122   - {
123   -
124   - if($_POST){
125   - foreach ($_POST as $key => $value) {
126   - $this->$key = $value;
127   -
128   - }
129   - }
130   -
131   - $this->ref_cod_modulo = explode("-",$this->ref_cod_modulo);
132   - $this->ref_cod_modulo = $this->ref_cod_modulo[1];
133   -
134   -
135   - if($this->ref_ref_cod_serie)
136   - $this->ref_cod_serie = $this->ref_ref_cod_serie;
137   -
138   - $fonte = 'arial';
139   - $corTexto = '#000000';
140   -
141   - if(empty($this->ref_cod_turma))
142   - {
143   - echo '<script>
144   - alert("Erro ao gerar relatório!\nNenhuma turma selecionada!");
145   - window.parent.fechaExpansivel(\'div_dinamico_\'+(window.parent.DOM_divs.length-1));
146   - </script>';
147   - return true;
148   - }
149   -
150   -
151   - if($this->ref_cod_escola){
152   -
153   - $obj_escola = new clsPmieducarEscola($this->ref_cod_escola);
154   - $det_escola = $obj_escola->detalhe();
155   - $this->nm_escola = $det_escola['nome'];
156   -
157   - $obj_instituicao = new clsPmieducarInstituicao($det_escola['ref_cod_instituicao']);
158   - $det_instituicao = $obj_instituicao->detalhe();
159   - $this->nm_instituicao = $det_instituicao['nm_instituicao'];
160   -
161   - }
162   -
163   - $obj_calendario = new clsPmieducarEscolaAnoLetivo();
164   - $lista_calendario = $obj_calendario->lista($this->ref_cod_escola,$this->ano,null,null,null,null,null,null,null,1,null);
165   -
166   - $obj_turma = new clsPmieducarTurma($this->ref_cod_turma);
167   - $det_turma = $obj_turma->detalhe();
168   - $this->nm_turma = $det_turma['nm_turma'];
169   -
170   - $obj_serie = new clsPmieducarSerie($this->ref_cod_serie);
171   - $det_serie = $obj_serie->detalhe();
172   - $this->nm_serie = $det_serie['nm_serie'];
173   -
174   - $obj_pessoa = new clsPessoa_($det_turma["ref_cod_regente"]);
175   - $det = $obj_pessoa->detalhe();
176   - $this->nm_professor = $det["nome"];
177   -
178   - if(!$lista_calendario)
179   - {
180   - echo '<script>
181   - alert("Escola não possui calendário definido para este ano");
182   - window.parent.fechaExpansivel(\'div_dinamico_\'+(window.parent.DOM_divs.length-1));
183   - </script>';
184   - return true;
185   - }
186   -
187   - $prox_mes = $this->mes + 1;
188   - $this->pdf = new clsPDF("Diário de Classe - {$this->ano}", "Diário de Classe - {$this->meses_do_ano[$this->mes]} e {$this->meses_do_ano[$prox_mes]} de {$this->ano}", "A4", "", false, false);
189   -
190   - //$this->pdf->largura = 842.0;
191   - //$this->pdf->altura = 595.0;
192   -
193   -
194   - $altura_linha = 15;
195   - $inicio_escrita_y = 175;
196   - $altura_pagina = 760;
197   -
198   -
199   - $obj = new clsPmieducarSerie();
200   - $obj->setOrderby('cod_serie,etapa_curso');
201   - $lista_serie_curso = $obj->lista(null,null,null,$this->ref_cod_curso,null,null,null,null,null,null,null,null,1,$this->ref_cod_instituicao);
202   -
203   - $obj_curso = new clsPmieducarCurso($this->ref_cod_curso);
204   - $det_curso = $obj_curso->detalhe();
205   -
206   - $obj_curso = new clsPmieducarCurso($this->ref_cod_curso);
207   - $det_curso = $obj_curso->detalhe();
  128 + if ($this->ref_ref_cod_serie) {
  129 + $this->ref_cod_serie = $this->ref_ref_cod_serie;
  130 + }
208 131  
209   - if(!$this->em_branco)
210   - {
211   - $obj_matricula_turma = new clsPmieducarMatriculaTurma();
212   - $obj_matricula_turma->setOrderby("nome_aluno");
213   - $lista_matricula = $obj_matricula_turma->lista(null,$this->ref_cod_turma,null,null,null,null,null,null,1,$this->ref_cod_serie,$this->ref_cod_curso,$this->ref_cod_escola,$this->ref_cod_instituicao,null,null,null,null,null,$this->ano,null,true,null,null,true);
214   - }
  132 + $fonte = 'arial';
  133 + $corTexto = '#000000';
215 134  
216   - if($lista_matricula || $this->em_branco)
217   - {
218   - $this->pdf->OpenPage();
219   - $this->addCabecalho();
220   - $num_aluno = 1;
  135 + if (empty($this->ref_cod_turma)) {
  136 + echo '
  137 + <script>
  138 + alert("Erro ao gerar relatório!\nNenhuma turma selecionada!");
  139 + window.parent.fechaExpansivel(\'div_dinamico_\'+(window.parent.DOM_divs.length-1));
  140 + </script>';
221 141  
222   - if($this->em_branco)
223   - {
224   - $lista_matricula = array();
225   - $this->numero_registros = $this->numero_registros? $this->numero_registros : 20;
226   - for ($i = 0 ; $i < $this->numero_registros; $i++)
227   - {
228   - $lista_matricula[] = '';
229   - }
230   - }
  142 + return TRUE;
  143 + }
231 144  
232   - foreach ($lista_matricula as $matricula)
233   - {
  145 + if ($this->ref_cod_escola) {
  146 + $obj_escola = new clsPmieducarEscola($this->ref_cod_escola);
  147 + $det_escola = $obj_escola->detalhe();
  148 + $this->nm_escola = $det_escola['nome'];
234 149  
235   - if($this->page_y > $altura_pagina)
236   - {
237   - $this->desenhaLinhasVertical();
238   - $this->pdf->ClosePage();
239   - $this->pdf->OpenPage();
240   - $this->page_y = 139;
241   - $this->addCabecalho();
  150 + $obj_instituicao = new clsPmieducarInstituicao($det_escola['ref_cod_instituicao']);
  151 + $det_instituicao = $obj_instituicao->detalhe();
  152 + $this->nm_instituicao = $det_instituicao['nm_instituicao'];
  153 + }
242 154  
  155 + $obj_calendario = new clsPmieducarEscolaAnoLetivo();
  156 + $lista_calendario = $obj_calendario->lista($this->ref_cod_escola, $this->ano,
  157 + NULL, NULL, NULL, NULL, NULL, NULL, NULL, 1, NULL);
  158 +
  159 + $obj_turma = new clsPmieducarTurma($this->ref_cod_turma);
  160 + $det_turma = $obj_turma->detalhe();
  161 + $this->nm_turma = $det_turma['nm_turma'];
  162 +
  163 + $obj_serie = new clsPmieducarSerie($this->ref_cod_serie);
  164 + $det_serie = $obj_serie->detalhe();
  165 + $this->nm_serie = $det_serie['nm_serie'];
  166 +
  167 + $obj_pessoa = new clsPessoa_($det_turma['ref_cod_regente']);
  168 + $det = $obj_pessoa->detalhe();
  169 + $this->nm_professor = $det['nome'];
  170 +
  171 + if(!$lista_calendario) {
  172 + echo '
  173 + <script>
  174 + alert("Escola não possui calendário definido para este ano");
  175 + window.parent.fechaExpansivel(\'div_dinamico_\'+(window.parent.DOM_divs.length-1));
  176 + </script>';
  177 + return true;
  178 + }
243 179  
244   - }
  180 + $prox_mes = $this->mes + 1;
  181 + $this->pdf = new clsPDF(sprintf('Diário de Classe - %s', $this->ano),
  182 + sprintf('Diário de Classe - %s e %s de %s', $this->meses_do_ano[$this->mes], $this->meses_do_ano[$prox_mes], $this->ano),
  183 + 'A4', '', FALSE, FALSE);
245 184  
246   - //$obj_matricula = new clsPmieducarMatricula($matricula['ref_cod_matricula']);
247   - //$det_matricula = $obj_matricula->detalhe();
  185 + $altura_linha = 15;
  186 + $inicio_escrita_y = 175;
  187 + $altura_pagina = 760;
248 188  
  189 + $obj = new clsPmieducarSerie();
  190 + $obj->setOrderby('cod_serie, etapa_curso');
  191 + $lista_serie_curso = $obj->lista(NULL, NULL, NULL, $this->ref_cod_curso, NULL,
  192 + NULL, NULL, NULL, NULL, NULL, NULL, NULL, 1, $this->ref_cod_instituicao);
249 193  
250   - $this->pdf->quadrado_relativo( 30, $this->page_y , 540, $altura_linha);
251   - $this->pdf->escreve_relativo(sprintf("%02d",$num_aluno) , 38 ,$this->page_y + 4,30, 15, $fonte, 7, $corTexto, 'left' );
252   - $this->pdf->escreve_relativo($matricula['nome_aluno'] , 55 ,$this->page_y + 4,160, 15, $fonte, 7, $corTexto, 'left' );
253   - $num_aluno++;
254   - $this->page_y +=$altura_linha;
  194 + $obj_curso = new clsPmieducarCurso($this->ref_cod_curso);
  195 + $det_curso = $obj_curso->detalhe();
255 196  
  197 + $obj_curso = new clsPmieducarCurso($this->ref_cod_curso);
  198 + $det_curso = $obj_curso->detalhe();
256 199  
  200 + if (!$this->em_branco) {
  201 + $obj_matricula_turma = new clsPmieducarMatriculaTurma();
  202 + $obj_matricula_turma->setOrderby('nome_aluno');
257 203  
258   - }
  204 + $lista_matricula = $obj_matricula_turma->lista(null, $this->ref_cod_turma,
  205 + NULL, NULL, NULL, NULL, NULL, NULL, 1, $this->ref_cod_serie, $this->ref_cod_curso,
  206 + $this->ref_cod_escola, $this->ref_cod_instituicao, NULL, NULL, NULL, NULL,
  207 + NULL, $this->ano, NULL, TRUE, NULL, NULL, TRUE);
  208 + }
259 209  
260   - $this->desenhaLinhasVertical();
  210 + if ($lista_matricula || $this->em_branco) {
  211 + $this->pdf->OpenPage();
  212 + $this->addCabecalho();
  213 + $num_aluno = 1;
261 214  
262   - $this->rodape();
263   - $this->pdf->ClosePage();
264   - }
265   - else
266   - {
  215 + if ($this->em_branco) {
  216 + $lista_matricula = array();
  217 + $this->numero_registros = $this->numero_registros ? $this->numero_registros : 20;
267 218  
268   - echo '<script>
269   - alert("Turma não possui matriculas");
270   - window.parent.fechaExpansivel(\'div_dinamico_\'+(window.parent.DOM_divs.length-1));
271   - </script>';
  219 + for ($i = 0; $i < $this->numero_registros; $i++) {
  220 + $lista_matricula[] = '';
  221 + }
  222 + }
272 223  
273   - return;
274   - }
  224 + foreach ($lista_matricula as $matricula) {
  225 + if($this->page_y > $altura_pagina) {
  226 + $this->desenhaLinhasVertical();
  227 + $this->pdf->ClosePage();
  228 + $this->pdf->OpenPage();
  229 + $this->page_y = 139;
  230 + $this->addCabecalho();
  231 + }
275 232  
  233 + $this->pdf->quadrado_relativo(30, $this->page_y, 540, $altura_linha);
276 234  
277   - //header( "location: " . $this->pdf->GetLink() );
278   - $this->pdf->CloseFile();
279   - $this->get_link = $this->pdf->GetLink();
  235 + $this->pdf->escreve_relativo(sprintf('%02d', $num_aluno), 38, $this->page_y + 4,
  236 + 30, 15, $fonte, 7, $corTexto, 'left');
280 237  
  238 + $this->pdf->escreve_relativo($matricula['nome_aluno'], 55, $this->page_y + 4,
  239 + 160, 15, $fonte, 7, $corTexto, 'left');
281 240  
  241 + $num_aluno++;
  242 + $this->page_y += $altura_linha;
  243 + }
282 244  
  245 + $this->desenhaLinhasVertical();
283 246  
284   - echo "<script>window.onload=function(){parent.EscondeDiv('LoadImprimir');window.location='download.php?filename=".$this->get_link."'}</script>";
  247 + $this->rodape();
  248 + $this->pdf->ClosePage();
  249 + }
  250 + else {
  251 + echo '
  252 + <script>
  253 + alert("Turma não possui matriculas");
  254 + window.parent.fechaExpansivel(\'div_dinamico_\'+(window.parent.DOM_divs.length-1));
  255 + </script>';
285 256  
286   - echo "<html><center>Se o download não iniciar automaticamente <br /><a target='blank' href='" . $this->get_link . "' style='font-size: 16px; color: #000000; text-decoration: underline;'>clique aqui!</a><br><br>
287   - <span style='font-size: 10px;'>Para visualizar os arquivos PDF, é necessário instalar o Adobe Acrobat Reader.<br>
  257 + return;
  258 + }
288 259  
289   - Clique na Imagem para Baixar o instalador<br><br>
290   - <a href=\"http://www.adobe.com.br/products/acrobat/readstep2.html\" target=\"new\"><br><img src=\"imagens/acrobat.gif\" width=\"88\" height=\"31\" border=\"0\"></a>
291   - </span>
292   - </center>";
293   - }
  260 + $this->pdf->CloseFile();
  261 + $this->get_link = $this->pdf->GetLink();
  262 +
  263 + echo sprintf('
  264 + <script>
  265 + window.onload=function()
  266 + {
  267 + parent.EscondeDiv("LoadImprimir");
  268 + window.location="download.php?filename=%s"
  269 + }
  270 + </script>', $this->get_link);
  271 +
  272 + echo sprintf('
  273 + <html>
  274 + <center>
  275 + Se o download não iniciar automaticamente <br>
  276 + <a target="blank" href="%s" style="font-size: 16px; color: #000000; text-decoration: underline;">clique aqui!</a><br><br>
  277 + <span style="font-size: 10px;">
  278 + Para visualizar os arquivos PDF, é necessário instalar o Adobe Acrobat Reader.<br>
  279 + Clique na Imagem para Baixar o instalador<br><br>
  280 + <a href="http://www.adobe.com.br/products/acrobat/readstep2.html" target="new"><br><img src="imagens/acrobat.gif" width="88" height="31" border="0"></a>
  281 + </span>
  282 + </center>
  283 + </html>', $this->get_link);
  284 + }
294 285  
295 286 public function addCabecalho()
296 287 {
... ... @@ -316,19 +307,23 @@ class indice extends clsCadastro
316 307  
317 308 // Título principal
318 309 $titulo = $config->get($config->titulo, 'i-Educar');
319   - $this->pdf->escreve_relativo($titulo, 30, 30, 782, 80, $fonte, 18,
320   - $corTexto, 'center');
321   - $this->pdf->escreve_relativo(date("d/m/Y"), 510, 100, 782, 80, $fonte, 10,
  310 +
  311 + $this->pdf->escreve_relativo($titulo, 30, 30, 782, 80, $fonte, 18, $corTexto, 'center');
  312 +
  313 + $this->pdf->escreve_relativo(date('d/m/Y'), 510, 100, 782, 80, $fonte, 10,
322 314 $corTexto, 'left');
323 315  
324 316 // Dados escola
325   - $this->pdf->escreve_relativo("Instituição:$this->nm_instituicao", 120, 52,
  317 + $this->pdf->escreve_relativo("Instituição: $this->nm_instituicao", 120, 52,
326 318 300, 80, $fonte, 7, $corTexto, 'left' );
327   - $this->pdf->escreve_relativo("Escola:{$this->nm_escola}",132, 64, 300, 80,
  319 +
  320 + $this->pdf->escreve_relativo("Escola: {$this->nm_escola}", 132, 64, 300, 80,
328 321 $fonte, 7, $corTexto, 'left');
  322 +
329 323 $dif = 0;
  324 +
330 325 if ($this->nm_professor) {
331   - $this->pdf->escreve_relativo("Prof.Regente:{$this->nm_professor}",111, 76,
  326 + $this->pdf->escreve_relativo("Prof. Regente: {$this->nm_professor}", 111, 76,
332 327 300, 80, $fonte, 7, $corTexto, 'left');
333 328 }
334 329 else {
... ... @@ -337,10 +332,12 @@ class indice extends clsCadastro
337 332  
338 333 $this->pdf->escreve_relativo("Série: {$this->nm_serie}", 138, 88 - $dif,
339 334 300, 80, $fonte, 7, $corTexto, 'left');
  335 +
340 336 $this->pdf->escreve_relativo("Turma: {$this->nm_turma}", 134, 100 - $dif,
341 337 300, 80, $fonte, 7, $corTexto, 'left');
342   - $this->pdf->escreve_relativo("BIMESTRE {$this->ref_cod_modulo}/2007",134,
343   - 100 , 300, 80, $fonte, 7, $corTexto, 'right');
  338 +
  339 + $this->pdf->escreve_relativo("BIMESTRE {$this->ref_cod_modulo}/2007", 134,
  340 + 100, 300, 80, $fonte, 7, $corTexto, 'right');
344 341  
345 342 $this->pdf->escreve_relativo("D I Á R I O D E A V A L I A Ç Ã O - $this->nm_serie",
346 343 30, 75, 782, 80, $fonte, 12, $corTexto, 'center');
... ... @@ -348,122 +345,102 @@ class indice extends clsCadastro
348 345 $obj_modulo = new clsPmieducarModulo($this->ref_cod_modulo);
349 346 $det_modulo = $obj_modulo->detalhe();
350 347  
351   - $this->pdf->linha_relativa(201,125,0,14);
352   - $this->pdf->linha_relativa(201,125,369,0);
353   - $this->pdf->escreve_relativo("COMPETÊNCIAS", 195, 128, 350, 80, $fonte,
  348 + $this->pdf->linha_relativa(201, 125, 0, 14);
  349 + $this->pdf->linha_relativa(201, 125, 369, 0);
  350 + $this->pdf->escreve_relativo('COMPETÊNCIAS', 195, 128, 350, 80, $fonte,
354 351 7, $corTexto, 'center');
355 352  
356   - $this->pdf->linha_relativa(30,139,0,20);
  353 + $this->pdf->linha_relativa(30, 139, 0, 20);
357 354  
358   - $this->pdf->linha_relativa(30,139,540,0);
  355 + $this->pdf->linha_relativa(30, 139, 540, 0);
359 356  
360   - $this->pdf->escreve_relativo("Nº", 36, 145, 100, 80, $fonte, 7, $corTexto,
  357 + $this->pdf->escreve_relativo('Nº', 36, 145, 100, 80, $fonte, 7, $corTexto,
361 358 'left');
362   - $this->pdf->escreve_relativo("Nome", 110, 145, 100, 80, $fonte, 7,
363   - $corTexto, 'left' );
364   -
365   - $this->page_y +=19;
366   - $this->pdf->escreve_relativo("Dias de aula: {$this->total}", 715, 100,
367   - 535, 80, $fonte, 10, $corTexto, 'left');
368   - }
369   -
370   -
371   - function desenhaLinhasVertical()
372   - {
373   - $corTexto = '#000000';
374   - /**
375   - *
376   - */
377 359  
378   - $this->total = 16;
379   - $largura_anos = 396;
380   -
381   - if($this->total >= 1)
382   - {
383   -
384   - $incremental = floor($largura_anos/ ($this->total )) ;
385   -
386   - }else {
387   -
388   - $incremental = 1;
389   - }
390   -
391   - $reta_ano_x = 200 ;
392   -
393   -
394   - $resto = $largura_anos - ($incremental * $this->total);
395   -
396   - for($linha = 0;$linha <$this->total-1;$linha++)
397   - {
  360 + $this->pdf->escreve_relativo('Nome', 110, 145, 100, 80, $fonte, 7,
  361 + $corTexto, 'left');
398 362  
399   - if(( $resto > 0) /*|| ($linha + 1 == $total && $resto >= 1) */|| $linha == 0)
400   - {
401   - $reta_ano_x++;
402   - $resto--;
403   - }
  363 + $this->page_y += 19;
  364 + $this->pdf->escreve_relativo('Dias de aula: ' . $this->total, 715, 100, 535,
  365 + 80, $fonte, 10, $corTexto, 'left');
  366 + }
404 367  
405   - $this->pdf->linha_relativa($reta_ano_x,139,0,$this->page_y - 139);
406   - $this->pdf->escreve_relativo( $linha + 1,$reta_ano_x , 145, $incremental, 80, $fonte, 7, $corTexto, 'center' );
  368 + function desenhaLinhasVertical()
  369 + {
  370 + $corTexto = '#000000';
407 371  
  372 + $this->total = 16;
  373 + $largura_anos = 396;
408 374  
409   - $reta_ano_x += $incremental;
  375 + if ($this->total >= 1) {
  376 + $incremental = floor($largura_anos / ($this->total));
  377 + }
  378 + else {
  379 + $incremental = 1;
  380 + }
410 381  
411   - }
  382 + $reta_ano_x = 200 ;
  383 + $resto = $largura_anos - ($incremental * $this->total);
412 384  
413   - $this->pdf->linha_relativa(50,139,0,$this->page_y - 139);
414   - $this->pdf->linha_relativa(812,125,0,$this->page_y - 139);
  385 + for ($linha = 0; $linha < $this->total - 1; $linha++) {
  386 + if (($resto > 0) || $linha == 0) {
  387 + $reta_ano_x++;
  388 + $resto--;
  389 + }
415 390  
  391 + $this->pdf->linha_relativa($reta_ano_x, 139, 0, $this->page_y - 139);
  392 + $this->pdf->escreve_relativo($linha + 1, $reta_ano_x, 145, $incremental,
  393 + 80, $fonte, 7, $corTexto, 'center');
416 394  
417   - $this->pdf->linha_relativa(570,125,0,$this->page_y - 139);
418   - //$this->pdf->escreve_relativo( "Faltas",40, 128, 100, 80, $fonte, 7, $corTexto, 'left' );
  395 + $reta_ano_x += $incremental;
  396 + }
419 397  
  398 + $this->pdf->linha_relativa(50, 139, 0, $this->page_y - 139);
  399 + $this->pdf->linha_relativa(812, 125, 0, $this->page_y - 139);
  400 + $this->pdf->linha_relativa(570, 125, 0, $this->page_y - 139);
  401 + }
420 402  
421   - /**
422   - *
423   - */
424   - }
  403 + function rodape()
  404 + {
  405 + $corTexto = '#000000';
  406 + $fonte = 'arial';
  407 + $dataAtual = date('d/m/Y');
425 408  
426   - function rodape()
427   - {
428   - $corTexto = '#000000';
429   - $fonte = 'arial';
430   - $dataAtual = date("d/m/Y");
431   - $this->pdf->escreve_relativo( "LEGENDA: \n
  409 + $this->pdf->escreve_relativo("LEGENDA: \n
432 410 D = Desenvolvida
433 411 PD = Parcialmente Desenvolvida
434 412 ID = Iniciando o Desenvolvimento
435 413 ND = Não Desenvolvida
436   -CNA = Competência Não Avaliada", 36,750, 200, 50, $fonte, 7, $corTexto, 'left' );
  414 +CNA = Competência Não Avaliada", 36,750, 200, 50, $fonte, 7, $corTexto, 'left');
437 415  
438   - $this->pdf->escreve_relativo( "Data: ____/____/_______", 200,810, 100, 50, $fonte, 7, $corTexto, 'left' );
  416 + $this->pdf->escreve_relativo('Data: ____/____/_______', 200, 810, 100, 50,
  417 + $fonte, 7, $corTexto, 'left');
439 418  
440   - //$this->pdf->escreve_relativo( "Assinatura do Professor(a)", 450,660, 100, 50, $fonte, 7, $corTexto, 'left' );
441   - //$this->pdf->escreve_relativo( "Assinatura do Diretor(a)", 68,520, 100, 50, $fonte, 7, $corTexto, 'left' );
442   - $this->pdf->escreve_relativo( "Assinatura do Professor(a)", 450,780, 100, 50, $fonte, 7, $corTexto, 'left' );
443   - //$this->pdf->linha_relativa(52,517,130,0);
444   - $this->pdf->linha_relativa(430,775,130,0);
445   - }
  419 + $this->pdf->escreve_relativo('Assinatura do Professor(a)', 450, 780, 100, 50,
  420 + $fonte, 7, $corTexto, 'left');
446 421  
447   - function Editar()
448   - {
449   - return false;
450   - }
  422 + $this->pdf->linha_relativa(430, 775, 130, 0);
  423 + }
451 424  
452   - function Excluir()
453   - {
454   - return false;
455   - }
  425 + function Editar()
  426 + {
  427 + return FALSE;
  428 + }
456 429  
  430 + function Excluir()
  431 + {
  432 + return FALSE;
  433 + }
457 434 }
458 435  
459   -// cria uma extensao da classe base
  436 +// Instancia objeto de página
460 437 $pagina = new clsIndexBase();
461   -// cria o conteudo
  438 +
  439 +// Instancia objeto de conteúdo
462 440 $miolo = new indice();
463   -// adiciona o conteudo na clsBase
464   -$pagina->addForm( $miolo );
465   -// gera o html
466   -$pagina->MakeAll();
467 441  
  442 +// Atribui o conteúdo à página
  443 +$pagina->addForm($miolo);
468 444  
469   -?>
  445 +// Gera o código HTML
  446 +$pagina->MakeAll();
470 447 \ No newline at end of file
... ...
ieducar/intranet/educar_relatorio_diario_classe_avaliacao_proc.php
1 1 <?php
2 2  
3   -/*
  3 +/**
4 4 * i-Educar - Sistema de gestão escolar
5 5 *
6 6 * Copyright (C) 2006 Prefeitura Municipal de Itajaí
... ... @@ -19,17 +19,13 @@
19 19 * Você deve ter recebido uma cópia da Licença Pública Geral do GNU junto
20 20 * com este programa; se não, escreva para a Free Software Foundation, Inc., no
21 21 * endereço 59 Temple Street, Suite 330, Boston, MA 02111-1307 USA.
22   - */
23   -
24   -/**
25   - * Diário de classe - avaliação padrão.
26 22 *
27   - * @author Prefeitura Municipal de Itajaí <ctima@itajai.sc.gov.br>
28   - * @license http://creativecommons.org/licenses/GPL/2.0/legalcode.pt CC GNU GPL
29   - * @package Core
30   - * @subpackage Relatório
31   - * @since Arquivo disponível desde a versão 1.0.0
32   - * @version $Id$
  23 + * @author Prefeitura Municipal de Itajaí <ctima@itajai.sc.gov.br>
  24 + * @category i-Educar
  25 + * @license @@license@@
  26 + * @package iEd_Pmieducar
  27 + * @since Arquivo disponível desde a versão 1.0.0
  28 + * @version $Id$
33 29 */
34 30  
35 31 require_once 'include/clsBase.inc.php';
... ... @@ -38,382 +34,366 @@ require_once &#39;include/clsBanco.inc.php&#39;;
38 34 require_once 'include/pmieducar/geral.inc.php';
39 35 require_once 'include/clsPDF.inc.php';
40 36  
41   -
  37 +/**
  38 + * clsIndexBase class.
  39 + *
  40 + * @author Prefeitura Municipal de Itajaí <ctima@itajai.sc.gov.br>
  41 + * @category i-Educar
  42 + * @license @@license@@
  43 + * @package iEd_Pmieducar
  44 + * @since Classe disponível desde a versão 1.0.0
  45 + * @version @@package_version@@
  46 + */
42 47 class clsIndexBase extends clsBase
43 48 {
44   - function Formular()
45   - {
46   - $this->SetTitulo( "{$this->_instituicao} i-Educar - Diário de Classe - Avalia&ccedil;&otilde;es" );
47   - $this->processoAp = "670";
48   - $this->renderMenu = false;
49   - $this->renderMenuSuspenso = false;
50   - }
  49 + function Formular()
  50 + {
  51 + $this->SetTitulo($this->_instituicao . ' i-Educar - Diário de Classe - Avaliações');
  52 + $this->processoAp = 670;
  53 + $this->renderMenu = FALSE;
  54 + $this->renderMenuSuspenso = FALSE;
  55 + }
51 56 }
52 57  
  58 +/**
  59 + * indice class.
  60 + *
  61 + * @author Prefeitura Municipal de Itajaí <ctima@itajai.sc.gov.br>
  62 + * @category i-Educar
  63 + * @license @@license@@
  64 + * @package iEd_Pmieducar
  65 + * @since Classe disponível desde a versão 1.0.0
  66 + * @version @@package_version@@
  67 + */
53 68 class indice extends clsCadastro
54 69 {
  70 + var $pessoa_logada;
  71 +
  72 + var $ref_cod_instituicao;
  73 + var $ref_cod_escola;
  74 + var $ref_cod_serie;
  75 + var $ref_cod_turma;
  76 +
  77 + var $ano;
  78 + var $mes;
  79 +
  80 + var $nm_escola;
  81 + var $nm_instituicao;
  82 + var $ref_cod_curso;
  83 + var $sequencial;
  84 + var $pdf;
  85 + var $pagina_atual = 1;
  86 + var $total_paginas = 1;
  87 + var $nm_professor;
  88 + var $nm_turma;
  89 + var $nm_serie;
  90 + var $nm_disciplina;
  91 + var $avaliacao_globalizada;
  92 +
  93 + var $page_y = 139;
  94 +
  95 + var $get_file;
  96 +
  97 + var $cursos = array();
  98 +
  99 + var $get_link;
  100 +
  101 + var $total;
  102 +
  103 + var $ref_cod_modulo;
  104 +
  105 + var $numero_registros;
  106 + var $em_branco;
  107 +
  108 + var $meses_do_ano = array(
  109 + 1 => 'JANEIRO',
  110 + 2 => 'FEVEREIRO',
  111 + 3 => 'MARÇO',
  112 + 4 => 'ABRIL',
  113 + 5 => 'MAIO',
  114 + 6 => 'JUNHO',
  115 + 7 => 'JULHO',
  116 + 8 => 'AGOSTO',
  117 + 9 => 'SETEMBRO',
  118 + 10 => 'OUTUBRO',
  119 + 11 => 'NOVEMBRO',
  120 + 12 => 'DEZEMBRO'
  121 + );
  122 +
  123 + function renderHTML()
  124 + {
  125 + if ($_POST) {
  126 + foreach ($_POST as $key => $value) {
  127 + $this->$key = $value;
  128 + }
  129 + }
55 130  
  131 + if ($this->ref_ref_cod_serie) {
  132 + $this->ref_cod_serie = $this->ref_ref_cod_serie;
  133 + }
56 134  
57   - /**
58   - * Referencia pega da session para o idpes do usuario atual
59   - *
60   - * @var int
61   - */
62   - var $pessoa_logada;
63   -
64   -
65   - var $ref_cod_instituicao;
66   - var $ref_cod_escola;
67   - var $ref_cod_serie;
68   - var $ref_cod_turma;
69   -
70   - var $ano;
71   - var $mes;
72   -
73   - var $nm_escola;
74   - var $nm_instituicao;
75   - var $ref_cod_curso;
76   - var $sequencial;
77   - var $pdf;
78   - var $pagina_atual = 1;
79   - var $total_paginas = 1;
80   - var $nm_professor;
81   - var $nm_turma;
82   - var $nm_serie;
83   - var $nm_disciplina;
84   - var $avaliacao_globalizada;
85   -
86   - var $page_y = 139;
87   -
88   - var $get_file;
89   -
90   - var $cursos = array();
91   -
92   - var $get_link;
93   -
94   - var $total;
95   -
96   - //var $array_disciplinas = array();
97   -
98   - var $ref_cod_modulo;
99   -
100   - var $numero_registros;
101   - var $em_branco;
102   -
103   - var $meses_do_ano = array(
104   - "1" => "JANEIRO"
105   - ,"2" => "FEVEREIRO"
106   - ,"3" => "MARÇO"
107   - ,"4" => "ABRIL"
108   - ,"5" => "MAIO"
109   - ,"6" => "JUNHO"
110   - ,"7" => "JULHO"
111   - ,"8" => "AGOSTO"
112   - ,"9" => "SETEMBRO"
113   - ,"10" => "OUTUBRO"
114   - ,"11" => "NOVEMBRO"
115   - ,"12" => "DEZEMBRO"
116   - );
117   -
118   -
119   - function renderHTML()
120   - {
121   -
122   - if($_POST){
123   - foreach ($_POST as $key => $value) {
124   - $this->$key = $value;
125   -
126   - }
127   - }
128   -
129   - if($this->ref_ref_cod_serie)
130   - $this->ref_cod_serie = $this->ref_ref_cod_serie;
131   -
132   - $fonte = 'arial';
133   - $corTexto = '#000000';
134   -
135   - if(empty($this->ref_cod_turma))
136   - {
137   - echo '<script>
138   - alert("Erro ao gerar relatório!\nNenhuma turma selecionada!");
139   - window.parent.fechaExpansivel(\'div_dinamico_\'+(window.parent.DOM_divs.length-1));
140   - </script>';
141   - return true;
142   - }
143   -
144   -
145   - if($this->ref_cod_escola){
146   -
147   - $obj_escola = new clsPmieducarEscola($this->ref_cod_escola);
148   - $det_escola = $obj_escola->detalhe();
149   - $this->nm_escola = $det_escola['nome'];
150   -
151   - $obj_instituicao = new clsPmieducarInstituicao($det_escola['ref_cod_instituicao']);
152   - $det_instituicao = $obj_instituicao->detalhe();
153   - $this->nm_instituicao = $det_instituicao['nm_instituicao'];
154   -
155   - }
  135 + $fonte = 'arial';
  136 + $corTexto = '#000000';
156 137  
157   - $obj_calendario = new clsPmieducarEscolaAnoLetivo();
158   - $lista_calendario = $obj_calendario->lista($this->ref_cod_escola,$this->ano,null,null,null,null,null,null,null,1,null);
  138 + if (empty($this->ref_cod_turma))
  139 + {
  140 + echo '
  141 + <script>
  142 + alert("Erro ao gerar relatório!\nNenhuma turma selecionada!");
  143 + window.parent.fechaExpansivel(\'div_dinamico_\'+(window.parent.DOM_divs.length-1));
  144 + </script>';
159 145  
160   - $obj_turma = new clsPmieducarTurma($this->ref_cod_turma);
161   - $det_turma = $obj_turma->detalhe();
162   - $this->nm_turma = $det_turma['nm_turma'];
  146 + return TRUE;
  147 + }
163 148  
164   - $obj_serie = new clsPmieducarSerie($this->ref_cod_serie);
165   - $det_serie = $obj_serie->detalhe();
166   - $this->nm_serie = $det_serie['nm_serie'];
  149 + if ($this->ref_cod_escola) {
  150 + $obj_escola = new clsPmieducarEscola($this->ref_cod_escola);
  151 + $det_escola = $obj_escola->detalhe();
  152 + $this->nm_escola = $det_escola['nome'];
167 153  
168   - $obj_pessoa = new clsPessoa_($det_turma["ref_cod_regente"]);
169   - $det = $obj_pessoa->detalhe();
170   - $this->nm_professor = $det["nome"];
  154 + $obj_instituicao = new clsPmieducarInstituicao($det_escola['ref_cod_instituicao']);
  155 + $det_instituicao = $obj_instituicao->detalhe();
  156 + $this->nm_instituicao = $det_instituicao['nm_instituicao'];
  157 + }
171 158  
172   - if(!$lista_calendario)
173   - {
174   - echo '<script>
175   - alert("Escola não possui calendário definido para este ano");
176   - window.parent.fechaExpansivel(\'div_dinamico_\'+(window.parent.DOM_divs.length-1));
177   - </script>';
178   - return true;
179   - }
  159 + $obj_calendario = new clsPmieducarEscolaAnoLetivo();
  160 + $lista_calendario = $obj_calendario->lista($this->ref_cod_escola, $this->ano,
  161 + NULL, NULL, NULL, NULL, NULL, NULL, NULL, 1, NULL);
180 162  
181   - $prox_mes = $this->mes + 1;
182   - $this->pdf = new clsPDF("Diário de Classe - {$this->ano}", "Diário de Classe - {$this->meses_do_ano[$this->mes]} e {$this->meses_do_ano[$prox_mes]} de {$this->ano}", "A4", "", false, false);
  163 + $obj_turma = new clsPmieducarTurma($this->ref_cod_turma);
  164 + $det_turma = $obj_turma->detalhe();
  165 + $this->nm_turma = $det_turma['nm_turma'];
183 166  
184   - //$this->pdf->largura = 842.0;
185   - //$this->pdf->altura = 595.0;
  167 + $obj_serie = new clsPmieducarSerie($this->ref_cod_serie);
  168 + $det_serie = $obj_serie->detalhe();
  169 + $this->nm_serie = $det_serie['nm_serie'];
186 170  
187   - $altura_linha = 15;
188   - $inicio_escrita_y = 175;
189   - $altura_pagina = 760;
  171 + $obj_pessoa = new clsPessoa_($det_turma["ref_cod_regente"]);
  172 + $det = $obj_pessoa->detalhe();
  173 + $this->nm_professor = $det["nome"];
190 174  
  175 + if (!$lista_calendario) {
  176 + echo '
  177 + <script>
  178 + alert("Escola não possui calendário definido para este ano");
  179 + window.parent.fechaExpansivel(\'div_dinamico_\'+(window.parent.DOM_divs.length-1));
  180 + </script>';
191 181  
192   - $obj = new clsPmieducarSerie();
193   - $obj->setOrderby('cod_serie,etapa_curso');
194   - $lista_serie_curso = $obj->lista(null,null,null,$this->ref_cod_curso,null,null,null,null,null,null,null,null,1,$this->ref_cod_instituicao);
195   -
196   - $obj_curso = new clsPmieducarCurso($this->ref_cod_curso);
197   - $det_curso = $obj_curso->detalhe();
198   -
199   - $obj_curso = new clsPmieducarCurso($this->ref_cod_curso);
200   - $det_curso = $obj_curso->detalhe();
201   -
202   - //if($det_curso['falta_ch_globalizada'])
203   - if($det_curso['falta_ch_globalizada'] && $det_curso['avaliacao_globalizada'] == 't')
204   - {
205   - if(!$this->em_branco)
206   - {
207   - $obj_matricula_turma = new clsPmieducarMatriculaTurma();
208   - $obj_matricula_turma->setOrderby("nome_aluno");
209   - $lista_matricula = $obj_matricula_turma->lista(null,$this->ref_cod_turma,null,null,null,null,null,null,1,$this->ref_cod_serie,$this->ref_cod_curso,$this->ref_cod_escola,$this->ref_cod_instituicao,null,null,null,null,null,$this->ano,null,true,null,null,true);
210   - }
211   - if($lista_matricula || $this->em_branco)
212   - {
213   - $this->pdf->OpenPage();
214   - $this->addCabecalho();
215   - $num_aluno = 1;
216   -
217   - if($this->em_branco)
218   - {
219   - $lista_matricula = array();
220   - $this->numero_registros = $this->numero_registros? $this->numero_registros : 20;
221   - for ($i = 0 ; $i < $this->numero_registros; $i++)
222   - {
223   - $lista_matricula[] = '';
224   - }
225   - }
226   -
227   - foreach ($lista_matricula as $matricula)
228   - {
229   -
230   - if($this->page_y > $altura_pagina)
231   - {
232   - $this->desenhaLinhasVertical();
233   - $this->pdf->ClosePage();
234   - $this->pdf->OpenPage();
235   - $this->page_y = 139;
236   - $this->addCabecalho();
237   -
238   -
239   - }
240   -
241   - //$obj_matricula = new clsPmieducarMatricula($matricula['ref_cod_matricula']);
242   - //$det_matricula = $obj_matricula->detalhe();
243   -
244   - //$obj_aluno = new clsPmieducarAluno();
245   -
246   - //$det_aluno = array_shift($obj_aluno->lista($det_matricula['ref_cod_aluno']));
247   -
248   - $this->pdf->quadrado_relativo( 30, $this->page_y , 540, $altura_linha);
249   - $this->pdf->escreve_relativo(sprintf("%02d",$num_aluno) , 38 ,$this->page_y + 4,30, 15, $fonte, 7, $corTexto, 'left' );
250   - $this->pdf->escreve_relativo($matricula['nome_aluno'] , 55 ,$this->page_y + 4,160, 15, $fonte, 7, $corTexto, 'left' );
251   - $num_aluno++;
252   - $this->page_y +=$altura_linha;
253   -
254   -
255   -
256   - }
257   -
258   - $this->desenhaLinhasVertical();
259   -
260   - $this->rodape();
261   - $this->pdf->ClosePage();
262   - }
263   - else
264   - {
265   -
266   - echo '<script>
267   - alert("Turma não possui matriculas");
268   - window.parent.fechaExpansivel(\'div_dinamico_\'+(window.parent.DOM_divs.length-1));
269   - </script>';
270   -
271   - return;
272   - }
273   -
274   -
275   - //header( "location: " . $this->pdf->GetLink() );
276   - $this->pdf->CloseFile();
277   - $this->get_link = $this->pdf->GetLink();
278   -
279   - }
280   - else
281   - {
282   - /**
283   - * CARGA HORARIA NAO GLOBALIZADA
284   - * GERAR UMA PAGINA PARA CADA DISICIPLINA
285   - */
286   -
287   - //$obj_turma_disc = new clsPmieducarTurmaDisciplina();
288   - $obj_turma_disc = new clsPmieducarDisciplinaSerie();
289   - $obj_turma_disc->setCamposLista("ref_cod_disciplina");
290   - $lst_turma_disc = $obj_turma_disc->lista(null,$this->ref_cod_serie,1);
291   - if($lst_turma_disc)
292   - {
293   - foreach ($lst_turma_disc as $disciplina) {
294   - $obj_disc = new clsPmieducarDisciplina($disciplina);
295   - $det_disc = $obj_disc->detalhe();
296   - $this->nm_disciplina = $det_disc['nm_disciplina'];
297   - $this->page_y = 139;
298   -
299   - /**
300   - * numero de semanas dos meses
301   - */
302   - $obj_quadro = new clsPmieducarQuadroHorario();
303   - $obj_quadro->setCamposLista("cod_quadro_horario");
304   - $quadro_horario = $obj_quadro->lista(null,null,null,$this->ref_cod_turma, null, null, null, null,1);
305   - if(!$quadro_horario && $det_curso['avaliacao_globalizada'] == 't')
306   - {
307   - echo '<script>alert(\'Turma não possui quadro de horários\'); window.location = "educar_relatorio_diario_classe.php";</script>';
308   - break;
309   - }
310   -
311   - $obj_quadro_horarios = new clsPmieducarQuadroHorarioHorarios();
312   - $obj_quadro_horarios->setCamposLista("dia_semana");
313   - $obj_quadro_horarios->setOrderby("1 asc");
314   -
315   - $lista_quadro_horarios = $obj_quadro_horarios->lista($quadro_horario,$this->ref_cod_serie,$this->ref_cod_escola,$disciplina,null,null,null,null,null,null,null,null,null,null,null,null,null,null,1);
316   -
317   - if(!$this->em_branco)
318   - {
319   - $obj_matricula_turma = new clsPmieducarMatriculaTurma();
320   - $obj_matricula_turma->setOrderby("nome_ascii");
321   - $lista_matricula = $obj_matricula_turma->lista(null,$this->ref_cod_turma,null,null,null,null,null,null,1,$this->ref_cod_serie,$this->ref_cod_curso,$this->ref_cod_escola,$this->ref_cod_instituicao,null,null,array( 1, 2, 3 ),null,null,$this->ano,null,true,null,null,true);
322   - }
323   - $num_aluno = 1;
324   - if($lista_matricula || $this->em_branco)
325   - {
326   - $this->pdf->OpenPage();
327   - $this->addCabecalho();
328   -
329   - if($this->em_branco)
330   - {
331   - $lista_matricula = array();
332   - $this->numero_registros = $this->numero_registros? $this->numero_registros : 20;
333   - for ($i = 0 ; $i < $this->numero_registros; $i++)
334   - {
335   - $lista_matricula[] = '';
336   - }
337   - }
338   - foreach ($lista_matricula as $matricula)
339   - {
340   -
341   - if($this->page_y > $altura_pagina)
342   - {
343   - $this->desenhaLinhasVertical();
344   - $this->pdf->ClosePage();
345   - $this->pdf->OpenPage();
346   - $this->page_y = 139;
347   - $this->addCabecalho();
348   -
349   -
350   - }
351   -
352   - //$obj_matricula = new clsPmieducarMatricula($matricula['ref_cod_matricula']);
353   - //$det_matricula = $obj_matricula->detalhe();
354   -
355   - //$obj_aluno = new clsPmieducarAluno();
356   - //$det_aluno = array_shift($obj_aluno->lista($det_matricula['ref_cod_aluno']));
357   -
358   - $this->pdf->quadrado_relativo( 30, $this->page_y , 540, $altura_linha);
359   - $this->pdf->escreve_relativo($num_aluno , 38 ,$this->page_y + 4,30, 15, $fonte, 7, $corTexto, 'left' );
360   - $this->pdf->escreve_relativo($matricula['nome_aluno'] , 55 ,$this->page_y + 4,160, 15, $fonte, 7, $corTexto, 'left' );
361   -
362   - $num_aluno++;
363   - $this->page_y +=$altura_linha;
364   -
365   -
366   -
367   - }
368   - $this->desenhaLinhasVertical();
369   - $this->rodape();
370   - $this->pdf->ClosePage();
371   - }
372   - else
373   - {
374   -
375   - echo '<script>
376   - alert("Turma não possui matriculas");
377   - window.parent.fechaExpansivel(\'div_dinamico_\'+(window.parent.DOM_divs.length-1));
378   - </script>';
379   -
380   - return;
381   - }
382   -
383   -
384   - }
385   - /**
386   - * gera diario de clase de avaliacoes
387   - */
388   - $this->pdf->CloseFile();
389   - $this->get_link = $this->pdf->GetLink();
390   - }
391   - else
392   - {
393   -
394   - echo '<script>
395   - alert("A Série não possui disciplinas");
396   - window.parent.fechaExpansivel(\'div_dinamico_\'+(window.parent.DOM_divs.length-1));
397   - </script>';
398   -
399   - return;
400   - }
401   -
402   -
403   - //header( "location: " . $this->pdf->GetLink() );
404   -
405   - }
406   -
407   - echo "<script>window.onload=function(){parent.EscondeDiv('LoadImprimir');window.location='download.php?filename=".$this->get_link."'}</script>";
  182 + return TRUE;
  183 + }
408 184  
409   - echo "<html><center>Se o download não iniciar automaticamente <br /><a target='blank' href='" . $this->get_link . "' style='font-size: 16px; color: #000000; text-decoration: underline;'>clique aqui!</a><br><br>
410   - <span style='font-size: 10px;'>Para visualizar os arquivos PDF, é necessário instalar o Adobe Acrobat Reader.<br>
  185 + $prox_mes = $this->mes + 1;
  186 + $this->pdf = new clsPDF('Diário de Classe - ' . $this->ano,
  187 + "Diário de Classe - {$this->meses_do_ano[$this->mes]} e {$this->meses_do_ano[$prox_mes]} de {$this->ano}",
  188 + 'A4', '', FALSE, FALSE);
  189 +
  190 + $altura_linha = 15;
  191 + $inicio_escrita_y = 175;
  192 + $altura_pagina = 760;
  193 +
  194 + $obj = new clsPmieducarSerie();
  195 + $obj->setOrderby('cod_serie, etapa_curso');
  196 + $lista_serie_curso = $obj->lista(NULL, NULL, NULL,$this->ref_cod_curso, NULL,
  197 + NULL, NULL, NULL, NULL, NULL, NULL, NULL, 1, $this->ref_cod_instituicao);
  198 +
  199 + $obj_curso = new clsPmieducarCurso($this->ref_cod_curso);
  200 + $det_curso = $obj_curso->detalhe();
  201 +
  202 + $obj_curso = new clsPmieducarCurso($this->ref_cod_curso);
  203 + $det_curso = $obj_curso->detalhe();
  204 +
  205 + if ($det_curso['falta_ch_globalizada'] && $det_curso['avaliacao_globalizada'] == 't') {
  206 + if (!$this->em_branco) {
  207 + $obj_matricula_turma = new clsPmieducarMatriculaTurma();
  208 + $obj_matricula_turma->setOrderby('nome_aluno');
  209 + $lista_matricula = $obj_matricula_turma->lista(NULL, $this->ref_cod_turma,
  210 + NULL, NULL, NULL, NULL, NULL, NULL, 1, $this->ref_cod_serie, $this->ref_cod_curso,
  211 + $this->ref_cod_escola, $this->ref_cod_instituicao, NULL, NULL, NULL, NULL,
  212 + NULL, $this->ano, NULL, TRUE, NULL, NULL, TRUE);
  213 + }
  214 +
  215 + if($lista_matricula || $this->em_branco) {
  216 + $this->pdf->OpenPage();
  217 + $this->addCabecalho();
  218 + $num_aluno = 1;
  219 +
  220 + if ($this->em_branco) {
  221 + $lista_matricula = array();
  222 + $this->numero_registros = $this->numero_registros? $this->numero_registros : 20;
  223 +
  224 + for ($i = 0 ; $i < $this->numero_registros; $i++) {
  225 + $lista_matricula[] = '';
  226 + }
  227 + }
  228 +
  229 + foreach ($lista_matricula as $matricula) {
  230 + if($this->page_y > $altura_pagina) {
  231 + $this->desenhaLinhasVertical();
  232 + $this->pdf->ClosePage();
  233 + $this->pdf->OpenPage();
  234 + $this->page_y = 139;
  235 + $this->addCabecalho();
  236 + }
  237 +
  238 + $this->pdf->quadrado_relativo( 30, $this->page_y , 540, $altura_linha);
  239 + $this->pdf->escreve_relativo(sprintf("%02d",$num_aluno) , 38 ,$this->page_y + 4,30, 15, $fonte, 7, $corTexto, 'left' );
  240 + $this->pdf->escreve_relativo($matricula['nome_aluno'] , 55 ,$this->page_y + 4,160, 15, $fonte, 7, $corTexto, 'left' );
  241 +
  242 + $num_aluno++;
  243 + $this->page_y +=$altura_linha;
  244 + }
  245 +
  246 + $this->desenhaLinhasVertical();
  247 +
  248 + $this->rodape();
  249 + $this->pdf->ClosePage();
  250 + }
  251 + else {
  252 + echo '
  253 + <script>
  254 + alert("Turma não possui matriculas");
  255 + window.parent.fechaExpansivel(\'div_dinamico_\'+(window.parent.DOM_divs.length-1));
  256 + </script>';
  257 +
  258 + return;
  259 + }
  260 +
  261 + $this->pdf->CloseFile();
  262 + $this->get_link = $this->pdf->GetLink();
  263 + }
  264 + else {
  265 + $obj_turma_disc = new clsPmieducarDisciplinaSerie();
  266 + $obj_turma_disc->setCamposLista('ref_cod_disciplina');
  267 + $lst_turma_disc = $obj_turma_disc->lista(NULL, $this->ref_cod_serie, 1);
  268 +
  269 + if ($lst_turma_disc) {
  270 + foreach ($lst_turma_disc as $disciplina) {
  271 + $obj_disc = new clsPmieducarDisciplina($disciplina);
  272 + $det_disc = $obj_disc->detalhe();
  273 + $this->nm_disciplina = $det_disc['nm_disciplina'];
  274 + $this->page_y = 139;
  275 +
  276 + // Número de semanas dos meses
  277 + $obj_quadro = new clsPmieducarQuadroHorario();
  278 + $obj_quadro->setCamposLista("cod_quadro_horario");
  279 + $quadro_horario = $obj_quadro->lista(NULL, NULL, NULL,$this->ref_cod_turma,
  280 + NULL, NULL, NULL, NULL, 1);
  281 +
  282 + if (!$quadro_horario && $det_curso['avaliacao_globalizada'] == 't') {
  283 + echo '
  284 + <script>
  285 + alert("Turma não possui quadro de horários");
  286 + window.location = "educar_relatorio_diario_classe.php";
  287 + </script>';
  288 + break;
  289 + }
  290 +
  291 + $obj_quadro_horarios = new clsPmieducarQuadroHorarioHorarios();
  292 + $obj_quadro_horarios->setCamposLista('dia_semana');
  293 + $obj_quadro_horarios->setOrderby('1 asc');
  294 +
  295 + $lista_quadro_horarios = $obj_quadro_horarios->lista($quadro_horario,
  296 + $this->ref_cod_serie, $this->ref_cod_escola, $disciplina, NULL, NULL,
  297 + NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 1);
  298 +
  299 + if (!$this->em_branco) {
  300 + $obj_matricula_turma = new clsPmieducarMatriculaTurma();
  301 + $obj_matricula_turma->setOrderby('nome_ascii');
  302 + $lista_matricula = $obj_matricula_turma->lista( NULL, $this->ref_cod_turma,
  303 + NULL, NULL, NULL, NULL, NULL, NULL, 1, $this->ref_cod_serie,
  304 + $this->ref_cod_curso, $this->ref_cod_escola, $this->ref_cod_instituicao,
  305 + NULL, NULL, array(1, 2, 3), NULL, NULL, $this->ano, NULL, TRUE,
  306 + NULL, NULL, TRUE);
  307 + }
  308 +
  309 + $num_aluno = 1;
  310 +
  311 + if ($lista_matricula || $this->em_branco) {
  312 + $this->pdf->OpenPage();
  313 + $this->addCabecalho();
  314 +
  315 + if ($this->em_branco) {
  316 + $lista_matricula = array();
  317 + $this->numero_registros = $this->numero_registros ?
  318 + $this->numero_registros : 20;
  319 +
  320 + for ($i = 0 ; $i < $this->numero_registros; $i++) {
  321 + $lista_matricula[] = '';
  322 + }
  323 + }
  324 +
  325 + foreach ($lista_matricula as $matricula) {
  326 + if($this->page_y > $altura_pagina) {
  327 + $this->desenhaLinhasVertical();
  328 + $this->pdf->ClosePage();
  329 + $this->pdf->OpenPage();
  330 + $this->page_y = 139;
  331 + $this->addCabecalho();
  332 + }
  333 +
  334 + $this->pdf->quadrado_relativo(30, $this->page_y , 540, $altura_linha);
  335 +
  336 + $this->pdf->escreve_relativo($num_aluno, 38 ,$this->page_y + 4,
  337 + 30, 15, $fonte, 7, $corTexto, 'left');
  338 +
  339 + $this->pdf->escreve_relativo($matricula['nome_aluno'] , 55,
  340 + $this->page_y + 4, 160, 15, $fonte, 7, $corTexto, 'left');
  341 +
  342 + $num_aluno++;
  343 + $this->page_y +=$altura_linha;
  344 + }
  345 +
  346 + $this->desenhaLinhasVertical();
  347 + $this->rodape();
  348 + $this->pdf->ClosePage();
  349 + }
  350 + else {
  351 + echo '
  352 + <script>
  353 + alert("Turma não possui matriculas");
  354 + window.parent.fechaExpansivel(\'div_dinamico_\'+(window.parent.DOM_divs.length-1));
  355 + </script>';
  356 +
  357 + return;
  358 + }
  359 + }
  360 +
  361 + $this->pdf->CloseFile();
  362 + $this->get_link = $this->pdf->GetLink();
  363 + }
  364 + else {
  365 + echo '
  366 + <script>
  367 + alert("A Série não possui disciplinas");
  368 + window.parent.fechaExpansivel(\'div_dinamico_\'+(window.parent.DOM_divs.length-1));
  369 + </script>';
  370 +
  371 + return;
  372 + }
  373 + }
411 374  
412   - Clique na Imagem para Baixar o instalador<br><br>
413   - <a href=\"http://www.adobe.com.br/products/acrobat/readstep2.html\" target=\"new\"><br><img src=\"imagens/acrobat.gif\" width=\"88\" height=\"31\" border=\"0\"></a>
414   - </span>
415   - </center>";
416   - }
  375 + echo sprintf('
  376 + <script>
  377 + window.onload=function()
  378 + {
  379 + parent.EscondeDiv("LoadImprimir");
  380 + window.location="download.php?filename=%s"
  381 + }
  382 + </script>', $this->get_link);
  383 +
  384 + echo sprintf('
  385 + <html>
  386 + <center>
  387 + Se o download não iniciar automaticamente <br>
  388 + <a target="blank" href="%s" style="font-size: 16px; color: #000000; text-decoration: underline;">clique aqui!</a><br><br>
  389 + <span style="font-size: 10px;">
  390 + Para visualizar os arquivos PDF, é necessário instalar o Adobe Acrobat Reader.<br>
  391 + Clique na Imagem para Baixar o instalador<br><br>
  392 + <a href="http://www.adobe.com.br/products/acrobat/readstep2.html" target="new"><br><img src="imagens/acrobat.gif" width="88" height="31" border="0"></a>
  393 + </span>
  394 + </center>
  395 + </html>', $this->get_link);
  396 + }
417 397  
418 398 public function addCabecalho()
419 399 {
... ... @@ -434,7 +414,7 @@ class indice extends clsCadastro
434 414 // Cabeçalho
435 415 $logo = $config->get($config->logo, 'imagens/brasao.gif');
436 416  
437   - $this->pdf->quadrado_relativo( 30, $altura, 540, 85 );
  417 + $this->pdf->quadrado_relativo(30, $altura, 540, 85);
438 418 $this->pdf->insertImageScaled('gif', $logo, 50, 95, 41);
439 419  
440 420 // Título principal
... ... @@ -443,25 +423,29 @@ class indice extends clsCadastro
443 423 $corTexto, 'center');
444 424  
445 425 // Dados escola
446   - $this->pdf->escreve_relativo("Instituição:$this->nm_instituicao", 120, 52,
  426 + $this->pdf->escreve_relativo('Instituição: ' . $this->nm_instituicao, 120, 52,
447 427 300, 80, $fonte, 7, $corTexto, 'left' );
448   - $this->pdf->escreve_relativo("Escola:{$this->nm_escola}",132, 64, 300, 80,
  428 +
  429 + $this->pdf->escreve_relativo('Escola: ' . $this->nm_escola,132, 64, 300, 80,
449 430 $fonte, 7, $corTexto, 'left');
  431 +
450 432 $dif = 0;
451 433  
452 434 if($this->nm_professor) {
453   - $this->pdf->escreve_relativo( "Prof.Regente:{$this->nm_professor}",111, 76, 300, 80, $fonte, 7, $corTexto, 'left' );
  435 + $this->pdf->escreve_relativo('Prof. Regente: ' . $this->nm_professor,111,
  436 + 76, 300, 80, $fonte, 7, $corTexto, 'left');
454 437 }
455 438 else {
456 439 $dif = 12;
457 440 }
458 441  
459   - $this->pdf->escreve_relativo("Série:{$this->nm_serie}",138, 88 - $dif, 300,
460   - 80, $fonte, 7, $corTexto, 'left' );
461   - $this->pdf->escreve_relativo("Turma:{$this->nm_turma}",134, 100 - $dif, 300,
462   - 80, $fonte, 7, $corTexto, 'left' );
  442 + $this->pdf->escreve_relativo('Série: ' . $this->nm_serie, 138, 88 - $dif,
  443 + 300, 80, $fonte, 7, $corTexto, 'left');
  444 +
  445 + $this->pdf->escreve_relativo('Turma: ' . $this->nm_turma, 134, 100 - $dif,
  446 + 300, 80, $fonte, 7, $corTexto, 'left');
463 447  
464   - $this->pdf->escreve_relativo("Diário de Classe - {$this->nm_disciplina}",
  448 + $this->pdf->escreve_relativo('Diário de Classe - ' . $this->nm_disciplina,
465 449 30, 75, 782, 80, $fonte, 12, $corTexto, 'center');
466 450  
467 451 $obj_modulo = new clsPmieducarModulo($this->ref_cod_modulo);
... ... @@ -469,114 +453,92 @@ class indice extends clsCadastro
469 453  
470 454 $this->pdf->linha_relativa(201, 125, 0, 14);
471 455 $this->pdf->linha_relativa(201, 125, 369, 0);
472   - $this->pdf->escreve_relativo("Avaliações", 195, 128, 350, 80, $fonte, 7,
  456 + $this->pdf->escreve_relativo('Avaliações', 195, 128, 350, 80, $fonte, 7,
473 457 $corTexto, 'center');
474 458  
475 459 $this->pdf->linha_relativa(543, 125, 0, 14);
476 460 $this->pdf->linha_relativa(30, 139, 0, 20);
477 461  
478 462 $this->pdf->linha_relativa(30, 139, 513, 0);
479   - $this->pdf->escreve_relativo("Média", 538, 137, 35, 80, $fonte, 7,
  463 + $this->pdf->escreve_relativo('Média', 538, 137, 35, 80, $fonte, 7,
480 464 $corTexto, 'center');
481 465  
482   - $this->pdf->escreve_relativo("Nº", 36, 145, 100, 80, $fonte, 7,
483   - $corTexto, 'left');
484   - $this->pdf->escreve_relativo("Nome",110, 145, 100, 80, $fonte, 7, $corTexto,
485   - 'left');
  466 + $this->pdf->escreve_relativo('Nº', 36, 145, 100, 80, $fonte, 7, $corTexto, 'left');
  467 + $this->pdf->escreve_relativo('Nome', 110, 145, 100, 80, $fonte, 7, $corTexto, 'left');
486 468  
487 469 $this->page_y +=19;
488   - $this->pdf->escreve_relativo("Dias de aula: {$this->total}", 715, 100, 535,
  470 +
  471 + $this->pdf->escreve_relativo('Dias de aula: ' . $this->total, 715, 100, 535,
489 472 80, $fonte, 10, $corTexto, 'left');
490 473 }
491 474  
  475 + function desenhaLinhasVertical()
  476 + {
  477 + $corTexto = '#000000';
492 478  
493   - function desenhaLinhasVertical()
494   - {
495   - $corTexto = '#000000';
496   - /**
497   - *
498   - */
499   -
500   - $this->total = 10;
501   - $largura_anos = 380;
502   -
503   - if($this->total >= 1)
504   - {
505   -
506   - $incremental = floor($largura_anos/ ($this->total )) ;
507   -
508   - }else {
509   -
510   - $incremental = 1;
511   - }
512   -
513   - $reta_ano_x = 200 ;
514   -
515   -
516   - $resto = $largura_anos - ($incremental * $this->total);
517   -
518   - for($linha = 0;$linha <$this->total;$linha++)
519   - {
520   -
521   - if(( $resto > 0) /*|| ($linha + 1 == $total && $resto >= 1) */|| $linha == 0)
522   - {
523   - $reta_ano_x++;
524   - $resto--;
525   - }
526   -
527   - $this->pdf->linha_relativa($reta_ano_x,139,0,$this->page_y - 139);
528   -
  479 + $this->total = 10;
  480 + $largura_anos = 380;
529 481  
530   - $reta_ano_x += $incremental;
  482 + if ($this->total >= 1) {
  483 + $incremental = floor($largura_anos/ ($this->total)) ;
  484 + }
  485 + else {
  486 + $incremental = 1;
  487 + }
531 488  
532   - }
  489 + $reta_ano_x = 200 ;
533 490  
534   - $this->pdf->linha_relativa(50,139,0,$this->page_y - 139);
535   - $this->pdf->linha_relativa(812,125,0,$this->page_y - 139);
  491 + $resto = $largura_anos - ($incremental * $this->total);
536 492  
  493 + for ($linha = 0; $linha < $this->total; $linha++) {
  494 + if (($resto > 0) || $linha == 0) {
  495 + $reta_ano_x++;
  496 + $resto--;
  497 + }
537 498  
538   - $this->pdf->linha_relativa(570,125,0,$this->page_y - 139);
539   - //$this->pdf->escreve_relativo( "Faltas",40, 128, 100, 80, $fonte, 7, $corTexto, 'left' );
  499 + $this->pdf->linha_relativa($reta_ano_x, 139, 0, $this->page_y - 139);
  500 + $reta_ano_x += $incremental;
540 501  
  502 + }
541 503  
542   - /**
543   - *
544   - */
545   - }
  504 + $this->pdf->linha_relativa(50, 139, 0, $this->page_y - 139);
  505 + $this->pdf->linha_relativa(812, 125, 0, $this->page_y - 139);
  506 + $this->pdf->linha_relativa(570, 125, 0, $this->page_y - 139);
  507 + }
546 508  
547   - function rodape()
548   - {
549   - $corTexto = '#000000';
550   - $fonte = 'arial';
551   - $dataAtual = date("d/m/Y");
552   - $this->pdf->escreve_relativo( "Data: $dataAtual", 36,795, 100, 50, $fonte, 7, $corTexto, 'left' );
  509 + function rodape()
  510 + {
  511 + $corTexto = '#000000';
  512 + $fonte = 'arial';
  513 + $dataAtual = date('d/m/Y');
  514 + $this->pdf->escreve_relativo('Data: ' . $dataAtual, 36,795, 100, 50, $fonte,
  515 + 7, $corTexto, 'left');
553 516  
554   - //$this->pdf->escreve_relativo( "Assinatura do Diretor(a)", 68,520, 100, 50, $fonte, 7, $corTexto, 'left' );
555   - $this->pdf->escreve_relativo( "Assinatura do Professor(a)", 677,520, 100, 50, $fonte, 7, $corTexto, 'left' );
556   - //$this->pdf->linha_relativa(52,517,130,0);
557   - $this->pdf->linha_relativa(660,517,130,0);
558   - }
  517 + $this->pdf->escreve_relativo('Assinatura do Professor(a)', 677, 520, 100, 50,
  518 + $fonte, 7, $corTexto, 'left');
559 519  
560   - function Editar()
561   - {
562   - return false;
563   - }
  520 + $this->pdf->linha_relativa(660, 517, 130, 0);
  521 + }
564 522  
565   - function Excluir()
566   - {
567   - return false;
568   - }
  523 + function Editar()
  524 + {
  525 + return FALSE;
  526 + }
569 527  
  528 + function Excluir()
  529 + {
  530 + return FALSE;
  531 + }
570 532 }
571 533  
572   -// cria uma extensao da classe base
  534 +// Instancia objeto de página
573 535 $pagina = new clsIndexBase();
574   -// cria o conteudo
  536 +
  537 +// Instancia objeto de conteúdo
575 538 $miolo = new indice();
576   -// adiciona o conteudo na clsBase
577   -$pagina->addForm( $miolo );
578   -// gera o html
579   -$pagina->MakeAll();
580 539  
  540 +// Atribui o conteúdo à página
  541 +$pagina->addForm($miolo);
581 542  
582   -?>
  543 +// Gera o código HTML
  544 +$pagina->MakeAll();
583 545 \ No newline at end of file
... ...