From c92c7f8c97d5bf7b822fd19bb2c97a3d9778f073 Mon Sep 17 00:00:00 2001 From: Eriksen Costa Paixão Date: Tue, 27 Apr 2010 22:25:32 +0000 Subject: [PATCH] Refactoring para coding standards --- ieducar/intranet/educar_relatorio_boletim.php | 681 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- 1 file changed, 330 insertions(+), 351 deletions(-) diff --git a/ieducar/intranet/educar_relatorio_boletim.php b/ieducar/intranet/educar_relatorio_boletim.php index ef9e94e..5b87f3f 100644 --- a/ieducar/intranet/educar_relatorio_boletim.php +++ b/ieducar/intranet/educar_relatorio_boletim.php @@ -1,434 +1,413 @@ + * + * Este programa é software livre; você pode redistribuí-lo e/ou modificá-lo + * sob os termos da Licença Pública Geral GNU conforme publicada pela Free + * Software Foundation; tanto a versão 2 da Licença, como (a seu critério) + * qualquer versão posterior. + * + * Este programa é distribuí­do na expectativa de que seja útil, porém, SEM + * NENHUMA GARANTIA; nem mesmo a garantia implí­cita de COMERCIABILIDADE OU + * ADEQUAÇÃO A UMA FINALIDADE ESPECÍFICA. Consulte a Licença Pública Geral + * do GNU para mais detalhes. + * + * Você deve ter recebido uma cópia da Licença Pública Geral do GNU junto + * com este programa; se não, escreva para a Free Software Foundation, Inc., no + * endereço 59 Temple Street, Suite 330, Boston, MA 02111-1307 USA. + * + * @author Prefeitura Municipal de Itajaí + * @category i-Educar + * @license @@license@@ + * @package iEd_Pmieducar + * @since Arquivo disponível desde a versão 1.0.0 + * @version $Id$ + */ + +require_once 'include/clsBase.inc.php'; +require_once 'include/clsCadastro.inc.php'; +require_once 'include/clsBanco.inc.php'; +require_once 'include/pmieducar/geral.inc.php'; +require_once 'include/clsPDF.inc.php'; + +/** + * clsIndexBase class. + * + * @author Prefeitura Municipal de Itajaí + * @category i-Educar + * @license @@license@@ + * @package iEd_Pmieducar + * @since Classe disponível desde a versão 1.0.0 + * @version @@package_version@@ + */ class clsIndexBase extends clsBase { - function Formular() - { - $this->SetTitulo( "{$this->_instituicao} i-Educar - Boletim" ); - $this->processoAp = "664"; - } + function Formular() + { + $this->SetTitulo($this->_instituicao . ' i-Educar - Boletim'); + $this->processoAp = 664; + } } +/** + * indice class. + * + * @author Prefeitura Municipal de Itajaí + * @category i-Educar + * @license @@license@@ + * @package iEd_Pmieducar + * @since Classe disponível desde a versão 1.0.0 + * @version @@package_version@@ + */ class indice extends clsCadastro { - - - /** - * Referencia pega da session para o idpes do usuario atual - * - * @var int - */ - var $pessoa_logada; - - - var $ref_cod_instituicao; - var $ref_cod_escola; - var $ref_cod_serie; - var $ref_cod_turma; - - var $ano; - var $mes; - - var $nm_escola; - var $nm_instituicao; - var $ref_cod_curso; - var $sequencial; - var $pdf; - var $pagina_atual = 1; - var $total_paginas = 1; - var $nm_professor; - var $nm_turma; - var $nm_serie; - var $nm_disciplina; - var $curso_com_exame = 0; - var $ref_cod_matricula; - - var $page_y = 135; - - var $nm_aluno; - var $array_modulos = array(); - var $nm_curso; - var $get_link = false; - //var $cursos = array(); - - var $total; - - //var $array_disciplinas = array(); - - var $ref_cod_modulo; - - var $meses_do_ano = array( - "1" => "JANEIRO" - ,"2" => "FEVEREIRO" - ,"3" => "MARÇO" - ,"4" => "ABRIL" - ,"5" => "MAIO" - ,"6" => "JUNHO" - ,"7" => "JULHO" - ,"8" => "AGOSTO" - ,"9" => "SETEMBRO" - ,"10" => "OUTUBRO" - ,"11" => "NOVEMBRO" - ,"12" => "DEZEMBRO" - ); - - - function Inicializar() - { - $retorno = "Novo"; - @session_start(); - $this->pessoa_logada = $_SESSION['id_pessoa']; - @session_write_close(); - - $obj_permissoes = new clsPermissoes(); - //if($obj_permissoes->nivel_acesso($this->pessoa_logada) > 7) - //header("location: index.php"); - - return $retorno; - } - - function Gerar() - { - - $obj_permissoes = new clsPermissoes(); - $nivel_usuario = $obj_permissoes->nivel_acesso($this->pessoa_logada); - - //if(!$nivel_usuario) - //header("location: index.php"); - - if($_POST){ - foreach ($_POST as $key => $value) { - $this->$key = $value; - - } - } - - $this->ano = $ano_atual = date("Y"); - $this->mes = $mes_atual = date("n"); - /* - $lim = 5; - for($a = date('Y') ; $a < $ano_atual + $lim ; $a++ ) - $anos["{$a}"] = "{$a}"; - - $this->campoLista( "ano", "Ano",$anos, $this->ano,"",false ); - */ - $this->campoNumero( "ano", "Ano", $this->ano, 4, 4, true ); - - $this->campoCheck("em_branco","Relatório em branco",""); - $this->campoNumero("numero_registros","Número de linhas","",3,3); - - //$this->campoLista( "mes", "Mês",$this->meses_do_ano, $this->mes,"",false ); - - $get_escola = true; - //$obrigatorio = true; - $exibe_nm_escola = true; -// $get_escola_curso = true; - $get_curso = true; - $get_escola_curso_serie = true; - $escola_obrigatorio = false; - $curso_obrigatorio = false; - $instituicao_obrigatorio = true; - - include("include/pmieducar/educar_campo_lista.php"); - - $this->campoLista("ref_cod_turma","Turma",array('' => 'Selecione'),'',"",false,"","",false,false); - - if($this->ref_cod_escola) - $this->ref_ref_cod_escola = $this->ref_cod_escola; - $this->campoLista( "ref_cod_matricula", "Aluno",array(''=>'Selecione'), "","",false,"Campo não obrigatório","",false,false ); - if($this->get_link) - $this->campoRotulo("rotulo11", "-", "Baixar Relatório"); - - $this->url_cancelar = "educar_index.php"; - $this->nome_url_cancelar = "Cancelar"; - - $this->acao_enviar = 'acao2()'; - $this->acao_executa_submit = false; - - } - + var $pessoa_logada; + + var $ref_cod_instituicao; + var $ref_cod_escola; + var $ref_cod_serie; + var $ref_cod_turma; + + var $ano; + var $mes; + + var $nm_escola; + var $nm_instituicao; + var $ref_cod_curso; + var $sequencial; + var $pdf; + var $pagina_atual = 1; + var $total_paginas = 1; + var $nm_professor; + var $nm_turma; + var $nm_serie; + var $nm_disciplina; + var $curso_com_exame = 0; + var $ref_cod_matricula; + + var $page_y = 135; + + var $nm_aluno; + var $array_modulos = array(); + var $nm_curso; + var $get_link = FALSE; + + var $total; + + var $ref_cod_modulo; + + var $meses_do_ano = array( + 1 => 'JANEIRO', + 2 => 'FEVEREIRO', + 3 => 'MARÇO', + 4 => 'ABRIL', + 5 => 'MAIO', + 6 => 'JUNHO', + 7 => 'JULHO', + 8 => 'AGOSTO', + 9 => 'SETEMBRO', + 10 => 'OUTUBRO', + 11 => 'NOVEMBRO', + 12 => 'DEZEMBRO' + ); + + + function Inicializar() + { + $retorno = 'Novo'; + + @session_start(); + $this->pessoa_logada = $_SESSION['id_pessoa']; + @session_write_close(); + + $obj_permissoes = new clsPermissoes(); + + return $retorno; + } + + function Gerar() + { + $obj_permissoes = new clsPermissoes(); + $nivel_usuario = $obj_permissoes->nivel_acesso($this->pessoa_logada); + + if ($_POST){ + foreach ($_POST as $key => $value) { + $this->$key = $value; + } + } + + $this->ano = $ano_atual = date('Y'); + $this->mes = $mes_atual = date('n'); + + $this->campoNumero('ano', 'Ano', $this->ano, 4, 4, TRUE); + + $this->campoCheck('em_branco', 'Relatório em branco', ''); + $this->campoNumero('numero_registros', 'Número de linhas', '', 3, 3); + + $get_escola = TRUE; + $exibe_nm_escola = TRUE; + $get_curso = TRUE; + $get_escola_curso_serie = TRUE; + $escola_obrigatorio = FALSE; + $curso_obrigatorio = FALSE; + $instituicao_obrigatorio = TRUE; + + include 'include/pmieducar/educar_campo_lista.php'; + + $this->campoLista('ref_cod_turma', 'Turma', array('' => 'Selecione'), '', '', + FALSE, '', '', FALSE, FALSE); + + if ($this->ref_cod_escola) { + $this->ref_ref_cod_escola = $this->ref_cod_escola; + } + + $this->campoLista('ref_cod_matricula', 'Aluno', array('' => 'Selecione'), '', + '', FALSE, 'Campo não obrigatório', '', FALSE, FALSE); + + if ($this->get_link) { + $this->campoRotulo('rotulo11', '-', sprintf('Baixar Relatório', $this->get_link)); + } + + $this->url_cancelar = 'educar_index.php'; + $this->nome_url_cancelar = 'Cancelar'; + + $this->acao_enviar = 'acao2()'; + $this->acao_executa_submit = FALSE; + } } -// cria uma extensao da classe base +// Instancia objeto de página $pagina = new clsIndexBase(); -// cria o conteudo + +// Instancia objeto de conteúdo $miolo = new indice(); -// adiciona o conteudo na clsBase -$pagina->addForm( $miolo ); -// gera o html -$pagina->MakeAll(); +// Atribui o conteúdo à página +$pagina->addForm($miolo); +// Gera o código HTML +$pagina->MakeAll(); ?> - + \ No newline at end of file -- libgit2 0.21.2