Commit f94f4c550a0b063bd44e2fd60962d79d1816d79e
1 parent
0c222af2
Exists in
master
Removido arquivo de relatório não utilizado
Showing
2 changed files
with
1 additions
and
357 deletions
Show diff stats
ieducar/intranet/educar_relatorio_alunos_falta_bimestre_disc_proc.php
| @@ -1,351 +0,0 @@ | @@ -1,351 +0,0 @@ | ||
| 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/relatorio.inc.php"); | ||
| 32 | - | ||
| 33 | -class clsIndexBase extends clsBase | ||
| 34 | -{ | ||
| 35 | - function Formular() | ||
| 36 | - { | ||
| 37 | - $this->SetTitulo( "{$this->_instituicao} i-Educar - Relação de alunos/falta bimestres" ); | ||
| 38 | - $this->processoAp = "811"; | ||
| 39 | - $this->renderMenu = false; | ||
| 40 | - $this->renderMenuSuspenso = false; | ||
| 41 | - } | ||
| 42 | -} | ||
| 43 | - | ||
| 44 | -class indice extends clsCadastro | ||
| 45 | -{ | ||
| 46 | - | ||
| 47 | - | ||
| 48 | - /** | ||
| 49 | - * Referencia pega da session para o idpes do usuario atual | ||
| 50 | - * | ||
| 51 | - * @var int | ||
| 52 | - */ | ||
| 53 | - var $pessoa_logada; | ||
| 54 | - | ||
| 55 | - | ||
| 56 | - var $ref_cod_instituicao; | ||
| 57 | - var $ref_cod_escola; | ||
| 58 | - var $ref_cod_serie; | ||
| 59 | - var $ref_cod_turma; | ||
| 60 | - var $ref_cod_curso; | ||
| 61 | - var $ref_cod_modulo; | ||
| 62 | - | ||
| 63 | - var $ano; | ||
| 64 | - | ||
| 65 | - var $is_padrao; | ||
| 66 | - var $semestre; | ||
| 67 | - | ||
| 68 | - var $cursos = array(); | ||
| 69 | - | ||
| 70 | - var $get_link; | ||
| 71 | - | ||
| 72 | - | ||
| 73 | - function renderHTML() | ||
| 74 | - { | ||
| 75 | - | ||
| 76 | - if($_POST){ | ||
| 77 | - foreach ($_POST as $key => $value) { | ||
| 78 | - $this->$key = $value; | ||
| 79 | - | ||
| 80 | - } | ||
| 81 | - } | ||
| 82 | - if($this->ref_ref_cod_serie) | ||
| 83 | - $this->ref_cod_serie = $this->ref_ref_cod_serie; | ||
| 84 | - | ||
| 85 | - $this->ref_cod_modulo = explode("-",$this->ref_cod_modulo); | ||
| 86 | - $this->ref_cod_modulo = array_pop($this->ref_cod_modulo); | ||
| 87 | - | ||
| 88 | - $fonte = 'arial'; | ||
| 89 | - $corTexto = '#000000'; | ||
| 90 | - | ||
| 91 | - if(empty($this->ref_cod_turma)) | ||
| 92 | - { | ||
| 93 | - echo '<script> | ||
| 94 | - alert("Erro ao gerar relatório!\nNenhuma turma selecionada!"); | ||
| 95 | - window.parent.fechaExpansivel(\'div_dinamico_\'+(window.parent.DOM_divs.length-1)); | ||
| 96 | - </script>'; | ||
| 97 | - return true; | ||
| 98 | - } | ||
| 99 | - | ||
| 100 | - if($this->ref_cod_escola){ | ||
| 101 | - | ||
| 102 | - $obj_escola = new clsPmieducarEscola($this->ref_cod_escola); | ||
| 103 | - $det_escola = $obj_escola->detalhe(); | ||
| 104 | - $this->nm_escola = $det_escola['nome']; | ||
| 105 | - | ||
| 106 | - $obj_instituicao = new clsPmieducarInstituicao($det_escola['ref_cod_instituicao']); | ||
| 107 | - $det_instituicao = $obj_instituicao->detalhe(); | ||
| 108 | - $this->nm_instituicao = $det_instituicao['nm_instituicao']; | ||
| 109 | - | ||
| 110 | - } | ||
| 111 | - | ||
| 112 | - $obj_calendario = new clsPmieducarEscolaAnoLetivo(); | ||
| 113 | - $lista_calendario = $obj_calendario->lista($this->ref_cod_escola,$this->ano,null,null,null,null,null,null,null,1,null); | ||
| 114 | - | ||
| 115 | - $obj_turma = new clsPmieducarTurma($this->ref_cod_turma); | ||
| 116 | - $det_turma = $obj_turma->detalhe(); | ||
| 117 | - $this->nm_turma = $det_turma['nm_turma']; | ||
| 118 | - | ||
| 119 | - $obj_serie = new clsPmieducarSerie($this->ref_cod_serie); | ||
| 120 | - $det_serie = $obj_serie->detalhe(); | ||
| 121 | - $this->nm_serie = $det_serie['nm_serie']; | ||
| 122 | - | ||
| 123 | - $obj_pessoa = new clsPessoa_($det_turma["ref_cod_regente"]); | ||
| 124 | - $det = $obj_pessoa->detalhe(); | ||
| 125 | - $this->nm_professor = $det["nome"]; | ||
| 126 | - | ||
| 127 | - if(!$lista_calendario) | ||
| 128 | - { | ||
| 129 | - echo '<script> | ||
| 130 | - alert("Escola não possui calendário definido para este ano"); | ||
| 131 | - window.parent.fechaExpansivel(\'div_dinamico_\'+(window.parent.DOM_divs.length-1)); | ||
| 132 | - </script>'; | ||
| 133 | - return true; | ||
| 134 | - } | ||
| 135 | - | ||
| 136 | - $obj = new clsPmieducarSerie(); | ||
| 137 | - $obj->setOrderby('cod_serie,etapa_curso'); | ||
| 138 | - $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); | ||
| 139 | - | ||
| 140 | - $obj_curso = new clsPmieducarCurso($this->ref_cod_curso); | ||
| 141 | - $det_curso = $obj_curso->detalhe(); | ||
| 142 | - $this->nm_curso = $det_curso['nm_curso']; | ||
| 143 | - | ||
| 144 | - $obj_tipo_avaliacao = new clsPmieducarTipoAvaliacao($det_curso['ref_cod_tipo_avaliacao']); | ||
| 145 | - $det_tipo_avaliacao = $obj_tipo_avaliacao->detalhe(); | ||
| 146 | - $conceitual = $det_tipo_avaliacao['conceitual']; | ||
| 147 | - | ||
| 148 | - if ($this->is_padrao || $this->semestre == 2007) { | ||
| 149 | - $this->semestre = null; | ||
| 150 | - } | ||
| 151 | - | ||
| 152 | - $obj_matricula_turma = new clsPmieducarMatriculaTurma(); | ||
| 153 | - $obj_matricula_turma->setOrderby('nome'); | ||
| 154 | -// $lst_matricula_turma = $obj_matricula_turma->lista($this->ref_cod_matricula, $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,null,null,null,true); | ||
| 155 | - $lst_matricula_turma = $obj_matricula_turma->lista($this->ref_cod_matricula, $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,null,null,null,true, null, null, true, null, $this->semestre); | ||
| 156 | - //$obj_disciplinas = new clsPmieducarDisciplinaSerie(); | ||
| 157 | - $obj_disciplinas = new clsPmieducarEscolaSerieDisciplina(); | ||
| 158 | - $lst_disciplinas = $obj_disciplinas->lista($this->ref_cod_serie,$this->ref_cod_escola,null,1); | ||
| 159 | - | ||
| 160 | - if($lst_matricula_turma) | ||
| 161 | - { | ||
| 162 | - | ||
| 163 | - $relatorio = new relatorios("Espelho de Faltas Bimestral {$this->ref_cod_modulo}º Bimestre Ano {$this->ano}", 210, false, "Espelho de Faltas Bimestral", "A4", "{$this->nm_instituicao}\n{$this->nm_escola}\n{$this->nm_curso}\n{$this->nm_serie} - Turma: $this->nm_turma ".date("d/m/Y")); | ||
| 164 | - $relatorio->setMargem(20,20,50,50); | ||
| 165 | - $relatorio->exibe_produzido_por = false; | ||
| 166 | - | ||
| 167 | - | ||
| 168 | - //$relatorio->novalinha( array( "Cód. Aluno", "Nome do Aluno", "1Mº", "M.Parcial", "Exame", "M.Final", "Faltas"),0,16,true,"arial",array( 75, 160, 120, 55, 50, 50),"#515151","#d3d3d3","#FFFFFF",false,true); | ||
| 169 | - //$relatorio->novalinha( array( "Cód. Aluno", "Nome do Aluno", "1Mº", "2Mº", "M.Parcial", "Exame", "M.Final", "Faltas"),0,16,true,"arial",array( 75, 160, 60, 60, 55, 50, 50),"#515151","#d3d3d3","#FFFFFF",false,true); | ||
| 170 | - //$relatorio->novalinha( array( "Cód. Aluno", "Nome do Aluno", "1Mº", "2Mº", "3Mº", "M.Parcial", "Exame", "M.Final", "Faltas"),0,16,true,"arial",array( 75, 160, 40, 40, 40, 55, 50, 50),"#515151","#d3d3d3","#FFFFFF",false,true); | ||
| 171 | - | ||
| 172 | - $db = new clsBanco(); | ||
| 173 | - | ||
| 174 | - if(!$det_curso['falta_ch_globalizada']) | ||
| 175 | - { | ||
| 176 | - foreach ($lst_disciplinas as $disciplina) | ||
| 177 | - { | ||
| 178 | - $obj_disciplina = new clsPmieducarDisciplina($disciplina['ref_cod_disciplina']); | ||
| 179 | - $det_disciplina = $obj_disciplina->detalhe(); | ||
| 180 | - | ||
| 181 | - $array_disc[$det_disciplina['cod_disciplina']] = ($det_disciplina['abreviatura']); | ||
| 182 | - $array_cab[] = str2upper($det_disciplina['abreviatura']); | ||
| 183 | - } | ||
| 184 | - } | ||
| 185 | - else | ||
| 186 | - { | ||
| 187 | - $array_disc[] = "FALTAS"; | ||
| 188 | - $array_cab[] = "FALTAS"; | ||
| 189 | - | ||
| 190 | - } | ||
| 191 | - | ||
| 192 | - //if($conceitual) | ||
| 193 | - { | ||
| 194 | - asort($array_disc); | ||
| 195 | - sort($array_cab); | ||
| 196 | - $array_cab = array_merge(array( "Cód.", "Nome do Aluno" ),$array_cab); | ||
| 197 | - } | ||
| 198 | - | ||
| 199 | - | ||
| 200 | - $divisoes = array( 40, 165 ); | ||
| 201 | - $divisoes_texto = array( 40, 165 ); | ||
| 202 | - | ||
| 203 | - if(!$conceitual) | ||
| 204 | - { | ||
| 205 | - $tamanho_divisao = 35 + ( 10 - count($array_disc) ) * 5; | ||
| 206 | - for($ct=0;$ct<20;$ct++) | ||
| 207 | - { | ||
| 208 | - $divisoes[] = $tamanho_divisao ; | ||
| 209 | - $divisoes_texto[] = $tamanho_divisao; | ||
| 210 | - } | ||
| 211 | - } | ||
| 212 | - else | ||
| 213 | - { | ||
| 214 | - $divisoes = null ; | ||
| 215 | - $divisoes_texto = null; | ||
| 216 | - } | ||
| 217 | - | ||
| 218 | - | ||
| 219 | - | ||
| 220 | - $relatorio->novalinha( $array_cab ,0,16,true,"arial",$divisoes,"#515151","#d3d3d3","#ffffff",false,true); | ||
| 221 | - | ||
| 222 | - /*if($conceitual) | ||
| 223 | - { | ||
| 224 | - $tam_fonte = 8; | ||
| 225 | - $tam_linha = 11; | ||
| 226 | - } | ||
| 227 | - else | ||
| 228 | - {*/ | ||
| 229 | - $tam_fonte = null; | ||
| 230 | - $tam_linha = 16; | ||
| 231 | - //} | ||
| 232 | - foreach ($lst_matricula_turma as $matricula) | ||
| 233 | - { | ||
| 234 | - | ||
| 235 | - if(!$det_curso['falta_ch_globalizada']) | ||
| 236 | - { | ||
| 237 | - $consulta = " SELECT ref_cod_disciplina | ||
| 238 | - ,faltas | ||
| 239 | - FROM pmieducar.falta_aluno | ||
| 240 | - WHERE ref_cod_matricula = {$matricula['ref_cod_matricula']} | ||
| 241 | - AND ref_cod_escola = {$this->ref_cod_escola} | ||
| 242 | - AND ref_cod_serie = {$this->ref_cod_serie} | ||
| 243 | - AND modulo = {$this->ref_cod_modulo} | ||
| 244 | - AND falta_aluno.ativo = 1 | ||
| 245 | - ORDER BY modulo ASC "; | ||
| 246 | - | ||
| 247 | - $db->Consulta($consulta); | ||
| 248 | - $notas = null; | ||
| 249 | - while ($db->ProximoRegistro()) | ||
| 250 | - { | ||
| 251 | - $registro = $db->Tupla(); | ||
| 252 | - | ||
| 253 | - $notas[$registro['ref_cod_disciplina']] = $registro['faltas']; | ||
| 254 | - | ||
| 255 | - } | ||
| 256 | - } | ||
| 257 | - else | ||
| 258 | - { | ||
| 259 | - $obj_falta = new clsPmieducarFaltas(); | ||
| 260 | - $obj_falta->setOrderby("sequencial asc"); | ||
| 261 | - $det_falta = $obj_falta->lista($matricula['ref_cod_matricula'],null,null,null,null,null); | ||
| 262 | - $notas = null; | ||
| 263 | - if(is_array($det_falta)) | ||
| 264 | - { | ||
| 265 | - $total_faltas = 0; | ||
| 266 | - foreach ($det_falta as $key => $value) | ||
| 267 | - { | ||
| 268 | - $total_faltas += $det_falta[$key]['faltas'] = $value['falta']; | ||
| 269 | - } | ||
| 270 | - | ||
| 271 | - $det_falta['total'] = $total_faltas; | ||
| 272 | - | ||
| 273 | - } | ||
| 274 | - | ||
| 275 | - $notas[] = $det_falta['total']; | ||
| 276 | - } | ||
| 277 | - | ||
| 278 | - if( strlen( $matricula['nome'] ) > 24 ) | ||
| 279 | - { | ||
| 280 | - $matricula['nome'] = explode(" ",$matricula['nome']); | ||
| 281 | - if(is_array($matricula['nome'] )) | ||
| 282 | - { | ||
| 283 | - $nome_aluno = array_shift($matricula['nome']); | ||
| 284 | - } | ||
| 285 | - if(is_array($matricula['nome'] )) | ||
| 286 | - { | ||
| 287 | - $nome_aluno .= " ".array_shift($matricula['nome']); | ||
| 288 | - } | ||
| 289 | - if(is_array($matricula['nome'] )) | ||
| 290 | - { | ||
| 291 | - $nome_aluno .= " ".array_pop($matricula['nome']); | ||
| 292 | - } | ||
| 293 | - $matricula['nome'] = $nome_aluno; | ||
| 294 | - } | ||
| 295 | - | ||
| 296 | - $array_val = array(); | ||
| 297 | - $array_val[] = $matricula['ref_cod_aluno']; | ||
| 298 | - $array_val[] = $matricula['nome']; | ||
| 299 | - | ||
| 300 | - foreach ($array_disc as $cod_disc => $disc) | ||
| 301 | - { | ||
| 302 | - //if(!$conceitual) | ||
| 303 | - // $array_val[] = $notas[$cod_disc] ? number_format( $notas[$cod_disc] ,2,'.','') : $notas[$cod_disc]; | ||
| 304 | - //else | ||
| 305 | - $array_val[] = $notas[$cod_disc]; | ||
| 306 | - | ||
| 307 | - } | ||
| 308 | - | ||
| 309 | - $relatorio->novalinha($array_val,0,$tam_linha,false,"arial",$divisoes_texto,"#515151","#d3d3d3","#FFFFFF",false,true,null,$tam_fonte); | ||
| 310 | - | ||
| 311 | - } | ||
| 312 | - | ||
| 313 | - $this->get_link = $relatorio->fechaPdf(); | ||
| 314 | - } | ||
| 315 | - | ||
| 316 | - | ||
| 317 | - echo "<script>window.onload=function(){parent.EscondeDiv('LoadImprimir');window.location='download.php?filename=".$this->get_link."'}</script>"; | ||
| 318 | - | ||
| 319 | - 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> | ||
| 320 | - <span style='font-size: 10px;'>Para visualizar os arquivos PDF, é necessário instalar o Adobe Acrobat Reader.<br> | ||
| 321 | - | ||
| 322 | - Clique na Imagem para Baixar o instalador<br><br> | ||
| 323 | - <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> | ||
| 324 | - </span> | ||
| 325 | - </center>"; | ||
| 326 | - } | ||
| 327 | - | ||
| 328 | - | ||
| 329 | - function Editar() | ||
| 330 | - { | ||
| 331 | - return false; | ||
| 332 | - } | ||
| 333 | - | ||
| 334 | - function Excluir() | ||
| 335 | - { | ||
| 336 | - return false; | ||
| 337 | - } | ||
| 338 | - | ||
| 339 | -} | ||
| 340 | - | ||
| 341 | -// cria uma extensao da classe base | ||
| 342 | -$pagina = new clsIndexBase(); | ||
| 343 | -// cria o conteudo | ||
| 344 | -$miolo = new indice(); | ||
| 345 | -// adiciona o conteudo na clsBase | ||
| 346 | -$pagina->addForm( $miolo ); | ||
| 347 | -// gera o html | ||
| 348 | -$pagina->MakeAll(); | ||
| 349 | - | ||
| 350 | - | ||
| 351 | -?> |
ieducar/intranet/educar_relatorio_alunos_nota_semestre_disc.php
| @@ -363,12 +363,7 @@ function acao2() | @@ -363,12 +363,7 @@ function acao2() | ||
| 363 | 363 | ||
| 364 | document.getElementById('btn_enviar').disabled = false; | 364 | document.getElementById('btn_enviar').disabled = false; |
| 365 | 365 | ||
| 366 | - if (document.formcadastro.tipo[0].checked) { | ||
| 367 | - document.formcadastro.action = 'educar_relatorio_alunos_nota_semestre_disc_proc.php'; | ||
| 368 | - } | ||
| 369 | - else { | ||
| 370 | - document.formcadastro.action = 'educar_relatorio_alunos_falta_bimestre_disc_proc.php'; | ||
| 371 | - } | 366 | + document.formcadastro.action = 'educar_relatorio_alunos_nota_semestre_disc_proc.php'; |
| 372 | 367 | ||
| 373 | document.formcadastro.submit(); | 368 | document.formcadastro.submit(); |
| 374 | } | 369 | } |