From 099dd342a7c6522f593fa45f2255549c6d8c8810 Mon Sep 17 00:00:00 2001 From: Eriksen Costa Paixão Date: Tue, 15 Jun 2010 15:05:27 +0000 Subject: [PATCH] Alterado nível de acesso para nível Escola --- ieducar/intranet/educar_servidor_formacao_cad.php | 10 +++++----- ieducar/intranet/educar_servidor_formacao_det.php | 2 +- ieducar/intranet/educar_servidor_formacao_lst.php | 33 +++++++++++++++++++++++++-------- 3 files changed, 31 insertions(+), 14 deletions(-) diff --git a/ieducar/intranet/educar_servidor_formacao_cad.php b/ieducar/intranet/educar_servidor_formacao_cad.php index 8a2a39b..f11fd78 100644 --- a/ieducar/intranet/educar_servidor_formacao_cad.php +++ b/ieducar/intranet/educar_servidor_formacao_cad.php @@ -107,7 +107,7 @@ class indice extends clsCadastro ); $obj_permissoes = new clsPermissoes(); - $obj_permissoes->permissao_cadastra(635, $this->pessoa_logada, 3, $backUrl); + $obj_permissoes->permissao_cadastra(635, $this->pessoa_logada, 7, $backUrl); if (is_string($this->passo) && $this->passo == 1) { $retorno = 'Novo'; @@ -141,7 +141,7 @@ class indice extends clsCadastro } $obj_permissoes = new clsPermissoes(); - if ($obj_permissoes->permissao_excluir(635, $this->pessoa_logada, 3)) { + if ($obj_permissoes->permissao_excluir(635, $this->pessoa_logada, 7)) { $this->fexcluir = TRUE; } @@ -318,7 +318,7 @@ class indice extends clsCadastro ); $obj_permissoes = new clsPermissoes(); - $obj_permissoes->permissao_cadastra(635, $this->pessoa_logada, 3, $backUrl); + $obj_permissoes->permissao_cadastra(635, $this->pessoa_logada, 7, $backUrl); $obj = new clsPmieducarServidorFormacao(NULL, NULL, $this->pessoa_logada, $this->ref_cod_servidor, $this->nm_formacao, $this->tipo, $this->descricao, @@ -365,7 +365,7 @@ class indice extends clsCadastro ); $obj_permissoes = new clsPermissoes(); - $obj_permissoes->permissao_cadastra(635, $this->pessoa_logada, 3, $backUrl); + $obj_permissoes->permissao_cadastra(635, $this->pessoa_logada, 7, $backUrl); $obj = new clsPmieducarServidorFormacao($this->cod_formacao, $this->pessoa_logada, NULL, $this->ref_cod_servidor, $this->nm_formacao, $this->tipo, $this->descricao, @@ -419,7 +419,7 @@ class indice extends clsCadastro ); $obj_permissoes = new clsPermissoes(); - $obj_permissoes->permissao_excluir(635, $this->pessoa_logada, 3, $backUrl); + $obj_permissoes->permissao_excluir(635, $this->pessoa_logada, 7, $backUrl); $obj = new clsPmieducarServidorFormacao($this->cod_formacao, $this->pessoa_logada, NULL, $this->ref_cod_servidor, $this->nm_formacao, $this->tipo, $this->descricao, diff --git a/ieducar/intranet/educar_servidor_formacao_det.php b/ieducar/intranet/educar_servidor_formacao_det.php index 558d8ac..25a044d 100644 --- a/ieducar/intranet/educar_servidor_formacao_det.php +++ b/ieducar/intranet/educar_servidor_formacao_det.php @@ -164,7 +164,7 @@ class indice extends clsDetalhe $obj_permissoes = new clsPermissoes(); - if ($obj_permissoes->permissao_cadastra(635, $this->pessoa_logada, 3)) { + if ($obj_permissoes->permissao_cadastra(635, $this->pessoa_logada, 7)) { $this->url_novo = 'educar_servidor_formacao_cad.php'; $this->url_editar = sprintf( diff --git a/ieducar/intranet/educar_servidor_formacao_lst.php b/ieducar/intranet/educar_servidor_formacao_lst.php index 5cece9b..f326292 100644 --- a/ieducar/intranet/educar_servidor_formacao_lst.php +++ b/ieducar/intranet/educar_servidor_formacao_lst.php @@ -33,6 +33,8 @@ require_once 'include/clsListagem.inc.php'; require_once 'include/clsBanco.inc.php'; require_once 'include/pmieducar/geral.inc.php'; +require_once 'CoreExt/View/Helper/UrlHelper.php'; + /** * clsIndexBase class. * @@ -47,7 +49,7 @@ class clsIndexBase extends clsBase { function Formular() { - $this->SetTitulo($this->_instituicao . ' i-Educar - Servidor Formacao' ); + $this->SetTitulo($this->_instituicao . ' i-Educar - Servidor Formação'); $this->processoAp = 635; } } @@ -148,6 +150,10 @@ class indice extends clsListagem $total = $obj_servidor_formacao->_total; + // UrlHelper + $url = CoreExt_View_Helper_UrlHelper::getInstance(); + $path = 'educar_servidor_formacao_det.php'; + // Monta a lista if (is_array($lista) && count($lista)) { foreach ($lista as $registro) { @@ -182,25 +188,36 @@ class indice extends clsListagem $registro['tipo'] = 'Concurso'; } + $options = array( + 'query' => array( + 'cod_formacao' => $registro['cod_formacao'] + )); + $this->addLinhas(array( - "{$registro["nm_formacao"]}", - "{$registro["tipo"]}" + $url->l($registro['nm_formacao'], $path, $options), + $url->l($registro['tipo'], $path, $options) )); $this->tipo = ''; } } - $this->addPaginador2( "educar_servidor_formacao_lst.php", $total, $_GET, $this->nome, $this->limite ); + $this->addPaginador2('educar_servidor_formacao_lst.php', $total, $_GET, $this->nome, $this->limite); $obj_permissoes = new clsPermissoes(); - if ($obj_permissoes->permissao_cadastra(635, $this->pessoa_logada, 3)) { - $this->array_botao[] = "Novo"; - $this->array_botao_url[] = "educar_servidor_formacao_cad.php?ref_cod_servidor={$this->ref_cod_servidor}&ref_cod_instituicao={$this->ref_cod_instituicao}"; + if ($obj_permissoes->permissao_cadastra(635, $this->pessoa_logada, 7)) { + $this->array_botao[] = 'Novo'; + $this->array_botao_url[] = sprintf( + 'educar_servidor_formacao_cad.php?ref_cod_servidor=%d&ref_cod_instituicao=%d', + $this->ref_cod_servidor, $this->ref_cod_instituicao + ); } $this->array_botao[] = 'Voltar'; - $this->array_botao_url[] = "educar_servidor_det.php?cod_servidor={$this->ref_cod_servidor}&ref_cod_instituicao={$this->ref_cod_instituicao}"; + $this->array_botao_url[] = sprintf( + 'educar_servidor_det.php?cod_servidor=%d&ref_cod_instituicao=%d', + $this->ref_cod_servidor, $this->ref_cod_instituicao + ); $this->largura = '100%'; } -- libgit2 0.21.2