function Inicializar() { $retorno = "Novo"; @session_start(); $this->pessoa_logada = $_SESSION['id_pessoa']; @session_write_close(); $this->cod_tipo_ocorrencia_disciplinar = $_GET["cod_tipo_ocorrencia_disciplinar"]; $obj_permissoes = new clsPermissoes(); $obj_permissoes->permissao_cadastra(580, $this->pessoa_logada, 3, "educar_tipo_ocorrencia_disciplinar_lst.php"); if (is_numeric($this->cod_tipo_ocorrencia_disciplinar)) { $obj = new clsPmieducarTipoOcorrenciaDisciplinar($this->cod_tipo_ocorrencia_disciplinar); $registro = $obj->detalhe(); if ($registro) { foreach ($registro as $campo => $val) { // passa todos os valores obtidos no registro para atributos do objeto $this->{$campo} = $val; } $this->fexcluir = $obj_permissoes->permissao_excluir(580, $this->pessoa_logada, 3); $retorno = "Editar"; } } $this->url_cancelar = $retorno == "Editar" ? "educar_tipo_ocorrencia_disciplinar_det.php?cod_tipo_ocorrencia_disciplinar={$registro["cod_tipo_ocorrencia_disciplinar"]}" : "educar_tipo_ocorrencia_disciplinar_lst.php"; $nomeMenu = $retorno == "Editar" ? $retorno : "Cadastrar"; $localizacao = new LocalizacaoSistema(); $localizacao->entradaCaminhos(array($_SERVER['SERVER_NAME'] . "/intranet" => "Início", "educar_index.php" => "i-Educar - Escola", "" => "{$nomeMenu} tipo de ocorrência disciplinar")); $this->enviaLocalizacao($localizacao->montar()); $this->nome_url_cancelar = "Cancelar"; return $retorno; }
function Inicializar() { $retorno = "Novo"; @session_start(); $this->pessoa_logada = $_SESSION['id_pessoa']; @session_write_close(); $this->cod_transferencia_tipo = $_GET["cod_transferencia_tipo"]; $obj_permissoes = new clsPermissoes(); $obj_permissoes->permissao_cadastra(575, $this->pessoa_logada, 7, "educar_transferencia_tipo_lst.php"); if (is_numeric($this->cod_transferencia_tipo)) { $obj = new clsPmieducarTransferenciaTipo(); $lst = $obj->lista($this->cod_transferencia_tipo); $registro = array_shift($lst); if ($registro) { foreach ($registro as $campo => $val) { // passa todos os valores obtidos no registro para atributos do objeto $this->{$campo} = $val; } $this->fexcluir = $obj_permissoes->permissao_excluir(575, $this->pessoa_logada, 7); $retorno = "Editar"; } } $this->url_cancelar = $retorno == "Editar" ? "educar_transferencia_tipo_det.php?cod_transferencia_tipo={$registro["cod_transferencia_tipo"]}" : "educar_transferencia_tipo_lst.php"; $this->nome_url_cancelar = "Cancelar"; return $retorno; }
function Inicializar() { $retorno = "Novo"; @session_start(); $this->pessoa_logada = $_SESSION['id_pessoa']; @session_write_close(); $this->cod_infra_predio = $_GET["cod_infra_predio"]; $obj_permissoes = new clsPermissoes(); $obj_permissoes->permissao_cadastra(567, $this->pessoa_logada, 7, "educar_infra_predio_lst.php"); if (is_numeric($this->cod_infra_predio)) { $obj = new clsPmieducarInfraPredio($this->cod_infra_predio); $registro = $obj->detalhe(); if ($registro) { foreach ($registro as $campo => $val) { // passa todos os valores obtidos no registro para atributos do objeto $this->{$campo} = $val; } //** verificao de permissao para exclusao $this->fexcluir = $obj_permissoes->permissao_excluir(567, $this->pessoa_logada, 7); //** $retorno = "Editar"; } else { header("Location: educar_infra_predio_lst.php"); die; } } $this->url_cancelar = $retorno == "Editar" ? "educar_infra_predio_det.php?cod_infra_predio={$registro["cod_infra_predio"]}" : "educar_infra_predio_lst.php"; $this->nome_url_cancelar = "Cancelar"; return $retorno; }
function Inicializar() { $retorno = "Novo"; @session_start(); $this->pessoa_logada = $_SESSION['id_pessoa']; @session_write_close(); //** Verificacao de permissao para exclusao $obj_permissao = new clsPermissoes(); $obj_permissao->permissao_cadastra(558, $this->pessoa_logada, 7, "educar_tipo_ensino_lst.php"); //** $this->cod_tipo_ensino = $_GET["cod_tipo_ensino"]; if (is_numeric($this->cod_tipo_ensino)) { $obj = new clsPmieducarTipoEnsino($this->cod_tipo_ensino, null, null, null, null, null, 1); if (!($registro = $obj->detalhe())) { header("Location: educar_tipo_ensino_lst.php"); } if (!$registro["ativo"]) { header("Location: educar_tipo_ensino_lst.php"); } if ($registro) { foreach ($registro as $campo => $val) { // passa todos os valores obtidos no registro para atributos do objeto $this->{$campo} = $val; } //** verificao de permissao para exclusao $this->fexcluir = $obj_permissao->permissao_excluir(558, $this->pessoa_logada, 7); //** $retorno = "Editar"; } } // $this->url_cancelar = ($retorno == "Editar") ? "educar_tipo_ensino_det.php?cod_tipo_ensino={$registro["cod_tipo_ensino"]}" : "educar_tipo_ensino_lst.php"; $this->nome_url_cancelar = "Cancelar"; $this->script_cancelar = "window.parent.fechaExpansivel(\"div_dinamico_\"+(parent.DOM_divs.length-1));"; return $retorno; }
function Inicializar() { $retorno = "Novo"; @session_start(); $this->pessoa_logada = $_SESSION['id_pessoa']; @session_write_close(); $this->cod_religiao = $_GET["cod_religiao"]; //** Verificacao de permissao para cadastro $obj_permissao = new clsPermissoes(); $obj_permissao->permissao_cadastra(579, $this->pessoa_logada, 3, "educar_religiao_lst.php"); //** if (is_numeric($this->cod_religiao)) { $obj = new clsPmieducarReligiao($this->cod_religiao); $registro = $obj->detalhe(); if ($registro) { foreach ($registro as $campo => $val) { // passa todos os valores obtidos no registro para atributos do objeto $this->{$campo} = $val; } //** verificao de permissao para exclusao $this->fexcluir = $obj_permissao->permissao_excluir(579, $this->pessoa_logada, 3); //** $retorno = "Editar"; } } $this->url_cancelar = $retorno == "Editar" ? "educar_religiao_det.php?cod_religiao={$registro["cod_religiao"]}" : "educar_religiao_lst.php"; $nomeMenu = $retorno == "Editar" ? $retorno : "Cadastrar"; $localizacao = new LocalizacaoSistema(); $localizacao->entradaCaminhos(array($_SERVER['SERVER_NAME'] . "/intranet" => "Início", "educar_index.php" => "i-Educar - Escola", "" => "{$nomeMenu} religião")); $this->enviaLocalizacao($localizacao->montar()); $this->nome_url_cancelar = "Cancelar"; return $retorno; }
function Inicializar() { $retorno = "Novo"; @session_start(); $this->pessoa_logada = $_SESSION['id_pessoa']; @session_write_close(); $this->cod_tipo_dispensa = $_GET["cod_tipo_dispensa"]; $obj_permissoes = new clsPermissoes(); $obj_permissoes->permissao_cadastra(577, $this->pessoa_logada, 7, "educar_tipo_dispensa_lst.php"); if (is_numeric($this->cod_tipo_dispensa)) { $obj = new clsPmieducarTipoDispensa($this->cod_tipo_dispensa); $registro = $obj->detalhe(); if ($registro) { foreach ($registro as $campo => $val) { // passa todos os valores obtidos no registro para atributos do objeto $this->{$campo} = $val; } $this->ref_cod_instituicao = $det_ref_cod_escola["ref_cod_instituicao"]; $this->fexcluir = $obj_permissoes->permissao_excluir(577, $this->pessoa_logada, 7); $retorno = "Editar"; } } $this->url_cancelar = $retorno == "Editar" ? "educar_tipo_dispensa_det.php?cod_tipo_dispensa={$registro["cod_tipo_dispensa"]}" : "educar_tipo_dispensa_lst.php"; $this->nome_url_cancelar = "Cancelar"; return $retorno; }
function Inicializar() { $retorno = "Novo"; @session_start(); $this->pessoa_logada = $_SESSION['id_pessoa']; @session_write_close(); $this->cod_deficiencia = $_GET["cod_deficiencia"]; $obj_permissoes = new clsPermissoes(); $obj_permissoes->permissao_cadastra(631, $this->pessoa_logada, 7, "educar_deficiencia_lst.php"); if (is_numeric($this->cod_deficiencia)) { $obj = new clsCadastroDeficiencia($this->cod_deficiencia); $registro = $obj->detalhe(); if ($registro) { foreach ($registro as $campo => $val) { // passa todos os valores obtidos no registro para atributos do objeto $this->{$campo} = $val; } if ($obj_permissoes->permissao_excluir(631, $this->pessoa_logada, 7)) { $this->fexcluir = true; } $retorno = "Editar"; } } $this->url_cancelar = $retorno == "Editar" ? "educar_deficiencia_det.php?cod_deficiencia={$registro["cod_deficiencia"]}" : "educar_deficiencia_lst.php"; $this->nome_url_cancelar = "Cancelar"; return $retorno; }
function Inicializar() { $retorno = 'Novo'; session_start(); $this->pessoa_logada = $_SESSION['id_pessoa']; session_write_close(); $this->idesco = $_GET['idesco']; $obj_permissoes = new clsPermissoes(); $obj_permissoes->permissao_cadastra(632, $this->pessoa_logada, 3, 'educar_escolaridade_lst.php'); if (is_numeric($this->idesco)) { $obj = new clsCadastroEscolaridade($this->idesco); $registro = $obj->detalhe(); if ($registro) { // Passa todos os valores obtidos no registro para atributos do objeto foreach ($registro as $campo => $val) { $this->{$campo} = $val; } if ($obj_permissoes->permissao_excluir(632, $this->pessoa_logada, 3)) { $this->fexcluir = true; } $retorno = 'Editar'; } } $this->url_cancelar = $retorno == 'Editar' ? 'educar_escolaridade_det.php?idesco=' . $registro['idesco'] : 'educar_escolaridade_lst.php'; $this->nome_url_cancelar = 'Cancelar'; $nomeMenu = $retorno == "Editar" ? $retorno : "Cadastrar"; $localizacao = new LocalizacaoSistema(); $localizacao->entradaCaminhos(array($_SERVER['SERVER_NAME'] . "/intranet" => "Início", "educar_index.php" => "i-Educar - Escola", "" => "{$nomeMenu} escolaridade")); $this->enviaLocalizacao($localizacao->montar()); return $retorno; }
function Inicializar() { $retorno = 'Novo'; session_start(); $this->pessoa_logada = $_SESSION['id_pessoa']; session_write_close(); // Verifica se o usuário tem permissão para realizar o cadastro $obj_permissao = new clsPermissoes(); $obj_permissao->permissao_cadastra(554, $this->pessoa_logada, 1, 'educar_tipo_usuario_lst.php', TRUE); $this->cod_tipo_usuario = $_GET['cod_tipo_usuario']; if (is_numeric($this->cod_tipo_usuario)) { $obj = new clsPmieducarTipoUsuario($this->cod_tipo_usuario); if (!($registro = $obj->detalhe())) { header('Location: educar_tipo_usuario_lst.php'); } if ($registro) { foreach ($registro as $campo => $val) { $this->{$campo} = $val; } $this->fexcluir = $obj_permissao->permissao_excluir(554, $this->pessoa_logada, 1, null, true); $retorno = "Editar"; } } $this->url_cancelar = $retorno == 'Editar' ? 'educar_tipo_usuario_det.php?cod_tipo_usuario=' . $registro['cod_tipo_usuario'] : 'educar_tipo_usuario_lst.php'; $this->nome_url_cancelar = 'Cancelar'; return $retorno; }
function Inicializar() { $retorno = "Novo"; @session_start(); $this->pessoa_logada = $_SESSION['id_pessoa']; @session_write_close(); if ($_POST) { $this->cod_usuario = $_POST["cod_usuario_"]; } else { $this->cod_usuario = $_GET["cod_usuario"]; } if (is_numeric($this->cod_usuario)) { $obj = new clsPmieducarUsuario($this->cod_usuario); $registro = $obj->detalhe(); if ($registro) { foreach ($registro as $campo => $val) { // passa todos os valores obtidos no registro para atributos do objeto $this->{$campo} = $val; } $obj_permissoes = new clsPermissoes(); $this->fexcluir = $obj_permissoes->permissao_excluir(555, $this->pessoa_logada, 7, "educar_usuario_lst.php", true); $retorno = "Editar"; } } $this->url_cancelar = $retorno == "Editar" ? "educar_usuario_det.php?cod_usuario={$registro["cod_usuario"]}" : "educar_usuario_lst.php"; $this->nome_url_cancelar = "Cancelar"; return $retorno; }
function Inicializar() { $retorno = "Novo"; @session_start(); $this->pessoa_logada = $_SESSION['id_pessoa']; @session_write_close(); $obj_permissoes = new clsPermissoes(); $obj_permissoes->permissao_cadastra(559, $this->pessoa_logada, 1, "educar_instituicao_lst.php"); $this->cod_instituicao = $_GET["cod_instituicao"]; if (is_numeric($this->cod_instituicao)) { $obj = new clsPmieducarInstituicao($this->cod_instituicao); $registro = $obj->detalhe(); if ($registro) { foreach ($registro as $campo => $val) { // passa todos os valores obtidos no registro para atributos do objeto $this->{$campo} = $val; } $this->data_cadastro = dataFromPgToBr($this->data_cadastro); $this->data_exclusao = dataFromPgToBr($this->data_exclusao); $this->fexcluir = $obj_permissoes->permissao_excluir(559, $this->pessoa_logada, 1); $retorno = "Editar"; } } $this->url_cancelar = $retorno == "Editar" ? "educar_instituicao_det.php?cod_instituicao={$registro["cod_instituicao"]}" : "educar_instituicao_lst.php"; $this->nome_url_cancelar = "Cancelar"; return $retorno; }
function Inicializar() { $retorno = "Novo"; @session_start(); $this->pessoa_logada = $_SESSION['id_pessoa']; @session_write_close(); $this->cod_nivel_ensino = $_GET["cod_nivel_ensino"]; $obj_permissoes = new clsPermissoes(); $obj_permissoes->permissao_cadastra(571, $this->pessoa_logada, 3, "educar_nivel_ensino_lst.php"); if (is_numeric($this->cod_nivel_ensino)) { $obj = new clsPmieducarNivelEnsino($this->cod_nivel_ensino); $registro = $obj->detalhe(); if ($registro) { foreach ($registro as $campo => $val) { // passa todos os valores obtidos no registro para atributos do objeto $this->{$campo} = $val; } $this->fexcluir = $obj_permissoes->permissao_excluir(571, $this->pessoa_logada, 3); $retorno = "Editar"; } } // $this->url_cancelar = ($retorno == "Editar") ? "educar_nivel_ensino_det.php?cod_nivel_ensino={$registro["cod_nivel_ensino"]}" : "educar_nivel_ensino_lst.php"; $this->nome_url_cancelar = "Cancelar"; $this->script_cancelar = "window.parent.fechaExpansivel(\"div_dinamico_\"+(parent.DOM_divs.length-1));"; return $retorno; }
function Inicializar() { $retorno = "Novo"; @session_start(); $this->pessoa_logada = $_SESSION['id_pessoa']; @session_write_close(); $this->cod_turma_tipo = $_GET["cod_turma_tipo"]; $obj_permissoes = new clsPermissoes(); $obj_permissoes->permissao_cadastra(570, $this->pessoa_logada, 7, "educar_turma_tipo_lst.php"); if (is_numeric($this->cod_turma_tipo)) { $obj = new clsPmieducarTurmaTipo($this->cod_turma_tipo); $registro = $obj->detalhe(); if ($registro) { foreach ($registro as $campo => $val) { // passa todos os valores obtidos no registro para atributos do objeto $this->{$campo} = $val; } //$obj_ref_cod_escola = new clsPmieducarEscola( $this->ref_cod_escola ); //$det_ref_cod_escola = $obj_ref_cod_escola->detalhe(); //$this->ref_cod_instituicao = $det_ref_cod_escola["ref_cod_instituicao"]; $this->fexcluir = $obj_permissoes->permissao_excluir(570, $this->pessoa_logada, 7); $retorno = "Editar"; } } $this->url_cancelar = $retorno == "Editar" ? "educar_turma_tipo_det.php?cod_turma_tipo={$registro["cod_turma_tipo"]}" : "educar_turma_tipo_lst.php"; $nomeMenu = $retorno == "Editar" ? $retorno : "Cadastrar"; $localizacao = new LocalizacaoSistema(); $localizacao->entradaCaminhos(array($_SERVER['SERVER_NAME'] . "/intranet" => "Início", "educar_index.php" => "i-Educar - Escola", "" => "{$nomeMenu} de turma")); $this->enviaLocalizacao($localizacao->montar()); $this->nome_url_cancelar = "Cancelar"; return $retorno; }
function Inicializar() { $retorno = 'Novo'; session_start(); $this->pessoa_logada = $_SESSION['id_pessoa']; session_write_close(); // Verifica se o usuário tem permissão para realizar o cadastro $obj_permissao = new clsPermissoes(); $obj_permissao->permissao_cadastra(554, $this->pessoa_logada, 1, 'educar_tipo_usuario_lst.php', TRUE); $this->cod_tipo_usuario = $_GET['cod_tipo_usuario']; if (is_numeric($this->cod_tipo_usuario)) { $obj = new clsPmieducarTipoUsuario($this->cod_tipo_usuario); if (!($registro = $obj->detalhe())) { header('Location: educar_tipo_usuario_lst.php'); } if ($registro) { foreach ($registro as $campo => $val) { $this->{$campo} = $val; } $this->fexcluir = $obj_permissao->permissao_excluir(554, $this->pessoa_logada, 1, null, true); $retorno = "Editar"; } } $this->url_cancelar = $retorno == 'Editar' ? 'educar_tipo_usuario_det.php?cod_tipo_usuario=' . $registro['cod_tipo_usuario'] : 'educar_tipo_usuario_lst.php'; $this->nome_url_cancelar = 'Cancelar'; $nomeMenu = $retorno == "Editar" ? $retorno : "Cadastrar"; $localizacao = new LocalizacaoSistema(); $localizacao->entradaCaminhos(array($_SERVER['SERVER_NAME'] . "/intranet" => "Início", "educar_index.php" => "i-Educar - Escola", "" => "{$nomeMenu} tipo de usuário")); $this->enviaLocalizacao($localizacao->montar()); return $retorno; }
function Inicializar() { $retorno = 'Novo'; session_start(); $this->pessoa_logada = $_SESSION['id_pessoa']; session_write_close(); $this->idesco = $_GET['idesco']; $obj_permissoes = new clsPermissoes(); $obj_permissoes->permissao_cadastra(632, $this->pessoa_logada, 3, 'educar_escolaridade_lst.php'); if (is_numeric($this->idesco)) { $obj = new clsCadastroEscolaridade($this->idesco); $registro = $obj->detalhe(); if ($registro) { // Passa todos os valores obtidos no registro para atributos do objeto foreach ($registro as $campo => $val) { $this->{$campo} = $val; } if ($obj_permissoes->permissao_excluir(632, $this->pessoa_logada, 3)) { $this->fexcluir = true; } $retorno = 'Editar'; } } $this->url_cancelar = $retorno == 'Editar' ? 'educar_escolaridade_det.php?idesco=' . $registro['idesco'] : 'educar_escolaridade_lst.php'; $this->nome_url_cancelar = 'Cancelar'; return $retorno; }
function Inicializar() { $retorno = "Novo"; @session_start(); $this->pessoa_logada = $_SESSION['id_pessoa']; @session_write_close(); $this->cod_tipo_regime = $_GET["cod_tipo_regime"]; $obj_permissoes = new clsPermissoes(); $obj_permissoes->permissao_cadastra(568, $this->pessoa_logada, 3, "educar_tipo_regime_lst.php"); if (is_numeric($this->cod_tipo_regime)) { $obj = new clsPmieducarTipoRegime($this->cod_tipo_regime); $registro = $obj->detalhe(); if ($registro) { foreach ($registro as $campo => $val) { // passa todos os valores obtidos no registro para atributos do objeto $this->{$campo} = $val; } //** verificao de permissao para exclusao $this->fexcluir = $obj_permissoes->permissao_excluir(568, $this->pessoa_logada, 3); //** $retorno = "Editar"; } } $this->url_cancelar = $retorno == "Editar" ? "educar_tipo_regime_det.php?cod_tipo_regime={$registro["cod_tipo_regime"]}" : "educar_tipo_regime_lst.php"; $this->nome_url_cancelar = "Cancelar"; return $retorno; }
function Inicializar() { $retorno = "Novo"; @session_start(); $this->pessoa_logada = $_SESSION['id_pessoa']; @session_write_close(); if ($_POST) { $this->cod_usuario = $_POST["cod_usuario_"]; } else { $this->cod_usuario = $_GET["cod_usuario"]; } if (is_numeric($this->cod_usuario)) { $obj = new clsPmieducarUsuario($this->cod_usuario); $registro = $obj->detalhe(); if ($registro) { foreach ($registro as $campo => $val) { // passa todos os valores obtidos no registro para atributos do objeto $this->{$campo} = $val; } $obj_permissoes = new clsPermissoes(); $this->fexcluir = $obj_permissoes->permissao_excluir(555, $this->pessoa_logada, 7, "educar_usuario_lst.php", true); $retorno = "Editar"; } } $this->url_cancelar = $retorno == "Editar" ? "educar_usuario_det.php?cod_usuario={$registro["cod_usuario"]}" : "educar_usuario_lst.php"; $this->nome_url_cancelar = "Cancelar"; $nomeMenu = $retorno == "Editar" ? $retorno : "Cadastrar"; $localizacao = new LocalizacaoSistema(); $localizacao->entradaCaminhos(array($_SERVER['SERVER_NAME'] . "/intranet" => "Início", "educar_index.php" => "i-Educar - Escola", "" => "{$nomeMenu} usuário")); $this->enviaLocalizacao($localizacao->montar()); return $retorno; }
function Inicializar() { $retorno = "Novo"; @session_start(); $this->pessoa_logada = $_SESSION['id_pessoa']; @session_write_close(); $this->cod_infra_comodo_funcao = $_GET["cod_infra_comodo_funcao"]; $obj_permissoes = new clsPermissoes(); $obj_permissoes->permissao_cadastra(572, $this->pessoa_logada, 7, "educar_infra_comodo_funcao_lst.php"); if (is_numeric($this->cod_infra_comodo_funcao)) { $obj = new clsPmieducarInfraComodoFuncao(); $lst = $obj->lista($this->cod_infra_comodo_funcao); if (is_array($lst)) { $registro = array_shift($lst); if ($registro) { foreach ($registro as $campo => $val) { // passa todos os valores obtidos no registro para atributos do objeto $this->{$campo} = $val; } //** verificao de permissao para exclusao $this->fexcluir = $obj_permissoes->permissao_excluir(572, $this->pessoa_logada, 7); //** $retorno = "Editar"; } else { header("Location: educar_infra_comodo_funcao_lst.php"); die; } } } $this->url_cancelar = $retorno == "Editar" ? "educar_infra_comodo_funcao_det.php?cod_infra_comodo_funcao={$registro["cod_infra_comodo_funcao"]}" : "educar_infra_comodo_funcao_lst.php"; $nomeMenu = $retorno == "Editar" ? $retorno : "Cadastrar"; $localizacao = new LocalizacaoSistema(); $localizacao->entradaCaminhos(array($_SERVER['SERVER_NAME'] . "/intranet" => "Início", "educar_index.php" => "i-Educar - Escola", "" => "{$nomeMenu} função de cômodo")); $this->enviaLocalizacao($localizacao->montar()); $this->nome_url_cancelar = "Cancelar"; return $retorno; }
function renderHTML() { @session_start(); $this->pessoa_logada = $_SESSION['id_pessoa']; session_write_close(); $obj_permissoes = new clsPermissoes(); if ($obj_permissoes->nivel_acesso($this->pessoa_logada) > 7) { $retorno .= ' <table width="100%" height="40%" cellspacing="1" cellpadding="2" border="0" class="tablelistagem"> <tbody> <tr> <td colspan="2" valig="center" height="50"> <center class="formdktd">Usuário sem permissão para acessar esta página</center> </td> </tr> </tbody> </table>'; return $retorno; } $retorno .= ' <table width="100%" cellspacing="1" cellpadding="2" border="0" class="tablelistagem"> <tbody>'; if ($_POST) { $this->ref_cod_turma = $_POST['ref_cod_turma'] ? $_POST['ref_cod_turma'] : NULL; $this->ref_cod_serie = $_POST['ref_cod_serie'] ? $_POST['ref_cod_serie'] : NULL; $this->ref_cod_curso = $_POST['ref_cod_curso'] ? $_POST['ref_cod_curso'] : NULL; $this->ref_cod_escola = $_POST['ref_cod_escola'] ? $_POST['ref_cod_escola'] : NULL; $this->ref_cod_instituicao = $_POST['ref_cod_instituicao'] ? $_POST['ref_cod_instituicao'] : NULL; $this->busca = $_GET['busca'] ? $_GET['busca'] : NULL; } else { if ($_GET) { // Passa todos os valores obtidos no GET para atributos do objeto foreach ($_GET as $var => $val) { $this->{$var} = $val === '' ? NULL : $val; } } } $nivel_usuario = $obj_permissoes->nivel_acesso($this->pessoa_logada); if (!$this->ref_cod_escola) { $this->ref_cod_escola = $obj_permissoes->getEscola($this->pessoa_logada); } if (!is_numeric($this->ref_cod_instituicao)) { $this->ref_cod_instituicao = $obj_permissoes->getInstituicao($this->pessoa_logada); } // Componente curricular $componenteMapper = new ComponenteCurricular_Model_ComponenteDataMapper(); $obrigatorio = FALSE; $get_instituicao = TRUE; $get_escola = TRUE; $get_curso = TRUE; $get_serie = TRUE; $get_turma = TRUE; include 'educar_quadro_horarios_pesquisas.php'; if ($this->busca == 'S') { if (is_numeric($this->ref_cod_turma)) { $obj_turma = new clsPmieducarTurma($this->ref_cod_turma); $det_turma = $obj_turma->detalhe(); $obj_quadro = new clsPmieducarQuadroHorario(NULL, NULL, NULL, $this->ref_cod_turma, NULL, NULL, 1); $det_quadro = $obj_quadro->detalhe(); if (is_array($det_quadro)) { $quadro_horario = "<table class='calendar' cellspacing='0' cellpadding='0' border='0'><tr><td class='cal_esq' > </td><td background='imagens/i-educar/cal_bg.gif' width='100%' class='mes'>{$det_turma["nm_turma"]}</td><td align='right' class='cal_dir'> </td></tr><tr><td colspan='3' class='bordaM' style='border-bottom: 1px solid #8A959B;' align='center'><table cellspacing='0' cellpadding='0' border='0' ><tr class='header'><td style='border-right: 1px dotted #FFFFFF;width: 100px;'>DOM</td><td style='border-right: 1px dotted #FFFFFF;width: 100px;'>SEG</td><td style='border-right: 1px dotted #FFFFFF;width: 100px;'>TER</td><td style='border-right: 1px dotted #FFFFFF;width: 100px;'>QUA</td><td style='border-right: 1px dotted #FFFFFF;width: 100px;'>QUI</td><td style='border-right: 1px dotted #FFFFFF;width: 100px;'>SEX</td><td style='width: 100px;'>SAB</td></tr>"; $texto = '<tr>'; for ($c = 1; $c <= 7; $c++) { $obj_horarios = new clsPmieducarQuadroHorarioHorarios(); $resultado = $obj_horarios->retornaHorario($this->ref_cod_instituicao, $this->ref_cod_escola, $this->ref_cod_serie, $this->ref_cod_turma, $c); $texto .= "<td valign=top align='center' width='100' style='cursor: pointer; ' onclick='envia( this, {$this->ref_cod_turma}, {$this->ref_cod_serie}, {$this->ref_cod_curso}, {$this->ref_cod_escola}, {$this->ref_cod_instituicao}, {$det_quadro["cod_quadro_horario"]}, {$c} );'>"; if (is_array($resultado)) { foreach ($resultado as $registro) { // Componente curricular $componente = $componenteMapper->find($registro['ref_cod_disciplina']); // Servidor $obj_servidor = new clsPmieducarServidor(); $det_servidor = array_shift($obj_servidor->lista($registro['ref_servidor'], NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, TRUE)); $det_servidor['nome'] = array_shift(explode(' ', $det_servidor['nome'])); //$texto .= "<div style='text-align: center;background-color: #F6F6F6;font-size: 11px; width: 100px; margin: 3px; border: 1px solid #CCCCCC; padding:5px; '>". substr($registro['hora_inicial'], 0, 5) . ' - ' . substr($registro['hora_final'], 0, 5) . " <br> {$componente->abreviatura} <br> {$det_servidor["nome"]}</div>"; $detalhes = sprintf("%s - %s<br />%s<br />%s", substr($registro['hora_inicial'], 0, 5), substr($registro['hora_final'], 0, 5), $componente->abreviatura, $det_servidor['nome']); $texto .= sprintf('<div style="text-align: center; background-color: #F6F6F6; font-size: 11px; width: 100px; margin: 3px; border: 1px solid #CCCCCC; padding:5px;">%s</div>', $detalhes); } } else { $texto .= "<div style='text-align: center;background-color: #F6F6F6;font-size: 11px; width: 100px; margin: 3px; border: 1px solid #CCCCCC; padding:5px; height: 85%;'></div>"; } $texto .= '</td>'; } $texto .= '<tr><td colspan="7"> </td></tr>'; $quadro_horario .= $texto; $quadro_horario .= '</table></td></tr></table>'; $retorno .= "<tr><td colspan='2' ><center><b></b>{$quadro_horario}</center></td></tr>"; } else { $retorno .= "<tr><td colspan='2' ><b><center>Não existe nenhum quadro de horário cadastrado para esta turma.</center></b></td></tr>"; } } } if ($obj_permissoes->permissao_cadastra(641, $this->pessoa_logada, 7)) { $retorno .= "<tr><td> </td></tr><tr>\n <td align=\"center\" colspan=\"2\">"; if (!$det_quadro) { $retorno .= "<input type=\"button\" value=\"Novo Quadro de Horários\" onclick=\"window.location='educar_quadro_horario_cad.php?ref_cod_turma={$this->ref_cod_turma}&ref_cod_serie={$this->ref_cod_serie}&ref_cod_curso={$this->ref_cod_curso}&ref_cod_escola={$this->ref_cod_escola}&ref_cod_instituicao={$this->ref_cod_instituicao};'\" class=\"botaolistagem\"/>"; } else { if ($obj_permissoes->permissao_excluir(641, $this->pessoa_logada, 7)) { $retorno .= "<input type=\"button\" value=\"Excluir Quadro de Horários\" onclick=\"window.location='educar_quadro_horario_cad.php?ref_cod_turma={$this->ref_cod_turma}&ref_cod_serie={$this->ref_cod_serie}&ref_cod_curso={$this->ref_cod_curso}&ref_cod_escola={$this->ref_cod_escola}&ref_cod_instituicao={$this->ref_cod_instituicao}&ref_cod_quadro_horario={$det_quadro["cod_quadro_horario"]}'\" class=\"botaolistagem\"/>"; } } $retorno .= "</td>\n </tr>"; } $retorno .= '</tbody> </table>'; return $retorno; }
function Excluir() { @session_start(); $this->pessoa_logada = $_SESSION['id_pessoa']; @session_write_close(); $obj_permissoes = new clsPermissoes(); $obj_permissoes->permissao_excluir(587, $this->pessoa_logada, 3, "educar_sequencia_serie_lst.php"); $obj = new clsPmieducarSequenciaSerie($this->ref_serie_origem, $this->ref_serie_destino, $this->pessoa_logada, null, null, null, 0); $excluiu = $obj->excluir(); if ($excluiu) { $this->mensagem .= "Exclusão efetuada com sucesso.<br>"; header("Location: educar_sequencia_serie_lst.php"); die; return true; } $this->mensagem = "Exclusão não realizada.<br>"; echo "<!--\nErro ao excluir clsPmieducarSequenciaSerie\nvalores obrigatorios\nif( is_numeric( {$this->ref_serie_origem} ) && is_numeric( {$this->ref_serie_destino} ) && is_numeric( {$this->pessoa_logada} ) )\n-->"; return false; }
function Excluir() { @session_start(); $this->pessoa_logada = $_SESSION['id_pessoa']; @session_write_close(); $obj_permissoes = new clsPermissoes(); $obj_permissoes->permissao_excluir(578, $this->pessoa_logada, 7, 'educar_aluno_det.php?cod_aluno=' . $this->ref_cod_aluno); if (!$this->desativaEnturmacoesMatricula($this->cod_matricula)) { return false; } $obj_matricula = new clsPmieducarMatricula($this->cod_matricula); $det_matricula = $obj_matricula->detalhe(); $ref_cod_serie = $det_matricula['ref_ref_cod_serie']; $obj_sequencia = new clsPmieducarSequenciaSerie(); $lst_sequencia = $obj_sequencia->lista(NULL, $ref_cod_serie, NULL, NULL, NULL, NULL, NULL, NULL, 1); // Coloca as matrículas anteriores em andamento $obj_transferencia_antiga = new clsPmieducarTransferenciaSolicitacao(); $lista_transferencia = $obj_transferencia_antiga->lista(null, null, null, null, null, $this->cod_matricula); if (is_array($lista_transferencia)) { foreach ($lista_transferencia as $transf) { $obj_mat = new clsPmieducarMatricula($transf['ref_cod_matricula_saida']); $obj_mat = $obj_mat->detalhe(); if ($obj_mat['aprovado'] == 4) { $obj_mat = new clsPmieducarMatricula($transf['ref_cod_matricula_saida'], null, null, null, $this->pessoa_logada, null, null, 3); $obj_mat->edita(); $obj_transf = new clsPmieducarTransferenciaSolicitacao($transf['cod_transferencia_solicitacao']); $obj_transf->desativaEntradaTransferencia(); } } } // Verifica se a série da matrícula cancelada é sequência de alguma outra série if (is_array($lst_sequencia)) { $det_sequencia = array_shift($lst_sequencia); $ref_serie_origem = $det_sequencia['ref_serie_origem']; $obj_matricula = new clsPmieducarMatricula(); $lst_matricula = $obj_matricula->lista(NULL, NULL, NULL, $ref_serie_origem, NULL, NULL, $this->ref_cod_aluno, NULL, NULL, NULL, NULL, NULL, 1, NULL, NULL, NULL, 0); // Verifica se o aluno tem matrícula na série encontrada if (is_array($lst_matricula)) { $det_matricula = array_shift($lst_matricula); $ref_cod_matricula = $det_matricula['cod_matricula']; $obj = new clsPmieducarMatricula($ref_cod_matricula, NULL, NULL, NULL, $this->pessoa_logada, NULL, NULL, NULL, NULL, NULL, 1, NULL, 1); $editou1 = $obj->edita(); if (!$editou1) { $this->mensagem = 'Não foi possível editar a "Última Matrícula da Sequência".<br />'; return FALSE; } } } $obj = new clsPmieducarMatricula($this->cod_matricula, NULL, NULL, NULL, $this->pessoa_logada, NULL, NULL, NULL, NULL, NULL, 0); $excluiu = $obj->excluir(); if ($excluiu) { $this->mensagem .= 'Exclusão efetuada com sucesso.<br />'; header('Location: educar_aluno_det.php?cod_aluno=' . $this->ref_cod_aluno); die; } $this->mensagem = 'Exclusão não realizada.<br />'; return FALSE; }
function Inicializar() { $retorno = "Novo"; @session_start(); $this->pessoa_logada = $_SESSION['id_pessoa']; @session_write_close(); //** Verificacao de permissao para cadastro $obj_permissao = new clsPermissoes(); $obj_permissao->permissao_cadastra(563, $this->pessoa_logada, 3, "educar_tipo_usuario_lst.php"); //** $this->cod_material_tipo = $_GET["cod_material_tipo"]; if (is_numeric($this->cod_material_tipo)) { $obj = new clsPmieducarMaterialTipo($this->cod_material_tipo); $registro = $obj->detalhe(); if ($registro) { /***ativacao de registro ***/ /* if($_GET["ativar"] == "true") { if( $registro["ativo"] == 0) { if(!$obj_permissao->permissao_excluir(563,$this->pessoa_logada)) { echo "<script>alert('Usuário sem permissão para ativar material!'); document.location='educar_material_tipo_lst.php?ativo=excluido';</script>"; die; } $obj->ativo = 1; $obj->ref_usuario_exc = $this->pessoa_logada; if($obj->edita()) echo "<script>alert('Ativação realizada com sucesso'); document.location='educar_material_tipo_lst.php?ativo=excluido';</script>"; else echo "<script>alert('Erro ao ativar material didático!'); document.location='educar_material_tipo_lst.php?ativo=excluido';</script>"; } else{ echo "<script>alert('Tipo de material já se encontra ativo!'); document.location='educar_material_tipo_lst.php';</script>"; } } */ /*if(!$registro["ativo"]) header( "Location: educar_material_tipo_lst.php" ); */ foreach ($registro as $campo => $val) { // passa todos os valores obtidos no registro para atributos do objeto $this->{$campo} = $val; } //** verificao de permissao para exclusao $this->fexcluir = $obj_permissao->permissao_excluir(563, $this->pessoa_logada, 3); //** $retorno = "Editar"; } } $this->url_cancelar = $retorno == "Editar" ? "educar_material_tipo_det.php?cod_material_tipo={$registro["cod_material_tipo"]}" : "educar_material_tipo_lst.php"; $this->nome_url_cancelar = "Cancelar"; return $retorno; }
function Inicializar() { $retorno = 'Novo'; @session_start(); $this->pessoa_logada = $_SESSION['id_pessoa']; @session_write_close(); $this->cod_turma = $_GET['cod_turma']; $obj_permissoes = new clsPermissoes(); $obj_permissoes->permissao_cadastra(586, $this->pessoa_logada, 7, 'educar_turma_lst.php'); if (is_numeric($this->cod_turma)) { $obj = new clsPmieducarTurma($this->cod_turma); $registro = $obj->detalhe(); $obj_esc = new clsPmieducarEscola($registro['ref_ref_cod_escola']); $det_esc = $obj_esc->detalhe(); $obj_ser = new clsPmieducarSerie($registro['ref_ref_cod_serie']); $det_ser = $obj_ser->detalhe(); $this->ref_cod_escola = $det_esc['cod_escola']; $this->ref_cod_instituicao = $det_esc['ref_cod_instituicao']; $this->ref_cod_curso = $det_ser['ref_cod_curso']; $obj_curso = new clsPmieducarCurso($this->ref_cod_curso); $det_curso = $obj_curso->detalhe(); $this->padrao_ano_escolar = $det_curso['padrao_ano_escolar']; if ($registro) { foreach ($registro as $campo => $val) { $this->{$campo} = $val; } $this->fexcluir = $obj_permissoes->permissao_excluir(586, $this->pessoa_logada, 7, 'educar_turma_lst.php'); $retorno = 'Editar'; } } $this->url_cancelar = $retorno == 'Editar' ? 'educar_turma_det.php?cod_turma=' . $registro['cod_turma'] : 'educar_turma_lst.php'; $this->nome_url_cancelar = 'Cancelar'; return $retorno; }
function Excluir() { @session_start(); $this->pessoa_logada = $_SESSION['id_pessoa']; @session_write_close(); $obj_permissoes = new clsPermissoes(); $obj_permissoes->permissao_excluir(641, $this->pessoa_logada, 7, 'educar_calendario_dia_lst.php'); $obj = new clsPmieducarCalendarioDia($this->ref_cod_calendario_ano_letivo, $this->mes, $this->dia, $this->pessoa_logada, $this->pessoa_logada, "NULL", "NULL", $this->data_cadastro, $this->data_exclusao, 1); $excluiu = $obj->edita(); if ($excluiu) { $obj_quadro_horarios_aux = new clsPmieducarQuadroHorarioHorariosAux(); $obj_quadro_horarios_aux->excluirTodos($this->identificador); $this->mensagem .= "Exclusão efetuada com sucesso.<br>"; header("Location: educar_calendario_anotacao_lst.php?dia={$this->dia}&mes={$this->mes}&ano={$this->ano}&ref_cod_calendario_ano_letivo={$this->ref_cod_calendario_ano_letivo}"); die; } $this->mensagem = "Exclusão não realizada.<br>"; return FALSE; }
function Gerar() { if ($_POST) { foreach ($_POST as $campo => $val) { if (is_string($val)) { $val = urldecode($val); } $this->{$campo} = $this->{$campo} ? $this->{$campo} : $val; } } $obj_inst = new clsPmieducarInstituicao($this->ref_ref_cod_instituicao); $inst_det = $obj_inst->detalhe(); $this->campoRotulo('nm_instituicao', 'Instituição', $inst_det['nm_instituicao']); $this->campoOculto('ref_ref_cod_instituicao', $this->ref_ref_cod_instituicao); // Dados do servidor $objTemp = new clsPmieducarServidor($this->ref_cod_servidor); $det = $objTemp->detalhe(); if ($det) { foreach ($det as $key => $registro) { $this->{$key} = $registro; } } if ($this->ref_cod_servidor) { $objTemp = new clsFuncionario($this->ref_cod_servidor); $detalhe = $objTemp->detalhe(); $detalhe = $detalhe['idpes']->detalhe(); $nm_servidor = $detalhe['nome']; } $this->campoRotulo('nm_servidor', 'Servidor', $nm_servidor); $this->campoOculto('ref_cod_servidor', $this->ref_cod_servidor); if ($_POST['alocacao_array']) { $this->alocacao_array = unserialize(urldecode($_POST['alocacao_array'])); } if ($_POST['alocacao_excluida_array']) { $this->alocacao_excluida_array = unserialize(urldecode($_POST['alocacao_excluida_array'])); } if ($_POST['carga_horaria_alocada'] && $_POST['periodo']) { $aux = array(); $aux['carga_horaria_alocada'] = $_POST['carga_horaria_alocada']; $aux['periodo'] = $_POST['periodo']; $aux['ref_cod_escola'] = $_POST['ref_cod_escola']; $aux['novo'] = 1; $this->alocacao_array[] = $aux; unset($this->periodo); unset($this->carga_horaria_alocada); unset($this->ref_cod_escola); } // Exclusão if ($this->alocacao_array) { foreach ($this->alocacao_array as $key => $alocacao) { if (is_numeric($_POST['excluir_periodo'])) { if ($_POST['excluir_periodo'] == $key) { $this->alocacao_excluida_array[] = $alocacao; unset($this->alocacao_array[$key]); unset($this->excluir_periodo); } } } } // Carga horária $carga = $this->carga_horaria_disponivel; $this->campoRotulo('carga_horaria_disponivel', 'Carga Horária', $carga . ':00'); foreach ($this->alocacao_array as $alocacao) { $carga_horaria_ = explode(':', $alocacao['carga_horaria_alocada']); $horas += (int) $carga_horaria_[0]; $minutos += (int) $carga_horaria_[1]; } $total = $horas * 60 + $minutos; $rest = $carga * 60 - $total; $total = sprintf('%02d:%02d', $total / 60, $total % 60); $rest = sprintf('%02d:%02d', $rest / 60, $rest % 60); $this->campoRotulo('horas_utilizadas', 'Horas Utilizadas', $total); $this->campoRotulo('horas_restantes', 'Horas Restantes', $rest); $this->campoOculto('horas_restantes_', $rest); $this->campoQuebra(); $this->campoOculto('excluir_periodo', ''); unset($aux); // Escolas $obj_escola = new clsPmieducarEscola(); $permissao = new clsPermissoes(); // Exibe apenas a escola ao qual o usuário de nível escola está alocado if (4 == $permissao->nivel_acesso($this->pessoa_logada)) { $lista_escola = $obj_escola->lista($permissao->getEscola($this->pessoa_logada), NULL, NULL, $this->ref_ref_cod_instituicao, NULL, NULL, NULL, NULL, NULL, NULL, 1); $nome_escola = $lista_escola[0]['nome']; $cod_escola = $lista_escola[0]['cod_escola']; $this->campoTextoInv('ref_cod_escola_label', 'Escola', $nome_escola, 100, 255, FALSE); $this->campoOculto('ref_cod_escola', $cod_escola); } else { $lista_escola = $obj_escola->lista(NULL, NULL, NULL, $this->ref_ref_cod_instituicao, NULL, NULL, NULL, NULL, NULL, NULL, 1); $opcoes = array('' => 'Selecione'); if ($lista_escola) { foreach ($lista_escola as $escola) { $opcoes[$escola['cod_escola']] = $escola['nome']; } } $this->campoLista('ref_cod_escola', 'Escola', $opcoes, $this->ref_cod_escola, '', FALSE, '', '', FALSE, FALSE); } $periodo = array(1 => 'Matutino', 2 => 'Vespertino', 3 => 'Noturno'); self::$periodos = $periodo; $this->campoLista('periodo', 'Período', $periodo, $this->periodo, NULL, FALSE, '', '', FALSE, FALSE); $this->campoHora('carga_horaria_alocada', 'Carga Horária', $this->carga_horaria_alocada, FALSE); // Altera a string de descrição original do campo hora $this->campos['carga_horaria_alocada'][6] = sprintf('Formato hh:mm (máximo de %d horas por período)', clsPmieducarServidorAlocacao::$cargaHorariaMax); $this->campoOculto('alocacao_array', serialize($this->alocacao_array)); $this->campoOculto('alocacao_excluida_array', serialize($this->alocacao_excluida_array)); $this->campoRotulo('bt_incluir_periodo', 'Período', "<a href='#' onclick=\"if(validaHora()) { document.getElementById('incluir_periodo').value = 'S'; document.getElementById('tipoacao').value = ''; document.{$this->__nome}.submit();}\"><img src='imagens/nvp_bot_adiciona.gif' title='Incluir' border=0></a>"); if ($this->alocacao_array) { $excluir_ok = FALSE; if ($_POST['excluir_periodo'] || $_POST['excluir_periodo'] == '0') { $excluir_ok = TRUE; } foreach ($this->alocacao_array as $key => $alocacao) { $obj_permissoes = new clsPermissoes(); $link_excluir = ''; $obj_escola = new clsPmieducarEscola($alocacao['ref_cod_escola']); $det_escola = $obj_escola->detalhe(); $det_escola = $det_escola['nome']; if ($obj_permissoes->permissao_excluir(635, $this->pessoa_logada, 7)) { $show = TRUE; if (4 == $permissao->nivel_acesso($this->pessoa_logada) && $alocacao['ref_cod_escola'] != $permissao->getEscola($this->pessoa_logada)) { $show = FALSE; } $link_excluir = $show ? "<a href='#' onclick=\"getElementById('excluir_periodo').value = '{$key}'; getElementById('tipoacao').value = ''; {$this->__nome}.submit();\"><img src='imagens/nvp_bola_xis.gif' title='Excluir' border=0></a>" : ""; } // @todo CoreExt_Enum switch ($alocacao['periodo']) { case 1: $nm_periodo = 'Matutino'; break; case 2: $nm_periodo = 'Vespertino'; break; case 3: $nm_periodo = 'Noturno'; break; } // Períodos usados na escola self::$escolasPeriodos[$alocacao['ref_cod_escola']][$alocacao['periodo']] = $alocacao['periodo']; $this->campoTextoInv('periodo_' . $key, '', $nm_periodo, 10, 10, FALSE, FALSE, TRUE, '', '', '', '', 'periodo'); $this->campoTextoInv('carga_horaria_alocada_' . $key, '', substr($alocacao['carga_horaria_alocada'], 0, 5), 5, 5, FALSE, FALSE, TRUE, '', '', '', '', 'ds_carga_horaria_'); $this->campoTextoInv('ref_cod_escola_' . $key, '', $det_escola, 70, 255, FALSE, FALSE, FALSE, '', $link_excluir, '', '', 'ref_cod_escola_'); } } $this->campoOculto('incluir_periodo', ''); $this->campoQuebra(); }
function Excluir() { @session_start(); $this->pessoa_logada = $_SESSION['id_pessoa']; @session_write_close(); $obj_permissoes = new clsPermissoes(); $obj_permissoes->permissao_excluir(829, $this->pessoa_logada, 3, "educar_categoria_nivel_lst.php", true); $obj = new clsPmieducarCategoriaNivel($this->cod_categoria_nivel, $this->pessoa_logada, $this->pessoa_logada, $this->nm_categoria_nivel, $this->data_cadastro, $this->data_exclusao, 0); $excluiu = $obj->excluir(); if ($excluiu) { $this->mensagem .= "Exclusão efetuada com sucesso.<br>"; header("Location: educar_categoria_nivel_lst.php"); die; return true; } $this->mensagem = "Exclusão não realizada.<br>"; echo "<!--\nErro ao excluir clsPmieducarCategoriaNivel\nvalores obrigatorios\nif( is_numeric( {$this->cod_categoria_nivel} ) && is_numeric( {$this->ref_usuario_exc} ) )\n-->"; return false; }
function Excluir() { @session_start(); $this->pessoa_logada = $_SESSION['id_pessoa']; @session_write_close(); $obj_permissoes = new clsPermissoes(); $permite_excluir = $obj_permissoes->permissao_excluir(829, $this->pessoa_logada, 3, "", true); if (!$permite_excluir) { echo "<script>window.parent.fechaExpansivel( '{$_GET['div']}');</script>"; die; } $obj = new clsPmieducarSubnivel($this->cod_nivel, $this->pessoa_logada, $this->pessoa_logada); $excluiu = $obj->excluirTodos(); if ($excluiu) { $this->mensagem .= "Exclusão efetuada com sucesso.<br>"; header("location:educar_categoria_nivel_det.php?cod_categoria_nivel={$this->ref_cod_categoria_nivel}"); die; return true; } $this->mensagem = "Exclusão não realizada.<br>"; echo "<!--\nErro ao excluir clsPmieducarNivel\nvalores obrigatorios\nif( is_numeric( {$this->cod_nivel} ) && is_numeric( {$this->ref_usuario_exc} ) )\n-->"; return false; }
function Inicializar() { $retorno = 'Novo'; @session_start(); $this->pessoa_logada = $_SESSION['id_pessoa']; @session_write_close(); $this->cod_serie = $_GET['cod_serie']; $obj_permissoes = new clsPermissoes(); $obj_permissoes->permissao_cadastra(583, $this->pessoa_logada, 3, 'educar_serie_lst.php'); if (is_numeric($this->cod_serie)) { $obj = new clsPmieducarSerie($this->cod_serie); $registro = $obj->detalhe(); if ($registro) { // passa todos os valores obtidos no registro para atributos do objeto foreach ($registro as $campo => $val) { $this->{$campo} = $val; } $obj_curso = new clsPmieducarCurso($registro['ref_cod_curso']); $obj_curso_det = $obj_curso->detalhe(); $this->ref_cod_instituicao = $obj_curso_det['ref_cod_instituicao']; $this->fexcluir = $obj_permissoes->permissao_excluir(583, $this->pessoa_logada, 3); $retorno = 'Editar'; } } $this->url_cancelar = $retorno == "Editar" ? "educar_serie_det.php?cod_serie={$registro["cod_serie"]}" : "educar_serie_lst.php"; $this->nome_url_cancelar = "Cancelar"; return $retorno; }
function Excluir() { @session_start(); $this->pessoa_logada = $_SESSION['id_pessoa']; @session_write_close(); $obj_permissoes = new clsPermissoes(); $obj_permissoes->permissao_excluir(600, $this->pessoa_logada, 11, "educar_motivo_baixa_lst.php"); $obj = new clsPmieducarMotivoBaixa($this->cod_motivo_baixa, $this->pessoa_logada, null, null, null, null, null, 0); $excluiu = $obj->excluir(); if ($excluiu) { $this->mensagem .= "Exclusão efetuada com sucesso.<br>"; header("Location: educar_motivo_baixa_lst.php"); die; return true; } $this->mensagem = "Exclusão não realizada.<br>"; echo "<!--\nErro ao excluir clsPmieducarMotivoBaixa\nvalores obrigatorios\nif( is_numeric( {$this->cod_motivo_baixa} ) && is_numeric( {$this->pessoa_logada} ) )\n-->"; return false; }
/** * Implementação do método clsCadastro::Excluir() * @see ieducar/intranet/include/clsCadastro#Excluir() */ public function Excluir() { session_start(); $this->pessoa_logada = $_SESSION['id_pessoa']; session_write_close(); $urlPermite = sprintf("educar_servidor_det.php?cod_servidor=%d&ref_cod_instituicao=%d", $this->ref_cod_servidor, $this->ref_cod_instituicao); $obj_permissoes = new clsPermissoes(); $obj_permissoes->permissao_excluir(635, $this->pessoa_logada, 7, $urlPermite); $obj = new clsPmieducarServidorAfastamento($this->ref_cod_servidor, $this->sequencial, $this->ref_ref_cod_instituicao, $this->ref_cod_motivo_afastamento, $this->pessoa_logada, $this->pessoa_logada, $this->data_cadastro, $this->data_exclusao, $this->data_retorno, $this->data_saida, 0); $excluiu = $obj->excluir(); if ($excluiu) { $this->mensagem .= "Exclusão efetuada com sucesso.<br>"; header("Location: educar_servidor_afastamento_lst.php"); die; } $this->mensagem = "Exclusão não realizada.<br>"; return FALSE; }