Commit 81e68536e6a2d3f48d56a364257408519eef450c
1 parent
5b226be1
Exists in
pesquisa_SEI_3.0.1
Inclusão do parâmetro Data Início de Pesquisa. Com esse parâmetro é possível o ó…
…rgão informar a partir de qual data os processos estarão disponíveis para pesquisa pelo módulo Pesquisa Pública.
Showing
4 changed files
with
368 additions
and
318 deletions
Show diff stats
sei/web/modulos/pesquisa/MdPesqBuscaProtocoloExterno.php
... | ... | @@ -53,7 +53,8 @@ class MdPesqBuscaProtocoloExterno { |
53 | 53 | $bolLinkMetadadosProcessoRestrito = $arrParametroPesquisaDTO[MdPesqParametroPesquisaRN::$TA_METADADOS_PROCESSO_RESTRITO] == 'S' ? true : false; |
54 | 54 | $txtDescricaoProcedimentoAcessoRestrito = $arrParametroPesquisaDTO[MdPesqParametroPesquisaRN::$TA_DESCRICAO_PROCEDIMENTO_ACESSO_RESTRITO]; |
55 | 55 | $bolAutocompletarInterressado = $arrParametroPesquisaDTO[MdPesqParametroPesquisaRN::$TA_AUTO_COMPLETAR_INTERESSADO] == 'S' ? true : false; |
56 | - | |
56 | + $dataInicioPesquisa = $arrParametroPesquisaDTO[MdPesqParametroPesquisaRN::$TA_DATA_INICIO_PESQUISA]; | |
57 | + | |
57 | 58 | $parametros = new stdClass(); |
58 | 59 | $filtro = new stdClass(); |
59 | 60 | |
... | ... | @@ -139,7 +140,17 @@ class MdPesqBuscaProtocoloExterno { |
139 | 140 | * ELABORA A URL |
140 | 141 | */ |
141 | 142 | |
142 | - $parametros->q = MdPesqSolrUtilExterno::formatarOperadores($q); | |
143 | + if($dataInicioPesquisa!='' && $dataInicioPesquisa!=0){ | |
144 | + $dia = substr($dataInicioPesquisa, 0, 2); | |
145 | + $mes = substr($dataInicioPesquisa, 3, 2); | |
146 | + $ano = substr($dataInicioPesquisa, 6, 4); | |
147 | + | |
148 | + $dataInicioPesquisa = 'dta_ger:[' . $ano . '-' . $mes . '-' . $dia . 'T00:00:00Z TO * ]'; | |
149 | + | |
150 | + $parametros->q = $dataInicioPesquisa; | |
151 | + } | |
152 | + | |
153 | + $parametros->q = $parametros->q . MdPesqSolrUtilExterno::formatarOperadores($q); | |
143 | 154 | |
144 | 155 | if ($strDescricaoPesquisa!=''){ |
145 | 156 | ... | ... |
sei/web/modulos/pesquisa/md_pesq_parametro_pesquisa_lista.php
1 | 1 | <? |
2 | 2 | /** |
3 | -* TRIBUNAL REGIONAL FEDERAL DA 4ª REGIÃO | |
4 | -* | |
5 | -* 29/11/2016 - criado por alex | |
6 | -* | |
7 | -* Versão do Gerador de Código: 1.39.0 | |
8 | -*/ | |
3 | + * TRIBUNAL REGIONAL FEDERAL DA 4ª REGIÃO | |
4 | + * | |
5 | + * 29/11/2016 - criado por alex | |
6 | + * | |
7 | + * Versão do Gerador de Código: 1.39.0 | |
8 | + */ | |
9 | 9 | |
10 | 10 | try { |
11 | - require_once dirname(__FILE__).'/../../SEI.php'; | |
12 | - | |
13 | - session_start(); | |
14 | - | |
15 | - ////////////////////////////////////////////////////////////////////////////// | |
16 | - //InfraDebug::getInstance()->setBolLigado(false); | |
17 | - //InfraDebug::getInstance()->setBolDebugInfra(true); | |
18 | - //InfraDebug::getInstance()->limpar(); | |
19 | - ////////////////////////////////////////////////////////////////////////////// | |
20 | - | |
21 | - SessaoSEI::getInstance()->validarLink(); | |
22 | - SessaoSEI::getInstance()->validarPermissao($_GET['acao']); | |
23 | - | |
24 | - switch($_GET['acao']){ | |
25 | - | |
26 | - | |
27 | - case 'md_pesq_parametro_listar': | |
28 | - $strTitulo = 'Parâmetros Pesquisa Pública'; | |
29 | - break; | |
30 | - | |
31 | - case 'md_pesq_parametro_alterar': | |
32 | - | |
33 | - $strTitulo = 'Parâmetros Pesquisa Pública'; | |
34 | - if(isset($_POST['btnSalvar'])) { | |
35 | - $arrParametroPesquisaDTO = array( | |
36 | - array('Nome' => MdPesqParametroPesquisaRN::$TA_CAPTCHA , 'Valor' => PaginaSEI::getInstance()->getCheckbox($_POST['chkCapcthaPesquisa'])), | |
37 | - array('Nome' => MdPesqParametroPesquisaRN::$TA_CAPTCHA_PDF , 'Valor' => PaginaSEI::getInstance()->getCheckbox($_POST['chkCapcthaGerarPdf'])), | |
38 | - array('Nome' => MdPesqParametroPesquisaRN::$TA_LISTA_ANDAMENTO_PROCESSO_PUBLICO , 'Valor' => PaginaSEI::getInstance()->getCheckbox($_POST['chkListaAndamentoProcessoPublico'])), | |
39 | - array('Nome' => MdPesqParametroPesquisaRN::$TA_PROCESSO_RESTRITO , 'Valor' => PaginaSEI::getInstance()->getCheckbox($_POST['chkProcessoRestrito'])), | |
40 | - array('Nome' => MdPesqParametroPesquisaRN::$TA_METADADOS_PROCESSO_RESTRITO , 'Valor' => PaginaSEI::getInstance()->getCheckbox($_POST['chkMetaDadosProcessoRestrito'])), | |
41 | - array('Nome' => MdPesqParametroPesquisaRN::$TA_LISTA_ANDAMENTO_PROCESSO_RESTRITO , 'Valor' => PaginaSEI::getInstance()->getCheckbox($_POST['chkListaAndamentoProcessoRestrito'])), | |
42 | - array('Nome' => MdPesqParametroPesquisaRN::$TA_DESCRICAO_PROCEDIMENTO_ACESSO_RESTRITO , 'Valor' => trim($_POST['txtDescricaoProcessoAcessoRestrito'])), | |
43 | - array('Nome' => MdPesqParametroPesquisaRN::$TA_DOCUMENTO_PROCESSO_PUBLICO , 'Valor' => PaginaSEI::getInstance()->getCheckbox($_POST['chkDocumentoProcessoPublico'])), | |
44 | - array('Nome' => MdPesqParametroPesquisaRN::$TA_LISTA_DOCUMENTO_PROCESSO_PUBLICO , 'Valor' => PaginaSEI::getInstance()->getCheckbox($_POST['chkListaDocumentoProcessoPublico'])), | |
45 | - array('Nome' => MdPesqParametroPesquisaRN::$TA_LISTA_DOCUMENTO_PROCESSO_RESTRITO , 'Valor' => PaginaSEI::getInstance()->getCheckbox($_POST['chkListaDocumentoProcessoRestrito'])), | |
46 | - array('Nome' => MdPesqParametroPesquisaRN::$TA_AUTO_COMPLETAR_INTERESSADO , 'Valor' => PaginaSEI::getInstance()->getCheckbox($_POST['chkAutoCompletarInteressado'])), | |
47 | - array('Nome' => MdPesqParametroPesquisaRN::$TA_MENU_USUARIO_EXTERNO , 'Valor' => PaginaSEI::getInstance()->getCheckbox($_POST['chkMenuUsuarioExterno'])), | |
48 | - array('Nome' => MdPesqParametroPesquisaRN::$TA_CHAVE_CRIPTOGRAFIA , 'Valor' => trim($_POST['txtChaveCriptografia'])), | |
49 | - | |
50 | - | |
51 | - ); | |
52 | - | |
53 | - $arrObjParametroPesquisaDTO = InfraArray::gerarArrInfraDTOMultiAtributos('MdPesqParametroPesquisaDTO', $arrParametroPesquisaDTO); | |
54 | - | |
55 | - $objParametroPesquisaRN = new MdPesqParametroPesquisaRN(); | |
56 | - $objParametroPesquisaRN->alterarParametros($arrObjParametroPesquisaDTO); | |
57 | - | |
58 | - PaginaSEI::getInstance()->adicionarMensagem("Parametros da Pesquisa Pública salva com sucesso!",PaginaSEI::$TIPO_MSG_AVISO); | |
59 | - } | |
60 | - | |
61 | - | |
62 | - break; | |
63 | - | |
64 | - | |
65 | - | |
66 | - default: | |
67 | - throw new InfraException("Ação '".$_GET['acao']."' não reconhecida."); | |
68 | - } | |
69 | - | |
70 | - $arrComandos = array(); | |
71 | - | |
72 | - $arrComandos[] = '<button type="submit" accesskey="S" id="btnSalvar" name="btnSalvar" value="Salvar" class="infraButton"><span class="infraTeclaAtalho">S</span>alvar</button>'; | |
73 | - | |
74 | - | |
75 | - $objParametroPesquisaDTO = new MdPesqParametroPesquisaDTO(); | |
76 | - $objParametroPesquisaDTO->retStrNome(); | |
77 | - $objParametroPesquisaDTO->retStrValor(); | |
78 | - | |
79 | - | |
80 | - $objParametroPesquisaRN = new MdPesqParametroPesquisaRN(); | |
81 | - $arrObjParametroPesquisaDTO = $objParametroPesquisaRN->listar($objParametroPesquisaDTO); | |
82 | - | |
83 | - $arrParametroPesquisaDTO = InfraArray::converterArrInfraDTO($arrObjParametroPesquisaDTO,'Valor','Nome'); | |
84 | - | |
11 | + require_once dirname(__FILE__).'/../../SEI.php'; | |
12 | + | |
13 | + session_start(); | |
14 | + | |
15 | + ////////////////////////////////////////////////////////////////////////////// | |
16 | + //InfraDebug::getInstance()->setBolLigado(false); | |
17 | + //InfraDebug::getInstance()->setBolDebugInfra(true); | |
18 | + //InfraDebug::getInstance()->limpar(); | |
19 | + ////////////////////////////////////////////////////////////////////////////// | |
20 | + | |
21 | + SessaoSEI::getInstance()->validarLink(); | |
22 | + SessaoSEI::getInstance()->validarPermissao($_GET['acao']); | |
23 | + | |
24 | + switch($_GET['acao']){ | |
25 | + | |
26 | + | |
27 | + case 'md_pesq_parametro_listar': | |
28 | + $strTitulo = 'Parâmetros Pesquisa Pública'; | |
29 | + break; | |
30 | + | |
31 | + case 'md_pesq_parametro_alterar': | |
32 | + | |
33 | + $strTitulo = 'Parâmetros Pesquisa Pública'; | |
34 | + if(isset($_POST['btnSalvar'])) { | |
35 | + | |
36 | + $arrParametroPesquisaDTO = array( | |
37 | + array('Nome' => MdPesqParametroPesquisaRN::$TA_CAPTCHA , 'Valor' => PaginaSEI::getInstance()->getCheckbox($_POST['chkCapcthaPesquisa'])), | |
38 | + array('Nome' => MdPesqParametroPesquisaRN::$TA_CAPTCHA_PDF , 'Valor' => PaginaSEI::getInstance()->getCheckbox($_POST['chkCapcthaGerarPdf'])), | |
39 | + array('Nome' => MdPesqParametroPesquisaRN::$TA_LISTA_ANDAMENTO_PROCESSO_PUBLICO , 'Valor' => PaginaSEI::getInstance()->getCheckbox($_POST['chkListaAndamentoProcessoPublico'])), | |
40 | + array('Nome' => MdPesqParametroPesquisaRN::$TA_PROCESSO_RESTRITO , 'Valor' => PaginaSEI::getInstance()->getCheckbox($_POST['chkProcessoRestrito'])), | |
41 | + array('Nome' => MdPesqParametroPesquisaRN::$TA_METADADOS_PROCESSO_RESTRITO , 'Valor' => PaginaSEI::getInstance()->getCheckbox($_POST['chkMetaDadosProcessoRestrito'])), | |
42 | + array('Nome' => MdPesqParametroPesquisaRN::$TA_LISTA_ANDAMENTO_PROCESSO_RESTRITO , 'Valor' => PaginaSEI::getInstance()->getCheckbox($_POST['chkListaAndamentoProcessoRestrito'])), | |
43 | + array('Nome' => MdPesqParametroPesquisaRN::$TA_DESCRICAO_PROCEDIMENTO_ACESSO_RESTRITO , 'Valor' => trim($_POST['txtDescricaoProcessoAcessoRestrito'])), | |
44 | + array('Nome' => MdPesqParametroPesquisaRN::$TA_DOCUMENTO_PROCESSO_PUBLICO , 'Valor' => PaginaSEI::getInstance()->getCheckbox($_POST['chkDocumentoProcessoPublico'])), | |
45 | + array('Nome' => MdPesqParametroPesquisaRN::$TA_LISTA_DOCUMENTO_PROCESSO_PUBLICO , 'Valor' => PaginaSEI::getInstance()->getCheckbox($_POST['chkListaDocumentoProcessoPublico'])), | |
46 | + array('Nome' => MdPesqParametroPesquisaRN::$TA_LISTA_DOCUMENTO_PROCESSO_RESTRITO , 'Valor' => PaginaSEI::getInstance()->getCheckbox($_POST['chkListaDocumentoProcessoRestrito'])), | |
47 | + array('Nome' => MdPesqParametroPesquisaRN::$TA_AUTO_COMPLETAR_INTERESSADO , 'Valor' => PaginaSEI::getInstance()->getCheckbox($_POST['chkAutoCompletarInteressado'])), | |
48 | + array('Nome' => MdPesqParametroPesquisaRN::$TA_MENU_USUARIO_EXTERNO , 'Valor' => PaginaSEI::getInstance()->getCheckbox($_POST['chkMenuUsuarioExterno'])), | |
49 | + array('Nome' => MdPesqParametroPesquisaRN::$TA_CHAVE_CRIPTOGRAFIA , 'Valor' => trim($_POST['txtChaveCriptografia'])), | |
50 | + array('Nome' => MdPesqParametroPesquisaRN::$TA_DATA_INICIO_PESQUISA , 'Valor' => (empty($_POST['txtDataInicioPesquisa']) ? '0' : $_POST['txtDataInicioPesquisa'] )), | |
51 | + | |
52 | + ); | |
53 | + | |
54 | + $arrObjParametroPesquisaDTO = InfraArray::gerarArrInfraDTOMultiAtributos('MdPesqParametroPesquisaDTO', $arrParametroPesquisaDTO); | |
55 | + | |
56 | + $objParametroPesquisaRN = new MdPesqParametroPesquisaRN(); | |
57 | + $objParametroPesquisaRN->alterarParametros($arrObjParametroPesquisaDTO); | |
58 | + | |
59 | + PaginaSEI::getInstance()->adicionarMensagem("Parametros da Pesquisa Pública salva com sucesso!",PaginaSEI::$TIPO_MSG_AVISO); | |
60 | + } | |
61 | + | |
62 | + | |
63 | + break; | |
64 | + | |
65 | + | |
66 | + | |
67 | + default: | |
68 | + throw new InfraException("Ação '".$_GET['acao']."' não reconhecida."); | |
69 | + } | |
70 | + | |
71 | + $arrComandos = array(); | |
72 | + | |
73 | + $arrComandos[] = '<button type="submit" accesskey="S" id="btnSalvar" name="btnSalvar" value="Salvar" class="infraButton"><span class="infraTeclaAtalho">S</span>alvar</button>'; | |
74 | + | |
75 | + | |
76 | + $objParametroPesquisaDTO = new MdPesqParametroPesquisaDTO(); | |
77 | + $objParametroPesquisaDTO->retStrNome(); | |
78 | + $objParametroPesquisaDTO->retStrValor(); | |
79 | + | |
80 | + | |
81 | + $objParametroPesquisaRN = new MdPesqParametroPesquisaRN(); | |
82 | + $arrObjParametroPesquisaDTO = $objParametroPesquisaRN->listar($objParametroPesquisaDTO); | |
83 | + | |
84 | + $arrParametroPesquisaDTO = InfraArray::converterArrInfraDTO($arrObjParametroPesquisaDTO,'Valor','Nome'); | |
85 | + | |
85 | 86 | |
86 | 87 | }catch(Exception $e){ |
87 | - PaginaSEI::getInstance()->processarExcecao($e); | |
88 | -} | |
88 | + PaginaSEI::getInstance()->processarExcecao($e); | |
89 | +} | |
89 | 90 | |
90 | 91 | PaginaSEI::getInstance()->montarDocType(); |
91 | 92 | PaginaSEI::getInstance()->abrirHtml(); |
... | ... | @@ -104,24 +105,24 @@ PaginaSEI::getInstance()->montarJavaScript(); |
104 | 105 | PaginaSEI::getInstance()->abrirJavaScript(); |
105 | 106 | ?> |
106 | 107 | |
107 | -function inicializar(){ | |
108 | - | |
109 | -} | |
108 | + function inicializar(){ | |
110 | 109 | |
111 | -function validarCadastro() { | |
110 | + } | |
112 | 111 | |
113 | - if (infraTrim(document.getElementById('txtChaveCriptografia').value)=='') { | |
112 | + function validarCadastro() { | |
113 | + | |
114 | + if (infraTrim(document.getElementById('txtChaveCriptografia').value)=='') { | |
114 | 115 | alert('Informe a Chave para criptografia.'); |
115 | 116 | document.getElementById('txtChaveCriptografia').focus(); |
116 | 117 | return false; |
117 | - } | |
118 | - | |
119 | - return true; | |
120 | -} | |
118 | + } | |
121 | 119 | |
122 | -function OnSubmitForm() { | |
123 | - return validarCadastro(); | |
124 | -} | |
120 | + return true; | |
121 | + } | |
122 | + | |
123 | + function OnSubmitForm() { | |
124 | + return validarCadastro(); | |
125 | + } | |
125 | 126 | |
126 | 127 | |
127 | 128 | <? |
... | ... | @@ -130,83 +131,89 @@ PaginaSEI::getInstance()->fecharHead(); |
130 | 131 | PaginaSEI::getInstance()->abrirBody($strTitulo,'onload="inicializar();"'); |
131 | 132 | PaginaSEI::getInstance()->abrirAreaDados(null); |
132 | 133 | ?> |
133 | -<form id="frmParametroPesquisaLista" method="post" onsubmit="return OnSubmitForm();" action="<?=SessaoSEI::getInstance()->assinarLink('controlador.php?acao=md_pesq_parametro_alterar&acao_origem='.$_GET['acao'])?>"> | |
134 | - | |
135 | - <? | |
136 | - //PaginaSEI::getInstance()->montarBarraLocalizacao($strTitulo); | |
137 | - PaginaSEI::getInstance()->montarBarraComandosSuperior($arrComandos); | |
138 | - //PaginaSEI::getInstance()->montarAreaValidacao(); | |
139 | - ?> | |
140 | - | |
141 | - <h2 style='font-weight:bold;text-decoration: underline;'>Captcha</h2> | |
142 | - <h3 style='font-weight:bold; font-style: italic;'>Habilitar Captcha na pesquisa pública:</h3> | |
143 | - <input id="chkCapcthaPesquisa" name="chkCapcthaPesquisa" type="checkbox" class="infraCheckBox" <?=($arrParametroPesquisaDTO[MdPesqParametroPesquisaRN::$TA_CAPTCHA] == 'S') ? "checked" : ""?> tabindex="<?=PaginaSEI::getInstance()->getProxTabDados()?>" /> | |
144 | - <label id="lblCapcthaPesquisa" for="chkCapcthaPesquisa" class="infraLabelCheckBox">Sim</label> | |
145 | - | |
146 | - <h3 style='font-weight:bold; font-style: italic;'>Habilitar Captcha gerar PDF:</h3> | |
147 | - <input id="chkCapcthaGerarPdf" name="chkCapcthaGerarPdf" type="checkbox" class="infraCheckBox" <?=($arrParametroPesquisaDTO[MdPesqParametroPesquisaRN::$TA_CAPTCHA_PDF] == 'S') ? "checked" : ""?> tabindex="<?=PaginaSEI::getInstance()->getProxTabDados()?>" /> | |
148 | - <label id="lblCapcthaGerarPdf" for="chkCapcthaGerarPdf" class="infraLabelCheckBox">Sim</label> | |
149 | - <hr/> | |
150 | - | |
151 | - <h2 style='font-weight:bold;text-decoration: underline;'>Processos</h2> | |
152 | - | |
153 | - <h3 style='font-weight:bold; font-style: italic;'>Habilitar a exibição dos Andamentos nos processos com nível de acesso global "Público":</h3> | |
154 | - <input id="chkListaAndamentoProcessoPublico" name="chkListaAndamentoProcessoPublico" type="checkbox" class="infraCheckBox" <?=($arrParametroPesquisaDTO[MdPesqParametroPesquisaRN::$TA_LISTA_ANDAMENTO_PROCESSO_PUBLICO] == 'S') ? "checked" : ""?> tabindex="<?=PaginaSEI::getInstance()->getProxTabDados()?>" /> | |
155 | - <label id="lblListaAndamentoProcessoPublico" for="chkListaAndamentoProcessoPublico" class="infraLabelCheckBox">Sim</label> | |
156 | - | |
157 | - <h3 style='font-weight:bold; font-style: italic;'>Habilitar a pesquisa em processos com nível de acesso global "Restrito":</h3> | |
158 | - <input id="chkProcessoRestrito" name="chkProcessoRestrito" type="checkbox" class="infraCheckBox" <?=($arrParametroPesquisaDTO[MdPesqParametroPesquisaRN::$TA_PROCESSO_RESTRITO] == 'S') ? "checked" : ""?> tabindex="<?=PaginaSEI::getInstance()->getProxTabDados()?>" /> | |
159 | - <label id="lblProcessoRestrito" for="chkProcessoRestrito" class="infraLabelCheckBox">Sim</label> | |
160 | - | |
161 | - <h3 style='font-weight:bold; font-style: italic;'>Habilitar o acesso aos metadados dos Processos com nível de acesso global "Restrito"</h3> | |
162 | - <input id="chkMetaDadosProcessoRestrito" name="chkMetaDadosProcessoRestrito" type="checkbox" class="infraCheckBox" <?=($arrParametroPesquisaDTO[MdPesqParametroPesquisaRN::$TA_METADADOS_PROCESSO_RESTRITO] == 'S') ? "checked" : ""?> tabindex="<?=PaginaSEI::getInstance()->getProxTabDados()?>" /> | |
163 | - <label id="lblMetaDadosProcessoRestrito" for="chkMetaDadosProcessoRestrito" class="infraLabelCheckBox">Sim</label> | |
164 | - | |
165 | - <h3 style='font-weight:bold; font-style: italic;'>Habilitar a exibição dos Andamentos nos processos com nível de acesso global "Restrito":</h3> | |
166 | - <input id="chkListaAndamentoProcessoRestrito" name="chkListaAndamentoProcessoRestrito" type="checkbox" class="infraCheckBox" <?=($arrParametroPesquisaDTO[MdPesqParametroPesquisaRN::$TA_LISTA_ANDAMENTO_PROCESSO_RESTRITO] == 'S') ? "checked" : ""?> tabindex="<?=PaginaSEI::getInstance()->getProxTabDados()?>" /> | |
167 | - <label id="lblListaAndamentoProcessoRestrito" for="chkListaAndamentoProcessoRestrito" class="infraLabelCheckBox">Sim</label> | |
168 | - | |
169 | - <h3 style='font-weight:bold; font-style: italic;'>Descrição de justificativa de restrição de acesso e orientações para meios alternativos de solicitação de acesso:</h3> | |
170 | - <textarea id="txtDescricaoProcessoAcessoRestrito" name="txtDescricaoProcessoAcessoRestrito" class="infraTextarea" rows="5" style="width: 90%" tabindex="<?=PaginaSEI::getInstance()->getProxTabDados()?>" ><?=$arrParametroPesquisaDTO[MdPesqParametroPesquisaRN::$TA_DESCRICAO_PROCEDIMENTO_ACESSO_RESTRITO]?></textarea> | |
171 | - <hr> | |
172 | - | |
173 | - <h2 style='font-weight:bold;text-decoration: underline;'>Documentos</h2> | |
174 | - <h3 style='font-weight:bold; font-style: italic;'>Habilitar a pesquisa em Documentos que estão associados à processos com nível de acesso global "Público":</h3> | |
175 | - <input id="chkDocumentoProcessoPublico" name="chkDocumentoProcessoPublico" type="checkbox" class="infraCheckBox" <?=($arrParametroPesquisaDTO[MdPesqParametroPesquisaRN::$TA_DOCUMENTO_PROCESSO_PUBLICO] == 'S') ? "checked" : ""?> tabindex="<?=PaginaSEI::getInstance()->getProxTabDados()?>" /> | |
176 | - <label id="lblDocumentoProcessoPublico" for="chkDocumentoProcessoPublico" class="infraLabelCheckBox">Sim</label> | |
177 | - | |
178 | - <h3 style='font-weight:bold; font-style: italic;'>Habilitar o acesso aos Documentos nos processos com nível de acesso global "Público":</h3> | |
179 | - <input id="chkListaDocumentoProcessoPublico" name="chkListaDocumentoProcessoPublico" type="checkbox" class="infraCheckBox" <?=($arrParametroPesquisaDTO[MdPesqParametroPesquisaRN::$TA_LISTA_DOCUMENTO_PROCESSO_PUBLICO] == 'S') ? "checked" : ""?> tabindex="<?=PaginaSEI::getInstance()->getProxTabDados()?>" /> | |
180 | - <label id="lblListaDocumentoProcessoPublico" for="chkListaDocumentoProcessoPublico" class="infraLabelCheckBox">Sim</label> | |
181 | - | |
182 | - <h3 style='font-weight:bold; font-style: italic;'>Habilitar o acesso aos Documentos nos processos com nível de acesso global "Restrito":</h3> | |
183 | - <input id="chkListaDocumentoProcessoRestrito" name="chkListaDocumentoProcessoRestrito" type="checkbox" class="infraCheckBox" <?=($arrParametroPesquisaDTO[MdPesqParametroPesquisaRN::$TA_LISTA_DOCUMENTO_PROCESSO_RESTRITO] == 'S') ? "checked" : ""?> tabindex="<?=PaginaSEI::getInstance()->getProxTabDados()?>" /> | |
184 | - <label id="lblListaDocumentoProcessoRestrito" for="chkListaDocumentoProcessoRestrito" class="infraLabelCheckBox">Sim</label> | |
185 | - | |
186 | - <hr/> | |
187 | - | |
188 | - | |
189 | - <h2 style='font-weight:bold;text-decoration: underline;'>Configurações Gerais</h2> | |
190 | - | |
191 | - <h3 style='font-weight:bold; font-style: italic;'>Habilitar a função auto completar no campo "Interessado / Remetente" na página principal da Pesquisa Pública:</h3> | |
192 | - <input id="chkAutoCompletarInteressado" name="chkAutoCompletarInteressado" type="checkbox" class="infraCheckBox" <?=($arrParametroPesquisaDTO[MdPesqParametroPesquisaRN::$TA_AUTO_COMPLETAR_INTERESSADO] == 'S') ? "checked" : ""?> tabindex="<?=PaginaSEI::getInstance()->getProxTabDados()?>" /> | |
193 | - <label id="lblAutoCompletarInteressado" for="chkAutoCompletarInteressado" class="infraLabelCheckBox">Sim</label> | |
194 | - | |
195 | - <h3 style='font-weight:bold; font-style: italic;'>Habilitar o link da pesquisa pública no menu de usuário externo:</h3> | |
196 | - <input id="chkMenuUsuarioExterno" name="chkMenuUsuarioExterno" type="checkbox" class="infraCheckBox" <?=($arrParametroPesquisaDTO[MdPesqParametroPesquisaRN::$TA_MENU_USUARIO_EXTERNO] == 'S') ? "checked" : ""?> tabindex="<?=PaginaSEI::getInstance()->getProxTabDados()?>" /> | |
197 | - <label id="lblMenuUsuarioExterno" for="chkMenuUsuarioExterno" class="infraLabelCheckBox">Sim</label> | |
198 | - | |
199 | - <h3 style='font-weight:bold; font-style: italic;'>Chave para criptografia dos links de processos e documentos:</h3> | |
200 | - <input id="txtChaveCriptografia" name="txtChaveCriptografia" type="text" class="infraText" maxlength="100" style="width: 40%" value="<?=$arrParametroPesquisaDTO[MdPesqParametroPesquisaRN::$TA_CHAVE_CRIPTOGRAFIA]?>" tabindex="<?=PaginaSEI::getInstance()->getProxTabDados()?>" /> | |
201 | - | |
202 | - <? | |
203 | - //PaginaSEI::getInstance()->montarBarraLocalizacao($strTitulo); | |
204 | - PaginaSEI::getInstance()->montarBarraComandosInferior($arrComandos); | |
205 | - //PaginaSEI::getInstance()->montarAreaValidacao(); | |
206 | - ?> | |
207 | - | |
208 | - | |
209 | -</form> | |
134 | + <form id="frmParametroPesquisaLista" method="post" onsubmit="return OnSubmitForm();" action="<?=SessaoSEI::getInstance()->assinarLink('controlador.php?acao=md_pesq_parametro_alterar&acao_origem='.$_GET['acao'])?>"> | |
135 | + | |
136 | + <? | |
137 | + //PaginaSEI::getInstance()->montarBarraLocalizacao($strTitulo); | |
138 | + PaginaSEI::getInstance()->montarBarraComandosSuperior($arrComandos); | |
139 | + //PaginaSEI::getInstance()->montarAreaValidacao(); | |
140 | + ?> | |
141 | + | |
142 | + <h2 style='font-weight:bold;text-decoration: underline;'>Captcha</h2> | |
143 | + <h3 style='font-weight:bold; font-style: italic;'>Habilitar Captcha na pesquisa pública:</h3> | |
144 | + <input id="chkCapcthaPesquisa" name="chkCapcthaPesquisa" type="checkbox" class="infraCheckBox" <?=($arrParametroPesquisaDTO[MdPesqParametroPesquisaRN::$TA_CAPTCHA] == 'S') ? "checked" : ""?> tabindex="<?=PaginaSEI::getInstance()->getProxTabDados()?>" /> | |
145 | + <label id="lblCapcthaPesquisa" for="chkCapcthaPesquisa" class="infraLabelCheckBox">Sim</label> | |
146 | + | |
147 | + <h3 style='font-weight:bold; font-style: italic;'>Habilitar Captcha gerar PDF:</h3> | |
148 | + <input id="chkCapcthaGerarPdf" name="chkCapcthaGerarPdf" type="checkbox" class="infraCheckBox" <?=($arrParametroPesquisaDTO[MdPesqParametroPesquisaRN::$TA_CAPTCHA_PDF] == 'S') ? "checked" : ""?> tabindex="<?=PaginaSEI::getInstance()->getProxTabDados()?>" /> | |
149 | + <label id="lblCapcthaGerarPdf" for="chkCapcthaGerarPdf" class="infraLabelCheckBox">Sim</label> | |
150 | + <hr/> | |
151 | + | |
152 | + <h2 style='font-weight:bold;text-decoration: underline;'>Processos</h2> | |
153 | + | |
154 | + <h3 style='font-weight:bold; font-style: italic;'>Habilitar a exibição dos Andamentos nos processos com nível de acesso global "Público":</h3> | |
155 | + <input id="chkListaAndamentoProcessoPublico" name="chkListaAndamentoProcessoPublico" type="checkbox" class="infraCheckBox" <?=($arrParametroPesquisaDTO[MdPesqParametroPesquisaRN::$TA_LISTA_ANDAMENTO_PROCESSO_PUBLICO] == 'S') ? "checked" : ""?> tabindex="<?=PaginaSEI::getInstance()->getProxTabDados()?>" /> | |
156 | + <label id="lblListaAndamentoProcessoPublico" for="chkListaAndamentoProcessoPublico" class="infraLabelCheckBox">Sim</label> | |
157 | + | |
158 | + <h3 style='font-weight:bold; font-style: italic;'>Habilitar a pesquisa em processos com nível de acesso global "Restrito":</h3> | |
159 | + <input id="chkProcessoRestrito" name="chkProcessoRestrito" type="checkbox" class="infraCheckBox" <?=($arrParametroPesquisaDTO[MdPesqParametroPesquisaRN::$TA_PROCESSO_RESTRITO] == 'S') ? "checked" : ""?> tabindex="<?=PaginaSEI::getInstance()->getProxTabDados()?>" /> | |
160 | + <label id="lblProcessoRestrito" for="chkProcessoRestrito" class="infraLabelCheckBox">Sim</label> | |
161 | + | |
162 | + <h3 style='font-weight:bold; font-style: italic;'>Habilitar o acesso aos metadados dos Processos com nível de acesso global "Restrito"</h3> | |
163 | + <input id="chkMetaDadosProcessoRestrito" name="chkMetaDadosProcessoRestrito" type="checkbox" class="infraCheckBox" <?=($arrParametroPesquisaDTO[MdPesqParametroPesquisaRN::$TA_METADADOS_PROCESSO_RESTRITO] == 'S') ? "checked" : ""?> tabindex="<?=PaginaSEI::getInstance()->getProxTabDados()?>" /> | |
164 | + <label id="lblMetaDadosProcessoRestrito" for="chkMetaDadosProcessoRestrito" class="infraLabelCheckBox">Sim</label> | |
165 | + | |
166 | + <h3 style='font-weight:bold; font-style: italic;'>Habilitar a exibição dos Andamentos nos processos com nível de acesso global "Restrito":</h3> | |
167 | + <input id="chkListaAndamentoProcessoRestrito" name="chkListaAndamentoProcessoRestrito" type="checkbox" class="infraCheckBox" <?=($arrParametroPesquisaDTO[MdPesqParametroPesquisaRN::$TA_LISTA_ANDAMENTO_PROCESSO_RESTRITO] == 'S') ? "checked" : ""?> tabindex="<?=PaginaSEI::getInstance()->getProxTabDados()?>" /> | |
168 | + <label id="lblListaAndamentoProcessoRestrito" for="chkListaAndamentoProcessoRestrito" class="infraLabelCheckBox">Sim</label> | |
169 | + | |
170 | + <h3 style='font-weight:bold; font-style: italic;'>Descrição de justificativa de restrição de acesso e orientações para meios alternativos de solicitação de acesso:</h3> | |
171 | + <textarea id="txtDescricaoProcessoAcessoRestrito" name="txtDescricaoProcessoAcessoRestrito" class="infraTextarea" rows="5" style="width: 90%" tabindex="<?=PaginaSEI::getInstance()->getProxTabDados()?>" ><?=$arrParametroPesquisaDTO[MdPesqParametroPesquisaRN::$TA_DESCRICAO_PROCEDIMENTO_ACESSO_RESTRITO]?></textarea> | |
172 | + <hr> | |
173 | + | |
174 | + <h2 style='font-weight:bold;text-decoration: underline;'>Documentos</h2> | |
175 | + <h3 style='font-weight:bold; font-style: italic;'>Habilitar a pesquisa em Documentos que estão associados à processos com nível de acesso global "Público":</h3> | |
176 | + <input id="chkDocumentoProcessoPublico" name="chkDocumentoProcessoPublico" type="checkbox" class="infraCheckBox" <?=($arrParametroPesquisaDTO[MdPesqParametroPesquisaRN::$TA_DOCUMENTO_PROCESSO_PUBLICO] == 'S') ? "checked" : ""?> tabindex="<?=PaginaSEI::getInstance()->getProxTabDados()?>" /> | |
177 | + <label id="lblDocumentoProcessoPublico" for="chkDocumentoProcessoPublico" class="infraLabelCheckBox">Sim</label> | |
178 | + | |
179 | + <h3 style='font-weight:bold; font-style: italic;'>Habilitar o acesso aos Documentos nos processos com nível de acesso global "Público":</h3> | |
180 | + <input id="chkListaDocumentoProcessoPublico" name="chkListaDocumentoProcessoPublico" type="checkbox" class="infraCheckBox" <?=($arrParametroPesquisaDTO[MdPesqParametroPesquisaRN::$TA_LISTA_DOCUMENTO_PROCESSO_PUBLICO] == 'S') ? "checked" : ""?> tabindex="<?=PaginaSEI::getInstance()->getProxTabDados()?>" /> | |
181 | + <label id="lblListaDocumentoProcessoPublico" for="chkListaDocumentoProcessoPublico" class="infraLabelCheckBox">Sim</label> | |
182 | + | |
183 | + <h3 style='font-weight:bold; font-style: italic;'>Habilitar o acesso aos Documentos nos processos com nível de acesso global "Restrito":</h3> | |
184 | + <input id="chkListaDocumentoProcessoRestrito" name="chkListaDocumentoProcessoRestrito" type="checkbox" class="infraCheckBox" <?=($arrParametroPesquisaDTO[MdPesqParametroPesquisaRN::$TA_LISTA_DOCUMENTO_PROCESSO_RESTRITO] == 'S') ? "checked" : ""?> tabindex="<?=PaginaSEI::getInstance()->getProxTabDados()?>" /> | |
185 | + <label id="lblListaDocumentoProcessoRestrito" for="chkListaDocumentoProcessoRestrito" class="infraLabelCheckBox">Sim</label> | |
186 | + | |
187 | + <hr/> | |
188 | + | |
189 | + | |
190 | + <h2 style='font-weight:bold;text-decoration: underline;'>Configurações Gerais</h2> | |
191 | + | |
192 | + <h3 style='font-weight:bold; font-style: italic;'>Habilitar a função auto completar no campo "Interessado / Remetente" na página principal da Pesquisa Pública:</h3> | |
193 | + <input id="chkAutoCompletarInteressado" name="chkAutoCompletarInteressado" type="checkbox" class="infraCheckBox" <?=($arrParametroPesquisaDTO[MdPesqParametroPesquisaRN::$TA_AUTO_COMPLETAR_INTERESSADO] == 'S') ? "checked" : ""?> tabindex="<?=PaginaSEI::getInstance()->getProxTabDados()?>" /> | |
194 | + <label id="lblAutoCompletarInteressado" for="chkAutoCompletarInteressado" class="infraLabelCheckBox">Sim</label> | |
195 | + | |
196 | + <h3 style='font-weight:bold; font-style: italic;'>Habilitar o link da pesquisa pública no menu de usuário externo:</h3> | |
197 | + <input id="chkMenuUsuarioExterno" name="chkMenuUsuarioExterno" type="checkbox" class="infraCheckBox" <?=($arrParametroPesquisaDTO[MdPesqParametroPesquisaRN::$TA_MENU_USUARIO_EXTERNO] == 'S') ? "checked" : ""?> tabindex="<?=PaginaSEI::getInstance()->getProxTabDados()?>" /> | |
198 | + <label id="lblMenuUsuarioExterno" for="chkMenuUsuarioExterno" class="infraLabelCheckBox">Sim</label> | |
199 | + | |
200 | + <h3 style='font-weight:bold; font-style: italic;'>Chave para criptografia dos links de processos e documentos:</h3> | |
201 | + <input id="txtChaveCriptografia" name="txtChaveCriptografia" type="text" class="infraText" maxlength="100" style="width: 40%" value="<?=$arrParametroPesquisaDTO[MdPesqParametroPesquisaRN::$TA_CHAVE_CRIPTOGRAFIA]?>" tabindex="<?=PaginaSEI::getInstance()->getProxTabDados()?>" /> | |
202 | + | |
203 | + <h3 style='font-weight:bold; font-style: italic;'>Data de corte para a Pesquisa Pública de Processos:</h3> | |
204 | + <input type="text" id="txtDataInicioPesquisa" onchange="return validarFormatoData(this);" name="txtDataInicioPesquisa" onkeypress="return infraMascaraData(this, event)" class="infraText" tabindex="<?=PaginaSEI::getInstance()->getProxTabDados()?>" style="width: 100px;" value="<?=$arrParametroPesquisaDTO[MdPesqParametroPesquisaRN::$TA_DATA_INICIO_PESQUISA]?>"> | |
205 | + <img src="/infra_css/imagens/calendario.gif" id="imgCalDataInicio" title="Selecionar Data de Início da Pesquisa" alt="Selecionar Data de Início da Pesquisa" size="10" style="margin-bottom: -4px;" class="infraImg" onclick="infraCalendario('txtDataInicioPesquisa',this);" tabindex="529"> | |
206 | + <img align="center" id="imgAjuda" src="/infra_css/imagens/ajuda.gif" name="ajuda" onmouseover="return infraTooltipMostrar('Somente processos a partir dessa data serão pesquisados.\n\n Para pesquisar todos os processos preencha 0');" onmouseout="return infraTooltipOcultar();" alt="Ajuda" class="infraImg"> | |
207 | + | |
208 | + | |
209 | + <? | |
210 | + //PaginaSEI::getInstance()->montarBarraLocalizacao($strTitulo); | |
211 | + PaginaSEI::getInstance()->montarBarraComandosInferior($arrComandos); | |
212 | + //PaginaSEI::getInstance()->montarAreaValidacao(); | |
213 | + ?> | |
214 | + | |
215 | + | |
216 | + </form> | |
210 | 217 | <? |
211 | 218 | PaginaSEI::getInstance()->fecharAreaDados(); |
212 | 219 | PaginaSEI::getInstance()->fecharBody(); | ... | ... |
sei/web/modulos/pesquisa/rn/MdPesqInstaladorModuloPesquisaPublicaRN.php
... | ... | @@ -6,157 +6,188 @@ |
6 | 6 | * |
7 | 7 | * |
8 | 8 | */ |
9 | - | |
9 | + | |
10 | 10 | require_once dirname(__FILE__).'/../../../SEI.php'; |
11 | 11 | |
12 | 12 | class MdPesqInstaladorModuloPesquisaPublicaRN extends InfraRN{ |
13 | - | |
14 | - private $numSeg = 0; | |
15 | - private $versaoAtualDesteModulo = '3.0.0'; | |
16 | - private $nomeDesteModulo = 'Pesquisa Pública'; | |
17 | - private $nomeParametroModulo = 'VERSAO_MODULO_PESQUISA_PUBLICA'; | |
18 | - | |
19 | - public function __construct(){ | |
20 | - parent::__construct(); | |
21 | - } | |
22 | - | |
23 | - protected function inicializarObjInfraIBanco(){ | |
24 | - return BancoSEI::getInstance(); | |
25 | - } | |
26 | - | |
27 | - private function inicializar($strTitulo){ | |
28 | - | |
29 | - ini_set('max_execution_time','0'); | |
30 | - ini_set('memory_limit','-1'); | |
31 | - | |
32 | - try { | |
33 | - @ini_set('zlib.output_compression','0'); | |
34 | - @ini_set('implicit_flush', '1'); | |
35 | - }catch(Exception $e){} | |
36 | - | |
37 | - ob_implicit_flush(); | |
38 | - | |
39 | - InfraDebug::getInstance()->setBolLigado(true); | |
40 | - InfraDebug::getInstance()->setBolDebugInfra(true); | |
41 | - InfraDebug::getInstance()->setBolEcho(true); | |
42 | - InfraDebug::getInstance()->limpar(); | |
43 | - | |
44 | - $this->numSeg = InfraUtil::verificarTempoProcessamento(); | |
45 | - | |
46 | - $this->logar($strTitulo); | |
47 | - } | |
48 | - | |
49 | - private function logar($strMsg){ | |
50 | - InfraDebug::getInstance()->gravar($strMsg); | |
51 | - flush(); | |
52 | - } | |
53 | - | |
54 | - private function finalizar($strMsg=null, $bolErro){ | |
55 | - | |
56 | - if (!$bolErro) { | |
57 | - $this->numSeg = InfraUtil::verificarTempoProcessamento($this->numSeg); | |
58 | - $this->logar('TEMPO TOTAL DE EXECUÇÃO: ' . $this->numSeg . ' s'); | |
59 | - }else{ | |
60 | - $strMsg = 'ERRO: '.$strMsg; | |
61 | - } | |
62 | - | |
63 | - if ($strMsg!=null){ | |
64 | - $this->logar($strMsg); | |
65 | - } | |
66 | - | |
67 | - InfraDebug::getInstance()->setBolLigado(false); | |
68 | - InfraDebug::getInstance()->setBolDebugInfra(false); | |
69 | - InfraDebug::getInstance()->setBolEcho(false); | |
70 | - $this->numSeg = 0; | |
71 | - | |
72 | - } | |
73 | - | |
74 | - private function instalarv300(){ | |
75 | - | |
76 | - | |
77 | - | |
78 | - $objInfraMetaBD = new InfraMetaBD(BancoSEI::getInstance()); | |
79 | - | |
80 | - $this->logar('EXECUTANDO A INSTALACAO DA VERSAO 3.0.0 DO NODULO DE PESQUISA PUBLICA NA BASE DO SEI'); | |
81 | - $this->logar('CRIANDO A TABELA md_pesq_parametro'); | |
82 | - | |
83 | - BancoSEI::getInstance()->executarSql(' CREATE TABLE md_pesq_parametro ( | |
13 | + | |
14 | + private $numSeg = 0; | |
15 | + private $versaoAtualDesteModulo = '3.0.1'; | |
16 | + private $nomeDesteModulo = 'Pesquisa Pública'; | |
17 | + private $nomeParametroModulo = 'VERSAO_MODULO_PESQUISA_PUBLICA'; | |
18 | + private $historicoVersoes = array('3.0.0', '3.0.1'); | |
19 | + | |
20 | + public function __construct(){ | |
21 | + parent::__construct(); | |
22 | + } | |
23 | + | |
24 | + protected function inicializarObjInfraIBanco(){ | |
25 | + return BancoSEI::getInstance(); | |
26 | + } | |
27 | + | |
28 | + private function inicializar($strTitulo){ | |
29 | + | |
30 | + ini_set('max_execution_time','0'); | |
31 | + ini_set('memory_limit','-1'); | |
32 | + | |
33 | + try { | |
34 | + @ini_set('zlib.output_compression','0'); | |
35 | + @ini_set('implicit_flush', '1'); | |
36 | + }catch(Exception $e){} | |
37 | + | |
38 | + ob_implicit_flush(); | |
39 | + | |
40 | + InfraDebug::getInstance()->setBolLigado(true); | |
41 | + InfraDebug::getInstance()->setBolDebugInfra(true); | |
42 | + InfraDebug::getInstance()->setBolEcho(true); | |
43 | + InfraDebug::getInstance()->limpar(); | |
44 | + | |
45 | + $this->numSeg = InfraUtil::verificarTempoProcessamento(); | |
46 | + | |
47 | + $this->logar($strTitulo); | |
48 | + } | |
49 | + | |
50 | + private function logar($strMsg){ | |
51 | + InfraDebug::getInstance()->gravar($strMsg); | |
52 | + flush(); | |
53 | + } | |
54 | + | |
55 | + private function finalizar($strMsg=null, $bolErro){ | |
56 | + | |
57 | + if (!$bolErro) { | |
58 | + $this->numSeg = InfraUtil::verificarTempoProcessamento($this->numSeg); | |
59 | + $this->logar('TEMPO TOTAL DE EXECUÇÃO: ' . $this->numSeg . ' s'); | |
60 | + }else{ | |
61 | + $strMsg = 'ERRO: '.$strMsg; | |
62 | + } | |
63 | + | |
64 | + if ($strMsg!=null){ | |
65 | + $this->logar($strMsg); | |
66 | + } | |
67 | + | |
68 | + InfraDebug::getInstance()->setBolLigado(false); | |
69 | + InfraDebug::getInstance()->setBolDebugInfra(false); | |
70 | + InfraDebug::getInstance()->setBolEcho(false); | |
71 | + $this->numSeg = 0; | |
72 | + | |
73 | + } | |
74 | + | |
75 | + private function instalarv300(){ | |
76 | + | |
77 | + | |
78 | + | |
79 | + $objInfraMetaBD = new InfraMetaBD(BancoSEI::getInstance()); | |
80 | + | |
81 | + $this->logar('EXECUTANDO A INSTALACAO DA VERSAO 3.0.0 DO NODULO DE PESQUISA PUBLICA NA BASE DO SEI'); | |
82 | + $this->logar('CRIANDO A TABELA md_pesq_parametro'); | |
83 | + | |
84 | + BancoSEI::getInstance()->executarSql(' CREATE TABLE md_pesq_parametro ( | |
84 | 85 | nome '.$objInfraMetaBD->tipoTextoVariavel(100). ' NOT NULL , |
85 | 86 | valor '.$objInfraMetaBD->tipoTextoGrande().' |
86 | 87 | )'); |
87 | - $objInfraMetaBD->adicionarChavePrimaria('md_pesq_parametro', 'pk_md_pesq_parametro', array('nome')); | |
88 | - | |
89 | - $this->logar('TABELA md_pesq_parametro CRIADA COM SUCESSO'); | |
90 | - $this->logar('INSERINDO DADOS NA TABELA md_pesq_parametro'); | |
91 | - | |
92 | - $arrParametroPesquisaDTO = array( | |
93 | - array('Nome' => MdPesqParametroPesquisaRN::$TA_CAPTCHA , 'Valor' => 'S'), | |
94 | - array('Nome' => MdPesqParametroPesquisaRN::$TA_CAPTCHA_PDF , 'Valor' => 'S'), | |
95 | - array('Nome' => MdPesqParametroPesquisaRN::$TA_LISTA_ANDAMENTO_PROCESSO_PUBLICO , 'Valor' => 'S'), | |
96 | - array('Nome' => MdPesqParametroPesquisaRN::$TA_PROCESSO_RESTRITO , 'Valor' => 'S'), | |
97 | - array('Nome' => MdPesqParametroPesquisaRN::$TA_METADADOS_PROCESSO_RESTRITO , 'Valor' => 'S'), | |
98 | - array('Nome' => MdPesqParametroPesquisaRN::$TA_LISTA_ANDAMENTO_PROCESSO_RESTRITO , 'Valor' => 'S'), | |
99 | - array('Nome' => MdPesqParametroPesquisaRN::$TA_DESCRICAO_PROCEDIMENTO_ACESSO_RESTRITO , 'Valor' => 'Processo ou Documento de Acesso Restrito - Para condições de acesso verifique a <a style="font-size: 1em;" href="http://[orgao]/link_condicao_acesso" target="_blank">Condição de Acesso</a> ou entre em contato pelo e-mail: sei@orgao.gov.br'), | |
100 | - array('Nome' => MdPesqParametroPesquisaRN::$TA_DOCUMENTO_PROCESSO_PUBLICO , 'Valor' => 'S'), | |
101 | - array('Nome' => MdPesqParametroPesquisaRN::$TA_LISTA_DOCUMENTO_PROCESSO_PUBLICO , 'Valor' => 'S'), | |
102 | - array('Nome' => MdPesqParametroPesquisaRN::$TA_LISTA_DOCUMENTO_PROCESSO_RESTRITO , 'Valor' => 'S'), | |
103 | - array('Nome' => MdPesqParametroPesquisaRN::$TA_AUTO_COMPLETAR_INTERESSADO , 'Valor' => 'S'), | |
104 | - array('Nome' => MdPesqParametroPesquisaRN::$TA_MENU_USUARIO_EXTERNO , 'Valor' => 'S'), | |
105 | - array('Nome' => MdPesqParametroPesquisaRN::$TA_CHAVE_CRIPTOGRAFIA , 'Valor' => 'ch@c3_cr1pt0gr@f1a'), | |
106 | - ); | |
107 | - | |
108 | - $arrObjParametroPesquisaDTO = InfraArray::gerarArrInfraDTOMultiAtributos('MdPesqParametroPesquisaDTO', $arrParametroPesquisaDTO); | |
109 | - | |
110 | - $objParametroPesquisaRN = new MdPesqParametroPesquisaRN(); | |
111 | - | |
112 | - foreach ($arrObjParametroPesquisaDTO as $objParametroPesquisaDTO){ | |
113 | - | |
114 | - $objParametroPesquisaRN->cadastrar($objParametroPesquisaDTO); | |
115 | - } | |
116 | - | |
117 | - | |
118 | - } | |
119 | - | |
120 | - protected function AtualizarVersaoConectado(){ | |
121 | - | |
122 | - $this->inicializar('INICIANDO ATUALIZACAO DO MODULO DE PESQUISA PUBLICA NO SEI VERSAO '.SEI_VERSAO); | |
123 | - | |
124 | - //testando se esta usando BDs suportados | |
125 | - if (!(BancoSEI::getInstance() instanceof InfraMySql) && | |
126 | - !(BancoSEI::getInstance() instanceof InfraSqlServer) && | |
127 | - !(BancoSEI::getInstance() instanceof InfraOracle)){ | |
128 | - | |
129 | - $this->finalizar('BANCO DE DADOS NAO SUPORTADO: '.get_parent_class(BancoSEI::getInstance()),true); | |
130 | - | |
131 | - } | |
132 | - | |
133 | - //testando permissoes de criacoes de tabelas | |
134 | - $objInfraMetaBD = new InfraMetaBD(BancoSEI::getInstance()); | |
135 | - | |
136 | - if (count($objInfraMetaBD->obterTabelas('sei_teste'))==0){ | |
137 | - BancoSEI::getInstance()->executarSql('CREATE TABLE sei_teste (id '.$objInfraMetaBD->tipoNumero().' null)'); | |
138 | - } | |
139 | - | |
140 | - BancoSEI::getInstance()->executarSql('DROP TABLE sei_teste'); | |
141 | - | |
142 | - //checando qual versao instalar | |
143 | - $objInfraParametro = new InfraParametro(BancoSEI::getInstance()); | |
144 | - | |
145 | - $strVersaoModuloPesquisa = $objInfraParametro->getValor($this->nomeParametroModulo, false); | |
146 | - | |
147 | - if (InfraString::isBolVazia($strVersaoModuloPesquisa)){ | |
148 | - $this->instalarv300(); | |
149 | - //adicionando parametro para controlar versao do modulo | |
150 | - BancoSei::getInstance()->executarSql('insert into infra_parametro (valor, nome ) VALUES( \''. $this->versaoAtualDesteModulo .'\', \''. $this->nomeParametroModulo .'\' )' ); | |
151 | - $this->logar('ATUALIZAÇÔES DA VERSÃO ' . $this->versaoAtualDesteModulo .' DO MÓDULO PESQUISA PÚBLICA INSTALADAS COM SUCESSO NA BASE DO SEI'); | |
152 | - $this->finalizar('FIM', false); | |
153 | - }else{ | |
154 | - $this->logar('SEI - MÓDULO PESQUISA PÚBLICA v' . $this->versaoAtualDesteModulo . ' JÁ INSTALADO'); | |
155 | - $this->finalizar('FIM', false); | |
156 | - } | |
157 | - | |
158 | - | |
159 | - } | |
88 | + $objInfraMetaBD->adicionarChavePrimaria('md_pesq_parametro', 'pk_md_pesq_parametro', array('nome')); | |
89 | + | |
90 | + $this->logar('TABELA md_pesq_parametro CRIADA COM SUCESSO'); | |
91 | + $this->logar('INSERINDO DADOS NA TABELA md_pesq_parametro'); | |
92 | + | |
93 | + $arrParametroPesquisaDTO = array( | |
94 | + array('Nome' => MdPesqParametroPesquisaRN::$TA_CAPTCHA , 'Valor' => 'S'), | |
95 | + array('Nome' => MdPesqParametroPesquisaRN::$TA_CAPTCHA_PDF , 'Valor' => 'S'), | |
96 | + array('Nome' => MdPesqParametroPesquisaRN::$TA_LISTA_ANDAMENTO_PROCESSO_PUBLICO , 'Valor' => 'S'), | |
97 | + array('Nome' => MdPesqParametroPesquisaRN::$TA_PROCESSO_RESTRITO , 'Valor' => 'S'), | |
98 | + array('Nome' => MdPesqParametroPesquisaRN::$TA_METADADOS_PROCESSO_RESTRITO , 'Valor' => 'S'), | |
99 | + array('Nome' => MdPesqParametroPesquisaRN::$TA_LISTA_ANDAMENTO_PROCESSO_RESTRITO , 'Valor' => 'S'), | |
100 | + array('Nome' => MdPesqParametroPesquisaRN::$TA_DESCRICAO_PROCEDIMENTO_ACESSO_RESTRITO , 'Valor' => 'Processo ou Documento de Acesso Restrito - Para condições de acesso verifique a <a style="font-size: 1em;" href="http://[orgao]/link_condicao_acesso" target="_blank">Condição de Acesso</a> ou entre em contato pelo e-mail: sei@orgao.gov.br'), | |
101 | + array('Nome' => MdPesqParametroPesquisaRN::$TA_DOCUMENTO_PROCESSO_PUBLICO , 'Valor' => 'S'), | |
102 | + array('Nome' => MdPesqParametroPesquisaRN::$TA_LISTA_DOCUMENTO_PROCESSO_PUBLICO , 'Valor' => 'S'), | |
103 | + array('Nome' => MdPesqParametroPesquisaRN::$TA_LISTA_DOCUMENTO_PROCESSO_RESTRITO , 'Valor' => 'S'), | |
104 | + array('Nome' => MdPesqParametroPesquisaRN::$TA_AUTO_COMPLETAR_INTERESSADO , 'Valor' => 'S'), | |
105 | + array('Nome' => MdPesqParametroPesquisaRN::$TA_MENU_USUARIO_EXTERNO , 'Valor' => 'S'), | |
106 | + array('Nome' => MdPesqParametroPesquisaRN::$TA_CHAVE_CRIPTOGRAFIA , 'Valor' => 'ch@c3_cr1pt0gr@f1a'), | |
107 | + ); | |
108 | + | |
109 | + $arrObjParametroPesquisaDTO = InfraArray::gerarArrInfraDTOMultiAtributos('MdPesqParametroPesquisaDTO', $arrParametroPesquisaDTO); | |
110 | + | |
111 | + $objParametroPesquisaRN = new MdPesqParametroPesquisaRN(); | |
112 | + | |
113 | + foreach ($arrObjParametroPesquisaDTO as $objParametroPesquisaDTO){ | |
114 | + | |
115 | + $objParametroPesquisaRN->cadastrar($objParametroPesquisaDTO); | |
116 | + } | |
117 | + | |
118 | + //adicionando parametro para controlar versao do modulo | |
119 | + BancoSei::getInstance()->executarSql('insert into infra_parametro (valor, nome ) VALUES( \'3.0.0\', \''. $this->nomeParametroModulo .'\' )' ); | |
120 | + $this->logar('ATUALIZAÇÔES DA VERSÃO ' . $this->versaoAtualDesteModulo .' DO MÓDULO PESQUISA PÚBLICA INSTALADAS COM SUCESSO NA BASE DO SEI'); | |
121 | + | |
122 | + } | |
123 | + | |
124 | + private function instalarv301(){ | |
125 | + | |
126 | + $objInfraMetaBD = new InfraMetaBD(BancoSEI::getInstance()); | |
127 | + | |
128 | + $this->logar('EXECUTANDO A INSTALACAO DA VERSAO 3.0.1 DO NODULO DE PESQUISA PUBLICA NA BASE DO SEI'); | |
129 | + $this->logar('ADICIONANDO PARÂMETRO NA TABELA md_pesq_parametro'); | |
130 | + | |
131 | + $arrParametroPesquisaDTO = array( | |
132 | + array('Nome' => MdPesqParametroPesquisaRN::$TA_DATA_INICIO_PESQUISA , 'Valor' => '0'), | |
133 | + ); | |
134 | + | |
135 | + $arrObjParametroPesquisaDTO = InfraArray::gerarArrInfraDTOMultiAtributos('MdPesqParametroPesquisaDTO', $arrParametroPesquisaDTO); | |
136 | + | |
137 | + $objParametroPesquisaRN = new MdPesqParametroPesquisaRN(); | |
138 | + | |
139 | + foreach ($arrObjParametroPesquisaDTO as $objParametroPesquisaDTO){ | |
140 | + | |
141 | + $objParametroPesquisaRN->cadastrar($objParametroPesquisaDTO); | |
142 | + } | |
143 | + | |
144 | + //atualizando parametro para controlar versao do modulo | |
145 | + BancoSei::getInstance()->executarSql('UPDATE infra_parametro SET valor = \'3.0.1\' WHERE nome = \'' . $this->nomeParametroModulo . '\' '); | |
146 | + $this->logar('ATUALIZAÇÔES DA VERSÃO ' . $this->versaoAtualDesteModulo .' DO MÓDULO PESQUISA PÚBLICA INSTALADAS COM SUCESSO NA BASE DO SEI'); | |
147 | + } | |
148 | + | |
149 | + protected function AtualizarVersaoConectado(){ | |
150 | + | |
151 | + $this->inicializar('INICIANDO ATUALIZACAO DO MODULO DE PESQUISA PUBLICA NO SEI VERSAO '.SEI_VERSAO); | |
152 | + | |
153 | + //testando se esta usando BDs suportados | |
154 | + if (!(BancoSEI::getInstance() instanceof InfraMySql) && | |
155 | + !(BancoSEI::getInstance() instanceof InfraSqlServer) && | |
156 | + !(BancoSEI::getInstance() instanceof InfraOracle)){ | |
157 | + | |
158 | + $this->finalizar('BANCO DE DADOS NAO SUPORTADO: '.get_parent_class(BancoSEI::getInstance()),true); | |
159 | + | |
160 | + } | |
161 | + | |
162 | + //testando permissoes de criacoes de tabelas | |
163 | + $objInfraMetaBD = new InfraMetaBD(BancoSEI::getInstance()); | |
164 | + | |
165 | + if (count($objInfraMetaBD->obterTabelas('sei_teste'))==0){ | |
166 | + BancoSEI::getInstance()->executarSql('CREATE TABLE sei_teste (id '.$objInfraMetaBD->tipoNumero().' null)'); | |
167 | + } | |
168 | + | |
169 | + BancoSEI::getInstance()->executarSql('DROP TABLE sei_teste'); | |
170 | + | |
171 | + //checando qual versao instalar | |
172 | + $objInfraParametro = new InfraParametro(BancoSEI::getInstance()); | |
173 | + | |
174 | + $strVersaoModuloPesquisa = $objInfraParametro->getValor($this->nomeParametroModulo, false); | |
175 | + | |
176 | + if (InfraString::isBolVazia($strVersaoModuloPesquisa)) { | |
177 | + $this->instalarv300(); | |
178 | + $this->instalarv301(); | |
179 | + $this->finalizar('FIM', false); | |
180 | + } | |
181 | + else if($strVersaoModuloPesquisa == '3.0.0'){ | |
182 | + $this->instalarv301(); | |
183 | + $this->finalizar('FIM', false); | |
184 | + } | |
185 | + else if($strVersaoModuloPesquisa == '3.0.1'){ | |
186 | + $this->logar('A VERSAO MAIS ATUAL DO MODULO ' . $this->nomeParametroModulo . ' (v ' . $this->versaoAtualDesteModulo . ') JA ESTA INSTALADA.'); | |
187 | + $this->finalizar('FIM', false); | |
188 | + } | |
189 | + | |
190 | + } | |
160 | 191 | |
161 | 192 | } |
162 | 193 | ... | ... |
sei/web/modulos/pesquisa/rn/MdPesqParametroPesquisaRN.php
... | ... | @@ -24,6 +24,7 @@ class MdPesqParametroPesquisaRN extends InfraRN { |
24 | 24 | public static $TA_MENU_USUARIO_EXTERNO = 'MENU_USUARIO_EXTERNO'; |
25 | 25 | public static $TA_METADADOS_PROCESSO_RESTRITO = 'METADADOS_PROCESSO_RESTRITO'; |
26 | 26 | public static $TA_PROCESSO_RESTRITO = 'PROCESSO_RESTRITO'; |
27 | + public static $TA_DATA_INICIO_PESQUISA = 'DATA_INICIO_PESQUISA'; | |
27 | 28 | |
28 | 29 | public function __construct(){ |
29 | 30 | parent::__construct(); | ... | ... |