* * 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'; /** * 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 - Servidor Nível'); $this->processoAp = 0; $this->renderBanner = FALSE; $this->renderMenu = FALSE; $this->renderMenuSuspenso = FALSE; } } /** * 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 { var $pessoa_logada; var $cod_servidor; var $ref_cod_instituicao; var $data_cadastro; var $data_exclusao; var $ativo; var $ref_cod_nivel; var $ref_cod_subnivel; var $ref_cod_categoria; function Inicializar() { $retorno = 'Novo'; @session_start(); $this->pessoa_logada = $_SESSION['id_pessoa']; @session_write_close(); $this->cod_servidor = $_GET['ref_cod_servidor']; $this->ref_cod_instituicao = $_GET['ref_cod_instituicao']; $obj_permissoes = new clsPermissoes(); $obj_permissoes->permissao_cadastra(635, $this->pessoa_logada, 7, 'educar_servidor_lst.php'); if (is_numeric($this->cod_servidor) && is_numeric($this->ref_cod_instituicao)) { $obj = new clsPmieducarServidor($this->cod_servidor, NULL, NULL, NULL, NULL, NULL, NULL, $this->ref_cod_instituicao); $registro = $obj->detalhe(); if ($registro) { $this->ref_cod_subnivel = $registro['ref_cod_subnivel']; $obj_subnivel = new clsPmieducarSubnivel($this->ref_cod_subnivel); $det_subnivel = $obj_subnivel->detalhe(); if ($det_subnivel) { $this->ref_cod_nivel = $det_subnivel['ref_cod_nivel']; } if ($this->ref_cod_nivel) { $obj_nivel = new clsPmieducarNivel($this->ref_cod_nivel); $det_nivel = $obj_nivel->detalhe(); $this->ref_cod_categoria = $det_nivel['ref_cod_categoria_nivel']; } $retorno = 'Editar'; } } else { echo sprintf('', $_GET['div']); die(); } return $retorno; } function Gerar() { $this->campoOculto('cod_servidor',$this->cod_servidor); $this->campoOculto('ref_cod_instituicao',$this->ref_cod_instituicao); $obj_categoria = new clsPmieducarCategoriaNivel(); $lst_categoria = $obj_categoria->lista(NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 1); $opcoes = array('' => 'Selecione uma categoria'); if ($lst_categoria) { foreach ($lst_categoria as $categoria) { $opcoes[$categoria['cod_categoria_nivel']] = $categoria['nm_categoria_nivel']; } } $this->campoLista('ref_cod_categoria', 'Categoria', $opcoes, $this->ref_cod_categoria); $opcoes = array('' => 'Selecione uma categoria'); if ($this->ref_cod_categoria) { $obj_nivel = new clsPmieducarNivel(); $lst_nivel = $obj_nivel->buscaSequenciaNivel($this->ref_cod_categoria); if ($lst_nivel) { foreach ($lst_nivel as $nivel) { $opcoes[$nivel['cod_nivel']] = $nivel['nm_nivel']; } } } $this->campoLista('ref_cod_nivel', 'Nível', $opcoes, $this->ref_cod_nivel, '', TRUE); $opcoes = array('' => 'Selecione um nível'); if ($this->ref_cod_nivel) { $obj_nivel = new clsPmieducarSubnivel(); $lst_nivel = $obj_nivel->buscaSequenciaSubniveis($this->ref_cod_nivel); if ($lst_nivel) { foreach ($lst_nivel as $subnivel) { $opcoes[$subnivel['cod_subnivel']] = $subnivel['nm_subnivel']; } } } $this->campoLista('ref_cod_subnivel', 'Subnível', $opcoes, $this->ref_cod_subnivel, '', FALSE, '', '', FALSE, TRUE); } function Novo() { echo sprintf('', $_GET['div']); die(); } function Editar() { $obj_servidor = new clsPmieducarServidor($this->cod_servidor, NULL, NULL, NULL, NULL, NULL, NULL, $this->ref_cod_instituicao, $this->ref_cod_subnivel ); $obj_servidor->edita(); echo sprintf('', $_GET['div']); die; } function Excluir() { return FALSE; } } // Instancia objeto de página $pagina = new clsIndexBase(); // Instancia objeto de conteúdo $miolo = new indice(); // Atribui o conteúdo à  página $pagina->addForm($miolo); // Gera o código HTML $pagina->MakeAll(); ?>