Commit ab1de61565830355ac57766826aeb2268a8ca5e1
1 parent
d0d2c447
Exists in
pesquisa_SEI_3.1.0
t
Showing
3 changed files
with
1133 additions
and
0 deletions
Show diff stats
@@ -0,0 +1,23 @@ | @@ -0,0 +1,23 @@ | ||
1 | +<? | ||
2 | + | ||
3 | + try { | ||
4 | + | ||
5 | + require_once dirname(__FILE__).'/../web/SEI.php'; | ||
6 | + | ||
7 | + session_start(); | ||
8 | + | ||
9 | + SessaoSEI::getInstance(false); | ||
10 | + | ||
11 | + $objInstaladorModuloPesquisaPublica = new MdPesqInstaladorModuloPesquisaPublicaRN(); | ||
12 | + $objInstaladorModuloPesquisaPublica->AtualizarVersao(); | ||
13 | + | ||
14 | + exit; | ||
15 | + | ||
16 | + } catch (Exception $e) { | ||
17 | + | ||
18 | + echo(InfraException::inspecionar($e)); | ||
19 | + try{LogSEI::getInstance()->gravar(InfraException::inspecionar($e)); }catch (Exception $e){} | ||
20 | + } | ||
21 | + | ||
22 | + | ||
23 | +?> |
@@ -0,0 +1,167 @@ | @@ -0,0 +1,167 @@ | ||
1 | +<? | ||
2 | +/** | ||
3 | + * CONSELHO ADMINISTRATIVO DE DEFESA ECONÔMICA | ||
4 | + * 2014-09-29 | ||
5 | + * Versão do Gerador de Código: 1.0 | ||
6 | + * Versão no CVS/SVN: | ||
7 | + * | ||
8 | + * sei | ||
9 | + * pesquisa | ||
10 | + * controlador_ajax_externo | ||
11 | + * | ||
12 | + * | ||
13 | + * @author Alex Alves Braga <bsi.alexbraga@gmail.com> | ||
14 | + */ | ||
15 | + | ||
16 | +/** | ||
17 | + * Arquivo para realizar criptografia de parametros. | ||
18 | + * | ||
19 | + * | ||
20 | + * @package institucional_pesquisa_controlador_ajax_externo | ||
21 | + * @author Alex Alves Braga <bsi.alexbraga@gmail.com> | ||
22 | + * @license Creative Commons Atribuição 3.0 não adaptada | ||
23 | + * <http://creativecommons.org/licenses/by/3.0/deed.pt_BR> | ||
24 | + * @ignore Este código é livre para uso sem nenhuma restrição, | ||
25 | + * salvo pelas informações a seguir referentes | ||
26 | + * a @author e @copyright que devem ser mantidas inalteradas! | ||
27 | + * @copyright Conselho Administrativo de Defesa Econômica ©2014-2018 | ||
28 | + * <http://www.cade.gov.br> | ||
29 | + * @author Alex Alves Braga <bsi.alexbraga@gmail.com> | ||
30 | + */ | ||
31 | + | ||
32 | +/** | ||
33 | + * CONSELHO ADMINISTRATIVO DE DEFESA ECONÔMICA | ||
34 | +* | ||
35 | +* 01/09/2014 - criado por alex braga | ||
36 | +* | ||
37 | +* Versão do Gerador de Código: | ||
38 | +* | ||
39 | +* Versão no CVS: | ||
40 | +*/ | ||
41 | + | ||
42 | + | ||
43 | + class MdPesqCriptografiaNew{ | ||
44 | + | ||
45 | + //private static $KEY = 'c@d3s3mp@p3l'; | ||
46 | + private static $IV = 'c@d3s3mp@p3l'; | ||
47 | + | ||
48 | + private static $ENCRYPT_METHOD = "AES-256-CBC"; | ||
49 | + | ||
50 | + public static function criptografa($texto){ | ||
51 | + try { | ||
52 | + | ||
53 | + $key = hash('sha256', MdPesqCriptografiaNew::getChaveCriptografia()); | ||
54 | + $iv = substr(hash('sha256', MdPesqCriptografiaNew::$IV), 0, 16); | ||
55 | + $output = openssl_encrypt($texto, MdPesqCriptografiaNew::$ENCRYPT_METHOD, $key, 0, $iv); | ||
56 | + $output = base64_encode($output); | ||
57 | + | ||
58 | + return $output; | ||
59 | + | ||
60 | + //return strtr(base64_encode(mcrypt_encrypt(MCRYPT_RIJNDAEL_256, md5(MdPesqCriptografiaNew::getChaveCriptografia()), serialize($texto), MCRYPT_MODE_CBC, md5(md5(MdPesqCriptografiaNew::getChaveCriptografia())))), '+/=', '-_,'); | ||
61 | + | ||
62 | + | ||
63 | + } catch (Exception $e) { | ||
64 | + | ||
65 | + throw new InfraException('Erro validando link externo.',$e); | ||
66 | + } | ||
67 | + } | ||
68 | + | ||
69 | + public static function descriptografa($texto){ | ||
70 | + try { | ||
71 | + | ||
72 | + $key = hash('sha256', MdPesqCriptografiaNew::getChaveCriptografia()); | ||
73 | + $iv = substr(hash('sha256', MdPesqCriptografiaNew::$IV), 0, 16); | ||
74 | + $output = openssl_decrypt(base64_decode($texto), MdPesqCriptografiaNew::$ENCRYPT_METHOD, $key, 0, $iv); | ||
75 | + return $output; | ||
76 | + | ||
77 | + //return unserialize(rtrim(mcrypt_decrypt(MCRYPT_RIJNDAEL_256, md5(MdPesqCriptografiaNew::getChaveCriptografia()), base64_decode(strtr($texto, '-_,', '+/=')), MCRYPT_MODE_CBC, md5(md5(MdPesqCriptografiaNew::getChaveCriptografia()))), "\0")); | ||
78 | + } catch (Exception $e) { | ||
79 | + | ||
80 | + throw new InfraException('Erro validando link externo.',$e); | ||
81 | + } | ||
82 | + } | ||
83 | + | ||
84 | + private static function getChaveCriptografia(){ | ||
85 | + | ||
86 | + $objParametroPesquisaDTO = new MdPesqParametroPesquisaDTO(); | ||
87 | + $objParametroPesquisaDTO->setStrNome(MdPesqParametroPesquisaRN::$TA_CHAVE_CRIPTOGRAFIA); | ||
88 | + $objParametroPesquisaDTO->retStrValor(); | ||
89 | + $objParametroPesquisaDTO->retStrNome(); | ||
90 | + | ||
91 | + $objParametroPesquisaRN = new MdPesqParametroPesquisaRN(); | ||
92 | + | ||
93 | + $objParametroPesquisaDTO = $objParametroPesquisaRN->consultar($objParametroPesquisaDTO); | ||
94 | + | ||
95 | + if($objParametroPesquisaDTO != null && !empty($objParametroPesquisaDTO->getStrValor())){ | ||
96 | + | ||
97 | + return $objParametroPesquisaDTO->getStrValor(); | ||
98 | + } | ||
99 | + | ||
100 | + return $KEY; | ||
101 | + } | ||
102 | + | ||
103 | + //Esta criptografia é usada no site do cade; | ||
104 | + //Alterar metodo de criptografia por uma criptografia php. | ||
105 | +// public static function criptografaSiteCade($texto){ | ||
106 | + | ||
107 | +// $caminho = dirname(__FILE__).'/criptografia/mascaraArgumentos.jar'; | ||
108 | +// $instrucao = 'java -jar '.$caminho.' \'criptografa\' \''.$texto.'\' \''.MdPesqCriptografiaNew::$KEY.'\' '; | ||
109 | + | ||
110 | +// exec( $instrucao, $saida, $retorno); | ||
111 | +// if($retorno !=0){ | ||
112 | +// throw new InfraException('Erro validando link externo.',$e); | ||
113 | +// }else{ | ||
114 | +// return $saida; | ||
115 | +// } | ||
116 | + | ||
117 | +// } | ||
118 | + //Esta criptografia é usada no site do cade; | ||
119 | + //Alterar metodo de criptografia por uma criptografia php. | ||
120 | +// public static function descriptografaSiteCade($texto){ | ||
121 | + | ||
122 | +// $caminho = dirname(__FILE__).'/criptografia/mascaraArgumentos.jar'; | ||
123 | +// $instrucao = 'java -jar '.$caminho.' \'descriptografa\' \''.$texto.'\' \''.MdPesqCriptografiaNew::$KEY.'\' '; | ||
124 | + | ||
125 | +// exec( $instrucao, $saida, $retorno); | ||
126 | +// if($retorno !=0){ | ||
127 | +// throw new InfraException('Erro validando link externo.',$e); | ||
128 | +// }else{ | ||
129 | +// return $saida; | ||
130 | +// } | ||
131 | + | ||
132 | +// } | ||
133 | + | ||
134 | + //Esta criptografia é usada no site do cade; | ||
135 | + //Alterar metodo de criptografia por uma criptografia php. | ||
136 | +// public static function descriptografaArgumentos($parametro){ | ||
137 | + | ||
138 | +// $parametrosCriptografados = $_SERVER['QUERY_STRING']; | ||
139 | +// $parametrosDescriptografados = MdPesqCriptografiaNew::descriptografa($parametrosCriptografados); | ||
140 | +// $arrParametros = explode("&", $parametrosDescriptografados[0]); | ||
141 | +// $bolRecuperParametro = false; | ||
142 | +// $valorParametro = ''; | ||
143 | +// foreach ($arrParametros as $arrParametro){ | ||
144 | +// $parametroRetorno = explode("=", $arrParametro); | ||
145 | +// if($parametroRetorno[0] == $parametro){ | ||
146 | +// $bolRecuperParametro = true; | ||
147 | +// $valorParametro = $parametroRetorno[1]; | ||
148 | +// break; | ||
149 | +// }else{ | ||
150 | +// $bolRecuperParametro = false; | ||
151 | +// } | ||
152 | +// } | ||
153 | + | ||
154 | +// if($bolRecuperParametro){ | ||
155 | +// return $valorParametro; | ||
156 | +// }else{ | ||
157 | +// throw new InfraException('Erro recuperando parâmetro.'); | ||
158 | +// } | ||
159 | + | ||
160 | + | ||
161 | +// } | ||
162 | + | ||
163 | + } | ||
164 | + | ||
165 | + | ||
166 | + | ||
167 | +?> | ||
0 | \ No newline at end of file | 168 | \ No newline at end of file |
sei/web/modulos/pesquisa/md_pesq_processo_exibir_new.php
0 → 100644
@@ -0,0 +1,943 @@ | @@ -0,0 +1,943 @@ | ||
1 | +<? | ||
2 | +/** | ||
3 | + * CONSELHO ADMINISTRATIVO DE DEFESA ECONÔMICA | ||
4 | +* | ||
5 | +* 29/09/2014 - criado por alex braga | ||
6 | +* | ||
7 | +* Versão do Gerador de Código: | ||
8 | +* | ||
9 | +* Versão no CVS: | ||
10 | +*/ | ||
11 | + | ||
12 | +try { | ||
13 | + require_once dirname(__FILE__).'/../../SEI.php'; | ||
14 | + | ||
15 | + SessaoSEIExterna::getInstance()->validarSessao(); | ||
16 | + //session_start(); | ||
17 | + | ||
18 | + ////////////////////////////////////////////////////////////////////////////// | ||
19 | +// InfraDebug::getInstance()->setBolLigado(false); | ||
20 | +// InfraDebug::getInstance()->setBolDebugInfra(true); | ||
21 | +// InfraDebug::getInstance()->limpar(); | ||
22 | + ////////////////////////////////////////////////////////////////////////////// | ||
23 | + | ||
24 | + MdPesqConverteURI::converterURI(); | ||
25 | + MdPesqPesquisaUtil::valiadarLink(); | ||
26 | + | ||
27 | + // SessaoSEIExterna::getInstance()->validarLink(); | ||
28 | + | ||
29 | + | ||
30 | + //carrega configurações pesquisa | ||
31 | + | ||
32 | + $objParametroPesquisaDTO = new MdPesqParametroPesquisaDTO(); | ||
33 | + $objParametroPesquisaDTO->retStrNome(); | ||
34 | + $objParametroPesquisaDTO->retStrValor(); | ||
35 | + | ||
36 | + $objParametroPesquisaRN = new MdPesqParametroPesquisaRN(); | ||
37 | + $arrObjParametroPesquisaDTO = $objParametroPesquisaRN->listar($objParametroPesquisaDTO); | ||
38 | + | ||
39 | + $arrParametroPesquisaDTO = InfraArray::converterArrInfraDTO($arrObjParametroPesquisaDTO,'Valor','Nome'); | ||
40 | + | ||
41 | + $bolPesquisaProcessoRestrito = $arrParametroPesquisaDTO[MdPesqParametroPesquisaRN::$TA_PROCESSO_RESTRITO] == 'S' ? true : false; | ||
42 | + $bolListaDocumentoProcessoPublico = $arrParametroPesquisaDTO[MdPesqParametroPesquisaRN::$TA_LISTA_DOCUMENTO_PROCESSO_PUBLICO] == 'S' ? true : false; | ||
43 | + $bolListaAndamentoProcessoPublico = $arrParametroPesquisaDTO[MdPesqParametroPesquisaRN::$TA_LISTA_ANDAMENTO_PROCESSO_PUBLICO] == 'S' ? true : false; | ||
44 | + $bolCaptchaGerarPdf = $arrParametroPesquisaDTO[MdPesqParametroPesquisaRN::$TA_CAPTCHA_PDF] == 'S' ? true : false; | ||
45 | + $bolLinkMetadadosProcessoRestrito = $arrParametroPesquisaDTO[MdPesqParametroPesquisaRN::$TA_METADADOS_PROCESSO_RESTRITO] == 'S' ? true : false; | ||
46 | + $bolListaAndamentoProcessoRestrito = $arrParametroPesquisaDTO[MdPesqParametroPesquisaRN::$TA_LISTA_ANDAMENTO_PROCESSO_RESTRITO] == 'S' ? true : false; | ||
47 | + $bolListaDocumentoProcessoRestrito = $arrParametroPesquisaDTO[MdPesqParametroPesquisaRN::$TA_LISTA_DOCUMENTO_PROCESSO_RESTRITO] == 'S' ? true : false; | ||
48 | + $txtDescricaoProcessoAcessoRestrito = $arrParametroPesquisaDTO[MdPesqParametroPesquisaRN::$TA_DESCRICAO_PROCEDIMENTO_ACESSO_RESTRITO]; | ||
49 | + //$numPaginacaoAndamentos = $arrParametroPesquisaDTO[MdPesqParametroPesquisaRN::$TA_PAGINACAO_ANDAMENTOS]; | ||
50 | + //$numPaginacaoDocumentos = $arrParametroPesquisaDTO[MdPesqParametroPesquisaRN::$TA_PAGINACAO_DOCUMENTOS]; | ||
51 | + $numPaginacaoAndamentos = 100; | ||
52 | + $numPaginacaoDocumentos = 100; | ||
53 | + | ||
54 | + if($bolCaptchaGerarPdf) { | ||
55 | + $strCodigoParaGeracaoCaptcha = InfraCaptcha::obterCodigo(); | ||
56 | + $md5Captcha = md5(InfraCaptcha::gerar($strCodigoParaGeracaoCaptcha)); | ||
57 | + }else { | ||
58 | + $md5Captcha = null; | ||
59 | + } | ||
60 | + | ||
61 | + PaginaSEIExterna::getInstance()->setTipoPagina(PaginaSEIExterna::$TIPO_PAGINA_SEM_MENU); | ||
62 | + | ||
63 | + $strTitulo = 'Pesquisa Processual'; | ||
64 | + | ||
65 | + | ||
66 | + $dblIdProcedimento = $_GET['id_procedimento']; | ||
67 | + | ||
68 | + //Carregar dados do cabeçalho | ||
69 | + $objProcedimentoDTO = new ProcedimentoDTO(); | ||
70 | + $objProcedimentoDTO->retStrNomeTipoProcedimento(); | ||
71 | + $objProcedimentoDTO->retStrProtocoloProcedimentoFormatado(); | ||
72 | + $objProcedimentoDTO->retDtaGeracaoProtocolo(); | ||
73 | + $objProcedimentoDTO->retStrStaNivelAcessoGlobalProtocolo(); | ||
74 | + $objProcedimentoDTO->retStrStaNivelAcessoLocalProtocolo(); | ||
75 | + $objProcedimentoDTO->retNumIdHipoteseLegalProtocolo(); | ||
76 | + | ||
77 | + $objProcedimentoDTO->setDblIdProcedimento($dblIdProcedimento); | ||
78 | + $objProcedimentoDTO->setStrSinDocTodos('S'); | ||
79 | + $objProcedimentoDTO->setStrSinProcAnexados('S'); | ||
80 | + //$objProcedimentoDTO->setStrSinDocAnexos('S'); | ||
81 | + //$objProcedimentoDTO->setStrSinDocConteudo('S'); | ||
82 | + | ||
83 | + $objProcedimentoRN = new ProcedimentoRN(); | ||
84 | + $arr = $objProcedimentoRN->listarCompleto($objProcedimentoDTO); | ||
85 | + | ||
86 | + if (count($arr)==0){ | ||
87 | + //SessaoSEIExterna::getInstance()->sair(null, 'Processo não encontrado.'); | ||
88 | + die('Processo não encontrado.'); | ||
89 | + } | ||
90 | + | ||
91 | + $objProcedimentoDTO = $arr[0]; | ||
92 | + | ||
93 | + if($objProcedimentoDTO->getStrStaNivelAcessoGlobalProtocolo() == ProtocoloRN::$NA_SIGILOSO ){ | ||
94 | + | ||
95 | + die('Processo não encontrado.'); | ||
96 | + | ||
97 | + } | ||
98 | + | ||
99 | + if(!$bolLinkMetadadosProcessoRestrito || !$bolPesquisaProcessoRestrito){ | ||
100 | + if ($objProcedimentoDTO->getStrStaNivelAcessoGlobalProtocolo()!= ProtocoloRN::$NA_PUBLICO){ | ||
101 | + die('Processo não encontrado.'); | ||
102 | + } | ||
103 | + } | ||
104 | + | ||
105 | + | ||
106 | + | ||
107 | + | ||
108 | + | ||
109 | + | ||
110 | + //Carregar interessados no processo | ||
111 | + $objInteressadosParticipanteDTO = new ParticipanteDTO(); | ||
112 | + $objInteressadosParticipanteDTO->retStrNomeContato(); | ||
113 | + $objInteressadosParticipanteDTO->setDblIdProtocolo($dblIdProcedimento); | ||
114 | + $objInteressadosParticipanteDTO->setStrStaParticipacao(ParticipanteRN::$TP_INTERESSADO); | ||
115 | + | ||
116 | + | ||
117 | + $objInteressadosParticipanteRN = new ParticipanteRN(); | ||
118 | + | ||
119 | + $objInteressadosParticipanteDTO = $objInteressadosParticipanteRN->listarRN0189($objInteressadosParticipanteDTO); | ||
120 | + | ||
121 | + if (count($objInteressadosParticipanteDTO)==0){ | ||
122 | + $strInteressados = ' '; | ||
123 | + }else{ | ||
124 | + $strInteressados = ''; | ||
125 | + foreach($objInteressadosParticipanteDTO as $objInteressadoParticipanteDTO){ | ||
126 | + $strInteressados .= $objInteressadoParticipanteDTO->getStrNomeContato()."<br /> "; | ||
127 | + } | ||
128 | + } | ||
129 | + | ||
130 | + | ||
131 | + //Mensagem Processo Restrito | ||
132 | + $strMensagemProcessoRestrito = ''; | ||
133 | + $strHipoteseLegal = ''; | ||
134 | + if($objProcedimentoDTO->getStrStaNivelAcessoGlobalProtocolo() == ProtocoloRN::$NA_RESTRITO && $bolLinkMetadadosProcessoRestrito){ | ||
135 | + | ||
136 | + $objHipoteseLegalDTO = new HipoteseLegalDTO(); | ||
137 | + $objHipoteseLegalDTO->setNumIdHipoteseLegal($objProcedimentoDTO->getNumIdHipoteseLegalProtocolo()); | ||
138 | + $objHipoteseLegalDTO->retStrBaseLegal(); | ||
139 | + $objHipoteseLegalDTO->retStrNome(); | ||
140 | + | ||
141 | + $objHipoteseLegalRN = new HipoteseLegalRN(); | ||
142 | + $objHipoteseLegalDTO = $objHipoteseLegalRN->consultar($objHipoteseLegalDTO); | ||
143 | + | ||
144 | + if($objHipoteseLegalDTO != null){ | ||
145 | + | ||
146 | + $strHipoteseLegal .= '<img src="/infra_css/imagens/espaco.gif">'; | ||
147 | + $strHipoteseLegal .= '<img src="imagens/sei_chave_restrito.gif" align="absbottom" title="Acesso Restrito.
'.PaginaSEIExterna::getInstance()->formatarXHTML($objHipoteseLegalDTO->getStrNome().' ('.$objHipoteseLegalDTO->getStrBaseLegal().')').'">'; | ||
148 | + | ||
149 | + } | ||
150 | + | ||
151 | + $strMensagemProcessoRestrito = '<p style="font-size: 1.2em;"> '.$txtDescricaoProcessoAcessoRestrito.'</p>'; | ||
152 | + | ||
153 | + } | ||
154 | + | ||
155 | + | ||
156 | + $strResultadoCabecalho = ''; | ||
157 | + $strResultadoCabecalho .= '<table id="tblCabecalho" width="99.3%" class="infraTable" summary="Cabeçalho de Processo" >'."\n"; | ||
158 | + $strResultadoCabecalho .= '<tr><th class="infraTh" colspan="2">Autuação</th></tr>'."\n"; | ||
159 | + $strResultadoCabecalho .= '<tr class="infraTrClara"><td width="20%">Processo:</td><td>'.$objProcedimentoDTO->getStrProtocoloProcedimentoFormatado().$strHipoteseLegal.'</td></tr>'."\n"; | ||
160 | + $strResultadoCabecalho .= '<tr class="infraTrClara"><td width="20%">Tipo:</td><td>'.PaginaSEIExterna::getInstance()->formatarXHTML($objProcedimentoDTO->getStrNomeTipoProcedimento()).'</td></tr>'."\n"; | ||
161 | + $strResultadoCabecalho .= '<tr class="infraTrClara"><td width="20%">Data de Registro:</td><td>'.$objProcedimentoDTO->getDtaGeracaoProtocolo().'</td></tr>'."\n"; | ||
162 | + $strResultadoCabecalho .= '<tr class="infraTrClara"><td width="20%">Interessados:</td><td> '.$strInteressados.'</td></tr>'."\n"; | ||
163 | + $strResultadoCabecalho .= '</table>'."\n"; | ||
164 | + | ||
165 | + | ||
166 | + | ||
167 | + | ||
168 | + | ||
169 | + | ||
170 | + //$arrObjDocumentoDTO = InfraArray::indexarArrInfraDTO($objProcedimentoDTO->getArrObjDocumentoDTO(),'IdDocumento'); | ||
171 | + $arrObjRelProtocoloProtocoloDTO = array(); | ||
172 | + | ||
173 | + if($bolListaDocumentoProcessoPublico && $objProcedimentoDTO->getStrStaNivelAcessoGlobalProtocolo() == ProtocoloRN::$NA_PUBLICO ){ | ||
174 | + $arrObjRelProtocoloProtocoloDTO = $objProcedimentoDTO->getArrObjRelProtocoloProtocoloDTO(); | ||
175 | + }else if($bolListaDocumentoProcessoRestrito && $objProcedimentoDTO->getStrStaNivelAcessoGlobalProtocolo() == ProtocoloRN::$NA_RESTRITO){ | ||
176 | + $arrObjRelProtocoloProtocoloDTO = $objProcedimentoDTO->getArrObjRelProtocoloProtocoloDTO(); | ||
177 | + } | ||
178 | + | ||
179 | + // Objeto Fake para ordenação. | ||
180 | + $objProtocoloPesquisaPublicaPaginacaoDTO = new MdPesqProtocoloPesquisaPublicaDTO(); | ||
181 | + $objProtocoloPesquisaPublicaPaginacaoDTO->retTodos(true); | ||
182 | + PaginaSEIExterna::getInstance()->prepararOrdenacao($objProtocoloPesquisaPublicaPaginacaoDTO, 'Registro', InfraDTO::$TIPO_ORDENACAO_ASC); | ||
183 | + $arrObjProtocoloPesquisaPublicaDTO = array(); | ||
184 | + | ||
185 | + | ||
186 | + | ||
187 | + $objDocumentoRN = new DocumentoRN(); | ||
188 | + | ||
189 | + $numProtocolos = 0; | ||
190 | + $numDocumentosPdf = 0; | ||
191 | + $strCssMostrarAcoes = '.colunaAcoes {display:none;}'."\n"; | ||
192 | + | ||
193 | + $strThCheck = PaginaSEIExterna::getInstance()->getThCheck(); | ||
194 | + | ||
195 | + | ||
196 | + foreach($arrObjRelProtocoloProtocoloDTO as $objRelProtocoloProtocoloDTO){ | ||
197 | + | ||
198 | + if ($objRelProtocoloProtocoloDTO->getStrStaAssociacao()==RelProtocoloProtocoloRN::$TA_DOCUMENTO_ASSOCIADO){ | ||
199 | + | ||
200 | + $objDocumentoDTO = $objRelProtocoloProtocoloDTO->getObjProtocoloDTO2(); | ||
201 | + //valida documentos para retornar | ||
202 | + if ($objDocumentoRN->verificarSelecaoAcessoExterno($objDocumentoDTO)){ | ||
203 | + | ||
204 | + $objProtocoloPesquisaPublicaDTO = new MdPesqProtocoloPesquisaPublicaDTO(); | ||
205 | + $objProtocoloPesquisaPublicaDTO->setStrNumeroSEI($objDocumentoDTO->getStrProtocoloDocumentoFormatado()); | ||
206 | + $objProtocoloPesquisaPublicaDTO->setStrTipoDocumento(PaginaSEIExterna::getInstance()->formatarXHTML($objDocumentoDTO->getStrNomeSerie().' '.$objDocumentoDTO->getStrNumero())); | ||
207 | + | ||
208 | + | ||
209 | + if($objDocumentoDTO->getStrStaProtocoloProtocolo() == ProtocoloRN::$TP_DOCUMENTO_RECEBIDO){ | ||
210 | + | ||
211 | + $objAtributoAndamentoDTO = new AtributoAndamentoDTO(); | ||
212 | + $objAtributoAndamentoDTO->setDblIdProtocoloAtividade($objProcedimentoDTO->getDblIdProcedimento()); | ||
213 | + $objAtributoAndamentoDTO->setNumIdTarefaAtividade(TarefaRN::$TI_RECEBIMENTO_DOCUMENTO); | ||
214 | + $objAtributoAndamentoDTO->setStrNome("DOCUMENTO"); | ||
215 | + $objAtributoAndamentoDTO->setStrIdOrigem($objDocumentoDTO->getDblIdDocumento()); | ||
216 | + | ||
217 | + $objAtributoAndamentoDTO->retDthAberturaAtividade(); | ||
218 | + | ||
219 | + $objAtributoAndamentoRN = new AtributoAndamentoRN(); | ||
220 | + | ||
221 | + $objAtributoAndamentoDTO = $objAtributoAndamentoRN->consultarRN1366($objAtributoAndamentoDTO); | ||
222 | + | ||
223 | + if($objAtributoAndamentoDTO != null && $objAtributoAndamentoDTO->isSetDthAberturaAtividade()){ | ||
224 | + | ||
225 | + $dtaRecebimento = substr($objAtributoAndamentoDTO->getDthAberturaAtividade(),0,10); | ||
226 | + | ||
227 | + $objProtocoloPesquisaPublicaDTO->setDtaRegistro($dtaRecebimento); | ||
228 | + | ||
229 | + }else{ | ||
230 | + | ||
231 | + $objProtocoloPesquisaPublicaDTO->setDtaRegistro($objDocumentoDTO->getDtaGeracaoProtocolo()); | ||
232 | + } | ||
233 | + | ||
234 | + $objProtocoloPesquisaPublicaDTO->setDtaDocumento($objDocumentoDTO->getDtaGeracaoProtocolo()); | ||
235 | + | ||
236 | + }else if ($objDocumentoDTO->getStrStaProtocoloProtocolo() == ProtocoloRN::$TP_DOCUMENTO_GERADO){ | ||
237 | + | ||
238 | + $objAssinaturaDTO = new AssinaturaDTO(); | ||
239 | + $objAssinaturaDTO->setDblIdDocumento($objDocumentoDTO->getDblIdDocumento()); | ||
240 | + $objAssinaturaDTO->setOrdNumIdAssinatura(InfraDTO::$TIPO_ORDENACAO_ASC); | ||
241 | + $objAssinaturaDTO->retDthAberturaAtividade(); | ||
242 | + | ||
243 | + $objAssinaturaRN = new AssinaturaRN(); | ||
244 | + $arrObjAssinaturaDTO = $objAssinaturaRN->listarRN1323($objAssinaturaDTO); | ||
245 | + | ||
246 | + if(is_array($arrObjAssinaturaDTO) && count($arrObjAssinaturaDTO) > 0) { | ||
247 | + | ||
248 | + $objAssinaturaDTO = $arrObjAssinaturaDTO[0]; | ||
249 | + | ||
250 | + if($objAssinaturaDTO != null && $objAssinaturaDTO->isSetDthAberturaAtividade()){ | ||
251 | + | ||
252 | + $dtaAssinatura = substr($objAssinaturaDTO->getDthAberturaAtividade(),0,10); | ||
253 | + | ||
254 | + $objProtocoloPesquisaPublicaDTO->setDtaRegistro($dtaAssinatura); | ||
255 | + $objProtocoloPesquisaPublicaDTO->setDtaDocumento($dtaAssinatura); | ||
256 | + | ||
257 | + }else{ | ||
258 | + $objProtocoloPesquisaPublicaDTO->setDtaRegistro($objDocumentoDTO->getDtaGeracaoProtocolo()); | ||
259 | + $objProtocoloPesquisaPublicaDTO->setDtaDocumento($objDocumentoDTO->getDtaGeracaoProtocolo()); | ||
260 | + } | ||
261 | + }else{ | ||
262 | + | ||
263 | + $objProtocoloPesquisaPublicaDTO->setDtaRegistro($objDocumentoDTO->getDtaGeracaoProtocolo()); | ||
264 | + $objProtocoloPesquisaPublicaDTO->setDtaDocumento($objDocumentoDTO->getDtaGeracaoProtocolo()); | ||
265 | + } | ||
266 | + | ||
267 | + | ||
268 | + | ||
269 | + | ||
270 | + } | ||
271 | + | ||
272 | + | ||
273 | + $objProtocoloPesquisaPublicaDTO->setStrUnidade($objDocumentoDTO->getStrSiglaUnidadeGeradoraProtocolo()); | ||
274 | + $objProtocoloPesquisaPublicaDTO->setStrStaAssociacao($objRelProtocoloProtocoloDTO->getStrStaAssociacao()); | ||
275 | + $objProtocoloPesquisaPublicaDTO->setObjDocumentoDTO($objDocumentoDTO); | ||
276 | + | ||
277 | + | ||
278 | + $arrObjProtocoloPesquisaPublicaDTO[] = $objProtocoloPesquisaPublicaDTO; | ||
279 | + $numProtocolos++; | ||
280 | + } | ||
281 | + }else if ($objRelProtocoloProtocoloDTO->getStrStaAssociacao()==RelProtocoloProtocoloRN::$TA_PROCEDIMENTO_ANEXADO){ | ||
282 | + | ||
283 | + $objProcedimentoDTOAnexado = $objRelProtocoloProtocoloDTO->getObjProtocoloDTO2(); | ||
284 | + | ||
285 | + $objProtocoloPesquisaPublicaDTO = new MdPesqProtocoloPesquisaPublicaDTO(); | ||
286 | + $objProtocoloPesquisaPublicaDTO->setStrNumeroSEI($objProcedimentoDTOAnexado->getStrProtocoloProcedimentoFormatado()); | ||
287 | + $objProtocoloPesquisaPublicaDTO->setStrTipoDocumento(PaginaSEIExterna::getInstance()->formatarXHTML($objProcedimentoDTOAnexado->getStrNomeTipoProcedimento())); | ||
288 | + $objProtocoloPesquisaPublicaDTO->setDtaDocumento($objProcedimentoDTOAnexado->getDtaGeracaoProtocolo()); | ||
289 | + $objProtocoloPesquisaPublicaDTO->setDtaRegistro($objProcedimentoDTOAnexado->getDtaGeracaoProtocolo()); | ||
290 | + $objProtocoloPesquisaPublicaDTO->setStrUnidade($objProcedimentoDTOAnexado->getStrSiglaUnidadeGeradoraProtocolo()); | ||
291 | + $objProtocoloPesquisaPublicaDTO->setStrStaAssociacao($objRelProtocoloProtocoloDTO->getStrStaAssociacao()); | ||
292 | + $objProtocoloPesquisaPublicaDTO->setObjProcedimentoDTO($objProcedimentoDTOAnexado); | ||
293 | + | ||
294 | + $arrObjProtocoloPesquisaPublicaDTO[] = $objProtocoloPesquisaPublicaDTO; | ||
295 | + | ||
296 | + | ||
297 | + $numProtocolos++; | ||
298 | + } | ||
299 | + } | ||
300 | + | ||
301 | + | ||
302 | + | ||
303 | + if ($numProtocolos > 0){ | ||
304 | + | ||
305 | + | ||
306 | + | ||
307 | + $strResultado = '<table id="tblDocumentos" width="99.3%" class="infraTable" summary="Lista de Documentos" > | ||
308 | + <caption class="infraCaption" >'.PaginaSEIExterna::getInstance()->gerarCaptionTabela("Protocolos",$numProtocolos).'</caption> | ||
309 | + <tr> | ||
310 | + <th class="infraTh" width="1%">'.$strThCheck.'</th> | ||
311 | + <th class="infraTh" width="15%">'.PaginaSEIExterna::getInstance()->getThOrdenacao($objProtocoloPesquisaPublicaPaginacaoDTO,'Documento / Processo','NumeroSEI',$arrObjProtocoloPesquisaPublicaDTO,true).'</th> | ||
312 | + <th class="infraTh" width="15%">'.PaginaSEIExterna::getInstance()->getThOrdenacao($objProtocoloPesquisaPublicaPaginacaoDTO,'Tipo de Documento','TipoDocumento',$arrObjProtocoloPesquisaPublicaDTO,true).'</th> | ||
313 | + <th class="infraTh" width="15%">'.PaginaSEIExterna::getInstance()->getThOrdenacao($objProtocoloPesquisaPublicaPaginacaoDTO,'Data do Documento','Documento',$arrObjProtocoloPesquisaPublicaDTO,true).'</th> | ||
314 | + <th class="infraTh" width="15%">'.PaginaSEIExterna::getInstance()->getThOrdenacao($objProtocoloPesquisaPublicaPaginacaoDTO,'Data de Registro','Registro',$arrObjProtocoloPesquisaPublicaDTO,true).'</th> | ||
315 | + <th class="infraTh" width="15%">'.PaginaSEIExterna::getInstance()->getThOrdenacao($objProtocoloPesquisaPublicaPaginacaoDTO,'Unidade','Unidade',$arrObjProtocoloPesquisaPublicaDTO,true).'</th> | ||
316 | + | ||
317 | + </tr>'; | ||
318 | + | ||
319 | + $objProtocoloPesquisaPublicaPaginacaoDTO = new MdPesqProtocoloPesquisaPublicaDTO(); | ||
320 | + | ||
321 | + PaginaSEIExterna::getInstance()->prepararPaginacao($objProtocoloPesquisaPublicaPaginacaoDTO,$numPaginacaoDocumentos,false,null,'infraDocumento'); | ||
322 | + $objProtocoloPesquisaPublicaPaginacaoDTO->setNumTotalRegistros($numProtocolos); | ||
323 | + $inicioRegistro = $objProtocoloPesquisaPublicaPaginacaoDTO->getNumMaxRegistrosRetorno() * $objProtocoloPesquisaPublicaPaginacaoDTO->getNumPaginaAtual(); | ||
324 | + | ||
325 | + if($objProtocoloPesquisaPublicaPaginacaoDTO->getNumMaxRegistrosRetorno() + $inicioRegistro < $numProtocolos){ | ||
326 | + $fimRegistro = $objProtocoloPesquisaPublicaPaginacaoDTO->getNumMaxRegistrosRetorno() + $inicioRegistro; | ||
327 | + }else{ | ||
328 | + $fimRegistro = $numProtocolos; | ||
329 | + } | ||
330 | + | ||
331 | + | ||
332 | + PaginaSEIExterna::getInstance()->processarPaginacao($objProtocoloPesquisaPublicaPaginacaoDTO,'infraDocumento'); | ||
333 | + | ||
334 | + // monta tabela documentos | ||
335 | + for ($i=$inicioRegistro; $i < $fimRegistro; $i++){ | ||
336 | + | ||
337 | + $objProtocoloPesquisaPublicaDTO = $arrObjProtocoloPesquisaPublicaDTO[$i]; | ||
338 | + if($objProtocoloPesquisaPublicaDTO->getStrStaAssociacao() == RelProtocoloProtocoloRN::$TA_DOCUMENTO_ASSOCIADO){ | ||
339 | + | ||
340 | + $objDocumentoDTO = $objProtocoloPesquisaPublicaDTO->getObjDocumentoDTO(); | ||
341 | + $urlCripografadaDocumeto = MdPesqCriptografiaNew::criptografa('acao_externa=documento_exibir&id_documento='.$objDocumentoDTO->getDblIdDocumento().'&id_orgao_acesso_externo=0'); | ||
342 | + $strLinkDocumento = PaginaSEI::getInstance()->formatarXHTML(SessaoSEI::getInstance()->assinarLink('md_pesq_documento_consulta_externa.php?'.$urlCripografadaDocumeto)); | ||
343 | + | ||
344 | + $strResultado .= '<tr class="infraTrClara">'; | ||
345 | + | ||
346 | + //Cria checkbox para gerar PDF, verifica se o Processo é público e o Acesso Local do Protocolo é Público | ||
347 | + if($objDocumentoDTO->getStrStaNivelAcessoLocalProtocolo() == ProtocoloRN::$NA_PUBLICO && $objProcedimentoDTO->getStrStaNivelAcessoLocalProtocolo() == ProtocoloRN::$NA_PUBLICO){ | ||
348 | + if($objDocumentoRN->verificarSelecaoGeracaoPdf($objDocumentoDTO)){ | ||
349 | + $strResultado .= '<td align="center">'.PaginaSEIExterna::getInstance()->getTrCheck($numDocumentosPdf++, $objDocumentoDTO->getDblIdDocumento(), $objDocumentoDTO->getStrNomeSerie()).'</td>'; | ||
350 | + }else{ | ||
351 | + $strResultado .= '<td> </td>'; | ||
352 | + } | ||
353 | + }else{ | ||
354 | + $strResultado .= '<td> </td>'; | ||
355 | + } | ||
356 | + | ||
357 | + | ||
358 | + //Exibe link de documentos com nivel de acesso local Público de processo público | ||
359 | + if($objDocumentoDTO->getStrStaNivelAcessoLocalProtocolo() == ProtocoloRN::$NA_PUBLICO && $objProcedimentoDTO->getStrStaNivelAcessoLocalProtocolo() == ProtocoloRN::$NA_PUBLICO ){ | ||
360 | + $strResultado .= '<td align="center" style="padding-right:22px"><a href="javascript:void(0);" onclick="window.open(\''.$strLinkDocumento.'\');" alt="'.PaginaSEIExterna::getInstance()->formatarXHTML($objDocumentoDTO->getStrNomeSerie()).'" title="'.PaginaSEIExterna::getInstance()->formatarXHTML($objDocumentoDTO->getStrNomeSerie()).'" class="ancoraPadraoAzul">'.$objDocumentoDTO->getStrProtocoloDocumentoFormatado().'</a></td>'; | ||
361 | + }else{ | ||
362 | + if($objDocumentoDTO->getStrStaNivelAcessoLocalProtocolo() == ProtocoloRN::$NA_RESTRITO){ | ||
363 | + | ||
364 | + //necessario para retornar id hipotese legal do documento | ||
365 | + $strHipoteseLegalDocumento = ''; | ||
366 | + $objProtocoloDocumentoDTO = new ProtocoloDTO(); | ||
367 | + $objProtocoloDocumentoDTO->setDblIdProtocolo($objDocumentoDTO->getDblIdDocumento()); | ||
368 | + $objProtocoloDocumentoDTO->retNumIdHipoteseLegal(); | ||
369 | + | ||
370 | + $objProtocoloRN = new ProtocoloRN(); | ||
371 | + $objProtocoloDocumentoDTO = $objProtocoloRN->consultarRN0186($objProtocoloDocumentoDTO); | ||
372 | + | ||
373 | + if($objProtocoloDocumentoDTO != null){ | ||
374 | + | ||
375 | + $objHipoteseLegaDocumentoDTO = new HipoteseLegalDTO(); | ||
376 | + $objHipoteseLegaDocumentoDTO->setNumIdHipoteseLegal($objProtocoloDocumentoDTO->getNumIdHipoteseLegal()); | ||
377 | + $objHipoteseLegaDocumentoDTO->retStrNome(); | ||
378 | + $objHipoteseLegaDocumentoDTO->retStrBaseLegal(); | ||
379 | + | ||
380 | + $objHipoteseLegalRN = new HipoteseLegalRN(); | ||
381 | + $objHipoteseLegaDocumentoDTO = $objHipoteseLegalRN->consultar($objHipoteseLegaDocumentoDTO); | ||
382 | + | ||
383 | + | ||
384 | + if($objHipoteseLegaDocumentoDTO != null){ | ||
385 | + | ||
386 | + $strHipoteseLegalDocumento .= $objHipoteseLegaDocumentoDTO->getStrNome().' ('.$objHipoteseLegaDocumentoDTO->getStrBaseLegal().')'; | ||
387 | + } | ||
388 | + } | ||
389 | + | ||
390 | + | ||
391 | + | ||
392 | + $strResultado .= '<td align="center" ><span class="retiraAncoraPadraoAzul">'.$objDocumentoDTO->getStrProtocoloDocumentoFormatado().'</span>'; | ||
393 | + $strResultado .= '<img src="/infra_css/imagens/espaco.gif">'; | ||
394 | + $strResultado .= '<img src="imagens/sei_chave_restrito.gif" align="absbottom" title="Acesso Restrito.
'.PaginaSEIExterna::getInstance()->formatarXHTML($strHipoteseLegalDocumento).'">'; | ||
395 | + $strResultado .= '</td>'; | ||
396 | + | ||
397 | + }else{ | ||
398 | + $strResultado .= '<td align="center" style="padding-right:22px" ><span class="retiraAncoraPadraoAzul">'.$objDocumentoDTO->getStrProtocoloDocumentoFormatado().'</span>'; | ||
399 | + } | ||
400 | + | ||
401 | + | ||
402 | + } | ||
403 | + | ||
404 | + $strResultado .= '<td align="center">'.PaginaSEIExterna::getInstance()->formatarXHTML($objDocumentoDTO->getStrNomeSerie().' '.$objDocumentoDTO->getStrNumero()).'</td> | ||
405 | + <td align="center">'.$objProtocoloPesquisaPublicaDTO->getDtaDocumento().'</td> | ||
406 | + <td align="center">'.$objProtocoloPesquisaPublicaDTO->getDtaRegistro().'</td> | ||
407 | + <td align="center"><a alt="'.$objDocumentoDTO->getStrDescricaoUnidadeGeradoraProtocolo().'" title="'.$objDocumentoDTO->getStrDescricaoUnidadeGeradoraProtocolo().'" class="ancoraSigla">'.$objDocumentoDTO->getStrSiglaUnidadeGeradoraProtocolo().'</a></td> | ||
408 | + <td align="center" class="colunaAcoes">'; | ||
409 | + | ||
410 | + $strResultado .='</td></tr>'; | ||
411 | + | ||
412 | + }else if($objProtocoloPesquisaPublicaDTO->getStrStaAssociacao() == RelProtocoloProtocoloRN::$TA_PROCEDIMENTO_ANEXADO){ | ||
413 | + | ||
414 | + | ||
415 | + $strResultado .= '<tr class="infraTrClara">'; | ||
416 | + $strResultado .= '<td> </td>'; | ||
417 | + $strHipoteseLegalAnexo = ''; | ||
418 | + $strProtocoloRestrito = ''; | ||
419 | + | ||
420 | + $objProcedimentoDTOAnexado = $objProtocoloPesquisaPublicaDTO->getObjProcedimentoDTO(); | ||
421 | + | ||
422 | + // cria indicação de acesso restrito com hipotese legal. | ||
423 | + if($objProcedimentoDTOAnexado->getStrStaNivelAcessoLocalProtocolo() == ProtocoloRN::$NA_RESTRITO){ | ||
424 | + | ||
425 | + $strHipoteseLegalAnexo = ''; | ||
426 | + $objProtocoloAnexoDTO = new ProtocoloDTO(); | ||
427 | + $objProtocoloAnexoDTO->setDblIdProtocolo($objProcedimentoDTOAnexado->getDblIdProcedimento()); | ||
428 | + $objProtocoloAnexoDTO->retNumIdHipoteseLegal(); | ||
429 | + | ||
430 | + $objProtocoloRN = new ProtocoloRN(); | ||
431 | + $objProtocoloAnexoDTO = $objProtocoloRN->consultarRN0186($objProtocoloAnexoDTO); | ||
432 | + | ||
433 | + if($objProtocoloAnexoDTO != null){ | ||
434 | + | ||
435 | + $objHipoteseLegaAnexoDTO = new HipoteseLegalDTO(); | ||
436 | + $objHipoteseLegaAnexoDTO->setNumIdHipoteseLegal($objProtocoloAnexoDTO->getNumIdHipoteseLegal()); | ||
437 | + $objHipoteseLegaAnexoDTO->retStrNome(); | ||
438 | + $objHipoteseLegaAnexoDTO->retStrBaseLegal(); | ||
439 | + | ||
440 | + $objHipoteseLegalRN = new HipoteseLegalRN(); | ||
441 | + $objHipoteseLegaDocumentoDTO = $objHipoteseLegalRN->consultar($objHipoteseLegaAnexoDTO); | ||
442 | + | ||
443 | + | ||
444 | + if($objHipoteseLegaDocumentoDTO != null){ | ||
445 | + | ||
446 | + $strHipoteseLegalAnexo .= $objHipoteseLegaDocumentoDTO->getStrNome().' ('.$objHipoteseLegaDocumentoDTO->getStrBaseLegal().')'; | ||
447 | + } | ||
448 | + } | ||
449 | + $strProtocoloRestrito .= '<img src="imagens/sei_chave_restrito.gif" align="absbottom" title="Acesso Restrito.
'.$strHipoteseLegalAnexo.'">'; | ||
450 | + } | ||
451 | + | ||
452 | + if($objProcedimentoDTOAnexado->getStrStaNivelAcessoLocalProtocolo() == ProtocoloRN::$NA_PUBLICO && $objProcedimentoDTO->getStrStaNivelAcessoLocalProtocolo() == ProtocoloRN::$NA_PUBLICO ){ | ||
453 | + $parametrosCriptografadosProcesso = MdPesqCriptografiaNew::criptografa('id_orgao_acesso_externo=0&id_procedimento='.$objProcedimentoDTOAnexado->getDblIdProcedimento()); | ||
454 | + $urlPesquisaProcesso = 'md_pesq_processo_exibir.php?'.$parametrosCriptografadosProcesso; | ||
455 | + | ||
456 | + // $strLinkProcessoAnexado = PaginaSEIExterna::getInstance()->formatarXHTML(SessaoSEIExterna::getInstance()->assinarLink('processo_acesso_externo_consulta.php?id_acesso_externo='.$_GET['id_acesso_externo'].'&id_acesso_externo_assinatura='.$_GET['id_acesso_externo_assinatura'].'&id_procedimento_anexado='.$objProcedimentoDTOAnexado->getDblIdProcedimento())); | ||
457 | + | ||
458 | + $strLinkProcessoAnexado = PaginaSEI::getInstance()->formatarXHTML(SessaoSEI::getInstance()->assinarLink(MdPesqSolrUtilExterno::prepararUrl($urlPesquisaProcesso))); | ||
459 | + | ||
460 | + | ||
461 | + $strResultado .= '<td align="center"><a href="javascript:void(0);" onclick="window.open(\''.$strLinkProcessoAnexado.'\');" alt="'.$objProcedimentoDTOAnexado->getStrNomeTipoProcedimento().'" title="'.$objProcedimentoDTOAnexado->getStrNomeTipoProcedimento().'" class="ancoraPadraoAzul">'.$objProcedimentoDTOAnexado->getStrProtocoloProcedimentoFormatado().'</a>'.$strProtocoloRestrito.'</td>'; | ||
462 | + | ||
463 | + }else{ | ||
464 | + | ||
465 | + $strResultado .= '<td align="center" style="padding-right:22px" ><span class="retiraAncoraPadraoAzul">'.PaginaSEIExterna::getInstance()->formatarXHTML($objProcedimentoDTOAnexado->getStrProtocoloProcedimentoFormatado()).' </span>'.$strProtocoloRestrito.'</td>'; | ||
466 | + | ||
467 | + } | ||
468 | + | ||
469 | + $strResultado.= '<td align="center">'.PaginaSEIExterna::getInstance()->formatarXHTML($objProcedimentoDTOAnexado->getStrNomeTipoProcedimento()).'</td> | ||
470 | + <td align="center">'.$objProtocoloPesquisaPublicaDTO->getDtaDocumento().'</td> | ||
471 | + <td align="center">'.$objProtocoloPesquisaPublicaDTO->getDtaRegistro().'</td> | ||
472 | + <td align="center"><a alt="'.$objProcedimentoDTOAnexado->getStrDescricaoUnidadeGeradoraProtocolo().'" title="'.$objProcedimentoDTOAnexado->getStrDescricaoUnidadeGeradoraProtocolo().'" class="ancoraSigla">'.$objProcedimentoDTOAnexado->getStrSiglaUnidadeGeradoraProtocolo().'</a></td> | ||
473 | + <td align="center" class="colunaAcoes"> </td>'; | ||
474 | + $strResultado .='</tr>'; | ||
475 | + | ||
476 | + } | ||
477 | + } | ||
478 | + | ||
479 | + $strResultado.='</table>'; | ||
480 | + | ||
481 | + } | ||
482 | + | ||
483 | + | ||
484 | + | ||
485 | + $arrComandos = array(); | ||
486 | + if ($numDocumentosPdf > 0){ | ||
487 | + if($bolCaptchaGerarPdf){ | ||
488 | + $strComando = '<button type="button" accesskey="G" name="btnGerarPdfModal" value="Gerar PDF" onclick="gerarPdfModal();" class="infraButton"><span class="infraTeclaAtalho">G</span>erar PDF</button>'; | ||
489 | + }else{ | ||
490 | + $strComando = '<button type="button" accesskey="G" name="btnGerarPdfModal" value="Gerar PDF" onclick="gerarPdf();" class="infraButton"><span class="infraTeclaAtalho">G</span>erar PDF</button>'; | ||
491 | + } | ||
492 | + | ||
493 | + $arrComandos[] = $strComando; | ||
494 | + | ||
495 | + } | ||
496 | + | ||
497 | + //Carregar histórico | ||
498 | + | ||
499 | + $numRegistrosAtividades = 0; | ||
500 | + | ||
501 | + | ||
502 | + if(($bolListaAndamentoProcessoPublico && $objProcedimentoDTO->getStrStaNivelAcessoGlobalProtocolo() == ProtocoloRN::$NA_PUBLICO) || | ||
503 | + ($bolListaAndamentoProcessoRestrito && $objProcedimentoDTO->getStrStaNivelAcessoGlobalProtocolo() == ProtocoloRN::$NA_RESTRITO) ){ | ||
504 | + | ||
505 | + $objProcedimentoHistoricoDTO = new ProcedimentoHistoricoDTO(); | ||
506 | + $objProcedimentoHistoricoDTO->setDblIdProcedimento($dblIdProcedimento); | ||
507 | + $objProcedimentoHistoricoDTO->setStrStaHistorico(ProcedimentoRN::$TH_EXTERNO); | ||
508 | + $objProcedimentoHistoricoDTO->setStrSinGerarLinksHistorico('N'); | ||
509 | + | ||
510 | + $objProcedimentoRN = new ProcedimentoRN(); | ||
511 | + $objProcedimentoDTORet = $objProcedimentoRN->consultarHistoricoRN1025($objProcedimentoHistoricoDTO); | ||
512 | + $arrObjAtividadeDTO = $objProcedimentoDTORet->getArrObjAtividadeDTO(); | ||
513 | + | ||
514 | + $numRegistrosAtividades = count($arrObjAtividadeDTO); | ||
515 | + | ||
516 | + | ||
517 | + } | ||
518 | + | ||
519 | + | ||
520 | + | ||
521 | + if ($numRegistrosAtividades > 0){ | ||
522 | + | ||
523 | + $bolCheck = false; | ||
524 | + | ||
525 | + $strResultadoAndamentos = ''; | ||
526 | + | ||
527 | + $strResultadoAndamentos .= '<table id="tblHistorico" width="99.3%" class="infraTable" summary="Histórico de Andamentos">'."\n"; | ||
528 | + $strResultadoAndamentos .= '<caption class="infraCaption">'.PaginaSEIExterna::getInstance()->gerarCaptionTabela('Andamentos',$numRegistrosAtividades).'</caption>'; | ||
529 | + $strResultadoAndamentos .= '<tr>'; | ||
530 | + $strResultadoAndamentos .= '<th class="infraTh" width="20%">Data/Hora</th>'; | ||
531 | + $strResultadoAndamentos .= '<th class="infraTh" width="10%">Unidade</th>'; | ||
532 | + $strResultadoAndamentos .= '<th class="infraTh">Descrição</th>'; | ||
533 | + $strResultadoAndamentos .= '</tr>'."\n"; | ||
534 | + | ||
535 | + $strQuebraLinha = '<span style="line-height:.5em"><br /></span>'; | ||
536 | + | ||
537 | + | ||
538 | + $objAtividadeDTO = new AtividadeDTO(); | ||
539 | + PaginaSEIExterna::getInstance()->prepararPaginacao($objAtividadeDTO,$numPaginacaoAndamentos,false,null,'infraAndamento'); | ||
540 | + $objAtividadeDTO->setNumTotalRegistros($numRegistrosAtividades); | ||
541 | + $inicioRegistroAtividade = $objAtividadeDTO->getNumMaxRegistrosRetorno() * $objAtividadeDTO->getNumPaginaAtual(); | ||
542 | + | ||
543 | + if($objAtividadeDTO->getNumMaxRegistrosRetorno() + $inicioRegistroAtividade < $numRegistrosAtividades){ | ||
544 | + $fimRegistroAtividade = $objProtocoloPesquisaPublicaPaginacaoDTO->getNumMaxRegistrosRetorno() + $inicioRegistroAtividade; | ||
545 | + }else{ | ||
546 | + $fimRegistroAtividade = $numRegistrosAtividades; | ||
547 | + } | ||
548 | + | ||
549 | + PaginaSEIExterna::getInstance()->processarPaginacao($objAtividadeDTO,'infraAndamento'); | ||
550 | + echo $objAtividadeDTO->getNumPaginaAtual(); | ||
551 | + //foreach($arrObjAtividadeDTO as $objAtividadeDTO){ | ||
552 | + for ($i=$inicioRegistroAtividade; $i < $fimRegistroAtividade; $i++){ | ||
553 | + //InfraDebug::getInstance()->gravar($objAtividadeDTO->getNumIdAtividade()); | ||
554 | + | ||
555 | + $strResultadoAndamentos .= "\n\n".'<!-- '.$arrObjAtividadeDTO[$i]->getNumIdAtividade().' -->'."\n"; | ||
556 | + | ||
557 | + if ($arrObjAtividadeDTO[$i]->getStrSinUltimaUnidadeHistorico() == 'S'){ | ||
558 | + $strAbertas = 'class="andamentoAberto"'; | ||
559 | + }else{ | ||
560 | + $strAbertas = 'class="andamentoConcluido"'; | ||
561 | + } | ||
562 | + | ||
563 | + $strResultadoAndamentos .= '<tr '.$strAbertas.'>'; | ||
564 | + $strResultadoAndamentos .= "\n".'<td align="center">'; | ||
565 | + $strResultadoAndamentos .= substr($arrObjAtividadeDTO[$i]->getDthAbertura(),0,16); | ||
566 | + $strResultadoAndamentos .= '</td>'; | ||
567 | + | ||
568 | + $strResultadoAndamentos .= "\n".'<td align="center">'; | ||
569 | + $strResultadoAndamentos .= '<a alt="'.$arrObjAtividadeDTO[$i]->getStrDescricaoUnidade().'" title="'.$arrObjAtividadeDTO[$i]->getStrDescricaoUnidade().'" class="ancoraSigla">'.$arrObjAtividadeDTO[$i]->getStrSiglaUnidade().'</a>'; | ||
570 | + $strResultadoAndamentos .= '</td>'; | ||
571 | + | ||
572 | + $strResultadoAndamentos .= "\n"; | ||
573 | + $strResultadoAndamentos .= "\n".'<td>'; | ||
574 | + | ||
575 | + if (!InfraString::isBolVazia($arrObjAtividadeDTO[$i]->getStrNomeTarefa())){ | ||
576 | + $strResultadoAndamentos .= nl2br($arrObjAtividadeDTO[$i]->getStrNomeTarefa()).$strQuebraLinha; | ||
577 | + } | ||
578 | + | ||
579 | + $strResultadoAndamentos .= '</td>'; | ||
580 | + | ||
581 | + $strResultadoAndamentos .= '</tr>'; | ||
582 | + } | ||
583 | + $strResultadoAndamentos .= '</table><br />'; | ||
584 | + } | ||
585 | + | ||
586 | + | ||
587 | + | ||
588 | + AuditoriaSEI::getInstance()->auditar('processo_consulta_externa', __FILE__, strip_tags($strResultadoCabecalho)."\n".strip_tags($strResultado)); | ||
589 | + | ||
590 | + if ($_POST['hdnFlagGerar']=='1'){ | ||
591 | + | ||
592 | + if(md5($_POST['txtCaptcha']) != $_POST['hdnCaptchaMd5'] && $_GET['hash'] != $_POST['hdnCaptchaMd5'] && $bolCaptchaGerarPdf == true){ | ||
593 | + PaginaSEIExterna::getInstance()->setStrMensagem('Código de confirmação inválido.'); | ||
594 | + | ||
595 | + }else { | ||
596 | + | ||
597 | + | ||
598 | + $objDocumentoRN = new DocumentoRN(); | ||
599 | + | ||
600 | + $parArrObjDocumentoDTO = InfraArray::converterArrInfraDTO(InfraArray::gerarArrInfraDTO('DocumentoDTO','IdDocumento',PaginaSEIExterna::getInstance()->getArrStrItensSelecionados()),'IdDocumento'); | ||
601 | + $objDocumentoDTO = new DocumentoDTO(); | ||
602 | + $objDocumentoDTO->retDblIdDocumento(); | ||
603 | + $objDocumentoDTO->setDblIdDocumento($parArrObjDocumentoDTO, InfraDTO::$OPER_IN); | ||
604 | + $objDocumentoDTO->retDblIdProcedimento(); | ||
605 | + $objDocumentoDTO->retStrStaNivelAcessoGlobalProtocolo(); | ||
606 | + $objDocumentoDTO->retStrStaNivelAcessoLocalProtocolo(); | ||
607 | + $arrObjDocumentoDTO = $objDocumentoRN->listarRN0008($objDocumentoDTO); | ||
608 | + | ||
609 | + foreach ($arrObjDocumentoDTO as $objDocumentoDTO){ | ||
610 | + | ||
611 | + //Alterardo para atender o pedido da anatel para gerar pdf de documentos de nivel de acesso local = Público e de Procedimentos Públicos mesmo se o nivel global for restrito | ||
612 | + if($bolListaDocumentoProcessoRestrito){ | ||
613 | + if($objDocumentoDTO->getDblIdProcedimento() != $dblIdProcedimento || $objDocumentoDTO->getStrStaNivelAcessoLocalProtocolo() != ProtocoloRN::$NA_PUBLICO || $objProcedimentoDTO->getStrStaNivelAcessoLocalProtocolo() != ProtocoloRN::$NA_PUBLICO){ | ||
614 | + die ("Erro ao Gerar Pdf"); | ||
615 | + } | ||
616 | + }else if($bolListaDocumentoProcessoPublico){ | ||
617 | + if($objDocumentoDTO->getDblIdProcedimento() != $dblIdProcedimento || $objDocumentoDTO->getStrStaNivelAcessoGlobalProtocolo() != ProtocoloRN::$NA_PUBLICO){ | ||
618 | + die ("Erro ao Gerar Pdf"); | ||
619 | + } | ||
620 | + }else{ | ||
621 | + die ("Erro ao Gerar Pdf"); | ||
622 | + } | ||
623 | + | ||
624 | + | ||
625 | + } | ||
626 | + | ||
627 | + | ||
628 | + $objDocumentoRN = new DocumentoRN(); | ||
629 | + $objAnexoDTO = $objDocumentoRN->gerarPdf(InfraArray::gerarArrInfraDTO('DocumentoDTO','IdDocumento',PaginaSEIExterna::getInstance()->getArrStrItensSelecionados())); | ||
630 | + | ||
631 | + $bolGeracaoOK = true; | ||
632 | + | ||
633 | + } | ||
634 | + | ||
635 | + } | ||
636 | + | ||
637 | +}catch(Exception $e){ | ||
638 | + PaginaSEIExterna::getInstance()->processarExcecao($e); | ||
639 | +} | ||
640 | + | ||
641 | + | ||
642 | +PaginaSEIExterna::getInstance()->montarDocType(); | ||
643 | +PaginaSEIExterna::getInstance()->abrirHtml(); | ||
644 | +PaginaSEIExterna::getInstance()->abrirHead(); | ||
645 | +PaginaSEIExterna::getInstance()->montarMeta(); | ||
646 | +PaginaSEIExterna::getInstance()->montarTitle(':: '.PaginaSEIExterna::getInstance()->getStrNomeSistema().' - '.$strTitulo.' ::'); | ||
647 | +PaginaSEIExterna::getInstance()->montarStyle(); | ||
648 | +PaginaSEIExterna::getInstance()->abrirStyle(); | ||
649 | +echo $strCssMostrarAcoes; | ||
650 | +?> | ||
651 | + | ||
652 | +div.infraBarraSistemaE {width:90%} | ||
653 | +div.infraBarraSistemaD {width:5%} | ||
654 | +div.infraBarraComandos {width:99%} | ||
655 | + | ||
656 | +table caption { | ||
657 | + text-align:left !important; | ||
658 | + font-size: 1.2em; | ||
659 | + font-weight:bold; | ||
660 | +} | ||
661 | + | ||
662 | +.andamentoAberto { | ||
663 | + background-color:white; | ||
664 | +} | ||
665 | + | ||
666 | +.andamentoConcluido { | ||
667 | + background-color:white; | ||
668 | +} | ||
669 | + | ||
670 | + | ||
671 | +#tblCabecalho{margin-top:1;} | ||
672 | +#tblDocumentos {margin-top:1.5em;} | ||
673 | +#tblHistorico {margin-top:1.5em;} | ||
674 | +#divinfraDocumentoAreaPaginacaoSuperior {display: none;} | ||
675 | +#divinfraAndamentoAreaPaginacaoSuperior {display: none;} | ||
676 | + | ||
677 | +<? if($bolCaptchaGerarPdf) { ?> | ||
678 | +#lblCaptcha {position: absolute; top:30%; left: 20%; width: 80%} | ||
679 | +#txtCaptcha{position: absolute; top:56%; left: 20%; height:15%; width:56%;font-size: 3em;} | ||
680 | +#btnEnviarCaptcha {position: absolute; top:80%; left: 20%; width:56%} | ||
681 | + | ||
682 | +#divInfraModal{ | ||
683 | + | ||
684 | + display: none; | ||
685 | + position: fixed; | ||
686 | + z-index: 1; | ||
687 | + padding-top: 100px; | ||
688 | + left: 0; | ||
689 | + top: 0; | ||
690 | + width: 50%; | ||
691 | + height: 50%; | ||
692 | + overflow: auto; | ||
693 | + | ||
694 | +} | ||
695 | + | ||
696 | + | ||
697 | + | ||
698 | +.close { | ||
699 | + color: white; | ||
700 | + float: right; | ||
701 | + font-size: 28px; | ||
702 | + font-weight: bold; | ||
703 | +} | ||
704 | + | ||
705 | +.close:hover, | ||
706 | +.close:focus { | ||
707 | + color: #000; | ||
708 | + text-decoration: none; | ||
709 | + cursor: pointer; | ||
710 | +} | ||
711 | + | ||
712 | +.modal-header { | ||
713 | + padding: 2px 16px; | ||
714 | + background-image: url("imagens/bg_barra_sistema.jpg"); | ||
715 | + color: white; | ||
716 | +} | ||
717 | + | ||
718 | +.modal-body {padding: 2px 16px;} | ||
719 | + | ||
720 | +.modal-footer { | ||
721 | + padding: 2px 16px; | ||
722 | + background-color: #5cb85c; | ||
723 | + color: white; | ||
724 | +} | ||
725 | +<? } ?> | ||
726 | + | ||
727 | +span.retiraAncoraPadraoAzul{font-size: 1.2em;} | ||
728 | + | ||
729 | +<? | ||
730 | +PaginaSEIExterna::getInstance()->fecharStyle(); | ||
731 | +PaginaSEIExterna::getInstance()->montarJavaScript(); | ||
732 | +PaginaSEIExterna::getInstance()->abrirJavaScript(); | ||
733 | +?> | ||
734 | + | ||
735 | +function inicializar(){ | ||
736 | + | ||
737 | + <?if ($bolGeracaoOK){?> | ||
738 | + | ||
739 | + | ||
740 | + <!-- | ||
741 | + //window.open('<?=SessaoSEIExterna::getInstance()->assinarLink('processo_exibe_arquivo.php?id_acesso_externo='.$_GET['id_acesso_externo'].'&acao_externa=usuario_externo_exibir_arquivo&nome_arquivo='.$objAnexoDTO->getStrNome().'&nome_download=SEI-'.$objProcedimentoDTO->getStrProtocoloProcedimentoFormatado().'.pdf');?>'); | ||
742 | + --> | ||
743 | + | ||
744 | + window.open('<?=SessaoSEIExterna::getInstance()->assinarLink('md_pesq_processo_exibe_arquivo.php?acao_externa=usuario_externo_exibir_arquivo&acao_origem_externa=protocolo_pesquisar&id_orgao_acesso_externo=0&nome_arquivo='.$objAnexoDTO->getStrNome().'&nome_download=SEI-'.$objProcedimentoDTO->getStrProtocoloProcedimentoFormatado().'.pdf');?>'); | ||
745 | + | ||
746 | + | ||
747 | + <?}?> | ||
748 | + | ||
749 | + infraEfeitoTabelas(); | ||
750 | +} | ||
751 | + | ||
752 | + | ||
753 | +<? | ||
754 | +if($bolCaptchaGerarPdf){ | ||
755 | +?> | ||
756 | + | ||
757 | +$(document).unbind("keyup").keyup(function(e){ | ||
758 | + e.preventDefault(); | ||
759 | + var code = e.which; | ||
760 | + if(code==13){ | ||
761 | + var modal = document.getElementById('divInfraModal'); | ||
762 | + if(modal.style.display == "block"){ | ||
763 | + fecharPdfModal(); | ||
764 | + gerarPdf(); | ||
765 | + | ||
766 | + } | ||
767 | + } | ||
768 | +}); | ||
769 | + | ||
770 | + | ||
771 | + | ||
772 | +function gerarPdfModal(){ | ||
773 | + | ||
774 | + if (document.getElementById('hdnInfraItensSelecionados').value==''){ | ||
775 | + alert('Nenhum documento selecionado.'); | ||
776 | + return; | ||
777 | + } | ||
778 | + var modal = document.getElementById('divInfraModal'); | ||
779 | + modal.style.display = "block"; | ||
780 | + | ||
781 | +} | ||
782 | + | ||
783 | +function fecharPdfModal(){ | ||
784 | + | ||
785 | + var modal = document.getElementById('divInfraModal'); | ||
786 | + modal.style.display = "none"; | ||
787 | +} | ||
788 | + | ||
789 | +window.onclick = function(event) { | ||
790 | + var modal = document.getElementById('divInfraModal'); | ||
791 | + if (event.target == modal) { | ||
792 | + modal.style.display = "none"; | ||
793 | + } | ||
794 | +} | ||
795 | + | ||
796 | +<? | ||
797 | +} | ||
798 | +?> | ||
799 | + | ||
800 | +function gerarPdf() { | ||
801 | + | ||
802 | + if (document.getElementById('hdnInfraItensSelecionados').value==''){ | ||
803 | + alert('Nenhum documento selecionado.'); | ||
804 | + return; | ||
805 | + } | ||
806 | + | ||
807 | + <? | ||
808 | + if($bolCaptchaGerarPdf){ | ||
809 | + ?> | ||
810 | + fecharPdfModal(); | ||
811 | + <? | ||
812 | + } | ||
813 | + ?> | ||
814 | + | ||
815 | + infraExibirAviso(false); | ||
816 | + | ||
817 | + document.getElementById('hdnFlagGerar').value = '1'; | ||
818 | + document.getElementById('frmProcessoAcessoExternoConsulta').submit(); | ||
819 | +} | ||
820 | + | ||
821 | +<? | ||
822 | +PaginaSEIExterna::getInstance()->fecharJavaScript(); | ||
823 | +PaginaSEIExterna::getInstance()->fecharHead(); | ||
824 | +PaginaSEIExterna::getInstance()->abrirBody($strTitulo,'onload="inicializar();"'); | ||
825 | +?> | ||
826 | + | ||
827 | +<form id="frmProcessoAcessoExternoConsulta" method="post"> | ||
828 | +<? | ||
829 | +if($bolCaptchaGerarPdf){ | ||
830 | + echo ' | ||
831 | + <div id="divInfraModal" class="infraFundoTransparente" style="position: fixed; width: 100%; height: 100%; visibility: visible;"> | ||
832 | + <div id="divCaptcha" class="infraAreaDados" style="height: 220px; width: 230px; background-color:white"> | ||
833 | + <div class="modal-header"> | ||
834 | + <span id="spnClose" class="close" onclick="fecharPdfModal();">×</span> | ||
835 | + <h2 style ="color: white;font-size: 1.2em;font-weight: bold;">Digite o Código da Imagem</h2> | ||
836 | + </div> | ||
837 | + <div class="modal-body"> | ||
838 | + <label id="lblCaptcha" accesskey="" class="infraLabelObrigatorio"> | ||
839 | + <img src="/infra_js/infra_gerar_captcha.php?codetorandom='.$strCodigoParaGeracaoCaptcha.'" alt="Não foi possível carregar imagem de confirmação" /> </label> | ||
840 | + <input type="text" id="txtCaptcha" name="txtCaptcha" class="infraText" maxlength="4" value="" /> | ||
841 | + <button id="btnEnviarCaptcha" type="submit" accesskey="G" name="btnEnviarCaptcha" value="Enviar" onclick="gerarPdf();" class="infraButton"><span class="infraTeclaAtalho">E</span>nviar</button> | ||
842 | + </div> | ||
843 | + | ||
844 | + </div> | ||
845 | + </div> | ||
846 | + '; | ||
847 | + | ||
848 | +} | ||
849 | +PaginaSEIExterna::getInstance()->montarBarraComandosSuperior($arrComandos); | ||
850 | +echo $strResultadoCabecalho; | ||
851 | +echo $strMensagemProcessoRestrito; | ||
852 | +PaginaSEIExterna::getInstance()->montarAreaTabela($strResultado,$numProtocolos,false,'',null,'infraDocumento'); | ||
853 | +PaginaSEIExterna::getInstance()->montarAreaTabela($strResultadoAndamentos,$numRegistrosAtividades,false,'',null,'infraAndamento'); | ||
854 | +//echo $strResultadoAndamentos; | ||
855 | +?> | ||
856 | +<input type="hidden" id="hdnFlagGerar" name="hdnFlagGerar" value="0" /> | ||
857 | + <?if($bolCaptchaGerarPdf) { ?> | ||
858 | + <input type="hidden" id="hdnCaptchaMd5" name="hdnCaptchaMd5" class="infraText" value="<?=md5(InfraCaptcha::gerar($strCodigoParaGeracaoCaptcha));?>" /> | ||
859 | + <?} ?> | ||
860 | +</form> | ||
861 | +<? | ||
862 | +PaginaSEIExterna::getInstance()->montarAreaDebug(); | ||
863 | + | ||
864 | +if($bolGeracaoOK){ | ||
865 | + ?> | ||
866 | + <script> | ||
867 | + if (navigator.userAgent.match(/msie/i) || navigator.userAgent.match(/trident/i) ){ | ||
868 | + | ||
869 | + window.open('<?=SessaoSEIExterna::getInstance()->assinarLink('md_pesq_processo_exibe_arquivo.php?acao_externa=usuario_externo_exibir_arquivo&acao_origem_externa=protocolo_pesquisar&id_orgao_acesso_externo=0&nome_arquivo='.$objAnexoDTO->getStrNome().'&nome_download=SEI-'.$objProcedimentoDTO->getStrProtocoloProcedimentoFormatado().'.pdf');?>'); | ||
870 | + <? | ||
871 | + if($bolCaptchaGerarPdf){ | ||
872 | + ?> | ||
873 | + | ||
874 | + $(document).unbind("keyup").keyup(function(e){ | ||
875 | + e.preventDefault(); | ||
876 | + var code = e.which; | ||
877 | + if(code==13){ | ||
878 | + var modal = document.getElementById('divInfraModal'); | ||
879 | + if(modal.style.display == "block"){ | ||
880 | + fecharPdfModal(); | ||
881 | + gerarPdf(); | ||
882 | + | ||
883 | + } | ||
884 | + } | ||
885 | + }); | ||
886 | + | ||
887 | + | ||
888 | + | ||
889 | + function gerarPdfModal(){ | ||
890 | + | ||
891 | + if (document.getElementById('hdnInfraItensSelecionados').value==''){ | ||
892 | + alert('Nenhum documento selecionado.'); | ||
893 | + return; | ||
894 | + } | ||
895 | + var modal = document.getElementById('divInfraModal'); | ||
896 | + modal.style.display = "block"; | ||
897 | + | ||
898 | + } | ||
899 | + | ||
900 | + function fecharPdfModal(){ | ||
901 | + | ||
902 | + var modal = document.getElementById('divInfraModal'); | ||
903 | + modal.style.display = "none"; | ||
904 | + } | ||
905 | + | ||
906 | + window.onclick = function(event) { | ||
907 | + var modal = document.getElementById('divInfraModal'); | ||
908 | + if (event.target == modal) { | ||
909 | + modal.style.display = "none"; | ||
910 | + } | ||
911 | + } | ||
912 | + | ||
913 | + <? | ||
914 | + } | ||
915 | + ?> | ||
916 | + | ||
917 | + function gerarPdf() { | ||
918 | + | ||
919 | + if (document.getElementById('hdnInfraItensSelecionados').value==''){ | ||
920 | + alert('Nenhum documento selecionado.'); | ||
921 | + return; | ||
922 | + } | ||
923 | + | ||
924 | + <? | ||
925 | + if($bolCaptchaGerarPdf){ | ||
926 | + ?> | ||
927 | + fecharPdfModal(); | ||
928 | + <? | ||
929 | + } | ||
930 | + ?> | ||
931 | + | ||
932 | + infraExibirAviso(false); | ||
933 | + | ||
934 | + document.getElementById('hdnFlagGerar').value = '1'; | ||
935 | + document.getElementById('frmProcessoAcessoExternoConsulta').submit(); | ||
936 | + } | ||
937 | + } | ||
938 | + </script> | ||
939 | +<? | ||
940 | +} | ||
941 | +PaginaSEIExterna::getInstance()->fecharBody(); | ||
942 | +PaginaSEIExterna::getInstance()->fecharHtml(); | ||
943 | +?> | ||
0 | \ No newline at end of file | 944 | \ No newline at end of file |