1 | <?xml version="1.0" encoding="ISO-8859-1"?> |
---|
2 | <process> |
---|
3 | <name>Sistema Normativo</name> |
---|
4 | <isValid>y</isValid> |
---|
5 | <version>1.2</version> |
---|
6 | <isActive>y</isActive> |
---|
7 | <description>Sistema que instrumentaliza todas as diretrizes inerentes aos documentos normativos da Celepar.</description> |
---|
8 | <lastModif>07/08/2007 [10:06:07]</lastModif> |
---|
9 | <sharedCode><![CDATA[<?php |
---|
10 | |
---|
11 | /* Início da definicao de constantes da aplicacao */ |
---|
12 | /* Fim da definicao de constantes da aplicacao */ |
---|
13 | |
---|
14 | /* Início da importacao/inclusao de classes */ |
---|
15 | |
---|
16 | //camada de controle do processo |
---|
17 | wf_include('class.controller.inc.php'); |
---|
18 | wf_include('class.model.inc.php'); |
---|
19 | wf_include('class.consulta.model.php'); |
---|
20 | wf_include('class.consulta.controller.php'); |
---|
21 | wf_include('class.tipodocumento.model.php'); |
---|
22 | wf_include('class.tipodocumento.controller.php'); |
---|
23 | wf_include('class.processo.model.php'); |
---|
24 | wf_include('class.processo.controller.php'); |
---|
25 | wf_include('class.macroprocesso.model.php'); |
---|
26 | wf_include('class.macroprocesso.controller.php'); |
---|
27 | wf_include('class.elaboracao.model.php'); |
---|
28 | wf_include('class.elaboracao.controller.php'); |
---|
29 | wf_include('class.editarnorma.model.php'); |
---|
30 | wf_include('class.editarnorma.controller.php'); |
---|
31 | |
---|
32 | wf_include('class.ajax.elaboracao.inc.php'); |
---|
33 | |
---|
34 | //camada da logica de negocios |
---|
35 | //classes de negocio/auxiliares |
---|
36 | |
---|
37 | /* Fim da importacao/inclusao de classes */ |
---|
38 | |
---|
39 | |
---|
40 | define('PAGING_MAX_NUMBER_OF_LINKS', 5); |
---|
41 | define('PAGING_NUMBER_OF_ITEMS', 30); |
---|
42 | define('ID_AREA_DJ', 11); |
---|
43 | |
---|
44 | ?> |
---|
45 | ]]></sharedCode> |
---|
46 | <configs> |
---|
47 | <config> |
---|
48 | <wf_config_name>execute_activities_in_debug_mode</wf_config_name> |
---|
49 | <wf_config_value></wf_config_value> |
---|
50 | <wf_config_value_int>1</wf_config_value_int> |
---|
51 | </config> |
---|
52 | <config> |
---|
53 | <wf_config_name>ownership_give_abort_right</wf_config_name> |
---|
54 | <wf_config_value></wf_config_value> |
---|
55 | <wf_config_value_int>1</wf_config_value_int> |
---|
56 | </config> |
---|
57 | <config> |
---|
58 | <wf_config_name>disable_advanced_actions</wf_config_name> |
---|
59 | <wf_config_value></wf_config_value> |
---|
60 | <wf_config_value_int>0</wf_config_value_int> |
---|
61 | </config> |
---|
62 | <config> |
---|
63 | <wf_config_name>database_name</wf_config_name> |
---|
64 | <wf_config_value>workflow</wf_config_value> |
---|
65 | <wf_config_value_int></wf_config_value_int> |
---|
66 | </config> |
---|
67 | <config> |
---|
68 | <wf_config_name>mail_smtp_profile</wf_config_name> |
---|
69 | <wf_config_value>default</wf_config_value> |
---|
70 | <wf_config_value_int></wf_config_value_int> |
---|
71 | </config> |
---|
72 | </configs> |
---|
73 | <activities> |
---|
74 | <activity> |
---|
75 | <name>Consulta</name> |
---|
76 | <type>standalone</type> |
---|
77 | <description>Consulta de Documentos Normativos em vigor.</description> |
---|
78 | <menuPath></menuPath> |
---|
79 | <lastModif>12/06/2007 [10:11:14]</lastModif> |
---|
80 | <isInteractive>y</isInteractive> |
---|
81 | <isAutoRouted>n</isAutoRouted> |
---|
82 | <roles> |
---|
83 | <role>Gerência</role> |
---|
84 | <role>Usuário</role> |
---|
85 | <role>Adm</role> |
---|
86 | </roles> |
---|
87 | <agents> |
---|
88 | </agents> |
---|
89 | <code><![CDATA[<?php |
---|
90 | |
---|
91 | /** |
---|
92 | * @brief Atividade Consulta |
---|
93 | * @author Guilherme Striquer Bisotto |
---|
94 | * @name Consulta |
---|
95 | */ |
---|
96 | |
---|
97 | /* instanciação de classe da camada Model */ |
---|
98 | $application = new ConsultaController(new ConsultaModel($env),$env); |
---|
99 | $application->run($_REQUEST['action']); |
---|
100 | |
---|
101 | ?> ]]></code> <template><![CDATA[ ]]></template> </activity> |
---|
102 | <activity> |
---|
103 | <name>Editar Norma</name> |
---|
104 | <type>standalone</type> |
---|
105 | <description>Atividade de Gerencia para editar uma norma já existente sem passar pro aprovação de outros departamentos</description> |
---|
106 | <menuPath></menuPath> |
---|
107 | <lastModif>12/06/2007 [10:11:14]</lastModif> |
---|
108 | <isInteractive>y</isInteractive> |
---|
109 | <isAutoRouted>n</isAutoRouted> |
---|
110 | <roles> |
---|
111 | <role>Adm</role> |
---|
112 | </roles> |
---|
113 | <agents> |
---|
114 | </agents> |
---|
115 | <code><![CDATA[<?php |
---|
116 | |
---|
117 | $application = new EditarNormaController(new EditarNormaModel($env),$env); |
---|
118 | $application->run($_REQUEST['action']); |
---|
119 | |
---|
120 | ?> |
---|
121 | ]]></code> <template><![CDATA[ ]]></template> </activity> |
---|
122 | <activity> |
---|
123 | <name>Elaborar</name> |
---|
124 | <type>start</type> |
---|
125 | <description>Elaborar proposta de documento normativo.</description> |
---|
126 | <menuPath></menuPath> |
---|
127 | <lastModif>12/06/2007 [10:11:14]</lastModif> |
---|
128 | <isInteractive>y</isInteractive> |
---|
129 | <isAutoRouted>y</isAutoRouted> |
---|
130 | <roles> |
---|
131 | <role>Gerência</role> |
---|
132 | <role>Adm</role> |
---|
133 | </roles> |
---|
134 | <agents> |
---|
135 | </agents> |
---|
136 | <code><![CDATA[<?php |
---|
137 | |
---|
138 | /* instanciação de classe da camada Model */ |
---|
139 | $application = new ElaboracaoController(new ElaboracaoModel($env),$env); |
---|
140 | $application->run($_REQUEST['action']); |
---|
141 | |
---|
142 | ?> ]]></code> <template><![CDATA[ ]]></template> </activity> |
---|
143 | <activity> |
---|
144 | <name>end</name> |
---|
145 | <type>end</type> |
---|
146 | <description>default end activity</description> |
---|
147 | <menuPath></menuPath> |
---|
148 | <lastModif>12/06/2007 [10:11:14]</lastModif> |
---|
149 | <isInteractive>n</isInteractive> |
---|
150 | <isAutoRouted>y</isAutoRouted> |
---|
151 | <roles> |
---|
152 | </roles> |
---|
153 | <agents> |
---|
154 | </agents> |
---|
155 | <code><![CDATA[<?php |
---|
156 | ?> ]]></code> </activity> |
---|
157 | <activity> |
---|
158 | <name>Macroprocesso</name> |
---|
159 | <type>standalone</type> |
---|
160 | <description></description> |
---|
161 | <menuPath>Manter</menuPath> |
---|
162 | <lastModif>12/06/2007 [10:11:14]</lastModif> |
---|
163 | <isInteractive>y</isInteractive> |
---|
164 | <isAutoRouted>n</isAutoRouted> |
---|
165 | <roles> |
---|
166 | <role>Gerência</role> |
---|
167 | <role>Adm</role> |
---|
168 | </roles> |
---|
169 | <agents> |
---|
170 | </agents> |
---|
171 | <code><![CDATA[<?php |
---|
172 | |
---|
173 | /* instanciação de classe da camada Model */ |
---|
174 | $application = new MacroprocessoController(new MacroprocessoModel($env),$env); |
---|
175 | $application->run($_REQUEST['action']); |
---|
176 | |
---|
177 | ?> ]]></code> <template><![CDATA[ ]]></template> </activity> |
---|
178 | <activity> |
---|
179 | <name>Processo</name> |
---|
180 | <type>standalone</type> |
---|
181 | <description></description> |
---|
182 | <menuPath>Manter</menuPath> |
---|
183 | <lastModif>12/06/2007 [10:11:14]</lastModif> |
---|
184 | <isInteractive>y</isInteractive> |
---|
185 | <isAutoRouted>n</isAutoRouted> |
---|
186 | <roles> |
---|
187 | <role>Gerência</role> |
---|
188 | <role>Adm</role> |
---|
189 | </roles> |
---|
190 | <agents> |
---|
191 | </agents> |
---|
192 | <code><![CDATA[<?php |
---|
193 | |
---|
194 | /* instanciação de classe da camada Model */ |
---|
195 | $application = new ProcessoController(new ProcessoModel($env),$env); |
---|
196 | $application->run($_REQUEST['action']); |
---|
197 | |
---|
198 | ?> ]]></code> <template><![CDATA[ ]]></template> </activity> |
---|
199 | <activity> |
---|
200 | <name>Tipo de Documento</name> |
---|
201 | <type>standalone</type> |
---|
202 | <description></description> |
---|
203 | <menuPath>Manter</menuPath> |
---|
204 | <lastModif>12/06/2007 [10:11:14]</lastModif> |
---|
205 | <isInteractive>y</isInteractive> |
---|
206 | <isAutoRouted>n</isAutoRouted> |
---|
207 | <roles> |
---|
208 | <role>Gerência</role> |
---|
209 | <role>Adm</role> |
---|
210 | </roles> |
---|
211 | <agents> |
---|
212 | </agents> |
---|
213 | <code><![CDATA[<?php |
---|
214 | |
---|
215 | |
---|
216 | $application = new TipoDocumentoController(new TipoDocumentoModel($env),$env); |
---|
217 | $application->run($_REQUEST['action']); |
---|
218 | |
---|
219 | ?> ]]></code> <template><![CDATA[ ]]></template> </activity> |
---|
220 | </activities> |
---|
221 | <templates> |
---|
222 | <template> |
---|
223 | <name>Adicionar_arquivos.tpl</name> |
---|
224 | <code><![CDATA[{wf_default_template} |
---|
225 | <link rel="stylesheet" type="text/css" href="{$wf_resources_path}/normas.css"> |
---|
226 | {include file=header.tpl} |
---|
227 | |
---|
228 | {wf_ajax_init} |
---|
229 | |
---|
230 | <script type="text/javascript" src="{$wf_resources_path}/ajaxCalls.js"></script> |
---|
231 | <script type="text/javascript" src="{$wf_resources_path}/toggleDetails.js"></script> |
---|
232 | |
---|
233 | <table class="super_table"> |
---|
234 | <tr> |
---|
235 | <td width="10%"></td> |
---|
236 | <td width="80%"> |
---|
237 | |
---|
238 | <input type="hidden" name=Gestor value="{$Gestor}"> |
---|
239 | <input type="hidden" name=Diretor value="{$Diretor}"> |
---|
240 | <input type="hidden" name=TipoDocumento value="{$TipoDocumento}"> |
---|
241 | <input type="hidden" name=Macroprocesso value="{$Macroprocesso}"> |
---|
242 | <input type="hidden" name=Processo value="{$Processo}"> |
---|
243 | <input type="hidden" name=TituloNorma value="{$TituloNorma}"> |
---|
244 | <input type="hidden" name=DataVigencia value="{$DataVigencia}"> |
---|
245 | <input type="hidden" name=ObjetivoNorma value="{$ObjetivoNorma}"> |
---|
246 | <input type="hidden" name=AmbitoAplicacao value="{$AmbitoAplicacao}"> |
---|
247 | <input type="hidden" name=PalavrasChave value="{$PalavrasChave}"> |
---|
248 | |
---|
249 | <div id="detalhes_button" width="100%"> |
---|
250 | <input type="button" class="form_botao" value="Expandir Detalhes" onClick="expandirDetalhes();"> |
---|
251 | </div> |
---|
252 | <table id=detalhes width="100%" cellpadding="0" cellspacing="0" style="border:1px solid black; display:none;"> |
---|
253 | <tr> |
---|
254 | <td> |
---|
255 | <table width="100%" cellpadding="0" cellspacing="5" border="0"> |
---|
256 | <tr> |
---|
257 | <td align="left" width="20%" class=topico>Elaborador*: </td> |
---|
258 | <td align="left" width="80%">{$nomeElaborador}</td> |
---|
259 | </tr> |
---|
260 | <tr> |
---|
261 | <td align="left" class=topico>Área do Elaborador*: </td> |
---|
262 | <td align="left">{$nomeArea}</td> |
---|
263 | </tr> |
---|
264 | {if $nomeAreaGestora ne ""} |
---|
265 | <tr> |
---|
266 | <td align="left" class=topico>Área Gestora*: </td> |
---|
267 | <td align="left">{$nomeAreaGestora}</td> |
---|
268 | </tr> |
---|
269 | {/if} |
---|
270 | {if $nomeGestor ne ""} |
---|
271 | <tr> |
---|
272 | <td align="left" class=topico>Titular da Área Gestora*: </td> |
---|
273 | <td align="left">{$nomeGestor}</td> |
---|
274 | </tr> |
---|
275 | {/if} |
---|
276 | {if $nomeDiretorJuridico ne ""} |
---|
277 | <tr> |
---|
278 | <td align="left" class=topico>Diretor Jurídico*: </td> |
---|
279 | <td align="left">{$nomeDiretorJuridico}</td> |
---|
280 | </tr> |
---|
281 | {/if} |
---|
282 | {if $nomeDiretoria ne ""} |
---|
283 | <tr> |
---|
284 | <td align="left" class=topico>Diretoria*: </td> |
---|
285 | <td align="left">{$nomeDiretoria}</td> |
---|
286 | </tr> |
---|
287 | {/if} |
---|
288 | {if $nomeDiretor ne ""} |
---|
289 | <tr> |
---|
290 | <td align="left" class=topico>Diretor*: </td> |
---|
291 | <td align="left">{$nomeDiretor}</td> |
---|
292 | </tr> |
---|
293 | {/if} |
---|
294 | <tr> |
---|
295 | <td align="left" class=topico>Tipo de Documento: </td> |
---|
296 | <td align="left">{$nomeTipoDocumento}</td> |
---|
297 | </tr> |
---|
298 | <tr> |
---|
299 | <td align="left" class=topico>Macroprocesso: </td> |
---|
300 | <td align="left">{$nomeMacroprocesso}</td> |
---|
301 | </tr> |
---|
302 | <tr> |
---|
303 | <td align="left" class=topico>Processo: </td> |
---|
304 | <td align="left">{$nomeProcesso}</td> |
---|
305 | </tr> |
---|
306 | <tr> |
---|
307 | <td align="left" class=topico>Título: </td> |
---|
308 | <td align="left">{$TituloNorma}</td> |
---|
309 | </tr> |
---|
310 | <tr> |
---|
311 | <td align="left" class=topico>Data do Início da Vigência: </td> |
---|
312 | <td align="left">{$DataVigencia}</td> |
---|
313 | </tr> |
---|
314 | <tr> |
---|
315 | <td align="left" valign="top" class=topico>Objetivo: </td> |
---|
316 | <td align="left">{$ObjetivoNorma}</td> |
---|
317 | </tr> |
---|
318 | <tr> |
---|
319 | <td align="left" class=topico>Âmbito de Aplicação:</td> |
---|
320 | <td align="left">{$nomeAmbitoAplicacao}</td> |
---|
321 | </tr> |
---|
322 | <tr> |
---|
323 | <td valign="top" class=topico>Palavras-Chave:</td> |
---|
324 | <td align="left">{$PalavrasChave}</td> |
---|
325 | </tr> |
---|
326 | <tr> |
---|
327 | <td></td> |
---|
328 | <td style="color:grey"> |
---|
329 | * Campos preenchidos automaticamente. Caso exista algum erro contacte o administrador do sistema. |
---|
330 | </td> |
---|
331 | </tr> |
---|
332 | <tr> |
---|
333 | <td></td> |
---|
334 | <td> |
---|
335 | <input type="button" class="form_botao" value="Editar Detalhes" onClick="document.location.href = 'javascript:history.back()'"> |
---|
336 | </td> |
---|
337 | </tr> |
---|
338 | </table> |
---|
339 | </td> |
---|
340 | </tr> |
---|
341 | </table> |
---|
342 | <table width="100%" cellpadding="0" cellspacing="5" border="0"> |
---|
343 | <tr> |
---|
344 | <td align="left" width="20%" class=topico>Arquivo: </td> |
---|
345 | <td width="80%"> |
---|
346 | {wf_file_upload_init} |
---|
347 | {wf_file_upload name=arquivo max=1} |
---|
348 | </td> |
---|
349 | </tr> |
---|
350 | <tr> |
---|
351 | <td align="left" width="20%" class=topico>Anexos: </td> |
---|
352 | <td width="80%"> |
---|
353 | {wf_file_upload name=anexos} |
---|
354 | </td> |
---|
355 | </tr> |
---|
356 | <tr> |
---|
357 | <td> |
---|
358 | </td> |
---|
359 | <td> |
---|
360 | <input type="button" class="form_botao" value="Enviar" onClick="dispatch('enviar')"> |
---|
361 | <input type="button" class="form_botao" value="Cancelar" onClick="document.location.href = '{$wf_back_link}'"> |
---|
362 | </td> |
---|
363 | </tr> |
---|
364 | </table> |
---|
365 | </td> |
---|
366 | <td width="10%"></td> |
---|
367 | </tr> |
---|
368 | </table> |
---|
369 | <table class=super_table id="nota_rodape" style="display:none;"> |
---|
370 | <tr> |
---|
371 | <td width="10%"> |
---|
372 | <td width="80%" style="color: grey"> |
---|
373 | |
---|
374 | </td> |
---|
375 | <td width="10%"> |
---|
376 | </td> |
---|
377 | </tr> |
---|
378 | </table> |
---|
379 | ]]></code> </template> |
---|
380 | <template> |
---|
381 | <name>Analise_Gerencia.tpl</name> |
---|
382 | <code><![CDATA[{wf_default_template} |
---|
383 | <link rel="stylesheet" type="text/css" href="{$wf_resources_path}/normas.css"> |
---|
384 | {include file=header.tpl} |
---|
385 | |
---|
386 | {include file=Visualizar.tpl} |
---|
387 | <table class=super_table> |
---|
388 | <tr> |
---|
389 | <td align="center"> |
---|
390 | <input type="button" value="Aprovar" onClick="dispatch('aprovar')"> |
---|
391 | </td> |
---|
392 | </tr> |
---|
393 | </table> |
---|
394 | ]]></code> </template> |
---|
395 | <template> |
---|
396 | <name>Consulta.tpl</name> |
---|
397 | <code><![CDATA[{wf_default_template} |
---|
398 | {* ARQUIVOS CSS *} |
---|
399 | <link rel="stylesheet" type="text/css" href="{$wf_resources_path}/normas.css"> |
---|
400 | {include file=header.tpl} |
---|
401 | {wf_ajax_init} |
---|
402 | |
---|
403 | <script type="text/javascript" src="{$wf_resources_path}/ajaxCalls.js"></script> |
---|
404 | |
---|
405 | <table class="super_Table" width="100%"> |
---|
406 | <tr> |
---|
407 | <td width="5%"></td> |
---|
408 | <td width="90%"> |
---|
409 | <table width="100%"> |
---|
410 | <tr> |
---|
411 | <td style="font-weight: bold"> |
---|
412 | Pesquisar: |
---|
413 | </td> |
---|
414 | </tr> |
---|
415 | <tr> |
---|
416 | <td width="20%">Macroprocessos: </td> |
---|
417 | <td width="80%"> |
---|
418 | {html_options name=cbMacroprocessos options=$cbMacroprocessos onChange="getProcessos(cbMacroprocessos.value);"} |
---|
419 | </td> |
---|
420 | </tr> |
---|
421 | <td width="20%">Processo: </td> |
---|
422 | <td width="80%"> |
---|
423 | <div id="Processos"> |
---|
424 | <select> |
---|
425 | <option>--- Selecione um macroprocesso ---</option> |
---|
426 | </select> |
---|
427 | </div> |
---|
428 | </td> |
---|
429 | <tr> |
---|
430 | <td width="20%">Tipo de Documento: </td> |
---|
431 | <td width="80%"> |
---|
432 | {html_options name=cbTiposDocumento options=$cbTiposDocumento} |
---|
433 | </td> |
---|
434 | </tr> |
---|
435 | <td width="20%">Título</td> |
---|
436 | <td width="80%"> |
---|
437 | <input type="text" size="50" name=titulo_busca> |
---|
438 | </td> |
---|
439 | </tr> |
---|
440 | </table> |
---|
441 | <table width="100%" align="center"> |
---|
442 | <tr> |
---|
443 | <td align="center"> |
---|
444 | <input type="button" class="form_botao" value="Pesquisar" onClick="dispatch('pesquisar')"> |
---|
445 | </td> |
---|
446 | </tr> |
---|
447 | </table> |
---|
448 | <table> |
---|
449 | <tr> |
---|
450 | <td> |
---|
451 | <input type="hidden" name="mostra_normas" value="{$mostra_normas}"/> |
---|
452 | {if $mostra_normas eq "ativas"} |
---|
453 | <input type="button" class="form_botao" value="Mostrar normas inativas" onClick="dispatch('switchVisualizacao', 'inativas')"/> |
---|
454 | {elseif $mostra_normas eq "inativas"} |
---|
455 | <input type="button" class="form_botao" value="Mostrar normas ativas" onClick="dispatch('switchVisualizacao', 'ativas')"/> |
---|
456 | {/if} |
---|
457 | </td> |
---|
458 | </tr> |
---|
459 | </table> |
---|
460 | <table align="center" width="100%"> |
---|
461 | <tr> |
---|
462 | <td align="right">{$linksPaginacao}</td> |
---|
463 | </tr> |
---|
464 | </table> |
---|
465 | <table class="norma_table" width="100%"> |
---|
466 | <tr class="norma_table_header"> |
---|
467 | <td width="7%"><a class="titulo_norma" title="Macroprocesso" href="{$titulos_ordenacao[0].link}">{$titulos_ordenacao[0].name}</a></td> |
---|
468 | <td width="19%"><a class="titulo_norma" href="{$titulos_ordenacao[1].link}">{$titulos_ordenacao[1].name}</a></td> |
---|
469 | <td width="7%"><a class="titulo_norma" title="Tipo de Documento" href="{$titulos_ordenacao[2].link}">{$titulos_ordenacao[2].name}</a></td> |
---|
470 | <td width="15%"><a class="titulo_norma" href="{$titulos_ordenacao[3].link}">{$titulos_ordenacao[3].name}</a></td> |
---|
471 | <td width="7%"><a class="titulo_norma" href="{$titulos_ordenacao[4].link}">{$titulos_ordenacao[4].name}</a></td> |
---|
472 | <td width="51%"><a class="titulo_norma" href="{$titulos_ordenacao[5].link}">{$titulos_ordenacao[5].name}</a></td> |
---|
473 | <td width="4%" align="center">Ação</td> |
---|
474 | </tr> |
---|
475 | {foreach item=elem from=$result} |
---|
476 | <tr bgcolor={cycle values="#FFEBCD,#DEB887"}> |
---|
477 | <td>{$elem.mpr_sigla}</td> |
---|
478 | <td>{$elem.pro_descricao}</td> |
---|
479 | <td>{$elem.tpd_sigla}</td> |
---|
480 | <td>{$elem.nrm_codigo}</td> |
---|
481 | <td>{$elem.nrm_situacao_ref}</td> |
---|
482 | <td>{$elem.nrm_titulo}</td> |
---|
483 | <td align="center"> |
---|
484 | <a title="visualizar" href="javascript:dispatch('visualizar', {$elem.nrm_id});"><img border="0" alt="" src="{$wf_resources_path}/view.png" /></a> |
---|
485 | </td> |
---|
486 | </tr> |
---|
487 | {/foreach} |
---|
488 | </table> |
---|
489 | {include file=bottom_table.tpl} |
---|
490 | </td> |
---|
491 | <td width="5%"></td> |
---|
492 | </tr> |
---|
493 | </table> |
---|
494 | ]]></code> </template> |
---|
495 | <template> |
---|
496 | <name>Editar_Norma.tpl</name> |
---|
497 | <code><![CDATA[{wf_default_template} |
---|
498 | <link rel="stylesheet" type="text/css" href="{$wf_resources_path}/normas.css"> |
---|
499 | {include file=header.tpl} |
---|
500 | |
---|
501 | {wf_ajax_init} |
---|
502 | |
---|
503 | <script type="text/javascript" src="{$wf_resources_path}/ajaxCalls.js"></script> |
---|
504 | |
---|
505 | <table class="super_Table" width="100%"> |
---|
506 | <tr> |
---|
507 | <td width="5%"></td> |
---|
508 | <td width="90%"> |
---|
509 | <table align="center" width="100%"> |
---|
510 | <tr> |
---|
511 | <td align="right">{$linksPaginacao}</td> |
---|
512 | </tr> |
---|
513 | </table> |
---|
514 | <table class="norma_table" width="100%"> |
---|
515 | <tr class="norma_table_header"> |
---|
516 | <td width="7%"><a class="titulo_norma" title="Macroprocesso" href="{$titulos_ordenacao[0].link}">{$titulos_ordenacao[0].name}</a></td> |
---|
517 | <td width="19%"><a class="titulo_norma" href="{$titulos_ordenacao[1].link}">{$titulos_ordenacao[1].name}</a></td> |
---|
518 | <td width="7%"><a class="titulo_norma" title="Tipo de Documento" href="{$titulos_ordenacao[2].link}">{$titulos_ordenacao[2].name}</a></td> |
---|
519 | <td width="15%"><a class="titulo_norma" href="{$titulos_ordenacao[3].link}">{$titulos_ordenacao[3].name}</a></td> |
---|
520 | <td width="7%"><a class="titulo_norma" href="{$titulos_ordenacao[4].link}">{$titulos_ordenacao[4].name}</a></td> |
---|
521 | <td width="51%"><a class="titulo_norma" href="{$titulos_ordenacao[5].link}">{$titulos_ordenacao[5].name}</a></td> |
---|
522 | <td width="4%" class="titulo_norma" align="center">Ação</td> |
---|
523 | </tr> |
---|
524 | {foreach item=elem from=$result} |
---|
525 | <tr bgcolor={cycle values="#FFEBCD,#DEB887"}> |
---|
526 | <td>{$elem.mpr_sigla}</td> |
---|
527 | <td>{$elem.pro_descricao}</td> |
---|
528 | <td>{$elem.tpd_sigla}</td> |
---|
529 | <td>{$elem.nrm_codigo}</td> |
---|
530 | <td>{$elem.nrm_situacao_ref}</td> |
---|
531 | <td>{$elem.nrm_titulo}</td> |
---|
532 | <td align="center"> |
---|
533 | <table cellspacing="0" cellpadding="0" width="100%"> |
---|
534 | <tr> |
---|
535 | <td> |
---|
536 | <a title="Editar" href="javascript:dispatch('editar', {$elem.nrm_id});"> |
---|
537 | <img border="0" alt="" src="{$wf_resources_path}/icon_edit.png"></a> |
---|
538 | </td> |
---|
539 | <td> |
---|
540 | <a title="Visualizar" href="javascript:dispatch('visualizar', {$elem.nrm_id});"> |
---|
541 | <img border="0" alt="" src="{$wf_resources_path}/view.png"></a> |
---|
542 | </td> |
---|
543 | <tr> |
---|
544 | </table> |
---|
545 | </td> |
---|
546 | </tr> |
---|
547 | {/foreach} |
---|
548 | </table> |
---|
549 | {include file=bottom_table.tpl} |
---|
550 | </td> |
---|
551 | <td width="5%"></td> |
---|
552 | </tr> |
---|
553 | </table> |
---|
554 | ]]></code> </template> |
---|
555 | <template> |
---|
556 | <name>Editar_Norma_Alt.tpl</name> |
---|
557 | <code><![CDATA[{wf_default_template} |
---|
558 | <link rel="stylesheet" type="text/css" href="{$wf_resources_path}/normas.css"> |
---|
559 | {include file=header.tpl} |
---|
560 | |
---|
561 | {wf_ajax_init} |
---|
562 | {wf_select_user_init} |
---|
563 | |
---|
564 | <script type="text/javascript" src="{$wf_resources_path}/ajaxCalls.js"></script> |
---|
565 | <script type="text/javascript" src="{$wf_resources_path}/formatInput.js"></script> |
---|
566 | |
---|
567 | {literal} |
---|
568 | |
---|
569 | <script type="text/javascript"> |
---|
570 | |
---|
571 | function remover(id, is_anexo){ |
---|
572 | |
---|
573 | var remover_div = document.getElementById('remover'+id); |
---|
574 | remover_div.innerHTML = '<span style="color:red">removido</span>'; |
---|
575 | |
---|
576 | var removidos_div = document.getElementById('removidos'); |
---|
577 | var removido = document.createElement("input"); |
---|
578 | removido.setAttribute("id", "removido"+id); |
---|
579 | removido.setAttribute("type", "hidden"); |
---|
580 | removido.setAttribute("value", id); |
---|
581 | |
---|
582 | removidos_div.appendChild(removido); |
---|
583 | |
---|
584 | if(is_anexo == 0){ |
---|
585 | $("uploadArquivo").toggle(); |
---|
586 | } |
---|
587 | } |
---|
588 | |
---|
589 | function salvarAlteracoes(){ |
---|
590 | var ids_removidos = ""; |
---|
591 | |
---|
592 | var container = document.getElementById('removidos'); |
---|
593 | if(container){ |
---|
594 | var removidos = container.childNodes; |
---|
595 | |
---|
596 | for(var i = 0; i < removidos.length; i++){ |
---|
597 | if(i == (removidos.length - 1)) |
---|
598 | ids_removidos += removidos[i].value; |
---|
599 | else |
---|
600 | ids_removidos += removidos[i].value+';'; |
---|
601 | } |
---|
602 | } |
---|
603 | |
---|
604 | dispatch('alterar', ids_removidos); |
---|
605 | } |
---|
606 | |
---|
607 | </script> |
---|
608 | |
---|
609 | {/literal} |
---|
610 | |
---|
611 | <table class="super_table"> |
---|
612 | <tr> |
---|
613 | <td width="10%"></td> |
---|
614 | <td width="80%"> |
---|
615 | <input type="hidden" name=normaId id=normaId value="{$normaId}"> |
---|
616 | <table width="100%" cellpadding="0" cellspacing="5" border="0"> |
---|
617 | <tr> |
---|
618 | <td align="left" width="20%" class=topico>Elaborador: </td> |
---|
619 | <td align="left" width="80%"> |
---|
620 | {wf_select_user name="idElaborador" id_value=$idElaborador desc_value=$nomeElaborador organization="CELEPAR"} |
---|
621 | </td> |
---|
622 | </tr> |
---|
623 | <tr> |
---|
624 | <td align="left" class=topico>Área do Elaborador: </td> |
---|
625 | <td align="left"> |
---|
626 | {html_options name=cbAreaElaborador options=$cbAreas selected=$sctAreaElaborador} |
---|
627 | </td> |
---|
628 | </tr> |
---|
629 | <tr> |
---|
630 | <td align="left" width="20%" class=topico>Gestor: </td> |
---|
631 | <td align="left" width="80%"> |
---|
632 | {wf_select_user name="idGestor" id_value=$idGestor desc_value=$nomeGestor organization="CELEPAR"} |
---|
633 | </td> |
---|
634 | </tr> |
---|
635 | <tr> |
---|
636 | <td align="left" class=topico>Área Gestora: </td> |
---|
637 | <td align="left"> |
---|
638 | {html_options name=cbAreasGestoras options=$cbAreas selected=$sctAreaGestora} |
---|
639 | </td> |
---|
640 | </tr> |
---|
641 | <tr> |
---|
642 | <td align="left" width="20%" class=topico>Diretor: </td> |
---|
643 | <td align="left" width="80%"> |
---|
644 | {wf_select_user name="idDiretor" id_value=$idDiretor desc_value=$nomeDiretor organization="CELEPAR"} |
---|
645 | </td> |
---|
646 | </tr> |
---|
647 | <tr> |
---|
648 | <td align="left" class=topico>Diretoria: </td> |
---|
649 | <td> |
---|
650 | {html_options name=cbDiretorias options=$cbAreas selected=$sctDiretoria} |
---|
651 | </td> |
---|
652 | </tr> |
---|
653 | <tr> |
---|
654 | <td align="left" width="20%" class=topico>Diretor Juridico: </td> |
---|
655 | <td align="left" width="80%"> |
---|
656 | {wf_select_user name="idDiretorJuridico" id_value=$idDiretorJuridico desc_value=$nomeDiretorJuridico organization="CELEPAR"} |
---|
657 | </td> |
---|
658 | </tr> |
---|
659 | <tr> |
---|
660 | <td align="left" class=topico>Tipo de Documento: </td> |
---|
661 | <td> |
---|
662 | {html_options name=cbTiposDocumentos options=$cbTiposDocumentos selected=$sctTipoDocumento} |
---|
663 | </td> |
---|
664 | </tr> |
---|
665 | <tr> |
---|
666 | <td align="left" class=topico>Macroprocesso: </td> |
---|
667 | <td> |
---|
668 | {html_options name=cbMacroprocessos options=$cbMacroprocessos selected=$sctMacroprocesso onChange="getProcessos(cbMacroprocessos.value);"} |
---|
669 | </td> |
---|
670 | </tr> |
---|
671 | <tr> |
---|
672 | <td align="left" class=topico>Processo: </td> |
---|
673 | <td> |
---|
674 | <div id="Processos"> |
---|
675 | {html_options name=cbProcessos options=$cbProcessos selected=$sctProcesso} |
---|
676 | </div> |
---|
677 | </td> |
---|
678 | </tr> |
---|
679 | <tr> |
---|
680 | <td align="left" class=topico>Título: </td> |
---|
681 | <td> |
---|
682 | <input type="text" id=txTituloNorma name=txTituloNorma value="{$TituloNorma}" size="70"> |
---|
683 | </td> |
---|
684 | </tr> |
---|
685 | <tr> |
---|
686 | <td align="left" class=topico>Data do Início da Vigência: </td> |
---|
687 | <td> |
---|
688 | {wf_calendar_init} |
---|
689 | {wf_calendar default=true id=dtDataVigencia name=dtDataVigencia value=$DataVigencia} |
---|
690 | </td> |
---|
691 | </tr> |
---|
692 | <tr> |
---|
693 | <td align="left" valign="top" class=topico>Objetivo: </td> |
---|
694 | <td> |
---|
695 | <textarea id=txObjetivoNorma name=txObjetivoNorma cols="60" rows="5">{$ObjetivoNorma}</textarea> |
---|
696 | </td> |
---|
697 | </tr> |
---|
698 | <tr> |
---|
699 | <td align="left" class=topico>Âmbito de Aplicação:</td> |
---|
700 | <td> |
---|
701 | {html_options name=cbAmbitoAplicacao options=$cbAreas selected=$sctAmbitoAplicacao} |
---|
702 | </td> |
---|
703 | </tr> |
---|
704 | <tr> |
---|
705 | <td valign="top" class=topico>Palavras-Chave:</td> |
---|
706 | <td> |
---|
707 | <input type="text" id=txPalavrasChave name=txPalavrasChave value="{$PalavrasChave}" size="70"> |
---|
708 | </td> |
---|
709 | </tr> |
---|
710 | <tr> |
---|
711 | <td align="left" class=topico>Status:</td> |
---|
712 | <td> |
---|
713 | {html_options name=cbStatus options=$cbStatus selected=$sctStatus} |
---|
714 | </td> |
---|
715 | </tr> |
---|
716 | <tr> |
---|
717 | <td align="left" class=topico>Número da Revisão:</td> |
---|
718 | <td> |
---|
719 | <input type="text" id=txNumRevisao name=txNumRevisao onkeypress="return(formatInput(this, event,'numeric'));" value="{$txNumRevisao}"> |
---|
720 | </td> |
---|
721 | </tr> |
---|
722 | </table> |
---|
723 | <table width="100%" cellpadding="0" cellspacing="5" border="0"> |
---|
724 | {section name=files loop=$Arquivos} |
---|
725 | |
---|
726 | {literal} |
---|
727 | <script type="text/javascript"> |
---|
728 | var noFile = false; |
---|
729 | </script> |
---|
730 | {/literal} |
---|
731 | |
---|
732 | <tr> |
---|
733 | {if $smarty.section.files.first} |
---|
734 | <hr> |
---|
735 | <td class=topico width="20%">Arquivo: </td> |
---|
736 | {else} |
---|
737 | {if $smarty.section.files.index == 1} |
---|
738 | <td class=topico width="20%">Anexos: </td> |
---|
739 | {else} |
---|
740 | <td></td> |
---|
741 | {/if} |
---|
742 | {/if} |
---|
743 | <td> |
---|
744 | <table width="100%" cellpading="0" cellspacing="0"> |
---|
745 | <tr> |
---|
746 | <td align="left" width="80%"> |
---|
747 | <table width="100%" cellpadding="0" cellspacing="0"> |
---|
748 | <tr> |
---|
749 | <td width="75%"> |
---|
750 | {wf_download_link getParams="action=$downloadMethod&id=`$Arquivos[files].id`&norma_id=$normaId" text=$Arquivos[files].nome} |
---|
751 | </td> |
---|
752 | <td width="25%"> |
---|
753 | <div id="remover{$Arquivos[files].id}"> |
---|
754 | <a href="javascript:remover('{$Arquivos[files].id}', '{$Arquivos[files].is_anexo}')">remover</a> |
---|
755 | </div> |
---|
756 | <div id=removidos></div> |
---|
757 | </td> |
---|
758 | </tr> |
---|
759 | </table> |
---|
760 | </td> |
---|
761 | </tr> |
---|
762 | </table> |
---|
763 | </td> |
---|
764 | </tr> |
---|
765 | {sectionelse} |
---|
766 | |
---|
767 | {literal} |
---|
768 | <script type="text/javascript"> |
---|
769 | var noFile = true; |
---|
770 | </script> |
---|
771 | {/literal} |
---|
772 | |
---|
773 | {/section} |
---|
774 | </table> |
---|
775 | <hr> |
---|
776 | <table width="100%" cellpadding="0" cellspacing="5" border="0"> |
---|
777 | <tr id=uploadArquivo style="display:none"> |
---|
778 | <td align="left" width="20%" class=topico>Arquivo: </td> |
---|
779 | <td width="80%"> |
---|
780 | {wf_file_upload_init} |
---|
781 | {wf_file_upload name=arquivo max=1} |
---|
782 | </td> |
---|
783 | </tr> |
---|
784 | |
---|
785 | {literal} |
---|
786 | <script type="text/javascript"> |
---|
787 | if(noFile){ |
---|
788 | $("uploadArquivo").toggle(); |
---|
789 | } |
---|
790 | </script> |
---|
791 | {/literal} |
---|
792 | |
---|
793 | <tr> |
---|
794 | <td align="left" width="20%" class=topico>Anexos: </td> |
---|
795 | <td width="80%"> |
---|
796 | {wf_file_upload name=anexos} |
---|
797 | </td> |
---|
798 | </tr> |
---|
799 | <tr> |
---|
800 | <td width="20%"></td> |
---|
801 | <td width="80%"> |
---|
802 | <input type="button" class="form_botao" value="Salvar alterações" onClick="salvarAlteracoes()"> |
---|
803 | <input type="button" class="form_botao" value="Remover a norma" onClick="dispatch('remover')"> |
---|
804 | <input type="button" class="form_botao" value="Cancelar" onClick="dispatch('')"> |
---|
805 | </td> |
---|
806 | </tr> |
---|
807 | </table> |
---|
808 | </td> |
---|
809 | <td width="10%"></td> |
---|
810 | </tr> |
---|
811 | </table> |
---|
812 | ]]></code> </template> |
---|
813 | <template> |
---|
814 | <name>Elaborar.tpl</name> |
---|
815 | <code><![CDATA[{wf_default_template} |
---|
816 | <link rel="stylesheet" type="text/css" href="{$wf_resources_path}/normas.css"> |
---|
817 | {include file=header.tpl} |
---|
818 | |
---|
819 | {wf_ajax_init} |
---|
820 | |
---|
821 | <script type="text/javascript" src="{$wf_resources_path}/ajaxCalls.js"></script> |
---|
822 | |
---|
823 | <table class="super_table"> |
---|
824 | <tr> |
---|
825 | <td width="10%"></td> |
---|
826 | <td width="80%"> |
---|
827 | <table width="100%" cellpadding="0" cellspacing="5" border="0"> |
---|
828 | <tr> |
---|
829 | <td align="left" width="20%" class=topico>Elaborador: </td> |
---|
830 | <td align="left" width="80%">{$nomeElaborador}</td> |
---|
831 | </tr> |
---|
832 | <tr> |
---|
833 | <td align="left" class=topico>Área do Elaborador: </td> |
---|
834 | <td align="left">{$nomeArea}</td> |
---|
835 | </tr> |
---|
836 | <tr> |
---|
837 | <td align="left" class=topico>Área Gestora: </td> |
---|
838 | <td align="left"> |
---|
839 | {html_options name=cbAreasGestoras options=$cbAreasGestoras selected=$sctAreaGestora} |
---|
840 | </td> |
---|
841 | </tr> |
---|
842 | <tr> |
---|
843 | <td align="left" class=topico>Tipo de Documento: </td> |
---|
844 | <td> |
---|
845 | {html_options name=cbTiposDocumentos options=$cbTiposDocumentos selected=$sctTipoDocumento} |
---|
846 | </td> |
---|
847 | </tr> |
---|
848 | <tr> |
---|
849 | <td align="left" class=topico>Macroprocesso: </td> |
---|
850 | <td> |
---|
851 | {html_options name=cbMacroprocessos options=$cbMacroprocessos selected=$sctMacroprocesso onChange="getProcessos(this.value);"} |
---|
852 | </td> |
---|
853 | </tr> |
---|
854 | <tr> |
---|
855 | <td align="left" class=topico>Processo: </td> |
---|
856 | <td> |
---|
857 | <div id="Processos"> |
---|
858 | <select> |
---|
859 | <option>--- Selecione um macroprocesso ---</option> |
---|
860 | </select> |
---|
861 | </div> |
---|
862 | </td> |
---|
863 | </tr> |
---|
864 | <tr> |
---|
865 | <td align="left" class=topico>Título: </td> |
---|
866 | <td> |
---|
867 | <input type="text" id=txTituloNorma name=txTituloNorma value="{$TituloNorma}" size="70"> |
---|
868 | </td> |
---|
869 | </tr> |
---|
870 | <tr> |
---|
871 | <td align="left" valign="top" class=topico>Objetivo: </td> |
---|
872 | <td> |
---|
873 | <textarea id=txObjetivoNorma name=txObjetivoNorma cols="60" rows="5">{$ObjetivoNorma}</textarea> |
---|
874 | </td> |
---|
875 | </tr> |
---|
876 | <tr> |
---|
877 | <td align="left" class=topico>Âmbito de Aplicação:</td> |
---|
878 | <td> |
---|
879 | {html_options name=cbAmbitoAplicacao options=$cbAmbitoAplicacao selected=$sctAmbitoAplicacao} |
---|
880 | </td> |
---|
881 | </tr> |
---|
882 | <tr> |
---|
883 | <td valign="top" class=topico>Palavras-Chave:</td> |
---|
884 | <td> |
---|
885 | <input type="text" id=txPalavrasChave name=txPalavrasChave value="{$PalavrasChave}" size="70"> |
---|
886 | </td> |
---|
887 | </tr> |
---|
888 | <tr> |
---|
889 | <td> |
---|
890 | </td> |
---|
891 | <td> |
---|
892 | <input type="button" class="form_botao" value="Adicionar Arquivos" onClick="dispatch('adicionarArquivos')"> |
---|
893 | <input type="button" class="form_botao" value="Cancelar" onClick="document.location.href = '{$wf_back_link}'"> |
---|
894 | </td> |
---|
895 | </tr> |
---|
896 | </table> |
---|
897 | </td> |
---|
898 | <td width="10%"></td> |
---|
899 | </tr> |
---|
900 | </table> |
---|
901 | ]]></code> </template> |
---|
902 | <template> |
---|
903 | <name>Macroprocesso.tpl</name> |
---|
904 | <code><![CDATA[{wf_default_template} |
---|
905 | <link rel="stylesheet" type="text/css" href="{$wf_resources_path}/normas.css"> |
---|
906 | {include file=header.tpl} |
---|
907 | |
---|
908 | <table class="super_table"> |
---|
909 | <tr> |
---|
910 | <td width="5%"></td> |
---|
911 | <td width="90%"> |
---|
912 | {* mostra o botão e novo e os links de paginação *} |
---|
913 | <table align="center" width="100%"> |
---|
914 | <tr> |
---|
915 | <td align="left"> |
---|
916 | <input class="form_botao" type="button" value="Novo" onClick="dispatch('Incluir');"></input> |
---|
917 | </td> |
---|
918 | <td align="right">{$linksPaginacao}</td> |
---|
919 | </tr> |
---|
920 | </table> |
---|
921 | |
---|
922 | {* Mostra os registros *} |
---|
923 | <table class="norma_table" width="100%"> |
---|
924 | <tr class="norma_table_header"> |
---|
925 | <td width="10%"><a class="titulo_norma" href="{$titulos_ordenacao[0].link}">{$titulos_ordenacao[0].name}</a></td> |
---|
926 | <td width="80%"><a class="titulo_norma" href="{$titulos_ordenacao[1].link}">{$titulos_ordenacao[1].name}</a></td> |
---|
927 | <td width="10%" class="titulo_norma" align="center">Ação</td> |
---|
928 | </tr> |
---|
929 | {foreach item=elem from=$result} |
---|
930 | <tr bgcolor={cycle values="#FFEBCD,#DEB887"}> |
---|
931 | <td >{$elem.sigla}</td> |
---|
932 | <td >{$elem.descricao}</td> |
---|
933 | <td align="center"> |
---|
934 | <a title="Alterar" href="javascript:dispatch('editar',{$elem.macroprocesso_id});";> |
---|
935 | <img border="0" alt="" src="{$wf_resources_path}/icon_edit.png" /></a> |
---|
936 | </td> |
---|
937 | </tr> |
---|
938 | {/foreach} |
---|
939 | </table> |
---|
940 | {include file=bottom_table.tpl} |
---|
941 | </td> |
---|
942 | <td width="5%"></td> |
---|
943 | </tr> |
---|
944 | </table> |
---|
945 | ]]></code> </template> |
---|
946 | <template> |
---|
947 | <name>Manter_Macroprocesso_Inc_Alt.tpl</name> |
---|
948 | <code><![CDATA[{wf_default_template} |
---|
949 | <link rel="stylesheet" type="text/css" href="{$wf_resources_path}/normas.css"> |
---|
950 | {include file=header.tpl} |
---|
951 | |
---|
952 | <table class="super_Table" width="100%"> |
---|
953 | <tr> |
---|
954 | <td width="5%"></td> |
---|
955 | <td width="90%"> |
---|
956 | |
---|
957 | <table width="650" cellspacing="2" cellpadding="2" border="0" align="center"> |
---|
958 | <tbody> |
---|
959 | <tr> |
---|
960 | <td><input type="hidden" name="id" value="{$macroprocesso.macroprocesso_id}" size="5" /></td> |
---|
961 | <td><input type="hidden" name="modo" value="{$modo}" size="5" /></td> |
---|
962 | </tr> |
---|
963 | <tr> |
---|
964 | <td valign="top">Sigla:</td> |
---|
965 | <td> |
---|
966 | <input type="text" name="sigla" value="{$macroprocesso.sigla}" size="5" /></td> |
---|
967 | </tr> |
---|
968 | <tr> |
---|
969 | <td valign="top">Descrição:</td> |
---|
970 | <td> |
---|
971 | <input type="text" name="descricao" value="{$macroprocesso.descricao}" size="50"/></td> |
---|
972 | <br /></td> |
---|
973 | </tr> |
---|
974 | <tr> |
---|
975 | <td valign="top"> </td> |
---|
976 | <td valign="top"> |
---|
977 | {if $modo eq "inserir"} |
---|
978 | <input class="form_botao" value="Inserir" type="submit" onClick="dispatch('inserir');"/> |
---|
979 | {else} |
---|
980 | <input class="form_botao" value="Alterar" type="submit" onClick="dispatch('alterar');"/> |
---|
981 | {/if} |
---|
982 | <input class="form_botao" value="Cancelar" type="submit" onClick="dispatch('cancelar');"/> |
---|
983 | </td> |
---|
984 | </tr> |
---|
985 | </tbody> |
---|
986 | </table> |
---|
987 | </td> |
---|
988 | </tr> |
---|
989 | </table> |
---|
990 | ]]></code> </template> |
---|
991 | <template> |
---|
992 | <name>Manter_Processo_Inc_Alt.tpl</name> |
---|
993 | <code><![CDATA[{wf_default_template} |
---|
994 | <link rel="stylesheet" type="text/css" href="{$wf_resources_path}/normas.css"> |
---|
995 | {include file=header.tpl} |
---|
996 | |
---|
997 | <table class="super_Table" width="100%"> |
---|
998 | <tr> |
---|
999 | <td width="5%"></td> |
---|
1000 | <td width="90%"> |
---|
1001 | |
---|
1002 | <table width="650" cellspacing="2" cellpadding="2" border="0" align="center"> |
---|
1003 | <tr> |
---|
1004 | <td><input type="hidden" name="id" value="{$processo.processo_id}" size="5" /></td> |
---|
1005 | <td><input type="hidden" name="modo" value="{$modo}" size="5" /></td> |
---|
1006 | </tr> |
---|
1007 | <tr> |
---|
1008 | <td valign="top">Macroprocesso:</td> |
---|
1009 | <td> |
---|
1010 | <select name="cb_macroprocesso"> |
---|
1011 | <option selected></option> |
---|
1012 | {foreach item=elem from=$macroprocesso} |
---|
1013 | {if $selected == $elem.macroprocesso_id} |
---|
1014 | <option value="{$elem.macroprocesso_id}" selected="selected">{$elem.sigla} - {$elem.descricao}</option> |
---|
1015 | {else} |
---|
1016 | <option value="{$elem.macroprocesso_id}">{$elem.sigla} - {$elem.descricao}</option> |
---|
1017 | {/if} |
---|
1018 | {/foreach} |
---|
1019 | </select> |
---|
1020 | </td> |
---|
1021 | </tr> |
---|
1022 | <tr> |
---|
1023 | <td valign="top">Processo:</td> |
---|
1024 | <td> |
---|
1025 | {if $modo eq inserir} |
---|
1026 | <input type="text" name="descricao" value="" size="50"/> |
---|
1027 | {else} |
---|
1028 | <input type="text" name="descricao" value="{$proc_descricao}" size="50"/> |
---|
1029 | {/if} |
---|
1030 | </td> |
---|
1031 | </tr> |
---|
1032 | <tr> |
---|
1033 | <td valign="top"> </td> |
---|
1034 | <td valign="top"> |
---|
1035 | {if $modo eq "inserir"} |
---|
1036 | <input type="submit" class="form_botao" name="inserir" value="Inserir" onClick="dispatch('inserir');"/> |
---|
1037 | {else} |
---|
1038 | <input type="submit" class="form_botao" name="alterar" value="Alterar" onClick="dispatch('alterar','{$proc_id}');"> |
---|
1039 | {/if} |
---|
1040 | <input type="submit" class="form_botao" name="Cancelar" value="Cancelar" /> |
---|
1041 | </td> |
---|
1042 | </tr> |
---|
1043 | </table> |
---|
1044 | </td> |
---|
1045 | </tr> |
---|
1046 | </table> |
---|
1047 | ]]></code> </template> |
---|
1048 | <template> |
---|
1049 | <name>Manter_Tipo_Documento_Inc_Alt.tpl</name> |
---|
1050 | <code><![CDATA[{wf_default_template} |
---|
1051 | <link rel="stylesheet" type="text/css" href="{$wf_resources_path}/normas.css"> |
---|
1052 | {include file=header.tpl} |
---|
1053 | |
---|
1054 | <table class="super_Table" width="100%"> |
---|
1055 | <tr> |
---|
1056 | <td width="5%"></td> |
---|
1057 | <td width="90%"> |
---|
1058 | |
---|
1059 | <table width="650" cellspacing="2" cellpadding="2" border="0" align="center"> |
---|
1060 | <tr> |
---|
1061 | <td><input type="hidden" name="id" value="{$tipo_documento.tipo_documento_id}" size="5" /></td> |
---|
1062 | <td><input type="hidden" name="modo" value="{$modo}" size="5" /></td> |
---|
1063 | </tr> |
---|
1064 | <tr> |
---|
1065 | <td valign="top">Sigla:</td> |
---|
1066 | <td> |
---|
1067 | <input type="text" name="sigla" value="{$tipo_documento.sigla}" size="5" /> |
---|
1068 | </td> |
---|
1069 | </tr> |
---|
1070 | <tr> |
---|
1071 | <td valign="top">Descrição:</td> |
---|
1072 | <td> |
---|
1073 | <input type="text" name="descricao" value="{$tipo_documento.descricao}" size="50"/> |
---|
1074 | <br/> |
---|
1075 | </td> |
---|
1076 | </tr> |
---|
1077 | <tr> |
---|
1078 | <td valign="top"> </td> |
---|
1079 | <td valign="top"> |
---|
1080 | {if $modo eq "inserir"} |
---|
1081 | <input class="form_botao" type="submit" name="inserir" value="Inserir" onClick="dispatch('inserir');"/> |
---|
1082 | {else} |
---|
1083 | <input class="form_botao" type="submit" name="alterar" value="Alterar" onClick="dispatch('alterar');"/> |
---|
1084 | {/if} |
---|
1085 | <input class="form_botao" type="submit" name="cancelar" value="Cancelar" onClink="dispatch('cancelar');"> |
---|
1086 | </td> |
---|
1087 | </tr> |
---|
1088 | </table> |
---|
1089 | </td> |
---|
1090 | </tr> |
---|
1091 | </table> |
---|
1092 | ]]></code> </template> |
---|
1093 | <template> |
---|
1094 | <name>Processo.tpl</name> |
---|
1095 | <code><![CDATA[{wf_default_template} |
---|
1096 | <link rel="stylesheet" type="text/css" href="{$wf_resources_path}/normas.css"> |
---|
1097 | {include file=header.tpl} |
---|
1098 | |
---|
1099 | <table class="super_table"> |
---|
1100 | <tr> |
---|
1101 | <td width="5%"></td> |
---|
1102 | <td width="90%"> |
---|
1103 | {* mostra o botão e novo e os links de paginação *} |
---|
1104 | <table align="center" width="100%"> |
---|
1105 | <tr> |
---|
1106 | <td align="left"> |
---|
1107 | <input class="form_botao" type="button" value="Novo" onClick="dispatch('Incluir');"></input> |
---|
1108 | </td> |
---|
1109 | <td align="right">{$linksPaginacao}</td> |
---|
1110 | </tr> |
---|
1111 | </table> |
---|
1112 | |
---|
1113 | {* Mostra os registros *} |
---|
1114 | <table class="norma_table" width="100%"> |
---|
1115 | <tr class="norma_table_header"> |
---|
1116 | <td width="10%"><a class="titulo_norma" href="{$titulos_ordenacao[0].link}">{$titulos_ordenacao[0].name}</a></td> |
---|
1117 | <td width="40%"><a class="titulo_norma" href="{$titulos_ordenacao[1].link}">{$titulos_ordenacao[1].name}</a></td> |
---|
1118 | <td width="40%"><a class="titulo_norma" href="{$titulos_ordenacao[2].link}">{$titulos_ordenacao[2].name}</a></td> |
---|
1119 | <td width="10%" class="titulo_norma" align="center">Ação</td> |
---|
1120 | </tr> |
---|
1121 | {foreach item=elem from=$result} |
---|
1122 | <tr bgcolor={cycle values="#FFEBCD,#DEB887"}> |
---|
1123 | <td>{$elem.mpr_sigla}</td> |
---|
1124 | <td>{$elem.mpr_descricao}</td> |
---|
1125 | <td>{$elem.pro_descricao}</td> |
---|
1126 | <td align="center"> |
---|
1127 | <a title="Alterar" href="javascript:dispatch('editar', '{$elem.mpr_id};{$elem.pro_descricao};{$elem.pro_id}');"> |
---|
1128 | <img border="0" alt="" src="{$wf_resources_path}/icon_edit.png" /></a> |
---|
1129 | </td> |
---|
1130 | </tr> |
---|
1131 | {/foreach} |
---|
1132 | </table> |
---|
1133 | {include file=bottom_table.tpl} |
---|
1134 | </td> |
---|
1135 | <td width="5%"></td> |
---|
1136 | </tr> |
---|
1137 | </table> |
---|
1138 | ]]></code> </template> |
---|
1139 | <template> |
---|
1140 | <name>Tipo_de_Documento.tpl</name> |
---|
1141 | <code><![CDATA[{wf_default_template} |
---|
1142 | <link rel="stylesheet" type="text/css" href="{$wf_resources_path}/normas.css"> |
---|
1143 | {include file=header.tpl} |
---|
1144 | |
---|
1145 | <table class="super_table"> |
---|
1146 | <tr> |
---|
1147 | <td width="5%"></td> |
---|
1148 | <td width="90%"> |
---|
1149 | {* mostra o botão e novo e os links de paginação *} |
---|
1150 | <table align="center" width="100%"> |
---|
1151 | <tr> |
---|
1152 | <td align="left"> |
---|
1153 | <input class="form_botao" type="button" value="Novo" onClick="dispatch('Incluir');"></input> |
---|
1154 | </td> |
---|
1155 | <td align="right">{$linksPaginacao}</td> |
---|
1156 | </tr> |
---|
1157 | </table> |
---|
1158 | |
---|
1159 | {* Mostra os registros *} |
---|
1160 | <table class="norma_table" width="100%"> |
---|
1161 | <tr class="norma_table_header"> |
---|
1162 | <td width="10%"><a class="titulo_norma" href="{$titulos_ordenacao[0].link}">{$titulos_ordenacao[0].name}</a></td> |
---|
1163 | <td width="80%"><a class="titulo_norma" href="{$titulos_ordenacao[1].link}">{$titulos_ordenacao[1].name}</a></td> |
---|
1164 | <td width="10%" class="titulo_norma" align="center">Ação</td> |
---|
1165 | </tr> |
---|
1166 | {foreach item=elem from=$result} |
---|
1167 | <tr bgcolor={cycle values="#FFEBCD,#DEB887"}> |
---|
1168 | <td >{$elem.sigla}</td> |
---|
1169 | <td >{$elem.descricao}</td> |
---|
1170 | <td align="center"> |
---|
1171 | <a title="Alterar" href="javascript:dispatch('editar',{$elem.tipo_documento_id});"> |
---|
1172 | <img border="0" alt="" src="{$wf_resources_path}/icon_edit.png" /></a> |
---|
1173 | </td> |
---|
1174 | </tr> |
---|
1175 | {/foreach} |
---|
1176 | </table> |
---|
1177 | {include file=bottom_table.tpl} |
---|
1178 | </td> |
---|
1179 | <td width="5%"></td> |
---|
1180 | </tr> |
---|
1181 | </table> |
---|
1182 | ]]></code> </template> |
---|
1183 | <template> |
---|
1184 | <name>Visualizar.tpl</name> |
---|
1185 | <code><![CDATA[<script type="text/javascript" src="{$wf_resources_path}/toggleDetails.js"></script> |
---|
1186 | |
---|
1187 | <table class=super_table> |
---|
1188 | <tr> |
---|
1189 | <td width="10%"></td> |
---|
1190 | <td width="80%"> |
---|
1191 | <table width="100%" cellpadding="0" cellspacing="5"> |
---|
1192 | <tr> |
---|
1193 | <td> |
---|
1194 | <div id=detalhes_button> |
---|
1195 | <input type="button" class="form_botao" value="Expandir Detalhes" onClick="expandirDetalhes()"/> |
---|
1196 | </div> |
---|
1197 | </td> |
---|
1198 | <td></td> |
---|
1199 | </tr> |
---|
1200 | </table> |
---|
1201 | <table id=detalhes width="100%" cellpadding="0" cellspacing="0" style="border:1px solid black; display:none;"> |
---|
1202 | <tr> |
---|
1203 | <td> |
---|
1204 | <table width="100%" cellpadding="0" cellspacing="5"> |
---|
1205 | <tr> |
---|
1206 | <td width="20%" class=topico>Elaborador: </td> |
---|
1207 | <td align="left" width="80%">{$nomeElaborador}</td> |
---|
1208 | </tr> |
---|
1209 | <tr> |
---|
1210 | <td class=topico>Área do Elaborador: </td> |
---|
1211 | <td align="left">{$nomeArea}</td> |
---|
1212 | </tr> |
---|
1213 | <tr> |
---|
1214 | <td class=topico width="20%">Área Gestora: </td> |
---|
1215 | <td align="left" width="80%">{$nomeAreaGestora}</td> |
---|
1216 | </tr> |
---|
1217 | <tr> |
---|
1218 | <td class=topico>Titular da Área Gestora: </td> |
---|
1219 | <td align="left">{$nomeGestor}</td> |
---|
1220 | </tr> |
---|
1221 | <tr> |
---|
1222 | <td class=topico>Diretor Jurídico: </td> |
---|
1223 | <td align="left">{$nomeDiretorJuridico}</td> |
---|
1224 | </tr> |
---|
1225 | <tr> |
---|
1226 | <td class=topico>Diretoria: </td> |
---|
1227 | <td align="left">{$nomeDiretoria}</td> |
---|
1228 | </tr> |
---|
1229 | <tr> |
---|
1230 | <td class=topico>Diretor: </td> |
---|
1231 | <td align="left">{$nomeDiretor}</td> |
---|
1232 | </tr> |
---|
1233 | </table> |
---|
1234 | </td> |
---|
1235 | </tr> |
---|
1236 | </table> |
---|
1237 | <table width="100%" cellpadding="0" cellspacing="5"> |
---|
1238 | <tr> |
---|
1239 | <td class=topico width="20%">Tipo de Documento: </td> |
---|
1240 | <td align="left" width="80%">{$nomeTipoDocumento}</td> |
---|
1241 | </tr> |
---|
1242 | <tr> |
---|
1243 | <td class=topico>Macroprocesso: </td> |
---|
1244 | <td align="left">{$nomeMacroprocesso}</td> |
---|
1245 | </tr> |
---|
1246 | <tr> |
---|
1247 | <td class=topico>Processo: </td> |
---|
1248 | <td align="left">{$nomeProcesso}</td> |
---|
1249 | </tr> |
---|
1250 | <tr> |
---|
1251 | <td class=topico>Título: </td> |
---|
1252 | <td align="left">{$TituloNorma}</td> |
---|
1253 | </tr> |
---|
1254 | <tr> |
---|
1255 | <td class=topico>Código: </td> |
---|
1256 | <td align="left">{$CodigoNorma}</td> |
---|
1257 | </tr> |
---|
1258 | <tr> |
---|
1259 | <td class=topico>Data do Início da Vigência: </td> |
---|
1260 | <td align="left">{$DataVigencia}</td> |
---|
1261 | </tr> |
---|
1262 | <tr> |
---|
1263 | <td class=topico>Objetivo: </td> |
---|
1264 | <td align="left">{$ObjetivoNorma}</td> |
---|
1265 | </tr> |
---|
1266 | <tr> |
---|
1267 | <td class=topico>Âmbito de Aplicação:</td> |
---|
1268 | <td align="left">{$nomeAmbitoAplicacao}</td> |
---|
1269 | </tr> |
---|
1270 | <tr> |
---|
1271 | <td class=topico>Palavras-Chave:</td> |
---|
1272 | <td align="left">{$PalavrasChave}</td> |
---|
1273 | </tr> |
---|
1274 | <tr> |
---|
1275 | <td class=topico>Status: </td> |
---|
1276 | <td align="left">{$nomeStatus}</td> |
---|
1277 | </tr> |
---|
1278 | </table> |
---|
1279 | |
---|
1280 | <table width="100%" cellpadding="0" cellspacing="5"> |
---|
1281 | {section name=files loop=$Arquivos} |
---|
1282 | <tr> |
---|
1283 | {if $smarty.section.files.first} |
---|
1284 | <hr> |
---|
1285 | <td class=topico width="20%">Arquivo: </td> |
---|
1286 | {else} |
---|
1287 | {if $smarty.section.files.index == 1} |
---|
1288 | <td class=topico width="20%">Anexos: </td> |
---|
1289 | {else} |
---|
1290 | <td></td> |
---|
1291 | {/if} |
---|
1292 | {/if} |
---|
1293 | <td> |
---|
1294 | <table width="100%" cellpading="0" cellspacing="0"> |
---|
1295 | <tr> |
---|
1296 | <td align="left" width="80%"> |
---|
1297 | {wf_download_link getParams="action=$downloadMethod&id=`$Arquivos[files].id`&norma_id=$NormaId" text=$Arquivos[files].nome} |
---|
1298 | </td> |
---|
1299 | </tr> |
---|
1300 | </table> |
---|
1301 | </td> |
---|
1302 | </tr> |
---|
1303 | {/section} |
---|
1304 | </table> |
---|
1305 | </td> |
---|
1306 | <td width="10%"></td> |
---|
1307 | <tr> |
---|
1308 | </table> |
---|
1309 | ]]></code> </template> |
---|
1310 | <template> |
---|
1311 | <name>Visualizar_norma.tpl</name> |
---|
1312 | <code><![CDATA[{wf_default_template} |
---|
1313 | <link rel="stylesheet" type="text/css" href="{$wf_resources_path}/normas.css"> |
---|
1314 | {include file=header.tpl} |
---|
1315 | |
---|
1316 | {include file=Visualizar.tpl} |
---|
1317 | |
---|
1318 | <table class=super_table> |
---|
1319 | <tr> |
---|
1320 | <td align="center"> |
---|
1321 | <input type="button" class="form_botao" value="Voltar" onClick="dispatch('')"> |
---|
1322 | </td> |
---|
1323 | </tr> |
---|
1324 | </table> |
---|
1325 | ]]></code> </template> |
---|
1326 | <template> |
---|
1327 | <name>bottom_table.tpl</name> |
---|
1328 | <code><![CDATA[{* Mostra o total quantidade de registros retornados *} |
---|
1329 | <table align="center" width="100%"> |
---|
1330 | <tr> |
---|
1331 | <td align="middle"> |
---|
1332 | {if $count_items > 0} |
---|
1333 | Encontrados {$count_items} registros. |
---|
1334 | {else} |
---|
1335 | Nenhum registro encontrado. |
---|
1336 | {/if} |
---|
1337 | </td> |
---|
1338 | </tr> |
---|
1339 | </table> |
---|
1340 | ]]></code> </template> |
---|
1341 | <template> |
---|
1342 | <name>header.tpl</name> |
---|
1343 | <code><![CDATA[{* Cabeçalho de Erro *} |
---|
1344 | <br> |
---|
1345 | <table class="msg" cellspacing="0" cellpading="0" width="100%"> |
---|
1346 | {foreach item=elem from=$msgs} |
---|
1347 | <tr> |
---|
1348 | {if $msgclass eq "msg_erro"} |
---|
1349 | <td width="16" height="16"><img src="{$wf_resources_path}/icon_msg_erro.png"></td> |
---|
1350 | {else} |
---|
1351 | <td width="16" height="16"><img src="{$wf_resources_path}/icon_msg_sucesso.png"></td> |
---|
1352 | {/if} |
---|
1353 | <td width="100%" class="{$msgclass}" align="left"> {$elem}</td> |
---|
1354 | </tr> |
---|
1355 | {/foreach} |
---|
1356 | <div id="lista_erros"> |
---|
1357 | </div> |
---|
1358 | </table> |
---|
1359 | ]]></code> </template> |
---|
1360 | </templates> |
---|
1361 | <includes> |
---|
1362 | <include> |
---|
1363 | <name>class.ajax.elaboracao.inc.php</name> |
---|
1364 | <code><![CDATA[<?php |
---|
1365 | |
---|
1366 | wf_include('shared.php'); |
---|
1367 | |
---|
1368 | /** |
---|
1369 | * Classe de interface com o AJAX |
---|
1370 | * |
---|
1371 | * @author Guilherme Striquer Bisotto |
---|
1372 | * @version 1.0 |
---|
1373 | */ |
---|
1374 | |
---|
1375 | class elaboracao extends ElaboracaoModel { |
---|
1376 | |
---|
1377 | /** |
---|
1378 | * construtora da classe |
---|
1379 | */ |
---|
1380 | function elaboracao(){ |
---|
1381 | parent::ElaboracaoModel(wf_get_env()); |
---|
1382 | } |
---|
1383 | |
---|
1384 | /** |
---|
1385 | * retorna os processos de acordo com o macroprocesso selecionado |
---|
1386 | */ |
---|
1387 | function getProcessos($selected_mpr){ |
---|
1388 | $this->DAO->connect(); |
---|
1389 | |
---|
1390 | $query = |
---|
1391 | "SELECT " . |
---|
1392 | "* " . |
---|
1393 | "FROM " . |
---|
1394 | "normas.processo " . |
---|
1395 | "WHERE " . |
---|
1396 | "macroprocesso_id = $selected_mpr " . |
---|
1397 | "ORDER BY " . |
---|
1398 | "descricao"; |
---|
1399 | |
---|
1400 | $result = $this->DAO->query($query); |
---|
1401 | |
---|
1402 | while($row = $result->fetchRow()) |
---|
1403 | $rows[] = $row; |
---|
1404 | |
---|
1405 | $processos[] = array('id' => 0, 'nome' => "--- Selecione um processo ---"); |
---|
1406 | |
---|
1407 | |
---|
1408 | if(count($rows)) |
---|
1409 | foreach($rows as $elem){ |
---|
1410 | $processos[] = array('id' => $elem['processo_id'], 'nome' => $elem['descricao']); |
---|
1411 | } |
---|
1412 | |
---|
1413 | $this->DAO->disconnect(); |
---|
1414 | |
---|
1415 | return $processos; |
---|
1416 | } |
---|
1417 | |
---|
1418 | } |
---|
1419 | ?> |
---|
1420 | ]]></code> </include> |
---|
1421 | <include> |
---|
1422 | <name>class.consulta.controller.php</name> |
---|
1423 | <code><![CDATA[<?php |
---|
1424 | /** |
---|
1425 | * Classe Consulta da Controller |
---|
1426 | * |
---|
1427 | * @author Guilherme Striquer Bisotto |
---|
1428 | * @version 1.0 |
---|
1429 | */ |
---|
1430 | class ConsultaController extends Controller{ |
---|
1431 | |
---|
1432 | |
---|
1433 | /** |
---|
1434 | * Armazena o nome da template de visualização |
---|
1435 | */ |
---|
1436 | var $VISUALIZAR = 'Visualizar_norma.tpl'; |
---|
1437 | |
---|
1438 | /** |
---|
1439 | * Executa a chamada do método pesquisarAction da Model |
---|
1440 | * e carrega as variáveis da camada view |
---|
1441 | * |
---|
1442 | * @return void |
---|
1443 | * @access public |
---|
1444 | */ |
---|
1445 | function pesquisar(){ |
---|
1446 | $this->model->pesquisarAction(); |
---|
1447 | $this->loadViewVars(); |
---|
1448 | } |
---|
1449 | |
---|
1450 | /** |
---|
1451 | * Executa a chamada do método visualizarAction da Model, |
---|
1452 | * mostra o template de visualização e carrega as variáveis da camada view |
---|
1453 | * |
---|
1454 | * @access public |
---|
1455 | * @return void |
---|
1456 | */ |
---|
1457 | function visualizar(){ |
---|
1458 | $this->model->visualizarAction(); |
---|
1459 | $this->showForm($this->VISUALIZAR); |
---|
1460 | $this->loadViewVars(); |
---|
1461 | } |
---|
1462 | |
---|
1463 | /** |
---|
1464 | * Executa a chamada do método switchVisualizacaoAction |
---|
1465 | * @access public |
---|
1466 | * @return void |
---|
1467 | * @param string $tipo_normas ativas ou inativas |
---|
1468 | */ |
---|
1469 | function switchVisualizacao(){ |
---|
1470 | $this->model->switchVisualizacaoAction(); |
---|
1471 | $this->loadViewVars(); |
---|
1472 | } |
---|
1473 | |
---|
1474 | /** |
---|
1475 | * Ação padrão da atividade. |
---|
1476 | * |
---|
1477 | * @return boolean |
---|
1478 | * @access private |
---|
1479 | */ |
---|
1480 | function __default(){ |
---|
1481 | $this->model->defaultAction(); |
---|
1482 | $this->loadViewVars(); |
---|
1483 | } |
---|
1484 | |
---|
1485 | /** |
---|
1486 | * Execução da aplicação. |
---|
1487 | * |
---|
1488 | * @return void |
---|
1489 | * @access public |
---|
1490 | */ |
---|
1491 | function run ($action){ |
---|
1492 | $this->model->DAO->connect(); |
---|
1493 | $this->dispatch($action); |
---|
1494 | $this->model->DAO->disconnect(); |
---|
1495 | } |
---|
1496 | } |
---|
1497 | ?> |
---|
1498 | ]]></code> </include> |
---|
1499 | <include> |
---|
1500 | <name>class.consulta.model.php</name> |
---|
1501 | <code><![CDATA[<?php |
---|
1502 | /** |
---|
1503 | * Classe de Consulta da Model |
---|
1504 | * |
---|
1505 | * @author Guilherme Striquer Bisotto |
---|
1506 | * @version 1.0 |
---|
1507 | */ |
---|
1508 | class ConsultaModel extends Model { |
---|
1509 | |
---|
1510 | |
---|
1511 | /** |
---|
1512 | * contructor |
---|
1513 | * |
---|
1514 | * @access public |
---|
1515 | * @return void |
---|
1516 | */ |
---|
1517 | function ConsultaModel($env){ |
---|
1518 | parent::Model($env); |
---|
1519 | |
---|
1520 | $this->pLdap = $this->factory->getInstance('wf_ldap'); |
---|
1521 | $this->pOrgchart = $this->factory->getInstance('wf_orgchart'); |
---|
1522 | } |
---|
1523 | |
---|
1524 | /** |
---|
1525 | * Filtra a consulta das normas por tipo de documento, macroprocesso, processo e título |
---|
1526 | * |
---|
1527 | * @access public |
---|
1528 | * @return void |
---|
1529 | */ |
---|
1530 | function pesquisarAction(){ |
---|
1531 | |
---|
1532 | $this->_montaTela(); |
---|
1533 | |
---|
1534 | $where['mpr_id'] = $this->request['cbMacroprocessos']; |
---|
1535 | $where['pro_id'] = $this->request['cbProcessos']; |
---|
1536 | $where['tpd_id'] = $this->request['cbTiposDocumento']; |
---|
1537 | $where['titulo'] = $this->request['titulo_busca']; |
---|
1538 | $where['status'] = $this->request['mostra_normas']; |
---|
1539 | |
---|
1540 | $_GET['status'] = $this->request['mostra_normas']; |
---|
1541 | |
---|
1542 | $this->addViewVar('mostra_normas', $where['status']); |
---|
1543 | |
---|
1544 | $this->_showConsulta($where); |
---|
1545 | |
---|
1546 | } |
---|
1547 | |
---|
1548 | |
---|
1549 | /** |
---|
1550 | * carrega os atributos da classe a partir de dados do banco para mostrar |
---|
1551 | * a visualização de uma norma |
---|
1552 | * |
---|
1553 | * @access public |
---|
1554 | * @return void |
---|
1555 | */ |
---|
1556 | function visualizarAction(){ |
---|
1557 | |
---|
1558 | $this->_visualizarNorma(); |
---|
1559 | |
---|
1560 | } |
---|
1561 | |
---|
1562 | /** |
---|
1563 | * Muda a visualização das normas de ativas para inativas e vice-versa |
---|
1564 | * @access public |
---|
1565 | * @return void |
---|
1566 | */ |
---|
1567 | function switchVisualizacaoAction(){ |
---|
1568 | |
---|
1569 | $tipo_normas = $this->request['params']; |
---|
1570 | $this->_montaTela(); |
---|
1571 | $this->addViewVar('mostra_normas', $tipo_normas); |
---|
1572 | $_GET['status'] = $tipo_normas; |
---|
1573 | $this->_showConsulta(array('status' => $tipo_normas)); |
---|
1574 | } |
---|
1575 | |
---|
1576 | /** |
---|
1577 | * lista as normas existentes utilizando a classe de paginação |
---|
1578 | * |
---|
1579 | * @access public |
---|
1580 | * @return void |
---|
1581 | */ |
---|
1582 | function defaultAction(){ |
---|
1583 | |
---|
1584 | $this->_montaTela(); |
---|
1585 | |
---|
1586 | if (!$_GET['status']){ |
---|
1587 | $where['status'] = "ativas"; |
---|
1588 | } else { |
---|
1589 | $where['status'] = $_GET['status']; |
---|
1590 | } |
---|
1591 | |
---|
1592 | $this->addViewVar('mostra_normas', $where['status']); |
---|
1593 | $_GET['status'] = $where['status']; |
---|
1594 | |
---|
1595 | $this->_showConsulta($where); |
---|
1596 | |
---|
1597 | } |
---|
1598 | |
---|
1599 | /** |
---|
1600 | * Monta os campos de pesquisa da tela |
---|
1601 | * @access private |
---|
1602 | * @return void |
---|
1603 | */ |
---|
1604 | function _montaTela(){ |
---|
1605 | $this->addViewVar("activity_title", "Sistema Normativo - Consultar"); |
---|
1606 | |
---|
1607 | $query = |
---|
1608 | "SELECT " . |
---|
1609 | "* " . |
---|
1610 | "FROM " . |
---|
1611 | "normas.macroprocesso " . |
---|
1612 | "ORDER BY " . |
---|
1613 | "sigla"; |
---|
1614 | |
---|
1615 | $result = $this->DAO->query($query); |
---|
1616 | |
---|
1617 | while($row = $result->fetchRow()) |
---|
1618 | $rows[] = $row; |
---|
1619 | |
---|
1620 | $macroprocessos[] = "--- Selecione um macroprocesso ---"; |
---|
1621 | foreach($rows as $row) |
---|
1622 | $macroprocessos[$row['macroprocesso_id']] = $row['sigla']. |
---|
1623 | " - ". |
---|
1624 | $row['descricao']; |
---|
1625 | |
---|
1626 | unset($rows); |
---|
1627 | |
---|
1628 | $this->addViewVar('cbMacroprocessos', $macroprocessos); |
---|
1629 | |
---|
1630 | $query = |
---|
1631 | "SELECT " . |
---|
1632 | "* " . |
---|
1633 | "FROM " . |
---|
1634 | "normas.tipo_documento " . |
---|
1635 | "ORDER BY " . |
---|
1636 | "sigla"; |
---|
1637 | |
---|
1638 | $result = $this->DAO->query($query); |
---|
1639 | |
---|
1640 | while($row = $result->fetchRow()) |
---|
1641 | $rows[] = $row; |
---|
1642 | |
---|
1643 | $tipos_documento[] = "--- Selecione um tipo de documento ---"; |
---|
1644 | foreach($rows as $row) |
---|
1645 | $tipos_documento[$row['tipo_documento_id']] = $row['sigla']. |
---|
1646 | " - ". |
---|
1647 | $row['descricao']; |
---|
1648 | |
---|
1649 | unset($rows); |
---|
1650 | |
---|
1651 | $this->addViewVar('cbTiposDocumento', $tipos_documento); |
---|
1652 | } |
---|
1653 | |
---|
1654 | /** |
---|
1655 | * método auxiliar para a consulta |
---|
1656 | * |
---|
1657 | * @param array $where Array com o id do macroprocesso, o id do processo, id do tipo do documento e uma substring do título |
---|
1658 | * @access private |
---|
1659 | * @return void |
---|
1660 | */ |
---|
1661 | function _showConsulta($where = ""){ |
---|
1662 | |
---|
1663 | if ($_GET['s_co'] == 0){ |
---|
1664 | $_GET['s_co'] = 4; |
---|
1665 | $_GET['s_so'] = 1; |
---|
1666 | } |
---|
1667 | |
---|
1668 | $query_where = "WHERE "; |
---|
1669 | |
---|
1670 | if($where['status'] == "ativas") $query_where .= "nrm.status = 1"; |
---|
1671 | else $query_where .= "nrm.status <> 1"; |
---|
1672 | |
---|
1673 | if (count($where) > 1){ |
---|
1674 | $_GET['mpr_id'] = $where['mpr_id']; |
---|
1675 | $_GET['pro_id'] = $where['pro_id']; |
---|
1676 | $_GET['tpd_id'] = $where['tpd_id']; |
---|
1677 | $_GET['titulo'] = $where['titulo']; |
---|
1678 | } else { |
---|
1679 | $where['mpr_id'] = $_GET['mpr_id']; |
---|
1680 | $where['pro_id'] = $_GET['pro_id']; |
---|
1681 | $where['tpd_id'] = $_GET['tpd_id']; |
---|
1682 | $where['titulo'] = $_GET['titulo']; |
---|
1683 | } |
---|
1684 | |
---|
1685 | if($where['mpr_id']) $query_where .= " AND mpr.macroprocesso_id = ".$where['mpr_id']; |
---|
1686 | if($where['pro_id']) $query_where .= " AND pro.processo_id = ".$where['pro_id']; |
---|
1687 | if($where['tpd_id']) $query_where .= " AND tpd.tipo_documento_id = ".$where['tpd_id']; |
---|
1688 | if($where['titulo']) $query_where .= " AND LOWER(nrm.titulo) LIKE '%".$this->DAO->quote(strtolower($where['titulo']))."%'"; |
---|
1689 | |
---|
1690 | |
---|
1691 | $query = |
---|
1692 | "SELECT ". |
---|
1693 | "mpr.sigla AS mpr_sigla, " . |
---|
1694 | "pro.descricao AS pro_descricao, " . |
---|
1695 | "tpd.sigla AS tpd_sigla, " . |
---|
1696 | "(CASE WHEN nrm.status = 0 ". |
---|
1697 | "THEN 'EM_ELAB' " . |
---|
1698 | "ELSE (tpd.sigla || '-' || mpr.sigla || '-' || ltrim(to_char(nrm.sequencia,'000')) || '-' || ltrim(to_char(nrm.num_revisao,'00'))) ". |
---|
1699 | "END) AS nrm_codigo, ". |
---|
1700 | "(CASE ". |
---|
1701 | "WHEN nrm.status = 0 THEN 'EE' ". |
---|
1702 | "WHEN nrm.status = 1 THEN 'VG' ". |
---|
1703 | "WHEN nrm.status = 2 THEN 'OB' ". |
---|
1704 | "WHEN nrm.status = 3 THEN 'SP' ". |
---|
1705 | "WHEN nrm.status = 4 THEN 'RV' ". |
---|
1706 | "WHEN nrm.status = 5 THEN 'ER' ". |
---|
1707 | "ELSE 'XX' ". |
---|
1708 | "END) AS nrm_situacao_ref, ". |
---|
1709 | "nrm.titulo AS nrm_titulo, " . |
---|
1710 | "nrm.norma_id AS nrm_id, " . |
---|
1711 | "nrm.macroprocesso_id AS nrm_mpr_id, " . |
---|
1712 | "nrm.processo_id AS nrm_pro_id, " . |
---|
1713 | "tpd.tipo_documento_id AS tpd_id, " . |
---|
1714 | "nrm.tipo_documento_id AS nrm_tpd_id, " . |
---|
1715 | "mpr.macroprocesso_id AS mpr_id, " . |
---|
1716 | "pro.processo_id AS pro_id " . |
---|
1717 | "FROM ". |
---|
1718 | "normas.norma nrm ". |
---|
1719 | "INNER JOIN ". |
---|
1720 | "normas.tipo_documento tpd ". |
---|
1721 | "ON ". |
---|
1722 | "(nrm.tipo_documento_id = tpd.tipo_documento_id) ". |
---|
1723 | "INNER JOIN ". |
---|
1724 | "normas.macroprocesso mpr ". |
---|
1725 | "ON ". |
---|
1726 | "(nrm.macroprocesso_id = mpr.macroprocesso_id) ". |
---|
1727 | "INNER JOIN ". |
---|
1728 | "normas.processo pro ". |
---|
1729 | "ON ". |
---|
1730 | "(nrm.processo_id = pro.processo_id) " . |
---|
1731 | $query_where; |
---|
1732 | |
---|
1733 | |
---|
1734 | $titulos_ordenacao = array(); |
---|
1735 | $titulos_ordenacao[] = array('name' => "Mpr.", 'id' => "1"); |
---|
1736 | $titulos_ordenacao[] = array('name' => "Processo", 'id' => "2"); |
---|
1737 | $titulos_ordenacao[] = array('name' => "Tpd.", 'id' => "3"); |
---|
1738 | $titulos_ordenacao[] = array('name' => "Código", 'id' => "4"); |
---|
1739 | $titulos_ordenacao[] = array('name' => "Sit.", 'id' => "5"); |
---|
1740 | $titulos_ordenacao[] = array('name' => "Título", 'id' => "6"); |
---|
1741 | |
---|
1742 | $paging = $this->factory->getInstance("wf_paging"); |
---|
1743 | $paging->configure(PAGING_NUMBER_OF_ITEMS, $_GET); |
---|
1744 | $paging->useDatabase(true); |
---|
1745 | $paging->enableSorting(true); |
---|
1746 | $paging->setSortingTitles($titulos_ordenacao); |
---|
1747 | $result = $paging->restrictDBItems($this->DAO, $query); |
---|
1748 | |
---|
1749 | $this->addViewVar('count_items', $paging->itemsCount); |
---|
1750 | $this->addViewVar('titulos_ordenacao', $paging->getSortingTitles()); |
---|
1751 | $this->addViewVar('linksPaginacao', $paging->autoLinks(PAGING_MAX_NUMBER_OF_LINKS)); |
---|
1752 | $this->addViewVar('result', $result); |
---|
1753 | } |
---|
1754 | |
---|
1755 | } |
---|
1756 | |
---|
1757 | |
---|
1758 | |
---|
1759 | ?> |
---|
1760 | ]]></code> </include> |
---|
1761 | <include> |
---|
1762 | <name>class.controller.inc.php</name> |
---|
1763 | <code><![CDATA[<?php
|
---|
1764 | /**
|
---|
1765 | * Classe base das classes controller
|
---|
1766 | *
|
---|
1767 | * @author Guilherme Striquer Bisotto
|
---|
1768 | * @version 1.0
|
---|
1769 | */
|
---|
1770 | class Controller extends BaseController{
|
---|
1771 |
|
---|
1772 | /**
|
---|
1773 | * Construtor da camada Controller.
|
---|
1774 | *
|
---|
1775 | * @access public
|
---|
1776 | * @param Model $model Instância da classe model que implementa a atividade.
|
---|
1777 | * @param array $env Configuração MVC.
|
---|
1778 | */
|
---|
1779 | function Controller (&$model ,&$env ){
|
---|
1780 | $this->super(&$model, &$env);
|
---|
1781 | }
|
---|
1782 |
|
---|
1783 | /**
|
---|
1784 | * executa a chamada do método downloadDataBaseAction
|
---|
1785 | *
|
---|
1786 | * @access public
|
---|
1787 | * @return void
|
---|
1788 | */
|
---|
1789 | function downloadDataBase(){
|
---|
1790 | $this->model->downloadDataBaseAction();
|
---|
1791 | }
|
---|
1792 |
|
---|
1793 | /**
|
---|
1794 | * Executa a chamada do método downloadPropertiesAction
|
---|
1795 | *
|
---|
1796 | * @access public
|
---|
1797 | * @return void
|
---|
1798 | */
|
---|
1799 | function downloadProperties(){
|
---|
1800 | $this->model->downloadPropertiesAction();
|
---|
1801 | }
|
---|
1802 | }
|
---|
1803 |
|
---|
1804 | ?>
|
---|
1805 | ]]></code> </include> |
---|
1806 | <include> |
---|
1807 | <name>class.editarnorma.controller.php</name> |
---|
1808 | <code><![CDATA[<?php |
---|
1809 | /** |
---|
1810 | * Classe Consulta da Controller |
---|
1811 | * |
---|
1812 | * @author Guilherme Striquer Bisotto |
---|
1813 | * @version 1.0 |
---|
1814 | */ |
---|
1815 | class EditarNormaController extends Controller{ |
---|
1816 | |
---|
1817 | |
---|
1818 | /** |
---|
1819 | * Armazena o nome da template de visualização |
---|
1820 | */ |
---|
1821 | var $VISUALIZAR = 'Visualizar_norma.tpl'; |
---|
1822 | |
---|
1823 | var $EDT = 'Editar_Norma_Alt.tpl'; |
---|
1824 | |
---|
1825 | /** |
---|
1826 | * Executa a chamada do método pesquisarAction da Model |
---|
1827 | * e carrega as variáveis da camada view |
---|
1828 | * |
---|
1829 | * @return void |
---|
1830 | * @access public |
---|
1831 | */ |
---|
1832 | function pesquisar(){ |
---|
1833 | $this->model->pesquisarAction(); |
---|
1834 | $this->loadViewVars(); |
---|
1835 | } |
---|
1836 | |
---|
1837 | function editar(){ |
---|
1838 | $this->model->editarAction(); |
---|
1839 | $this->showForm($this->EDT); |
---|
1840 | $this->loadViewVars(); |
---|
1841 | } |
---|
1842 | |
---|
1843 | function alterar(){ |
---|
1844 | $this->model->alterarAction(); |
---|
1845 | $this->__default(); |
---|
1846 | } |
---|
1847 | |
---|
1848 | /** |
---|
1849 | * Executa a chamada do método visualizarAction da Model, |
---|
1850 | * mostra o template de visualização e carrega as variáveis da camada view |
---|
1851 | * |
---|
1852 | * @access public |
---|
1853 | * @return void |
---|
1854 | */ |
---|
1855 | function visualizar(){ |
---|
1856 | $this->model->visualizarAction(); |
---|
1857 | $this->showForm($this->VISUALIZAR); |
---|
1858 | $this->loadViewVars(); |
---|
1859 | } |
---|
1860 | |
---|
1861 | /** |
---|
1862 | * função para remover uma norma |
---|
1863 | */ |
---|
1864 | function remover(){ |
---|
1865 | $this->model->removerAction(); |
---|
1866 | $this->__default(); |
---|
1867 | } |
---|
1868 | |
---|
1869 | /** |
---|
1870 | * Ação padrão da atividade. |
---|
1871 | * |
---|
1872 | * @return boolean |
---|
1873 | * @access private |
---|
1874 | */ |
---|
1875 | function __default(){ |
---|
1876 | $this->model->defaultAction(); |
---|
1877 | $this->loadViewVars(); |
---|
1878 | } |
---|
1879 | |
---|
1880 | /** |
---|
1881 | * Execução da aplicação. |
---|
1882 | * |
---|
1883 | * @return void |
---|
1884 | * @access public |
---|
1885 | */ |
---|
1886 | function run ($action){ |
---|
1887 | $this->model->DAO->connect(); |
---|
1888 | $this->dispatch($action); |
---|
1889 | $this->model->DAO->disconnect(); |
---|
1890 | } |
---|
1891 | } |
---|
1892 | ?> |
---|
1893 | ]]></code> </include> |
---|
1894 | <include> |
---|
1895 | <name>class.editarnorma.model.php</name> |
---|
1896 | <code><![CDATA[<?php |
---|
1897 | /** |
---|
1898 | * Classe de EditarNorma da Model |
---|
1899 | * |
---|
1900 | * @author Guilherme Striquer Bisotto |
---|
1901 | * @version 1.0 |
---|
1902 | */ |
---|
1903 | class EditarNormaModel extends Model { |
---|
1904 | |
---|
1905 | |
---|
1906 | /** |
---|
1907 | * contructor |
---|
1908 | * |
---|
1909 | * @access public |
---|
1910 | * @return void |
---|
1911 | */ |
---|
1912 | function EditarNormaModel($env){ |
---|
1913 | parent::Model($env); |
---|
1914 | |
---|
1915 | $this->pLdap = $this->factory->getInstance('wf_ldap'); |
---|
1916 | $this->pOrgchart = $this->factory->getInstance('wf_orgchart'); |
---|
1917 | } |
---|
1918 | |
---|
1919 | |
---|
1920 | /** |
---|
1921 | * carrega os atributos da classe a partir de dados do banco para mostrar |
---|
1922 | * a visualização de uma norma |
---|
1923 | * |
---|
1924 | * @access public |
---|
1925 | * @return void |
---|
1926 | */ |
---|
1927 | function visualizarAction(){ |
---|
1928 | |
---|
1929 | $this->_visualizarNorma(); |
---|
1930 | |
---|
1931 | } |
---|
1932 | |
---|
1933 | /** |
---|
1934 | * lista as normas existentes utilizando a classe de paginação |
---|
1935 | * |
---|
1936 | * @access public |
---|
1937 | * @return void |
---|
1938 | */ |
---|
1939 | function defaultAction(){ |
---|
1940 | $this->addViewVar("titulo","Sistema de Normas"); |
---|
1941 | $this->addViewVar("activity_title", "Sistema Normativo - Editar Normas"); |
---|
1942 | |
---|
1943 | $this->_showConsulta(); |
---|
1944 | } |
---|
1945 | |
---|
1946 | /** |
---|
1947 | * remove uma norma |
---|
1948 | * |
---|
1949 | * @access public |
---|
1950 | * @return void |
---|
1951 | */ |
---|
1952 | function removerAction(){ |
---|
1953 | |
---|
1954 | $nrm_id = $this->request['normaId']; |
---|
1955 | |
---|
1956 | $this->DAO->Link_ID->StartTrans(); |
---|
1957 | |
---|
1958 | $query = |
---|
1959 | "DELETE FROM " . |
---|
1960 | "normas.arquivo " . |
---|
1961 | "WHERE " . |
---|
1962 | "norma_id = ?"; |
---|
1963 | |
---|
1964 | $queryOK = true; |
---|
1965 | if(!$this->DAO->Link_ID->query($query, array($nrm_id))) |
---|
1966 | $queryOK = false; |
---|
1967 | |
---|
1968 | $query = |
---|
1969 | "DELETE FROM " . |
---|
1970 | "normas.norma " . |
---|
1971 | "WHERE " . |
---|
1972 | "norma_id = ?"; |
---|
1973 | |
---|
1974 | if(!$this->DAO->Link_ID->query($query, array($nrm_id))) |
---|
1975 | $queryOK = false; |
---|
1976 | |
---|
1977 | if($queryOK) |
---|
1978 | $this->DAO->Link_ID->CompleteTrans(); |
---|
1979 | else { |
---|
1980 | $this->addViewVar('msgs', array("A transação no banco falhou")); |
---|
1981 | $this->addViewVar('msgclass', "msg_erro"); |
---|
1982 | $this->DAO->Link_ID->FailTrans(); |
---|
1983 | } |
---|
1984 | |
---|
1985 | } |
---|
1986 | |
---|
1987 | /** |
---|
1988 | * carrega a página de edição de normas |
---|
1989 | * |
---|
1990 | * @access public |
---|
1991 | * @return void |
---|
1992 | */ |
---|
1993 | function editarAction(){ |
---|
1994 | |
---|
1995 | $nrm_id = $this->request['params']; |
---|
1996 | |
---|
1997 | $this->_updateDataBaseAttributesAction($nrm_id); |
---|
1998 | |
---|
1999 | $OrgchartAreas = $this->pOrgchart->getOrganizationAreas($this->_Elaborador['employee']['organizacao_id']); |
---|
2000 | |
---|
2001 | foreach($OrgchartAreas as $area){ |
---|
2002 | $areas[$area['area_id']] = $area['sigla']. |
---|
2003 | " - ". |
---|
2004 | $area['descricao']; |
---|
2005 | } |
---|
2006 | |
---|
2007 | $query = |
---|
2008 | "SELECT " . |
---|
2009 | "* " . |
---|
2010 | "FROM " . |
---|
2011 | "normas.tipo_documento " . |
---|
2012 | "ORDER BY " . |
---|
2013 | "sigla"; |
---|
2014 | |
---|
2015 | $result = $this->DAO->query($query); |
---|
2016 | while($row = $result->fetchRow()) |
---|
2017 | $tiposDocumentos[$row['tipo_documento_id']] = $row['sigla']. |
---|
2018 | " - ". |
---|
2019 | $row['descricao']; |
---|
2020 | |
---|
2021 | $query = |
---|
2022 | "SELECT " . |
---|
2023 | "* " . |
---|
2024 | "FROM " . |
---|
2025 | "normas.macroprocesso " . |
---|
2026 | "ORDER BY " . |
---|
2027 | "sigla"; |
---|
2028 | |
---|
2029 | $result = $this->DAO->query($query); |
---|
2030 | while($row = $result->fetchRow()) |
---|
2031 | $macroprocessos[$row['macroprocesso_id']] = $row['sigla']. |
---|
2032 | " - " . |
---|
2033 | $row['descricao']; |
---|
2034 | |
---|
2035 | $query = |
---|
2036 | "SELECT " . |
---|
2037 | "* " . |
---|
2038 | "FROM " . |
---|
2039 | "normas.processo " . |
---|
2040 | "WHERE " . |
---|
2041 | "macroprocesso_id = ?" . |
---|
2042 | "ORDER BY " . |
---|
2043 | "descricao"; |
---|
2044 | |
---|
2045 | $result = $this->DAO->Link_ID->query($query, array($this->_Macroprocesso['id'])); |
---|
2046 | while($row = $result->fetchRow()) |
---|
2047 | $processos[$row['processo_id']] = $row['descricao']; |
---|
2048 | |
---|
2049 | $status = array(); |
---|
2050 | $status[0] = "Em Elaboração"; |
---|
2051 | $status[1] = "Vigente"; |
---|
2052 | $status[2] = "Obsoleta"; |
---|
2053 | $status[3] = "Suspensa"; |
---|
2054 | $status[4] = "Revogada"; |
---|
2055 | $status[5] = "Em Revisão"; |
---|
2056 | |
---|
2057 | $this->addViewVar('normaId', $nrm_id); |
---|
2058 | |
---|
2059 | $this->addViewVar('idElaborador', $this->_Elaborador['user']['uidnumber']); |
---|
2060 | $this->addViewVar('nomeElaborador', $this->_Elaborador['user']['cn']); |
---|
2061 | $this->addViewVar('organizacaoId', $this->_Elaborador['employee']['organizacao_id']); |
---|
2062 | |
---|
2063 | $this->addViewVar('idGestor', $this->_Gestor['user']['uidnumber']); |
---|
2064 | $this->addViewVar('nomeGestor', $this->_Gestor['user']['cn']); |
---|
2065 | |
---|
2066 | $this->addViewVar('idDiretor', $this->_Diretor['user']['uidnumber']); |
---|
2067 | $this->addViewVar('nomeDiretor', $this->_Diretor['user']['cn']); |
---|
2068 | |
---|
2069 | $this->addViewVar('idDiretorJuridico', $this->_DiretorJuridico['user']['uidnumber']); |
---|
2070 | $this->addViewVar('nomeDiretorJuridico', $this->_DiretorJuridico['user']['cn']); |
---|
2071 | |
---|
2072 | $this->addViewVar('cbTiposDocumentos', $tiposDocumentos); |
---|
2073 | $this->addViewVar('sctTipoDocumento', $this->_TipoDocumento['id']); |
---|
2074 | |
---|
2075 | $this->addViewVar('cbMacroprocessos', $macroprocessos); |
---|
2076 | $this->addViewVar('sctMacroprocesso', $this->_Macroprocesso['id']); |
---|
2077 | |
---|
2078 | $this->addViewVar('cbProcessos', $processos); |
---|
2079 | $this->addViewVar('sctProcesso', $this->_Processo['id']); |
---|
2080 | |
---|
2081 | $this->addViewVar('TituloNorma', $this->_TituloNorma); |
---|
2082 | $this->addViewVar('DataVigencia', $this->_DataVigencia); |
---|
2083 | $this->addViewVar('ObjetivoNorma', $this->_ObjetivoNorma); |
---|
2084 | $this->addViewVar('PalavrasChave', $this->_PalavrasChave); |
---|
2085 | $this->addViewVar('txNumRevisao', $this->_NumRevisao); |
---|
2086 | |
---|
2087 | for($i = 0; $i < count($this->_Arquivos); $i++){ |
---|
2088 | $Arquivos[$i]['id'] = $this->_Arquivos[$i]['arquivo_id']; |
---|
2089 | $Arquivos[$i]['nome'] = $this->_Arquivos[$i]['name']; |
---|
2090 | $Arquivos[$i]['is_anexo'] = $this->_Arquivos[$i]['is_anexo']; |
---|
2091 | } |
---|
2092 | $this->addViewVar('Arquivos', $Arquivos); |
---|
2093 | |
---|
2094 | $this->addViewVar('cbStatus', $status); |
---|
2095 | |
---|
2096 | $this->addViewVar('cbAreas', $areas); |
---|
2097 | $this->addViewVar('sctStatus', $this->_Status); |
---|
2098 | $this->addViewVar('sctAreaElaborador', $this->_Elaborador['area']['area_id']); |
---|
2099 | $this->addViewVar('sctAreaGestora', $this->_Gestor['area']['area_id']); |
---|
2100 | $this->addViewVar('sctDiretoria', $this->_Diretor['area']['area_id']); |
---|
2101 | $this->addViewVar('sctAmbitoAplicacao', $this->_AmbitoAplicacao['id']); |
---|
2102 | |
---|
2103 | $this->addViewVar('downloadMethod', "downloadDataBase"); |
---|
2104 | $this->addViewVar('activity_title', "Sistema Normativo - Editar Norma"); |
---|
2105 | } |
---|
2106 | |
---|
2107 | /** |
---|
2108 | * Executa a ação de alteração dos dados no banco |
---|
2109 | * |
---|
2110 | * @access public |
---|
2111 | * @return void |
---|
2112 | */ |
---|
2113 | function alterarAction(){ |
---|
2114 | |
---|
2115 | $nrm_id = $this->request['normaId']; |
---|
2116 | |
---|
2117 | $this->_Elaborador = |
---|
2118 | $this->_setEmployee($this->request['idElaborador'], |
---|
2119 | $this->request['cbAreaElaborador']); |
---|
2120 | |
---|
2121 | $this->_Gestor = |
---|
2122 | $this->_setEmployee($this->request['idGestor'], |
---|
2123 | $this->request['cbAreasGestoras']); |
---|
2124 | |
---|
2125 | $this->_Diretor = |
---|
2126 | $this->_setEmployee($this->request['idDiretor'], |
---|
2127 | $this->request['cbDiretorias']); |
---|
2128 | |
---|
2129 | $this->_DiretorJuridico = |
---|
2130 | $this->_setEmployee($this->request['idDiretorJuridico'], |
---|
2131 | ID_AREA_DJ); |
---|
2132 | |
---|
2133 | $this->_TipoDocumento['id'] = $this->request['cbTiposDocumentos']; |
---|
2134 | $this->_Macroprocesso['id'] = $this->request['cbMacroprocessos']; |
---|
2135 | $this->_Processo['id'] = $this->request['cbProcessos']; |
---|
2136 | |
---|
2137 | $this->_TituloNorma = $this->request['txTituloNorma']; |
---|
2138 | $this->_DataVigencia = $this->request['dtDataVigencia']; |
---|
2139 | $this->_ObjetivoNorma = $this->request['txObjetivoNorma']; |
---|
2140 | |
---|
2141 | $this->_AmbitoAplicacao['id'] = $this->request['cbAmbitoAplicacao']; |
---|
2142 | |
---|
2143 | $this->_PalavrasChave = $this->request['txPalavrasChave']; |
---|
2144 | |
---|
2145 | $this->_Status['id'] = $this->request['cbStatus']; |
---|
2146 | |
---|
2147 | $this->_NumRevisao = $this->request['txNumRevisao']; |
---|
2148 | |
---|
2149 | $arquivo = array(); |
---|
2150 | $anexos = array(); |
---|
2151 | $this->_Arquivos = array(); |
---|
2152 | |
---|
2153 | $arquivo = wf_get_uploaded_files("arquivo"); |
---|
2154 | $anexos = wf_get_uploaded_files("anexos"); |
---|
2155 | |
---|
2156 | if(count($arquivo)) |
---|
2157 | if(!$arquivo[0]['error']){ |
---|
2158 | $arquivo[0]['is_anexo'] = 0; |
---|
2159 | $this->_Arquivos[] = $arquivo[0]; |
---|
2160 | } |
---|
2161 | |
---|
2162 | if(count($anexos)) |
---|
2163 | foreach($anexos as $elem){ |
---|
2164 | if(!$elem['error']){ |
---|
2165 | $elem['is_anexo'] = 1; |
---|
2166 | $this->_Arquivos[] = $elem; |
---|
2167 | } |
---|
2168 | } |
---|
2169 | |
---|
2170 | if(strlen($this->request['params'])) |
---|
2171 | $filesToRemove = explode(';', $this->request['params']); |
---|
2172 | |
---|
2173 | $this->_updateNorma($nrm_id, $filesToRemove); |
---|
2174 | } |
---|
2175 | |
---|
2176 | /** |
---|
2177 | * método auxiliar para a consulta |
---|
2178 | * |
---|
2179 | * @param array $where Array com o id do macroprocesso, o id do processo, id do tipo do documento e uma substring do título |
---|
2180 | * @access private |
---|
2181 | * @return void |
---|
2182 | */ |
---|
2183 | function _showConsulta($where = ""){ |
---|
2184 | |
---|
2185 | if ($_GET['s_co'] == 0){ |
---|
2186 | $_GET['s_co'] = 4; |
---|
2187 | $_GET['s_so'] = 1; |
---|
2188 | } |
---|
2189 | |
---|
2190 | if(!$where){ |
---|
2191 | $where['mpr_id'] = $_GET['mpr_id']; |
---|
2192 | $where['pro_id'] = $_GET['pro_id']; |
---|
2193 | $where['tpd_id'] = $_GET['tpd_id']; |
---|
2194 | $where['titulo'] = $_GET['titulo']; |
---|
2195 | } else { |
---|
2196 | $_GET['mpr_id'] = $where['mpr_id']; |
---|
2197 | $_GET['pro_id'] = $where['pro_id']; |
---|
2198 | $_GET['tpd_id'] = $where['tpd_id']; |
---|
2199 | $_GET['titulo'] = $where['titulo']; |
---|
2200 | } |
---|
2201 | |
---|
2202 | if(count($where)){ |
---|
2203 | $query_where = "WHERE " . |
---|
2204 | "1 = 1"; |
---|
2205 | if($where['mpr_id']) $query_where .= " AND mpr.macroprocesso_id = ".$where['mpr_id']; |
---|
2206 | if($where['pro_id']) $query_where .= " AND pro.processo_id = ".$where['pro_id']; |
---|
2207 | if($where['tpd_id']) $query_where .= " AND tpd.tipo_documento_id = ".$where['tpd_id']; |
---|
2208 | if($where['titulo']) $query_where .= " AND nrm.titulo LIKE '%".$where['titulo']."%'"; |
---|
2209 | } |
---|
2210 | |
---|
2211 | $query = |
---|
2212 | "SELECT ". |
---|
2213 | "mpr.sigla AS mpr_sigla, " . |
---|
2214 | "pro.descricao AS pro_descricao, " . |
---|
2215 | "tpd.sigla AS tpd_sigla, " . |
---|
2216 | "(CASE WHEN nrm.status = 0 ". |
---|
2217 | "THEN 'EM_ELAB' " . |
---|
2218 | "ELSE (tpd.sigla || '-' || mpr.sigla || '-' || ltrim(to_char(nrm.sequencia,'000')) || '-' || ltrim(to_char(nrm.num_revisao,'00'))) ". |
---|
2219 | "END) AS nrm_codigo, ". |
---|
2220 | "(CASE ". |
---|
2221 | "WHEN nrm.status = 0 THEN 'EE' ". |
---|
2222 | "WHEN nrm.status = 1 THEN 'VG' ". |
---|
2223 | "WHEN nrm.status = 2 THEN 'OB' ". |
---|
2224 | "WHEN nrm.status = 3 THEN 'SP' ". |
---|
2225 | "WHEN nrm.status = 4 THEN 'RV' ". |
---|
2226 | "WHEN nrm.status = 5 THEN 'ER' ". |
---|
2227 | "ELSE 'XX' ". |
---|
2228 | "END) AS nrm_situacao_ref, ". |
---|
2229 | "nrm.titulo AS nrm_titulo, " . |
---|
2230 | "nrm.norma_id AS nrm_id, " . |
---|
2231 | "nrm.macroprocesso_id AS nrm_mpr_id, " . |
---|
2232 | "nrm.processo_id AS nrm_pro_id, " . |
---|
2233 | "tpd.tipo_documento_id AS tpd_id, " . |
---|
2234 | "nrm.tipo_documento_id AS nrm_tpd_id, " . |
---|
2235 | "mpr.macroprocesso_id AS mpr_id, " . |
---|
2236 | "pro.processo_id AS pro_id " . |
---|
2237 | "FROM ". |
---|
2238 | "normas.norma nrm ". |
---|
2239 | "INNER JOIN ". |
---|
2240 | "normas.tipo_documento tpd ". |
---|
2241 | "ON ". |
---|
2242 | "(nrm.tipo_documento_id = tpd.tipo_documento_id) ". |
---|
2243 | "INNER JOIN ". |
---|
2244 | "normas.macroprocesso mpr ". |
---|
2245 | "ON ". |
---|
2246 | "(nrm.macroprocesso_id = mpr.macroprocesso_id) ". |
---|
2247 | "INNER JOIN ". |
---|
2248 | "normas.processo pro ". |
---|
2249 | "ON ". |
---|
2250 | "(nrm.processo_id = pro.processo_id) " . |
---|
2251 | $query_where; |
---|
2252 | |
---|
2253 | $titulos_ordenacao = array(); |
---|
2254 | $titulos_ordenacao[] = array('name' => "Mpr.", 'id' => "1"); |
---|
2255 | $titulos_ordenacao[] = array('name' => "Processo", 'id' => "2"); |
---|
2256 | $titulos_ordenacao[] = array('name' => "Tpd", 'id' => "3"); |
---|
2257 | $titulos_ordenacao[] = array('name' => "Código", 'id' => "4"); |
---|
2258 | $titulos_ordenacao[] = array('name' => "Sit.", 'id' => "5"); |
---|
2259 | $titulos_ordenacao[] = array('name' => "Título", 'id' => "6"); |
---|
2260 | |
---|
2261 | $paging = $this->factory->getInstance("wf_paging"); |
---|
2262 | $paging->configure(PAGING_NUMBER_OF_ITEMS, $_GET); |
---|
2263 | $paging->useDatabase(true); |
---|
2264 | $paging->enableSorting(true); |
---|
2265 | $paging->setSortingTitles($titulos_ordenacao); |
---|
2266 | $result = $paging->restrictDBItems($this->DAO, $query); |
---|
2267 | |
---|
2268 | $this->addViewVar('count_items', $paging->itemsCount); |
---|
2269 | $this->addViewVar('titulos_ordenacao', $paging->getSortingTitles()); |
---|
2270 | $this->addViewVar('linksPaginacao', $paging->autoLinks(PAGING_MAX_NUMBER_OF_LINKS)); |
---|
2271 | $this->addViewVar('result', $result); |
---|
2272 | } |
---|
2273 | |
---|
2274 | /** |
---|
2275 | * Atualiza a tabela de arquivos |
---|
2276 | * |
---|
2277 | * @access private |
---|
2278 | * @param int $nrm_id O Id da norma a ser atualizada |
---|
2279 | * @param array $filesToRemove Array com os "is_anexo" para serem removidos |
---|
2280 | * @return false se ocorrer algum problema no update ou true se tudo correr bem |
---|
2281 | */ |
---|
2282 | function _updateFiles($nrm_id, $filesToRemove){ |
---|
2283 | // verifica se o arquivo foi removido e se existe um para reposição |
---|
2284 | if(count($filesToRemove)){ |
---|
2285 | $query = |
---|
2286 | "SELECT " . |
---|
2287 | "is_anexo " . |
---|
2288 | "FROM " . |
---|
2289 | "normas.arquivo " . |
---|
2290 | "WHERE " . |
---|
2291 | "arquivo_id = ?"; |
---|
2292 | |
---|
2293 | $rem = false; |
---|
2294 | foreach($filesToRemove as $f){ |
---|
2295 | $result = $this->DAO->Link_ID->query($query, array($f)); |
---|
2296 | if($result->fields['is_anexo'] == 0){ |
---|
2297 | $rem = true; |
---|
2298 | break; |
---|
2299 | } |
---|
2300 | } |
---|
2301 | |
---|
2302 | |
---|
2303 | $ins = false; |
---|
2304 | if(count($this->_Arquivos)){ |
---|
2305 | foreach($this->_Arquivos as $arquivo) |
---|
2306 | if(!$arquivo['is_anexo']){ |
---|
2307 | $ins = true; |
---|
2308 | break; |
---|
2309 | } |
---|
2310 | } |
---|
2311 | |
---|
2312 | if(!(($rem && $ins) |
---|
2313 | || !($rem || $ins))) |
---|
2314 | return false; |
---|
2315 | } |
---|
2316 | if(count($filesToRemove)){ |
---|
2317 | foreach($filesToRemove as $arq_id){ |
---|
2318 | $query = |
---|
2319 | "DELETE FROM " . |
---|
2320 | "normas.arquivo " . |
---|
2321 | "WHERE " . |
---|
2322 | "arquivo_id = ?"; |
---|
2323 | |
---|
2324 | if(!$this->DAO->Link_ID->query($query, array($arq_id))) |
---|
2325 | return false; |
---|
2326 | } |
---|
2327 | } |
---|
2328 | if(count($this->_Arquivos)){ |
---|
2329 | $query = |
---|
2330 | "INSERT INTO " . |
---|
2331 | "normas.arquivo(" . |
---|
2332 | "norma_id, " . |
---|
2333 | "nome, " . |
---|
2334 | "tipo, " . |
---|
2335 | "tamanho, " . |
---|
2336 | "is_anexo," . |
---|
2337 | "conteudo) ". |
---|
2338 | "VALUES(?,?,?,?,?,?)"; |
---|
2339 | |
---|
2340 | for($i=0; $i < count($this->_Arquivos); $i++ ){ |
---|
2341 | |
---|
2342 | $args[] = $nrm_id; |
---|
2343 | $args[] = $this->_Arquivos[$i]['name']; |
---|
2344 | $args[] = $this->_Arquivos[$i]['type']; |
---|
2345 | $args[] = $this->_Arquivos[$i]['size']; |
---|
2346 | $args[] = $this->_Arquivos[$i]['is_anexo']; |
---|
2347 | $args[] = base64_encode(serialize(array($this->_Arquivos[$i]['content']))); |
---|
2348 | |
---|
2349 | |
---|
2350 | if(!$this->DAO->Link_ID->query($query, $args)) |
---|
2351 | return false; |
---|
2352 | |
---|
2353 | unset($args); |
---|
2354 | } |
---|
2355 | } |
---|
2356 | |
---|
2357 | return true; |
---|
2358 | } |
---|
2359 | |
---|
2360 | /** |
---|
2361 | * Atualiza a tabela de normas |
---|
2362 | * |
---|
2363 | * @access protected |
---|
2364 | * @param int $nrm_id O Id da norma a ser atualizada |
---|
2365 | * @param array $filesToRemove Array com os "is_anexo" para serem removidos |
---|
2366 | * @return false se ocorrer algum problema no update ou true se tudo correr bem |
---|
2367 | */ |
---|
2368 | function _updateNorma($nrm_id, $filesToRemove){ |
---|
2369 | |
---|
2370 | $query = |
---|
2371 | "SELECT " . |
---|
2372 | "* " . |
---|
2373 | "FROM " . |
---|
2374 | "normas.norma " . |
---|
2375 | "WHERE " . |
---|
2376 | "norma_id = ?"; |
---|
2377 | |
---|
2378 | |
---|
2379 | if(!$this->DAO->Link_ID->query($query, array($nrm_id))) |
---|
2380 | return false; |
---|
2381 | |
---|
2382 | $query = " |
---|
2383 | UPDATE " . |
---|
2384 | "normas.norma " . |
---|
2385 | "SET " . |
---|
2386 | "elaborador_id = ?, " . |
---|
2387 | "area_elaborador_id = ?, " . |
---|
2388 | "area_gestora_id = ?, " . |
---|
2389 | "gerente_id = ?, " . |
---|
2390 | "diretor_juridico_id = ?, " . |
---|
2391 | "diretoria_id = ?, " . |
---|
2392 | "diretor_id = ?, " . |
---|
2393 | "tipo_documento_id = ?, " . |
---|
2394 | "macroprocesso_id = ?, " . |
---|
2395 | "processo_id = ?, " . |
---|
2396 | "titulo = ?, " . |
---|
2397 | "num_revisao = ?, " . |
---|
2398 | "data_vigencia = ?, " . |
---|
2399 | "objetivo = ?, " . |
---|
2400 | "ambito_aplicacao = ?, " . |
---|
2401 | "palavras_chave = ?, " . |
---|
2402 | "status = ? " . |
---|
2403 | "WHERE " . |
---|
2404 | "norma_id = ?"; |
---|
2405 | |
---|
2406 | $args[] = $this->_Elaborador['user']['uidnumber']; |
---|
2407 | $args[] = $this->_Elaborador['area']['area_id']; |
---|
2408 | $args[] = $this->_Gestor['area']['area_id']; |
---|
2409 | $args[] = $this->_Gestor['user']['uidnumber']; |
---|
2410 | $args[] = $this->_DiretorJuridico['user']['uidnumber']; |
---|
2411 | $args[] = $this->_Diretor['area']['area_id']; |
---|
2412 | $args[] = $this->_Diretor['user']['uidnumber']; |
---|
2413 | $args[] = $this->_TipoDocumento['id']; |
---|
2414 | $args[] = $this->_Macroprocesso['id']; |
---|
2415 | $args[] = $this->_Processo['id']; |
---|
2416 | $args[] = $this->_TituloNorma; |
---|
2417 | $args[] = $this->_NumRevisao; |
---|
2418 | if($this->_DataVigencia){ |
---|
2419 | $data = explode('/', $this->_DataVigencia); |
---|
2420 | $args[] = $data[2].$data[1].$data[0]; |
---|
2421 | } else $args[] = ""; |
---|
2422 | $args[] = $this->_ObjetivoNorma; |
---|
2423 | $args[] = $this->_AmbitoAplicacao['id']; |
---|
2424 | $args[] = $this->_PalavrasChave; |
---|
2425 | $args[] = $this->_Status['id']; |
---|
2426 | $args[] = $nrm_id; |
---|
2427 | |
---|
2428 | $this->DAO->Link_ID->StartTrans(); |
---|
2429 | |
---|
2430 | if($this->DAO->Link_ID->query($query, $args)) $queryOK = true; |
---|
2431 | else $queryOK = false; |
---|
2432 | |
---|
2433 | $queryOK = $this->_updateFiles($nrm_id, $filesToRemove); |
---|
2434 | |
---|
2435 | if($queryOK){ |
---|
2436 | $this->addViewVar('msgs', array("A modificação foi feita com sucesso")); |
---|
2437 | $this->addViewVar('msgclass', "msg_sucesso"); |
---|
2438 | $this->DAO->Link_ID->CompleteTrans(); |
---|
2439 | return true; |
---|
2440 | } else { |
---|
2441 | $this->addViewVar('msgs', array("A transação falhou")); |
---|
2442 | $this->addViewVar('msgclass', "msg_erro"); |
---|
2443 | $this->DAO->Link_ID->FailTrans(); |
---|
2444 | return false; |
---|
2445 | } |
---|
2446 | } |
---|
2447 | |
---|
2448 | |
---|
2449 | } |
---|
2450 | ?> |
---|
2451 | ]]></code> </include> |
---|
2452 | <include> |
---|
2453 | <name>class.elaboracao.controller.php</name> |
---|
2454 | <code><![CDATA[<?php |
---|
2455 | /** |
---|
2456 | * Classe Elaboração da Controller |
---|
2457 | * |
---|
2458 | * @author Guilherme Striquer Bisotto |
---|
2459 | * @version 1.0 |
---|
2460 | */ |
---|
2461 | class ElaboracaoController extends Controller{ |
---|
2462 | |
---|
2463 | /** |
---|
2464 | * Armazena o nome do template adicionar arquivos |
---|
2465 | */ |
---|
2466 | var $ADD_FILES = 'Adicionar_arquivos.tpl'; |
---|
2467 | |
---|
2468 | /** |
---|
2469 | * Executa a chamada do método de adicionarArquivosAction, |
---|
2470 | * caso o resultado for false, executa o método default, caso contrário |
---|
2471 | * carrega as variáveis da camada view e mostra o tamplate de adicionar arquivos |
---|
2472 | * |
---|
2473 | * @return void |
---|
2474 | * @access public |
---|
2475 | */ |
---|
2476 | function adicionarArquivos(){ |
---|
2477 | if($this->model->adicionarArquivosAction()){ |
---|
2478 | $this->loadViewVars(); |
---|
2479 | $this->showForm($this->ADD_FILES); |
---|
2480 | } else { |
---|
2481 | $this->__default(); |
---|
2482 | } |
---|
2483 | } |
---|
2484 | |
---|
2485 | /** |
---|
2486 | * Executa a chamada do método enviarAction |
---|
2487 | * |
---|
2488 | * @return void |
---|
2489 | * @access public |
---|
2490 | */ |
---|
2491 | function enviar(){ |
---|
2492 | $this->model->enviarAction(); |
---|
2493 | } |
---|
2494 | |
---|
2495 | /** |
---|
2496 | * Executa o método default |
---|
2497 | * |
---|
2498 | * @return void |
---|
2499 | * @access public |
---|
2500 | */ |
---|
2501 | function cancelar(){ |
---|
2502 | $this->__default(); |
---|
2503 | } |
---|
2504 | |
---|
2505 | /** |
---|
2506 | * Ação padrão da atividade. |
---|
2507 | * |
---|
2508 | * @return boolean |
---|
2509 | * @access private |
---|
2510 | */ |
---|
2511 | function __default(){ |
---|
2512 | $this->model->defaultAction(); |
---|
2513 | $this->loadViewVars(); |
---|
2514 | } |
---|
2515 | |
---|
2516 | /** |
---|
2517 | * Execução da aplicação. |
---|
2518 | * |
---|
2519 | * @return void |
---|
2520 | * @access public |
---|
2521 | */ |
---|
2522 | function run ($action){ |
---|
2523 | $this->model->DAO->connect(); |
---|
2524 | $this->dispatch($action); |
---|
2525 | $this->model->DAO->disconnect(); |
---|
2526 | } |
---|
2527 | } |
---|
2528 | ?> |
---|
2529 | ]]></code> </include> |
---|
2530 | <include> |
---|
2531 | <name>class.elaboracao.model.php</name> |
---|
2532 | <code><![CDATA[<?php |
---|
2533 | /** |
---|
2534 | * Classe de Elaboração |
---|
2535 | * |
---|
2536 | * @author Guilherme Striquer Bisotto |
---|
2537 | * @version 1.0 |
---|
2538 | */ |
---|
2539 | class ElaboracaoModel extends Model{ |
---|
2540 | |
---|
2541 | /** |
---|
2542 | * Mantém o id da organização do elaborador |
---|
2543 | */ |
---|
2544 | var $iOrganizacaoId; |
---|
2545 | |
---|
2546 | /** |
---|
2547 | * Mantém o array de áreas da organização |
---|
2548 | */ |
---|
2549 | var $pOrganizacaoAreas; |
---|
2550 | |
---|
2551 | /** |
---|
2552 | * mantém o array de diretorias da organização |
---|
2553 | */ |
---|
2554 | var $pDiretorias; |
---|
2555 | |
---|
2556 | /** |
---|
2557 | * Objeto wf_regex |
---|
2558 | * @access private |
---|
2559 | */ |
---|
2560 | var $pRegex; |
---|
2561 | |
---|
2562 | /** |
---|
2563 | * construtora |
---|
2564 | */ |
---|
2565 | function ElaboracaoModel($env){ |
---|
2566 | parent::Model($env); |
---|
2567 | |
---|
2568 | $this->pLdap = $this->factory->getInstance('wf_ldap'); |
---|
2569 | $this->pOrgchart = $this->factory->getInstance('wf_orgchart'); |
---|
2570 | |
---|
2571 | $elaborador = $this->pOrgchart->getEmployee($this->getWfProperty('wf_user_id')); |
---|
2572 | $this->_Elaborador = |
---|
2573 | $this->_setEmployee($this->getWfProperty('wf_user_id'), |
---|
2574 | $elaborador['area_id']); |
---|
2575 | |
---|
2576 | $area_dj = $this->pOrgchart->getArea(ID_AREA_DJ); |
---|
2577 | $this->_DiretorJuridico = |
---|
2578 | $this->_setEmployee($area_dj['titular_funcionario_id'], |
---|
2579 | $area_dj['area_id']); |
---|
2580 | |
---|
2581 | $this->pOrganizacaoAreas = |
---|
2582 | $this->pOrgchart->getOrganizationAreas($this->_Elaborador['area']['organizacao_id']); |
---|
2583 | $this->pRegex = $this->factory->getInstance('wf_regex'); |
---|
2584 | } |
---|
2585 | |
---|
2586 | /** |
---|
2587 | * retorna a diretoria de uma área. |
---|
2588 | * |
---|
2589 | * @return (Objeto área - Orgchart) a diretoria de uma área ou ela própria caso não tenha diretoria. |
---|
2590 | * @access private |
---|
2591 | */ |
---|
2592 | function getDiretoria($area_id){ |
---|
2593 | $area = $this->pOrgchart->getArea($area_id); |
---|
2594 | if($area['area_status_id'] == 3){ //diretoria |
---|
2595 | return $area; |
---|
2596 | } else { |
---|
2597 | if(($area['superior_area_id'] == $this->_Gestor['organizacao_id']) // a área superior é a organização |
---|
2598 | || ($area['superior_area_id'] == $area['area_id']) // a área superior é a própria área |
---|
2599 | || empty($area['superior_area_id'])){ // não tem área superior |
---|
2600 | return $this->_Gestor['area']; |
---|
2601 | } |
---|
2602 | return $this->getDiretoria($area['superior_area_id']); |
---|
2603 | } |
---|
2604 | } |
---|
2605 | |
---|
2606 | /** |
---|
2607 | * função que consiste os dados do formulário |
---|
2608 | * |
---|
2609 | * @access public |
---|
2610 | * @return true caso o formulário esteja consistente |
---|
2611 | * @return false caso o formulário esteja incosistente |
---|
2612 | */ |
---|
2613 | function adicionarArquivosAction(){ |
---|
2614 | |
---|
2615 | // verifica se foi selecionada alguma área na combo de áreas gestoras |
---|
2616 | if(($area_gestora_id = $this->request['cbAreasGestoras']) == 0){ |
---|
2617 | $this->addViewVar('msgclass', "msg_erro"); |
---|
2618 | $msgs[] = "Uma área gestora deve ser selecionada"; |
---|
2619 | } else { |
---|
2620 | |
---|
2621 | $area_gestora = $this->pOrgchart->getArea($area_gestora_id); |
---|
2622 | $this->_Gestor = |
---|
2623 | $this->_setEmployee($area_gestora['titular_funcionario_id'], |
---|
2624 | $area_gestora['area_id']); |
---|
2625 | |
---|
2626 | $diretoria = $this->getDiretoria($this->_Gestor['area']['area_id']); |
---|
2627 | $this->_Diretor = |
---|
2628 | $this->_setEmployee($diretoria['titular_funcionario_id'], |
---|
2629 | $diretoria['area_id']); |
---|
2630 | |
---|
2631 | $this->addViewVar('Gestor', htmlspecialchars(serialize($this->_Gestor))); |
---|
2632 | $this->addViewVar('Diretor', htmlspecialchars(serialize($this->_Diretor))); |
---|
2633 | } |
---|
2634 | |
---|
2635 | |
---|
2636 | // verifica se algum tipo de documento foi selecionado |
---|
2637 | if(($tipo_documento_id = $this->request['cbTiposDocumentos']) == 0){ |
---|
2638 | $this->addViewVar('msgclass', "msg_erro"); |
---|
2639 | $msgs[] = "Um tipo de documento deve ser selecionado"; |
---|
2640 | } else { |
---|
2641 | $this->_TipoDocumento['id'] = $tipo_documento_id; |
---|
2642 | $query = " |
---|
2643 | SELECT |
---|
2644 | * |
---|
2645 | FROM |
---|
2646 | normas.tipo_documento |
---|
2647 | WHERE |
---|
2648 | tipo_documento_id = ? |
---|
2649 | "; |
---|
2650 | |
---|
2651 | $result = $this->DAO->Link_ID->query($query, array($tipo_documento_id)); |
---|
2652 | $this->_TipoDocumento['cn'] = $result->fields['sigla'] . |
---|
2653 | " - " . |
---|
2654 | $result->fields['descricao']; |
---|
2655 | |
---|
2656 | unset($result); |
---|
2657 | |
---|
2658 | $this->addViewVar('TipoDocumento', htmlspecialchars(serialize($this->_TipoDocumento))); |
---|
2659 | } |
---|
2660 | |
---|
2661 | |
---|
2662 | // verifica se algum maprocesso foi selecionado |
---|
2663 | if(($macroprocesso_id = $this->request['cbMacroprocessos']) == 0){ |
---|
2664 | $this->addViewVar('msgclass', "msg_erro"); |
---|
2665 | $msgs[] = "Um macroprocesso deve ser selecionado"; |
---|
2666 | } else { |
---|
2667 | $this->_Macroprocesso['id'] = $macroprocesso_id; |
---|
2668 | $query = " |
---|
2669 | SELECT |
---|
2670 | * |
---|
2671 | FROM |
---|
2672 | normas.macroprocesso |
---|
2673 | WHERE |
---|
2674 | macroprocesso_id = ? |
---|
2675 | "; |
---|
2676 | |
---|
2677 | $result = $this->DAO->Link_ID->query($query, array($macroprocesso_id)); |
---|
2678 | $this->_Macroprocesso['cn'] = $result->fields['sigla']. |
---|
2679 | " - " . |
---|
2680 | $result->fields['descricao']; |
---|
2681 | |
---|
2682 | unset($result); |
---|
2683 | $this->addViewVar('Macroprocesso', htmlspecialchars(serialize($this->_Macroprocesso))); |
---|
2684 | |
---|
2685 | } |
---|
2686 | |
---|
2687 | if(($processo_id = $this->request['cbProcessos']) == 0){ |
---|
2688 | $this->addViewVar('msgclass', "msg_erro"); |
---|
2689 | $msgs[] = "Um processo deve ser selecionado"; |
---|
2690 | $macroprocesso_id = 0; |
---|
2691 | } else { |
---|
2692 | $this->_Processo['id'] = $processo_id; |
---|
2693 | $query = " |
---|
2694 | SELECT |
---|
2695 | * |
---|
2696 | FROM |
---|
2697 | normas.processo |
---|
2698 | WHERE |
---|
2699 | processo_id = ? |
---|
2700 | "; |
---|
2701 | |
---|
2702 | $result = $this->DAO->Link_ID->query($query, array($processo_id)); |
---|
2703 | $this->_Processo['cn'] = $result->fields['descricao']; |
---|
2704 | unset($result); |
---|
2705 | |
---|
2706 | $this->addViewVar('Processo',htmlspecialchars(serialize($this->_Processo))); |
---|
2707 | } |
---|
2708 | |
---|
2709 | if(($this->_TituloNorma = $this->request['txTituloNorma']) == ""){ |
---|
2710 | $this->addViewVar('msgclass', "msg_erro"); |
---|
2711 | $msgs[] = "O campo TITULO deve ser preenchido"; |
---|
2712 | } else { |
---|
2713 | $this->addViewVar('TituloNorma', $this->_TituloNorma); |
---|
2714 | } |
---|
2715 | |
---|
2716 | if(($this->_ObjetivoNorma = $this->request['txObjetivoNorma']) == ""){ |
---|
2717 | $this->addViewVar('msgclass', "msg_erro"); |
---|
2718 | $msgs[] = "A área OBJETIVO deve ser preenchida"; |
---|
2719 | } else { |
---|
2720 | $this->addViewVar('ObjetivoNorma', $this->_ObjetivoNorma); |
---|
2721 | } |
---|
2722 | |
---|
2723 | if(($ambito_aplicacao = $this->request['cbAmbitoAplicacao']) == 0){ |
---|
2724 | $this->addViewVar('msgclass', "msg_erro"); |
---|
2725 | $msgs[] = "Uma área deve ser selecionado para o âmbito da aplicação da norma"; |
---|
2726 | } else { |
---|
2727 | |
---|
2728 | $this->_AmbitoAplicacao['id'] = $ambito_aplicacao; |
---|
2729 | |
---|
2730 | $result = $this->pOrgchart->getArea($this->_AmbitoAplicacao); |
---|
2731 | |
---|
2732 | $this->_AmbitoAplicacao['cn'] = $result['sigla']. |
---|
2733 | " - ". |
---|
2734 | $result['descricao']; |
---|
2735 | |
---|
2736 | |
---|
2737 | $this->addViewVar('AmbitoAplicacao', htmlspecialchars(serialize($this->_AmbitoAplicacao))); |
---|
2738 | } |
---|
2739 | |
---|
2740 | if(($this->_PalavrasChave = $this->request['txPalavrasChave']) == ""){ |
---|
2741 | $this->addViewVar('msgclass', "msg_erro"); |
---|
2742 | $msgs[] = "O campo PALAVRAS CHAVE deve ser preenchido"; |
---|
2743 | } else { |
---|
2744 | $this->addViewVar('PalavrasChave', $this->_PalavrasChave); |
---|
2745 | } |
---|
2746 | |
---|
2747 | $this->addViewVar('activity_title', "Sistema Normativo - Adicionar arquivos"); |
---|
2748 | |
---|
2749 | $this->addViewVar('sctAreaGestora', $this->_Gestor['area']['area_id']); |
---|
2750 | $this->addViewVar('sctTipoDocumento', $this->_TipoDocumento['id']); |
---|
2751 | $this->addViewVar('sctMacroprocesso', $this->_Macroprocesso['id']); |
---|
2752 | $this->addViewVar('sctProcesso', $this->_Processo['id']); |
---|
2753 | $this->addViewVar('sctAmbitoAplicacao', $this->_AmbitoAplicacao); |
---|
2754 | $this->addViewVar('nomeElaborador', $this->_Elaborador['user']['cn']); |
---|
2755 | |
---|
2756 | $this->addViewVar('nomeArea', $this->_Elaborador['area']['sigla']. |
---|
2757 | " - ". |
---|
2758 | $this->_Elaborador['area']['descricao']); |
---|
2759 | |
---|
2760 | $this->addViewVar('nomeAreaGestora', $this->_Gestor['area']['sigla']. |
---|
2761 | " - " . |
---|
2762 | $this->_Gestor['area']['descricao']); |
---|
2763 | |
---|
2764 | $this->addViewVar('nomeGestor', $this->_Gestor['user']['cn']); |
---|
2765 | $this->addViewVar('nomeDiretorJuridico', $this->_DiretorJuridico['user']['cn']); |
---|
2766 | |
---|
2767 | $this->addViewVar('nomeDiretoria', $this->_Diretor['area']['sigla']. |
---|
2768 | " - ". |
---|
2769 | $this->_Diretor['area']['descricao']); |
---|
2770 | |
---|
2771 | $this->addViewVar('nomeDiretor', $this->_Diretor['user']['cn']); |
---|
2772 | $this->addViewVar('nomeTipoDocumento', $this->_TipoDocumento['cn']); |
---|
2773 | $this->addViewVar('nomeMacroprocesso', $this->_Macroprocesso['cn']); |
---|
2774 | $this->addViewVar('nomeProcesso', $this->_Processo['cn']); |
---|
2775 | $this->addViewVar('TituloNorma', $this->_TituloNorma); |
---|
2776 | $this->addViewVar('DataVigencia', $this->_DataVigencia); |
---|
2777 | $this->addViewVar('ObjetivoNorma', $this->_ObjetivoNorma); |
---|
2778 | $this->addViewVar('nomeAmbitoAplicacao', $this->_AmbitoAplicacao['cn']); |
---|
2779 | $this->addViewVar('PalavrasChave', $this->_PalavrasChave); |
---|
2780 | |
---|
2781 | |
---|
2782 | // carrega as mensagens de erro, se houverem. |
---|
2783 | $this->addViewVar('msgs', $msgs); |
---|
2784 | |
---|
2785 | if(count($msgs)) return false; |
---|
2786 | |
---|
2787 | return true; |
---|
2788 | |
---|
2789 | |
---|
2790 | } |
---|
2791 | |
---|
2792 | /** |
---|
2793 | * função que, provisóriamente, insere uma nova norma no banco de dados. |
---|
2794 | * |
---|
2795 | * A intúito horiginal dessa função é que ela apenas jogue os dados para as properties da instancia |
---|
2796 | * e comite a mesma, fazendo com que a próxima instancia, uma switch inicie o restante do processo. |
---|
2797 | * |
---|
2798 | * @return void |
---|
2799 | * @access public |
---|
2800 | */ |
---|
2801 | function enviarAction(){ |
---|
2802 | |
---|
2803 | // $this->_Elaborador; Carregada na construtora |
---|
2804 | // $this->_DiretorJuridico; Carregada na construtora |
---|
2805 | |
---|
2806 | $this->_Gestor = unserialize($this->request['Gestor']); |
---|
2807 | $this->_Diretor = unserialize($this->request['Diretor']); |
---|
2808 | |
---|
2809 | $this->_TipoDocumento = unserialize($this->request['TipoDocumento']); |
---|
2810 | $this->_Macroprocesso = unserialize($this->request['Macroprocesso']); |
---|
2811 | $this->_Processo = unserialize($this->request['Processo']); |
---|
2812 | $this->_AmbitoAplicacao = unserialize($this->request['AmbitoAplicacao']); |
---|
2813 | |
---|
2814 | $this->_TituloNorma = $this->request['TituloNorma']; |
---|
2815 | $this->_ObjetivoNorma = $this->request['ObjetivoNorma']; |
---|
2816 | $this->_PalavrasChave = $this->request['PalavrasChave']; |
---|
2817 | |
---|
2818 | $tmp_Arquivos = array_merge(wf_get_uploaded_files("arquivo"), |
---|
2819 | wf_get_uploaded_files("anexos")); |
---|
2820 | |
---|
2821 | $this->_Arquivos = array(); |
---|
2822 | |
---|
2823 | foreach($tmp_Arquivos as $elem){ |
---|
2824 | if(!$elem['error']) $this->_Arquivos[] = $elem; |
---|
2825 | } |
---|
2826 | |
---|
2827 | $this->DAO->Link_ID->StartTrans(); |
---|
2828 | |
---|
2829 | $query = " |
---|
2830 | SELECT |
---|
2831 | nextval('normas.seq_norma')"; |
---|
2832 | |
---|
2833 | $norma_id = $this->DAO->query($query); |
---|
2834 | |
---|
2835 | $query = " |
---|
2836 | INSERT INTO " . |
---|
2837 | "normas.norma(" . |
---|
2838 | "norma_id, " . |
---|
2839 | "elaborador_id, " . |
---|
2840 | "area_elaborador_id, " . |
---|
2841 | "area_gestora_id, " . |
---|
2842 | "gerente_id, " . |
---|
2843 | "diretor_juridico_id, " . |
---|
2844 | "diretoria_id, " . |
---|
2845 | "diretor_id, " . |
---|
2846 | "tipo_documento_id, " . |
---|
2847 | "macroprocesso_id, " . |
---|
2848 | "processo_id, " . |
---|
2849 | "titulo, " . |
---|
2850 | "num_revisao, " . |
---|
2851 | "sequencia, ". |
---|
2852 | "objetivo, " . |
---|
2853 | "ambito_aplicacao, " . |
---|
2854 | "palavras_chave, " . |
---|
2855 | "status) " . |
---|
2856 | "VALUES (?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?)"; |
---|
2857 | |
---|
2858 | |
---|
2859 | $args[] = $norma_id->fields['nextval']; |
---|
2860 | $args[] = $this->_Elaborador['user']['uidnumber']; |
---|
2861 | $args[] = $this->_Elaborador['area']['area_id']; |
---|
2862 | $args[] = $this->_Gestor['area']['area_id']; |
---|
2863 | $args[] = $this->_Gestor['user']['uidnumber']; |
---|
2864 | $args[] = $this->_DiretorJuridico['user']['uidnumber']; |
---|
2865 | $args[] = $this->_Diretor['area']['area_id']; |
---|
2866 | $args[] = $this->_Diretor['user']['uidnumber']; |
---|
2867 | $args[] = $this->_TipoDocumento['id']; |
---|
2868 | $args[] = $this->_Macroprocesso['id']; |
---|
2869 | $args[] = $this->_Processo['id']; |
---|
2870 | $args[] = $this->_TituloNorma; |
---|
2871 | $args[] = 1; |
---|
2872 | $args[] = $this->_getCodeSequence($this->_TipoDocumento['id'], |
---|
2873 | $this->_Macroprocesso['id']); |
---|
2874 | $args[] = $this->_ObjetivoNorma; |
---|
2875 | $args[] = $this->_AmbitoAplicacao['id']; |
---|
2876 | $args[] = $this->_PalavrasChave; |
---|
2877 | $args[] = 0; |
---|
2878 | |
---|
2879 | $queryOK = ($this->DAO->Link_ID->query($query, $args)) ? true : false; |
---|
2880 | |
---|
2881 | unset($args); |
---|
2882 | |
---|
2883 | $query = |
---|
2884 | "INSERT INTO " . |
---|
2885 | "normas.arquivo(" . |
---|
2886 | "norma_id, " . |
---|
2887 | "nome, " . |
---|
2888 | "tipo, " . |
---|
2889 | "tamanho, " . |
---|
2890 | "is_anexo," . |
---|
2891 | "conteudo) ". |
---|
2892 | "VALUES(?,?,?,?,?,?)"; |
---|
2893 | |
---|
2894 | for($i=0; $i < count($this->_Arquivos); $i++ ){ |
---|
2895 | |
---|
2896 | $args[] = $norma_id->fields['nextval']; |
---|
2897 | $args[] = $this->_Arquivos[$i]['name']; |
---|
2898 | $args[] = $this->_Arquivos[$i]['type']; |
---|
2899 | $args[] = $this->_Arquivos[$i]['size']; |
---|
2900 | $args[] = (!$i) ? 0 : 1; // false se não for anexo |
---|
2901 | $args[] = base64_encode(serialize(array($this->_Arquivos[$i]['content']))); |
---|
2902 | |
---|
2903 | if(!$this->DAO->Link_ID->query($query, $args)){ |
---|
2904 | $queryOK = false; |
---|
2905 | break; |
---|
2906 | } |
---|
2907 | |
---|
2908 | unset($args); |
---|
2909 | } |
---|
2910 | |
---|
2911 | if($queryOK) $this->DAO->Link_ID->CompleteTrans(); |
---|
2912 | else { |
---|
2913 | $this->DAO->Link_ID->FailTrans(); |
---|
2914 | $msgs[] = "A atualização no banco de dados falhou"; |
---|
2915 | |
---|
2916 | $this->addViewVar('msgs', $msgs); |
---|
2917 | $this->addViewVar('msgclass', "msg_erro"); |
---|
2918 | } |
---|
2919 | |
---|
2920 | $this->commitInstance(); |
---|
2921 | |
---|
2922 | } |
---|
2923 | |
---|
2924 | |
---|
2925 | /** |
---|
2926 | * função padrão da atividade. Preenche os arrays para posteriormente popular as combos da camada view, |
---|
2927 | * recupera as informações automáticas. |
---|
2928 | * |
---|
2929 | * @return void |
---|
2930 | * @access public |
---|
2931 | */ |
---|
2932 | function defaultAction(){ |
---|
2933 | |
---|
2934 | $area_elaborador = $this->_Elaborador['area']['sigla']. |
---|
2935 | " - ". |
---|
2936 | $this->_Elaborador['area']['descricao']; |
---|
2937 | |
---|
2938 | $areas_gestoras[0] = "--- Selecione a área gestora ---"; |
---|
2939 | foreach($this->pOrganizacaoAreas as $area){ |
---|
2940 | $areas_gestoras[$area['area_id']] = $area['sigla']. |
---|
2941 | " - ". |
---|
2942 | $area['descricao']; |
---|
2943 | } |
---|
2944 | |
---|
2945 | $query = |
---|
2946 | "SELECT ". |
---|
2947 | "* ". |
---|
2948 | "FROM " . |
---|
2949 | "normas.tipo_documento " . |
---|
2950 | "ORDER BY " . |
---|
2951 | "sigla"; |
---|
2952 | |
---|
2953 | $result = $this->DAO->query($query); |
---|
2954 | |
---|
2955 | while($row = $result->fetchRow()) |
---|
2956 | if($row) $rows[] = $row; |
---|
2957 | |
---|
2958 | $tipos_documentos[0] = "--- Selecione um tipo ---"; |
---|
2959 | foreach($rows as $elem){ |
---|
2960 | $tipos_documentos[$elem['tipo_documento_id']] = $elem['sigla']. |
---|
2961 | " - ". |
---|
2962 | $elem['descricao']; |
---|
2963 | } |
---|
2964 | |
---|
2965 | $query = |
---|
2966 | "SELECT ". |
---|
2967 | "* ". |
---|
2968 | "FROM " . |
---|
2969 | "normas.macroprocesso " . |
---|
2970 | "ORDER BY " . |
---|
2971 | "sigla"; |
---|
2972 | |
---|
2973 | $result = $this->DAO->query($query); |
---|
2974 | |
---|
2975 | unset($rows); |
---|
2976 | |
---|
2977 | while($row = $result->fetchRow()) |
---|
2978 | if($row) $rows[] = $row; |
---|
2979 | |
---|
2980 | $macroprocessos[0] = "--- Selecione um macroprocesso ---"; |
---|
2981 | foreach($rows as $elem){ |
---|
2982 | $macroprocessos[$elem['macroprocesso_id']] = $elem['sigla']. |
---|
2983 | " - ". |
---|
2984 | $elem['descricao']; |
---|
2985 | } |
---|
2986 | |
---|
2987 | $result = $this->pOrgchart->getOrganizationAreas($this->_Elaborador['employee']['organizacao_id']); |
---|
2988 | |
---|
2989 | $ambito_aplicacao[0] = "--- Selecione uma área ---"; |
---|
2990 | foreach($result as $area){ |
---|
2991 | $ambito_aplicacao[$area['area_id']] = $area['sigla']. |
---|
2992 | " - ". |
---|
2993 | $area['descricao']; |
---|
2994 | } |
---|
2995 | |
---|
2996 | $this->addViewVar('activity_title', "Sistema Normativo - Elaborar Norma"); |
---|
2997 | $this->addViewVar('nomeElaborador', $this->_Elaborador['user']['cn']); |
---|
2998 | $this->addViewVar('nomeArea', $area_elaborador); |
---|
2999 | |
---|
3000 | $this->addViewVar('cbAreasGestoras', $areas_gestoras); |
---|
3001 | $this->addViewVar('cbTiposDocumentos', $tipos_documentos); |
---|
3002 | $this->addViewVar('cbMacroprocessos', $macroprocessos); |
---|
3003 | $this->addViewVar('cbAmbitoAplicacao', $ambito_aplicacao); |
---|
3004 | |
---|
3005 | } |
---|
3006 | |
---|
3007 | } |
---|
3008 | |
---|
3009 | ?> |
---|
3010 | ]]></code> </include> |
---|
3011 | <include> |
---|
3012 | <name>class.macroprocesso.controller.php</name> |
---|
3013 | <code><![CDATA[<?php |
---|
3014 | /** |
---|
3015 | * Classe Macroprocesso da Controller |
---|
3016 | * |
---|
3017 | * @author Guilherme Striquer Bisotto |
---|
3018 | * @version 1.0 |
---|
3019 | */ |
---|
3020 | class MacroprocessoController extends Controller{ |
---|
3021 | |
---|
3022 | /** |
---|
3023 | * armazena o nome do template de edição/alteração de macroprocesso |
---|
3024 | */ |
---|
3025 | var $INS = 'Manter_Macroprocesso_Inc_Alt.tpl'; |
---|
3026 | |
---|
3027 | /** |
---|
3028 | * armazena o nome do template de edição/alteração de macroprocesso |
---|
3029 | */ |
---|
3030 | var $EDT = 'Manter_Macroprocesso_Inc_Alt.tpl'; |
---|
3031 | |
---|
3032 | /** |
---|
3033 | * Executa a chamada do método incluirAction, carrega as variáveis |
---|
3034 | * da camada view e mostra o template de inserção |
---|
3035 | * |
---|
3036 | * @access public |
---|
3037 | * @return void |
---|
3038 | */ |
---|
3039 | function incluir(){ |
---|
3040 | $this->model->incluirAction(); |
---|
3041 | $this->showForm($this->INS); |
---|
3042 | $this->loadViewVars(); |
---|
3043 | } |
---|
3044 | |
---|
3045 | /** |
---|
3046 | * Executa a chamada do método inserirAction e executa o método |
---|
3047 | * default |
---|
3048 | * |
---|
3049 | * @return void |
---|
3050 | * @access public |
---|
3051 | */ |
---|
3052 | function inserir(){ |
---|
3053 | $this->model->inserirAction(); |
---|
3054 | $this->__default(); |
---|
3055 | } |
---|
3056 | |
---|
3057 | /** |
---|
3058 | * Executa o método default |
---|
3059 | */ |
---|
3060 | function cancelar(){ |
---|
3061 | $this->__default(); |
---|
3062 | } |
---|
3063 | |
---|
3064 | /** |
---|
3065 | * Executa a chamada do método editarAction |
---|
3066 | * carrega as variáveis da camada view e mostra o |
---|
3067 | * template de edição de macroprocessos |
---|
3068 | * |
---|
3069 | * @access public |
---|
3070 | * @return void |
---|
3071 | */ |
---|
3072 | function editar(){ |
---|
3073 | $this->model->editarAction(); |
---|
3074 | $this->loadViewVars(); |
---|
3075 | $this->showForm($this->EDT); |
---|
3076 | } |
---|
3077 | |
---|
3078 | /** |
---|
3079 | * Executa a chamada do método alterarAction |
---|
3080 | * e executa o método default |
---|
3081 | * |
---|
3082 | * @access public |
---|
3083 | * @return void |
---|
3084 | */ |
---|
3085 | function alterar(){ |
---|
3086 | $this->model->alterarAction(); |
---|
3087 | $this->__default(); |
---|
3088 | } |
---|
3089 | |
---|
3090 | /** |
---|
3091 | * Ação padrão da atividade. |
---|
3092 | * |
---|
3093 | * @return boolean |
---|
3094 | * @access private |
---|
3095 | */ |
---|
3096 | function __default(){ |
---|
3097 | $this->model->defaultAction(); |
---|
3098 | $this->loadViewVars(); |
---|
3099 | } |
---|
3100 | |
---|
3101 | /** |
---|
3102 | * Execução da aplicação. |
---|
3103 | * |
---|
3104 | * @return void |
---|
3105 | * @access public |
---|
3106 | */ |
---|
3107 | function run ($action){ |
---|
3108 | $this->model->DAO->connect(); |
---|
3109 | $this->dispatch($action); |
---|
3110 | $this->model->DAO->disconnect(); |
---|
3111 | } |
---|
3112 | } |
---|
3113 | ?> |
---|
3114 | ]]></code> </include> |
---|
3115 | <include> |
---|
3116 | <name>class.macroprocesso.model.php</name> |
---|
3117 | <code><![CDATA[<?php |
---|
3118 | /** |
---|
3119 | * Classe de Macroprocesso |
---|
3120 | * |
---|
3121 | * @author Guilherme Striquer Bisotto |
---|
3122 | * @version 1.0 |
---|
3123 | */ |
---|
3124 | class MacroprocessoModel extends Model{ |
---|
3125 | |
---|
3126 | /** |
---|
3127 | * Carrega as variáveis da view com os macroprocessos existentes e a descrição |
---|
3128 | * para a posterior alteração |
---|
3129 | * |
---|
3130 | * @access public |
---|
3131 | * @return void |
---|
3132 | */ |
---|
3133 | function editarAction(){ |
---|
3134 | $id = $this->request['params']; |
---|
3135 | |
---|
3136 | $query = "SELECT * FROM normas.macroprocesso ". |
---|
3137 | "WHERE macroprocesso_id = ?"; |
---|
3138 | |
---|
3139 | $result = $this->DAO->Link_ID->query($query, array($id)); |
---|
3140 | |
---|
3141 | $this->addViewVar('modo', "alterar"); |
---|
3142 | $this->addViewVar('macroprocesso', $result->fields); |
---|
3143 | $this->addViewVar('activity_title', "Sistema Normativo - Alterar Macroprocesso"); |
---|
3144 | } |
---|
3145 | |
---|
3146 | /** |
---|
3147 | * método de atualização dos dados de um macroprocesso no banco de dados |
---|
3148 | * |
---|
3149 | * @access public |
---|
3150 | * @return void |
---|
3151 | */ |
---|
3152 | function alterarAction(){ |
---|
3153 | $id = $this->request['id']; |
---|
3154 | |
---|
3155 | $query = |
---|
3156 | "UPDATE " . |
---|
3157 | "normas.macroprocesso ". |
---|
3158 | "SET " . |
---|
3159 | "sigla = ?, " . |
---|
3160 | "descricao = ? " . |
---|
3161 | "WHERE " . |
---|
3162 | "macroprocesso_id = ?"; |
---|
3163 | |
---|
3164 | $args[] = $this->request['sigla']; |
---|
3165 | $args[] = $this->request['descricao']; |
---|
3166 | $args[] = $id; |
---|
3167 | |
---|
3168 | $result = $this->DAO->Link_ID->query($query, $args); |
---|
3169 | |
---|
3170 | if($result){ |
---|
3171 | $this->addViewVar('msgclass', "msg_sucesso"); |
---|
3172 | $this->addViewVar('msgs', array("Cadastro atualizado com sucesso")); |
---|
3173 | } else { |
---|
3174 | $this->addViewVar('msgclass', "msg_erro"); |
---|
3175 | $this->addViewVar('msgs', array("Não foi possível atualizar o cadastro")); |
---|
3176 | } |
---|
3177 | } |
---|
3178 | |
---|
3179 | /** |
---|
3180 | * Carrega as variáveis da view para mostrar a tela de inclusão de macroprocessos |
---|
3181 | * |
---|
3182 | * @access public |
---|
3183 | * @return void |
---|
3184 | */ |
---|
3185 | function incluirAction(){ |
---|
3186 | $this->addViewVar('modo', "inserir"); |
---|
3187 | $this->addViewVar('activity_title', "Sistema Normativo - Incluir Macroprocesso"); |
---|
3188 | } |
---|
3189 | |
---|
3190 | /** |
---|
3191 | * Método de inclusão de um macroprocesso no banco de dados |
---|
3192 | * |
---|
3193 | * @access public |
---|
3194 | * @return void |
---|
3195 | */ |
---|
3196 | function inserirAction(){ |
---|
3197 | if(!($args[] = $this->request['sigla'])) |
---|
3198 | $msgs[] = "O campo SIGLA deve ser preenchido."; |
---|
3199 | |
---|
3200 | if(!($args[] = $this->request['descricao'])) |
---|
3201 | $msgs[] = "O campo DESCRIÇÃO deve ser preenchido."; |
---|
3202 | |
---|
3203 | if(!count($msgs)){ |
---|
3204 | $query = "INSERT INTO " . |
---|
3205 | "normas.macroprocesso(sigla, descricao) ". |
---|
3206 | "VALUES(?,?)"; |
---|
3207 | |
---|
3208 | if($this->DAO->Link_ID->query($query, $args)){ |
---|
3209 | $this->addViewVar('msgclass', "msg_sucesso"); |
---|
3210 | $this->addViewVar('msgs', array("Cadastro realizado com sucesso")); |
---|
3211 | } else { |
---|
3212 | $this->addViewVar('msgclass', "msg_erro"); |
---|
3213 | $this->addViewVar('msgs', array("Não foi possível fazer o cadastro")); |
---|
3214 | } |
---|
3215 | } else { |
---|
3216 | $this->addViewVar('msgclass', "msg_erro"); |
---|
3217 | $this->addViewVar('msgs', $msgs); |
---|
3218 | } |
---|
3219 | } |
---|
3220 | |
---|
3221 | /** |
---|
3222 | * Mostra a listagem de todos os macroprocessos existentes utilizando a classe de paginação |
---|
3223 | * |
---|
3224 | * @access public |
---|
3225 | * @return void |
---|
3226 | */ |
---|
3227 | function defaultAction(){ |
---|
3228 | $this->addViewVar("titulo","Sistema de Normas"); |
---|
3229 | $this->addViewVar("activity_title", "Sistema Normativo - Manter Macroprocesso"); |
---|
3230 | |
---|
3231 | $query = "SELECT " . |
---|
3232 | "* " . |
---|
3233 | "FROM " . |
---|
3234 | "normas.macroprocesso"; |
---|
3235 | |
---|
3236 | $titulos_ordenacao = array(); |
---|
3237 | $titulos_ordenacao[] = array('name' => "Sigla", 'id' => "1"); |
---|
3238 | $titulos_ordenacao[] = array('name' => "Descricao", 'id' => "2"); |
---|
3239 | |
---|
3240 | $paging = $this->factory->getInstance("wf_paging"); |
---|
3241 | $paging->configure(PAGING_NUMBER_OF_ITEMS, $_GET); |
---|
3242 | $paging->useDatabase(true); |
---|
3243 | $paging->enableSorting(true); |
---|
3244 | $paging->setSortingTitles($titulos_ordenacao); |
---|
3245 | |
---|
3246 | $result = $paging->restrictDBItems($this->DAO, $query); |
---|
3247 | |
---|
3248 | $this->addViewVar('titulos_ordenacao', $paging->getSortingTitles()); |
---|
3249 | $this->addViewVar('count_items', $paging->itemsCount); |
---|
3250 | $this->addViewVar('result', $result); |
---|
3251 | $this->addViewVar('linksPaginacao', $paging->autoLinks(PAGING_MAX_NUMBER_OF_LINKS)); |
---|
3252 | } |
---|
3253 | } |
---|
3254 | |
---|
3255 | ?> |
---|
3256 | ]]></code> </include> |
---|
3257 | <include> |
---|
3258 | <name>class.model.inc.php</name> |
---|
3259 | <code><![CDATA[<?php
|
---|
3260 |
|
---|
3261 | /**
|
---|
3262 | * Classe base para as classes Model criadas no processo
|
---|
3263 | * @author Guilherme Striquer Bisotto
|
---|
3264 | * @version 1.0
|
---|
3265 | * @package Workflow
|
---|
3266 | **/
|
---|
3267 | class Model extends BaseModel {
|
---|
3268 |
|
---|
3269 | var $rows_per_page;
|
---|
3270 |
|
---|
3271 | /**
|
---|
3272 | * Objeto wf_ldap
|
---|
3273 | * @access protected
|
---|
3274 | */
|
---|
3275 | var $pLdap;
|
---|
3276 |
|
---|
3277 | /**
|
---|
3278 | * Objeto wf_orgchart
|
---|
3279 | * @access protected
|
---|
3280 | */
|
---|
3281 | var $pOrgchart;
|
---|
3282 |
|
---|
3283 | /**
|
---|
3284 | * Arrays que armazenam
|
---|
3285 | * na posição 'user' o array que é retornado no método get_entry do wf_ldap
|
---|
3286 | * na posição 'employee' o array que é retornado no método getEmployee do wf_orgchart
|
---|
3287 | * na posição 'area' o array que é retornado no método getArea do wf_orgchart
|
---|
3288 | * @access protected
|
---|
3289 | */
|
---|
3290 | var $_Elaborador = array(); // ['user']['employee']['area']
|
---|
3291 | var $_Gestor = array(); // ['user']['employee']['area']
|
---|
3292 | var $_Diretor = array(); // ['user']['employee']['area']
|
---|
3293 | var $_DiretorJuridico = array(); // ['user']['employee']['area']
|
---|
3294 |
|
---|
3295 | /**
|
---|
3296 | * Arrays que armazenam
|
---|
3297 | * na posição 'id' o id do tipo do documento, macroprocesso ou processo
|
---|
3298 | * na posição 'cn' o nome completo do tipo do documento, macroprocesso ou processo
|
---|
3299 | * @access protected
|
---|
3300 | */
|
---|
3301 | var $_TipoDocumento = array(); // ['id']['cn']
|
---|
3302 | var $_Macroprocesso = array(); // ['id']['cn']
|
---|
3303 | var $_Processo = array(); // ['id']['cn']
|
---|
3304 |
|
---|
3305 | /**
|
---|
3306 | * O título da norma
|
---|
3307 | * @access protected
|
---|
3308 | */
|
---|
3309 | var $_TituloNorma; // string
|
---|
3310 |
|
---|
3311 | /**
|
---|
3312 | * O código completo da norma
|
---|
3313 | * @access protected
|
---|
3314 | */
|
---|
3315 | var $_CodigoNorma; // string
|
---|
3316 |
|
---|
3317 | /**
|
---|
3318 | * A data de início da vigencia da norma
|
---|
3319 | * @access protected
|
---|
3320 | */
|
---|
3321 | var $_DataVigencia; // string
|
---|
3322 |
|
---|
3323 | /**
|
---|
3324 | * O objetivo da criação da norma
|
---|
3325 | * @access protected
|
---|
3326 | */
|
---|
3327 | var $_ObjetivoNorma; // string
|
---|
3328 |
|
---|
3329 | /**
|
---|
3330 | * O id da área sob a qual a norma será aplicada
|
---|
3331 | * @access protected
|
---|
3332 | */
|
---|
3333 | var $_AmbitoAplicacao; // string
|
---|
3334 |
|
---|
3335 | /**
|
---|
3336 | * As palavras chave da norma
|
---|
3337 | * @access protected
|
---|
3338 | */
|
---|
3339 | var $_PalavrasChave; // array
|
---|
3340 |
|
---|
3341 | /**
|
---|
3342 | * Contém o código do status da norma:
|
---|
3343 | * 0: Em Elaboração
|
---|
3344 | * 1: Vigente
|
---|
3345 | * 2: Obsoleta
|
---|
3346 | * 3: Suspensa
|
---|
3347 | * 4: Revogada
|
---|
3348 | * 5: Em Revisão
|
---|
3349 | * def: ERROR
|
---|
3350 | */
|
---|
3351 | var $_Status;
|
---|
3352 |
|
---|
3353 | /**
|
---|
3354 | * Contém o número de revisões que a norma sofreu
|
---|
3355 | */
|
---|
3356 | var $_NumRevisao;
|
---|
3357 |
|
---|
3358 | /**
|
---|
3359 | * Um array de arrays do tipo
|
---|
3360 | * array(
|
---|
3361 | * 'name',
|
---|
3362 | * 'type',
|
---|
3363 | * 'content',
|
---|
3364 | * 'size'
|
---|
3365 | * )
|
---|
3366 | */
|
---|
3367 | var $_Arquivos; // tipo Array (wf_get_uploaded_files)
|
---|
3368 |
|
---|
3369 | /**
|
---|
3370 | * gera o próximo número sequencial para a uma nova norma
|
---|
3371 | *
|
---|
3372 | * @access protected
|
---|
3373 | * @return int O próximo número sequencial para uma norma
|
---|
3374 | * @param int $tpd_id O id do tipo do documento da nova norma
|
---|
3375 | * @param int $mpr_id O id do macroprocesso da nova norma
|
---|
3376 | */
|
---|
3377 | function _getCodeSequence($tpd_id, $mpr_id){
|
---|
3378 |
|
---|
3379 | $query =
|
---|
3380 | "SELECT " .
|
---|
3381 | "COUNT (1) AS qtd " .
|
---|
3382 | "FROM " .
|
---|
3383 | "normas.norma AS nrm " .
|
---|
3384 | "WHERE " .
|
---|
3385 | "nrm.tipo_documento_id = ".$tpd_id.
|
---|
3386 | " AND " .
|
---|
3387 | "nrm.macroprocesso_id = ".$mpr_id.
|
---|
3388 | " AND ".
|
---|
3389 | "nrm.status = 1";
|
---|
3390 |
|
---|
3391 | $result = $this->DAO->query($query);
|
---|
3392 | echo "quantidade ".$result->fields['qtd'];
|
---|
3393 | return $result->fields['qtd'] + 1;
|
---|
3394 |
|
---|
3395 | }
|
---|
3396 |
|
---|
3397 | /**
|
---|
3398 | * função para carregar as properties a partir do banco de dados
|
---|
3399 | *
|
---|
3400 | * @access protected
|
---|
3401 | * @return void
|
---|
3402 | * @param int $nrm_id o id da norma da qual serão extraídos os dados para a carga das properties
|
---|
3403 | */
|
---|
3404 | function _updateDataBaseAttributesAction($nrm_id){
|
---|
3405 |
|
---|
3406 | $query =
|
---|
3407 | "SELECT ".
|
---|
3408 | "nrm.norma_id AS nrm_id, " .
|
---|
3409 | "nrm.elaborador_id AS nrm_elaborador_id, " .
|
---|
3410 | "nrm.area_elaborador_id AS nrm_area_elaborador_id, " .
|
---|
3411 | "nrm.gerente_id AS nrm_gerente_id, " .
|
---|
3412 | "nrm.area_gestora_id AS nrm_area_gestora_id, " .
|
---|
3413 | "nrm.diretor_id AS nrm_diretor_id, " .
|
---|
3414 | "nrm.diretoria_id AS nrm_diretoria_id, " .
|
---|
3415 | "nrm.diretor_juridico_id AS nrm_diretor_juridico_id, " .
|
---|
3416 | "nrm.tipo_documento_id AS nrm_tpd_id, " .
|
---|
3417 | "nrm.macroprocesso_id AS nrm_mpr_id, " .
|
---|
3418 | "nrm.processo_id AS nrm_pro_id, " .
|
---|
3419 | "nrm.titulo AS nrm_titulo, " .
|
---|
3420 | "(tpd.sigla || '-' || mpr.sigla || '-' || ltrim(to_char(nrm.sequencia,'000')) || '-' || ltrim(to_char(nrm.num_revisao,'00'))) AS nrm_codigo, ".
|
---|
3421 | "to_char(nrm.data_vigencia, 'DD/MM/YYYY') AS nrm_data_vigencia, " .
|
---|
3422 | "nrm.objetivo AS nrm_objetivo, " .
|
---|
3423 | "nrm.ambito_aplicacao AS nrm_ambito_aplicacao, " .
|
---|
3424 | "nrm.palavras_chave AS nrm_palavras_chave, " .
|
---|
3425 | "nrm.status AS nrm_status, " .
|
---|
3426 | "nrm.num_revisao AS nrm_num_revisao, " .
|
---|
3427 | "tpd.tipo_documento_id AS tpd_id, " .
|
---|
3428 | "tpd.sigla AS tpd_sigla, " .
|
---|
3429 | "tpd.descricao AS tpd_descricao, " .
|
---|
3430 | "mpr.macroprocesso_id AS mpr_id, " .
|
---|
3431 | "mpr.sigla AS mpr_sigla, " .
|
---|
3432 | "mpr.descricao AS mpr_descricao, " .
|
---|
3433 | "pro.processo_id AS pro_id, " .
|
---|
3434 | "pro.descricao AS pro_descricao " .
|
---|
3435 | "FROM ".
|
---|
3436 | "normas.norma nrm ".
|
---|
3437 | "INNER JOIN ".
|
---|
3438 | "normas.tipo_documento tpd ".
|
---|
3439 | "ON ".
|
---|
3440 | "(nrm.tipo_documento_id = tpd.tipo_documento_id) ".
|
---|
3441 | "INNER JOIN ".
|
---|
3442 | "normas.macroprocesso mpr ".
|
---|
3443 | "ON ".
|
---|
3444 | "(nrm.macroprocesso_id = mpr.macroprocesso_id) ".
|
---|
3445 | "INNER JOIN ".
|
---|
3446 | "normas.processo pro ".
|
---|
3447 | "ON ".
|
---|
3448 | "(nrm.processo_id = pro.processo_id) " .
|
---|
3449 | "WHERE " .
|
---|
3450 | "nrm.norma_id = ?";
|
---|
3451 |
|
---|
3452 | $result = $this->DAO->Link_ID->query($query, array($nrm_id));
|
---|
3453 |
|
---|
3454 | $this->_Elaborador =
|
---|
3455 | $this->_setEmployee($result->fields['nrm_elaborador_id'],
|
---|
3456 | $result->fields['nrm_area_elaborador_id']);
|
---|
3457 |
|
---|
3458 | $this->_Gestor =
|
---|
3459 | $this->_setEmployee($result->fields['nrm_gerente_id'],
|
---|
3460 | $result->fields['nrm_area_gestora_id']);
|
---|
3461 |
|
---|
3462 | $this->_Diretor =
|
---|
3463 | $this->_setEmployee($result->fields['nrm_diretor_id'],
|
---|
3464 | $result->fields['nrm_diretoria_id']);
|
---|
3465 |
|
---|
3466 | $this->_DiretorJuridico =
|
---|
3467 | $this->_setEmployee($result->fields['nrm_diretor_juridico_id'],
|
---|
3468 | ID_AREA_DJ);
|
---|
3469 |
|
---|
3470 |
|
---|
3471 | $this->_TipoDocumento['id'] = $result->fields['tpd_id'];
|
---|
3472 | $this->_TipoDocumento['cn'] = $result->fields['tpd_sigla'].
|
---|
3473 | " - ".
|
---|
3474 | $result->fields['tpd_descricao'];
|
---|
3475 |
|
---|
3476 | $this->_Macroprocesso['id'] = $result->fields['mpr_id'];
|
---|
3477 | $this->_Macroprocesso['cn'] = $result->fields['mpr_sigla'].
|
---|
3478 | " - ".
|
---|
3479 | $result->fields['mpr_descricao'];
|
---|
3480 |
|
---|
3481 | $this->_Processo['id'] = $result->fields['pro_id'];
|
---|
3482 | $this->_Processo['cn'] = $result->fields['pro_descricao'];
|
---|
3483 |
|
---|
3484 | $this->_TituloNorma = $result->fields['nrm_titulo'];
|
---|
3485 | $this->_CodigoNorma = $result->fields['nrm_codigo'];
|
---|
3486 | $this->_DataVigencia = $result->fields['nrm_data_vigencia'];
|
---|
3487 | $this->_ObjetivoNorma = $result->fields['nrm_objetivo'];
|
---|
3488 | $ambito_aplicacao = $this->pOrgchart->getArea($result->fields['nrm_ambito_aplicacao']);
|
---|
3489 | $this->_AmbitoAplicacao['id'] = $ambito_aplicacao['area_id'];
|
---|
3490 | $this->_AmbitoAplicacao['cn'] = $ambito_aplicacao['sigla'].
|
---|
3491 | " - ".
|
---|
3492 | $ambito_aplicacao['descricao'];
|
---|
3493 | $this->_PalavrasChave = $result->fields['nrm_palavras_chave'];
|
---|
3494 | $this->_Status['id'] = $result->fields['nrm_status'];
|
---|
3495 | $this->_NumRevisao = $result->fields['nrm_num_revisao'];
|
---|
3496 |
|
---|
3497 | switch($result->fields['nrm_status']){
|
---|
3498 | case 0:
|
---|
3499 | $this->_Status['cn'] = "Em Elaboração";
|
---|
3500 | break;
|
---|
3501 | case 1:
|
---|
3502 | $this->_Status['cn'] = "Vigente";
|
---|
3503 | break;
|
---|
3504 | case 2:
|
---|
3505 | $this->_Status['cn'] = "Obsoleta";
|
---|
3506 | break;
|
---|
3507 | case 3:
|
---|
3508 | $this->_Status['cn'] = "Suspensa";
|
---|
3509 | break;
|
---|
3510 | case 4:
|
---|
3511 | $this->_Status['cn'] = "Revogada";
|
---|
3512 | break;
|
---|
3513 | case 5:
|
---|
3514 | $this->_Status['cn'] = "Em Revisão";
|
---|
3515 | break;
|
---|
3516 | default:
|
---|
3517 | $this->_Status['cn'] = "ERROR";
|
---|
3518 | }
|
---|
3519 |
|
---|
3520 | $this->_updateDataBaseFilesAction($nrm_id);
|
---|
3521 |
|
---|
3522 | }
|
---|
3523 |
|
---|
3524 | /**
|
---|
3525 | * função que carrega a property _Arquivos a partir de dados do banco de dados
|
---|
3526 | *
|
---|
3527 | * @access protected
|
---|
3528 | * @return void
|
---|
3529 | * @param int $nrm_id O id da norma da qual se quer fazer download dos arquivos
|
---|
3530 | */
|
---|
3531 | function _updateDataBaseFilesAction( $nrm_id ){
|
---|
3532 | $query =
|
---|
3533 | "SELECT " .
|
---|
3534 | "* " .
|
---|
3535 | "FROM " .
|
---|
3536 | "normas.arquivo " .
|
---|
3537 | "WHERE " .
|
---|
3538 | "norma_id = ? " .
|
---|
3539 | "ORDER BY " .
|
---|
3540 | "is_anexo";
|
---|
3541 |
|
---|
3542 | $result = $this->DAO->Link_ID->query($query, array($nrm_id));
|
---|
3543 |
|
---|
3544 | while($row = $result->fetchRow())
|
---|
3545 | if($row) $tmpArquivos[] = $row;
|
---|
3546 |
|
---|
3547 | for($i = 0; $i < count($tmpArquivos); $i++){
|
---|
3548 |
|
---|
3549 | $this->_Arquivos[$i]['arquivo_id'] = $tmpArquivos[$i]['arquivo_id'];
|
---|
3550 | $this->_Arquivos[$i]['name'] = $tmpArquivos[$i]['nome'];
|
---|
3551 | $this->_Arquivos[$i]['type'] = $tmpArquivos[$i]['tipo'];
|
---|
3552 | $this->_Arquivos[$i]['size'] = $tmpArquivos[$i]['tamanho'];
|
---|
3553 | $conteudo = unserialize(base64_decode($tmpArquivos[$i]['conteudo']));
|
---|
3554 | $this->_Arquivos[$i]['content'] = $conteudo[0];
|
---|
3555 | $this->_Arquivos[$i]['is_anexo'] = $tmpArquivos[$i]['is_anexo'];
|
---|
3556 |
|
---|
3557 | }
|
---|
3558 |
|
---|
3559 | }
|
---|
3560 |
|
---|
3561 |
|
---|
3562 | /**
|
---|
3563 | * função para automatizar o carregamento dos atributos _Elaborador, _Gestor,
|
---|
3564 | * _Diretor e _DiretorJuridico
|
---|
3565 | *
|
---|
3566 | * @access protected
|
---|
3567 | * @param int $uid O Id do usuário
|
---|
3568 | * @param int $area_id O Id da área
|
---|
3569 | * @return Um array de arrays com os dados de user (ldap), employee (orgchart) e área (orgchart)
|
---|
3570 | */
|
---|
3571 | function _setEmployee($uid, $area_id){
|
---|
3572 | $ret['user'] = $this->pLdap->get_entry($uid);
|
---|
3573 | $ret['employee'] = $this->pOrgchart->getEmployee($uid);
|
---|
3574 | $ret['area'] = $this->pOrgchart->getArea($area_id);
|
---|
3575 | return $ret;
|
---|
3576 | }
|
---|
3577 |
|
---|
3578 |
|
---|
3579 | /**
|
---|
3580 | * função para fazer download de arquivos que estejam no banco de dados
|
---|
3581 | *
|
---|
3582 | * @access protected
|
---|
3583 | * @return void
|
---|
3584 | */
|
---|
3585 | function downloadDataBaseAction(){
|
---|
3586 |
|
---|
3587 | $this->_updateDataBaseFilesAction( $_GET['norma_id'] );
|
---|
3588 | $this->_downloadAction();
|
---|
3589 |
|
---|
3590 | }
|
---|
3591 |
|
---|
3592 | /**
|
---|
3593 | * função para fazer download de arquivos que estejam em na property _Arquivos
|
---|
3594 | * da instancia
|
---|
3595 | *
|
---|
3596 | * @access protected
|
---|
3597 | * @return void
|
---|
3598 | */
|
---|
3599 | function downloadPropertiesAction(){
|
---|
3600 |
|
---|
3601 | $this->updateAttributes();
|
---|
3602 | $this->_downloadAction();
|
---|
3603 | }
|
---|
3604 |
|
---|
3605 | /**
|
---|
3606 | * função para fazer downloads de arquivos desde que eles estejam no
|
---|
3607 | * atributo _Arquivos da classe model
|
---|
3608 | *
|
---|
3609 | * @access privado
|
---|
3610 | * $return void
|
---|
3611 | */
|
---|
3612 | function _downloadAction(){
|
---|
3613 |
|
---|
3614 | function download($params){
|
---|
3615 |
|
---|
3616 | foreach($params['model']->_Arquivos as $arq)
|
---|
3617 | if($arq['arquivo_id'] == $params['id']){
|
---|
3618 | $fileToDownload = array();
|
---|
3619 | $fileToDownload['filename'] = $arq['name'];
|
---|
3620 | $fileToDownload['content'] = $arq['content'];
|
---|
3621 | }
|
---|
3622 |
|
---|
3623 | return $fileToDownload;
|
---|
3624 |
|
---|
3625 | }
|
---|
3626 |
|
---|
3627 | wf_handle_download(array_merge($_GET, array('model' => $this)), "download");
|
---|
3628 | }
|
---|
3629 |
|
---|
3630 | /**
|
---|
3631 | * carrega os atributos da classe model dos dados do banco e
|
---|
3632 | * carrega as variáveis da camada view
|
---|
3633 | *
|
---|
3634 | * @access protected
|
---|
3635 | * @return void
|
---|
3636 | */
|
---|
3637 | function _visualizarNorma(){
|
---|
3638 |
|
---|
3639 | $nrm_id = $this->request['params'];
|
---|
3640 |
|
---|
3641 | $this->_updateDataBaseAttributesAction($nrm_id);
|
---|
3642 |
|
---|
3643 | for($i = 0; $i < count($this->_Arquivos); $i++){
|
---|
3644 | $Arquivos[$i]['id'] = $this->_Arquivos[$i]['arquivo_id'];
|
---|
3645 | $Arquivos[$i]['nome'] = $this->_Arquivos[$i]['name'];
|
---|
3646 | }
|
---|
3647 |
|
---|
3648 | $this->addViewVar('NormaId', $nrm_id);
|
---|
3649 |
|
---|
3650 | $this->addViewVar('nomeElaborador', $this->_Elaborador['user']['cn']);
|
---|
3651 |
|
---|
3652 | $this->addViewVar('nomeArea', $this->_Elaborador['area']['sigla'].
|
---|
3653 | " - ".
|
---|
3654 | $this->_Elaborador['area']['descricao']);
|
---|
3655 |
|
---|
3656 | $this->addViewVar('nomeAreaGestora', $this->_Gestor['area']['sigla'].
|
---|
3657 | " - " .
|
---|
3658 | $this->_Gestor['area']['descricao']);
|
---|
3659 |
|
---|
3660 | $this->addViewVar('nomeGestor', $this->_Gestor['user']['cn']);
|
---|
3661 | $this->addViewVar('nomeDiretorJuridico', $this->_DiretorJuridico['user']['cn']);
|
---|
3662 |
|
---|
3663 | $this->addViewVar('nomeDiretoria', $this->_Diretor['area']['sigla'].
|
---|
3664 | " - ".
|
---|
3665 | $this->_Diretor['area']['descricao']);
|
---|
3666 |
|
---|
3667 | $this->addViewVar('nomeDiretor', $this->_Diretor['user']['cn']);
|
---|
3668 | $this->addViewVar('nomeTipoDocumento', $this->_TipoDocumento['cn']);
|
---|
3669 | $this->addViewVar('nomeMacroprocesso', $this->_Macroprocesso['cn']);
|
---|
3670 | $this->addViewVar('nomeProcesso', $this->_Processo['cn']);
|
---|
3671 | $this->addViewVar('TituloNorma', $this->_TituloNorma);
|
---|
3672 | $this->addViewVar('CodigoNorma', $this->_CodigoNorma);
|
---|
3673 | $this->addViewVar('DataVigencia', $this->_DataVigencia);
|
---|
3674 | $this->addViewVar('ObjetivoNorma', $this->_ObjetivoNorma);
|
---|
3675 | $this->addViewVar('nomeAmbitoAplicacao', $this->_AmbitoAplicacao['cn']);
|
---|
3676 | $this->addViewVar('PalavrasChave', $this->_PalavrasChave);
|
---|
3677 | $this->addViewVar('nomeStatus', $this->_Status['cn']);
|
---|
3678 |
|
---|
3679 | $this->addViewVar('Arquivos', $Arquivos);
|
---|
3680 |
|
---|
3681 | $this->addViewVar('downloadMethod', "downloadDataBase");
|
---|
3682 |
|
---|
3683 | $this->addViewVar('activity_title', "Sistema Normativo - Visualizar Norma - ".$this->_CodigoNorma);
|
---|
3684 |
|
---|
3685 | }
|
---|
3686 | }
|
---|
3687 | ?>
|
---|
3688 | ]]></code> </include> |
---|
3689 | <include> |
---|
3690 | <name>class.processo.controller.php</name> |
---|
3691 | <code><![CDATA[<?php |
---|
3692 | /** |
---|
3693 | * Classe Processo da Controller |
---|
3694 | * |
---|
3695 | * @author Guilherme Striquer Bisotto |
---|
3696 | * @version 1.0 |
---|
3697 | */ |
---|
3698 | class ProcessoController extends Controller{ |
---|
3699 | |
---|
3700 | /** |
---|
3701 | * Armazena o nome do template de incluir/alterar um processo |
---|
3702 | */ |
---|
3703 | var $INS = 'Manter_Processo_Inc_Alt.tpl'; |
---|
3704 | |
---|
3705 | /** |
---|
3706 | * Armazena o nome do template de incluir/alterar um processo |
---|
3707 | */ |
---|
3708 | var $EDT = 'Manter_Processo_Inc_Alt.tpl'; |
---|
3709 | |
---|
3710 | /** |
---|
3711 | * Mostra o formulário para inclusão de um novo processo |
---|
3712 | * |
---|
3713 | * @return NULL |
---|
3714 | * @access public |
---|
3715 | */ |
---|
3716 | function incluir(){ |
---|
3717 | $this->model->incluirAction(); |
---|
3718 | $this->loadViewVars(); |
---|
3719 | $this->showForm($this->INS); |
---|
3720 | } |
---|
3721 | |
---|
3722 | /** |
---|
3723 | * Executa a ação de inserir um novo processo no banco |
---|
3724 | * |
---|
3725 | * @return NULL |
---|
3726 | * @access public |
---|
3727 | */ |
---|
3728 | function inserir(){ |
---|
3729 | $this->model->inserirAction(); |
---|
3730 | $this->__default(); |
---|
3731 | } |
---|
3732 | |
---|
3733 | /** |
---|
3734 | * Mostra o formulário de edição de um processo existente |
---|
3735 | * |
---|
3736 | * @return NULL |
---|
3737 | * @access public |
---|
3738 | */ |
---|
3739 | function editar(){ |
---|
3740 | $this->model->editarAction(); |
---|
3741 | $this->loadViewVars(); |
---|
3742 | $this->showForm($this->EDT); |
---|
3743 | } |
---|
3744 | |
---|
3745 | /** |
---|
3746 | * Executa a ação de alteração de um processo no banco |
---|
3747 | * |
---|
3748 | * @return NULL |
---|
3749 | * @access public |
---|
3750 | */ |
---|
3751 | function alterar(){ |
---|
3752 | $this->model->alterarAction(); |
---|
3753 | $this->__default(); |
---|
3754 | } |
---|
3755 | |
---|
3756 | /** |
---|
3757 | * Ação padrão da atividade. |
---|
3758 | * |
---|
3759 | * @return boolean |
---|
3760 | * @access private |
---|
3761 | */ |
---|
3762 | function __default(){ |
---|
3763 | $this->model->defaultAction(); |
---|
3764 | $this->loadViewVars(); |
---|
3765 | } |
---|
3766 | |
---|
3767 | /** |
---|
3768 | * Execução da aplicação. |
---|
3769 | * |
---|
3770 | * @return void |
---|
3771 | * @access public |
---|
3772 | */ |
---|
3773 | function run ($action){ |
---|
3774 | $this->model->DAO->connect(); |
---|
3775 | $this->dispatch($action); |
---|
3776 | $this->model->DAO->disconnect(); |
---|
3777 | } |
---|
3778 | } |
---|
3779 | |
---|
3780 | ?> |
---|
3781 | ]]></code> </include> |
---|
3782 | <include> |
---|
3783 | <name>class.processo.model.php</name> |
---|
3784 | <code><![CDATA[<?php |
---|
3785 | /** |
---|
3786 | * Classe de Processo da Model |
---|
3787 | * |
---|
3788 | * @author Guilherme Striquer Bisotto |
---|
3789 | * @version 1.0 |
---|
3790 | */ |
---|
3791 | class ProcessoModel extends Model { |
---|
3792 | |
---|
3793 | /** |
---|
3794 | * Carrega as variáveis da camada view para mostrar a tela de inclusão de um processo |
---|
3795 | * |
---|
3796 | * @access public |
---|
3797 | * @return void |
---|
3798 | */ |
---|
3799 | function incluirAction(){ |
---|
3800 | |
---|
3801 | $this->addViewVar('activity_title', "Sistema Normativo - Incluir Processo"); |
---|
3802 | $this->addViewVar('modo', "inserir"); |
---|
3803 | |
---|
3804 | $query = |
---|
3805 | "SELECT ". |
---|
3806 | "* ". |
---|
3807 | "FROM ". |
---|
3808 | "normas.macroprocesso ". |
---|
3809 | "ORDER BY ". |
---|
3810 | "sigla"; |
---|
3811 | |
---|
3812 | $result = $this->DAO->query($query); |
---|
3813 | |
---|
3814 | while($row = $result->fetchRow()) |
---|
3815 | if($row) $rows[] = $row; |
---|
3816 | |
---|
3817 | $this->addViewVar('macroprocesso', $rows); |
---|
3818 | } |
---|
3819 | |
---|
3820 | /** |
---|
3821 | * Carrega as variáveis variáveis da camada view para mostrar a tela de alteração de um processo |
---|
3822 | * |
---|
3823 | * @access public |
---|
3824 | * @return void |
---|
3825 | */ |
---|
3826 | function editarAction(){ |
---|
3827 | |
---|
3828 | $params = explode(';',$this->request['params']); |
---|
3829 | |
---|
3830 | $query = |
---|
3831 | "SELECT " . |
---|
3832 | "* " . |
---|
3833 | "FROM " . |
---|
3834 | "normas.macroprocesso " . |
---|
3835 | "ORDER BY " . |
---|
3836 | "sigla"; |
---|
3837 | |
---|
3838 | $result = $this->DAO->query($query); |
---|
3839 | |
---|
3840 | while($row = $result->fetchRow()) |
---|
3841 | if($row) $rows[] = $row; |
---|
3842 | |
---|
3843 | $this->addViewVar('selected', $params[0]); |
---|
3844 | $this->addViewVar('macroprocesso', $rows); |
---|
3845 | $this->addViewVar('proc_descricao', $params[1]); |
---|
3846 | $this->addViewVar('proc_id', $params[2]); |
---|
3847 | $this->addViewVar('activity_title', "Sistema Normativo - Alterar Processo"); |
---|
3848 | |
---|
3849 | } |
---|
3850 | |
---|
3851 | /** |
---|
3852 | * Insere um processo no banco de dados |
---|
3853 | * |
---|
3854 | * @access public |
---|
3855 | * @return void |
---|
3856 | */ |
---|
3857 | function inserirAction(){ |
---|
3858 | |
---|
3859 | $sucesso = true; |
---|
3860 | |
---|
3861 | if(($args[] = $this->request['cb_macroprocesso']) == 0){ |
---|
3862 | $sucesso = false; |
---|
3863 | $msgclass = "msg_erro"; |
---|
3864 | $msgs[] = "Um macro-processo deve ser selecionado"; |
---|
3865 | } |
---|
3866 | |
---|
3867 | if(!($args[] = $this->request['descricao'])){ |
---|
3868 | $sucesso = false; |
---|
3869 | $msgclass = "msg_erro"; |
---|
3870 | $msgs[] = "O campo DESCRICAO deve ser preenchido"; |
---|
3871 | } |
---|
3872 | |
---|
3873 | if($sucesso){ |
---|
3874 | $query = |
---|
3875 | "INSERT INTO ". |
---|
3876 | "normas.processo " . |
---|
3877 | "(macroprocesso_id, descricao) " . |
---|
3878 | "VALUES " . |
---|
3879 | "(?,?)"; |
---|
3880 | |
---|
3881 | if($this->DAO->Link_ID->query($query, $args)){ |
---|
3882 | $msgclass = "msg_sucesso"; |
---|
3883 | $msgs[] = "Cadastro realizado com sucesso"; |
---|
3884 | } else { |
---|
3885 | $msgclass = "msg_erro"; |
---|
3886 | $msgs[] = "Não foi possível executar a inserção"; |
---|
3887 | } |
---|
3888 | } |
---|
3889 | |
---|
3890 | $this->addViewVar('msgs', $msgs); |
---|
3891 | $this->addViewVar('msgclass', $msgclass); |
---|
3892 | $this->addViewVar('activity_title', "Incluir Processo"); |
---|
3893 | } |
---|
3894 | |
---|
3895 | /** |
---|
3896 | * Altera um processo no banco de dados |
---|
3897 | * |
---|
3898 | * @access public |
---|
3899 | * @return void |
---|
3900 | */ |
---|
3901 | function alterarAction(){ |
---|
3902 | |
---|
3903 | $sucesso = true; |
---|
3904 | |
---|
3905 | if(($args[] = $this->request['cb_macroprocesso']) == 0){ |
---|
3906 | $sucesso = false; |
---|
3907 | $msgclass = "msg_erro"; |
---|
3908 | $msgs[] = "Um macroprocesso deve ser selecionado"; |
---|
3909 | } |
---|
3910 | |
---|
3911 | if(!($args[] = $this->request['descricao'])){ |
---|
3912 | $sucesso = false; |
---|
3913 | $msgclass = "msg_erro"; |
---|
3914 | $msgs[] = "O campo DESCRIÇÃO deve ser preenchido"; |
---|
3915 | } |
---|
3916 | |
---|
3917 | $args[] = $this->request['params']; |
---|
3918 | |
---|
3919 | if($sucesso){ |
---|
3920 | $query = |
---|
3921 | "UPDATE " . |
---|
3922 | "normas.processo " . |
---|
3923 | "SET " . |
---|
3924 | "macroprocesso_id = ?, " . |
---|
3925 | "descricao = ? " . |
---|
3926 | "WHERE " . |
---|
3927 | "processo_id = ?"; |
---|
3928 | |
---|
3929 | if(!($this->DAO->Link_ID->query($query, $args))){ |
---|
3930 | $msgclass = "msg_erro"; |
---|
3931 | $msgs[] = "Não foi possível atualizar o cadastro"; |
---|
3932 | } else { |
---|
3933 | $msgclass = "msg_sucesso"; |
---|
3934 | $msgs[] = "Cadastro atualizado com sucesso"; |
---|
3935 | } |
---|
3936 | } |
---|
3937 | |
---|
3938 | $this->addViewVar('msgclass', $msgclass); |
---|
3939 | $this->addViewVar('msgs', $msgs); |
---|
3940 | } |
---|
3941 | |
---|
3942 | /** |
---|
3943 | * mostra a listagem de processos salvos no banco de dados utilizando a classe de paginação |
---|
3944 | * |
---|
3945 | * @access public |
---|
3946 | * @return void |
---|
3947 | */ |
---|
3948 | function defaultAction(){ |
---|
3949 | $this->addViewVar("titulo","Sistema de Normas"); |
---|
3950 | $this->addViewVar("activity_title", "Sistema Normativo - Manter Processos"); |
---|
3951 | |
---|
3952 | $query = |
---|
3953 | "SELECT " . |
---|
3954 | "mpr.sigla AS mpr_sigla, ". |
---|
3955 | "mpr.descricao AS mpr_descricao, ". |
---|
3956 | "pro.descricao AS pro_descricao, ". |
---|
3957 | "mpr.macroprocesso_id AS mpr_id, ". |
---|
3958 | "pro.processo_id AS pro_id, ". |
---|
3959 | "pro.macroprocesso_id AS pro_mpr_id ". |
---|
3960 | "FROM ". |
---|
3961 | "normas.macroprocesso mpr, ". |
---|
3962 | "normas.processo pro ". |
---|
3963 | "WHERE ". |
---|
3964 | "mpr.macroprocesso_id = pro.macroprocesso_id"; |
---|
3965 | |
---|
3966 | $titulos_ordenacao = array(); |
---|
3967 | $titulos_ordenacao[] = array('name' => "Sigla", 'id' => "1"); |
---|
3968 | $titulos_ordenacao[] = array('name' => "Macroprocesso", 'id' => "2"); |
---|
3969 | $titulos_ordenacao[] = array('name' => "Processo", 'id' => "3"); |
---|
3970 | |
---|
3971 | $paging = $this->factory->getInstance("wf_paging"); |
---|
3972 | $paging->configure(PAGING_NUMBER_OF_ITEMS, $_GET); |
---|
3973 | $paging->useDatabase(true); |
---|
3974 | $paging->enableSorting(true); |
---|
3975 | $paging->setSortingTitles($titulos_ordenacao); |
---|
3976 | |
---|
3977 | $result = $paging->restrictDBItems($this->DAO, $query); |
---|
3978 | |
---|
3979 | $this->addViewVar('titulos_ordenacao', $paging->getSortingTitles()); |
---|
3980 | $this->addViewVar('count_items', $paging->itemsCount); |
---|
3981 | $this->addViewVar('result', $result); |
---|
3982 | $this->addViewVar('linksPaginacao', $paging->autoLinks(PAGING_MAX_NUMBER_OF_LINKS)); |
---|
3983 | } |
---|
3984 | } |
---|
3985 | ?> |
---|
3986 | ]]></code> </include> |
---|
3987 | <include> |
---|
3988 | <name>class.tipodocumento.controller.php</name> |
---|
3989 | <code><![CDATA[<?php |
---|
3990 | /** |
---|
3991 | * Classe TipoDocumento da Controller |
---|
3992 | * |
---|
3993 | * @author Guilherme Striquer Bisotto |
---|
3994 | * @version 1.0 |
---|
3995 | */ |
---|
3996 | class TipoDocumentoController extends Controller{ |
---|
3997 | |
---|
3998 | /** |
---|
3999 | * Armazena o nome do template para incluir/alterar um Tipo de Documento |
---|
4000 | */ |
---|
4001 | var $INS = 'Manter_Tipo_Documento_Inc_Alt.tpl'; |
---|
4002 | |
---|
4003 | /** |
---|
4004 | * Armazena o nome do template para incluir/alterar um Tipo de Documento |
---|
4005 | */ |
---|
4006 | var $EDT = 'Manter_Tipo_Documento_Inc_Alt.tpl'; |
---|
4007 | |
---|
4008 | /** |
---|
4009 | * Executa a chamada do método incluirAction, mostra o template de |
---|
4010 | * inclusão e carrega as variáveis da camada view |
---|
4011 | * |
---|
4012 | * @access public |
---|
4013 | * @return void |
---|
4014 | */ |
---|
4015 | function incluir(){ |
---|
4016 | $this->model->incluirAction(); |
---|
4017 | $this->showForm($this->INS); |
---|
4018 | $this->loadViewVars(); |
---|
4019 | } |
---|
4020 | |
---|
4021 | /** |
---|
4022 | * Executa o método inserirAction e o método default |
---|
4023 | * |
---|
4024 | * @access public |
---|
4025 | * @return void |
---|
4026 | */ |
---|
4027 | function inserir(){ |
---|
4028 | $this->model->inserirAction(); |
---|
4029 | $this->__default(); |
---|
4030 | } |
---|
4031 | |
---|
4032 | /** |
---|
4033 | * Executa a chamada do métodp editarAction, mostra o template de alteração |
---|
4034 | * e carrega as variáveis da camada view |
---|
4035 | * |
---|
4036 | * @access public |
---|
4037 | * @return void |
---|
4038 | */ |
---|
4039 | function editar(){ |
---|
4040 | $this->model->editarAction(); |
---|
4041 | $this->showForm($this->EDT); |
---|
4042 | $this->loadViewVars(); |
---|
4043 | } |
---|
4044 | |
---|
4045 | /** |
---|
4046 | * Executa o metodo alterarAction e o método default |
---|
4047 | * |
---|
4048 | * @access public |
---|
4049 | * @return void |
---|
4050 | */ |
---|
4051 | function alterar(){ |
---|
4052 | $this->model->alterarAction(); |
---|
4053 | $this->__default(); |
---|
4054 | } |
---|
4055 | |
---|
4056 | /** |
---|
4057 | * Executa a chamada do método default |
---|
4058 | * |
---|
4059 | * @access public |
---|
4060 | * @return void |
---|
4061 | */ |
---|
4062 | function cancelar(){ |
---|
4063 | $this->__default(); |
---|
4064 | } |
---|
4065 | |
---|
4066 | /** |
---|
4067 | * Ação padrão da atividade. |
---|
4068 | * |
---|
4069 | * @return boolean |
---|
4070 | * @access private |
---|
4071 | */ |
---|
4072 | function __default(){ |
---|
4073 | $this->model->defaultAction(); |
---|
4074 | $this->loadViewVars(); |
---|
4075 | } |
---|
4076 | |
---|
4077 | /** |
---|
4078 | * Execução da aplicação. |
---|
4079 | * |
---|
4080 | * @return void |
---|
4081 | * @access public |
---|
4082 | */ |
---|
4083 | function run ($action){ |
---|
4084 | $this->model->DAO->connect(); |
---|
4085 | $this->dispatch($action); |
---|
4086 | $this->model->DAO->disconnect(); |
---|
4087 | } |
---|
4088 | } |
---|
4089 | ?> |
---|
4090 | ]]></code> </include> |
---|
4091 | <include> |
---|
4092 | <name>class.tipodocumento.model.php</name> |
---|
4093 | <code><![CDATA[<?php |
---|
4094 | /** |
---|
4095 | * Classe de TipoDocumento da Model |
---|
4096 | * |
---|
4097 | * @author Guilherme Striquer Bisotto |
---|
4098 | * @version 1.0 |
---|
4099 | */ |
---|
4100 | class TipoDocumentoModel extends Model{ |
---|
4101 | |
---|
4102 | /** |
---|
4103 | * Carrega as variáveis da camada view para mostrar a tela de alteração de um tipo de documento |
---|
4104 | * |
---|
4105 | * @access public |
---|
4106 | * @return void |
---|
4107 | */ |
---|
4108 | function editarAction(){ |
---|
4109 | $id = $this->request['params']; |
---|
4110 | |
---|
4111 | $query = |
---|
4112 | "SELECT " . |
---|
4113 | "* " . |
---|
4114 | "FROM " . |
---|
4115 | "normas.tipo_documento ". |
---|
4116 | "WHERE " . |
---|
4117 | "tipo_documento_id = ?"; |
---|
4118 | |
---|
4119 | $result = $this->DAO->Link_ID->query($query, array($id)); |
---|
4120 | |
---|
4121 | $this->addViewVar('modo', "alterar"); |
---|
4122 | $this->addViewVar('tipo_documento', $result->fields); |
---|
4123 | $this->addViewVar('activity_title', "Sistema Normativo - Alterar Tipo de Documento"); |
---|
4124 | } |
---|
4125 | |
---|
4126 | /** |
---|
4127 | * Altera um tipo de documento no banco de dados |
---|
4128 | * |
---|
4129 | * @access public |
---|
4130 | * @return void |
---|
4131 | */ |
---|
4132 | function alterarAction(){ |
---|
4133 | $id = $this->request['id']; |
---|
4134 | |
---|
4135 | $query = |
---|
4136 | "UPDATE " . |
---|
4137 | "normas.tipo_documento ". |
---|
4138 | "SET " . |
---|
4139 | "sigla = ?, " . |
---|
4140 | "descricao = ? " . |
---|
4141 | "WHERE " . |
---|
4142 | "tipo_documento_id = ?"; |
---|
4143 | |
---|
4144 | $args[] = $this->request['sigla']; |
---|
4145 | $args[] = $this->request['descricao']; |
---|
4146 | $args[] = $id; |
---|
4147 | |
---|
4148 | $result = $this->DAO->Link_ID->query($query, $args); |
---|
4149 | |
---|
4150 | if($result){ |
---|
4151 | $this->addViewVar('msgclass', "msg_sucesso"); |
---|
4152 | $this->addViewVar('msgs', array("Cadastro atualizado com sucesso")); |
---|
4153 | } else { |
---|
4154 | $this->addViewVar('msgclass', "msg_erro"); |
---|
4155 | $this->addViewVar('msgs', array("Não foi possível atualizar o cadastro")); |
---|
4156 | } |
---|
4157 | } |
---|
4158 | |
---|
4159 | /** |
---|
4160 | * Carrega as variáveis da camada view para mostrar a tela de inclusão de um tipo de documento |
---|
4161 | * |
---|
4162 | * @access public |
---|
4163 | * @return void |
---|
4164 | */ |
---|
4165 | function incluirAction(){ |
---|
4166 | $this->addViewVar('modo', "inserir"); |
---|
4167 | $this->addViewVar('activity_title', "Sistema Normativo - Incluir Tipo de Documento"); |
---|
4168 | } |
---|
4169 | |
---|
4170 | /** |
---|
4171 | * Insere um tipo de documento no banco de dados |
---|
4172 | * |
---|
4173 | * @access public |
---|
4174 | * @return void |
---|
4175 | */ |
---|
4176 | function inserirAction(){ |
---|
4177 | |
---|
4178 | if(!($args[] = $this->request['sigla'])) |
---|
4179 | $msgs[] = "O campo SIGLA deve ser preenchido."; |
---|
4180 | |
---|
4181 | if(!($args[] = $this->request['descricao'])) |
---|
4182 | $msgs[] = "O campo DESCRIÇÃO deve ser preenchido."; |
---|
4183 | |
---|
4184 | |
---|
4185 | if(!count($msgs)){ |
---|
4186 | $query = "INSERT INTO " . |
---|
4187 | "normas.tipo_documento(" . |
---|
4188 | "sigla, " . |
---|
4189 | "descricao) ". |
---|
4190 | "VALUES(?,?)"; |
---|
4191 | |
---|
4192 | |
---|
4193 | if($this->DAO->Link_ID->query($query, $args)){ |
---|
4194 | $this->addViewVar('msgclass', "msg_sucesso"); |
---|
4195 | $this->addViewVar('msgs', array("Cadastro realizado com sucesso")); |
---|
4196 | } else { |
---|
4197 | $this->addViewVar('msgclass', "msg_erro"); |
---|
4198 | $this->addViewVar('msgs', array("Não foi possível fazer o cadastro")); |
---|
4199 | } |
---|
4200 | } else { |
---|
4201 | $this->addViewVar('msgclass', "msg_erro"); |
---|
4202 | $this->addViewVar('msgs', $msgs); |
---|
4203 | } |
---|
4204 | |
---|
4205 | } |
---|
4206 | |
---|
4207 | /** |
---|
4208 | * Mostra a listagem dos tipos de documento utilizando a classe de paginação |
---|
4209 | * |
---|
4210 | * @access public |
---|
4211 | * @return void |
---|
4212 | */ |
---|
4213 | function defaultAction(){ |
---|
4214 | $this->addViewVar("titulo","Sistema de Normas"); |
---|
4215 | $this->addViewVar("activity_title", "Sistema Normativo - Manter Tipo de Documentos"); |
---|
4216 | |
---|
4217 | $query = "SELECT " . |
---|
4218 | "* " . |
---|
4219 | "FROM " . |
---|
4220 | "normas.tipo_documento"; |
---|
4221 | |
---|
4222 | $titulos_ordenacao = array(); |
---|
4223 | $titulos_ordenacao[] = array('name' => "Sigla", 'id' => "1"); |
---|
4224 | $titulos_ordenacao[] = array('name' => "Tipo de Documento", 'id' => "2"); |
---|
4225 | |
---|
4226 | $paging = $this->factory->getInstance("wf_paging"); |
---|
4227 | $paging->configure(PAGING_NUMBER_OF_ITEMS, $_GET); |
---|
4228 | $paging->useDatabase(true); |
---|
4229 | $paging->enableSorting(true); |
---|
4230 | $paging->setSortingTitles($titulos_ordenacao); |
---|
4231 | |
---|
4232 | $result = $paging->restrictDBItems($this->DAO, $query); |
---|
4233 | |
---|
4234 | $this->addViewVar('titulos_ordenacao', $paging->getSortingTitles()); |
---|
4235 | $this->addViewVar('count_items', $paging->itemsCount); |
---|
4236 | $this->addViewVar('result', $result); |
---|
4237 | $this->addViewVar('linksPaginacao', $paging->autoLinks(PAGING_MAX_NUMBER_OF_LINKS)); |
---|
4238 | } |
---|
4239 | } |
---|
4240 | ?> |
---|
4241 | ]]></code> </include> |
---|
4242 | </includes> |
---|
4243 | <resources> |
---|
4244 | <resource> |
---|
4245 | <name>add_user.png</name> |
---|
4246 | <bindata><![CDATA[iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAACXBIWXMAAAsTAAALEwEAmpwYAAAB
|
---|
4247 | L2lDQ1BQaG90b3Nob3AgSUNDIHByb2ZpbGUAAHjarY69SsNQHEfPbUXBIYgEN+HiIC7ix9YxaUsR
|
---|
4248 | HGoUSbI1yaWKNrncXD86+RI+hIOLo6BvUHEQnHwEN0EcHBwiZHAQwTOd/xn+/KCx4nX8bmMORrk1
|
---|
4249 | Qc+XYRTLmUemaQLAIC211+9vA+RFrvjB+zMC4GnV6/hd/sZsqo0FPoHNTJUpiHUgO7PagrgE3ORI
|
---|
4250 | WxBXgGv2gjaIO8AZVj4BnKTyF8AxYRSDeAXcYRjF0ABwk8pdwLXq3AK0Cz02h8MDKzdarZb0siJR
|
---|
4251 | cndcWjUq5VaeFkYXZmBVBlT7qt2e1sdKBj2f/yWMYlnZ2w4CEAuTutWkJ+b0W4V4+P2uf4zvwQtg
|
---|
4252 | 6rZu+x9wvQaLzbotL8H8BdzoL/HAUD36i+bmAAAABGdBTUEAANjr9RwUqgAAACBjSFJNAAB6JQAA
|
---|
4253 | gIMAAPQlAACE0QAAbV8AAOhsAAA8iwAAG1iD5wd4AAADQElEQVR42mSTy2tcZRjGf9/5vjMzZ87M
|
---|
4254 | ZGYymWQSG6Wxpk0gqSTVVF0IVaQFF0YQSq0Fuyiif4B/gLiybkQ34sqFihvBuggFMRovDbZCeotW
|
---|
4255 | bZuYhEwy98zMybl8n4tZqPjAu3su8PC84vSxFP+GNpByDMX+4Wfy7vpb2b7sdDKV86VKrtjB3Vf9
|
---|
4256 | wLsThj5CCADE/ww0pJLGPj4RfVppWvMdr8vIUJYDB8epNjK3bl6/cbLV2l6zLAWAJYD/nIC0W/hA
|
---|
4257 | WGL+1Ok3eHDiJKt3avz2612U8ie0cd7uMXtQSeuf9AjwASFEyxcj4cGpp9WRx+b5anCE61cuE6xt
|
---|
4258 | 0A203NhVSNkTyuhRh03XYi1lEdkwagzNdnXRSR948YnZqWLMNoxPP87YkaOsLC/frFTrr4dBZzdm
|
---|
4259 | K5QUqPvpnpMB1iIYLA1xKjPs/VXr1HW3BlEdbJdCCqLI/iPj6NWOPEr80BnsuECmJx2kAWnAwmJV
|
---|
4260 | d0jkMgwM5a+quv/86FA6Q7jH94u/bHRC+Zqdnd3So2fxNVhK0asSA8IAlpNUscxnW7dM2k47PyzP
|
---|
4261 | rRWK/kg8qXn/8uH62OTItfVyIPOFKMIEPVn+3CB2bB8l63jV7MdzM8dfTqdcGuvKe2H8gjg2MxqX
|
---|
4262 | EhoNbb68dLveqLXXnaR5LzTtTywZtRVIECn6Ev3YUpdmzl7DEg7fXHw4UUrnaO1YyESEikXi3CvT
|
---|
4263 | uXzOzb17celDr7s3hI4uydRsJm5psRjtqwv57MChsad2Ul0vzu0rFivby3z95xcMFwscLk0iMPhB
|
---|
4264 | iONqlpbuD7quaimnpGxlyyefPVMByrRDQ9NrMXW+QRD9zsJHgnU9S6HvJcqNHe7dK7NdruI4sUdq
|
---|
4265 | u/o5VQ13jNkXbO3uM5yHalPTDfcQviIAKsUQP9A06wFb5SatvX1sO0YirpSJ6YQYPu8qrxZfMJHI
|
---|
4266 | 2TJhnXhzcxrH8N07pU1vo79mecWtQnfOT8tiEOpQGG0wRuP7Ecbwo5JahMl0cCLwBIFvFgquZOAB
|
---|
4267 | zbdWu9Jf6p/q/jxOFIvwo5BIRxhjMBjC0BCGurcDI8AojQjRP32eDBJJ7LijK/GHboDUiKvzyJgF
|
---|
4268 | opduDISi93h/DwCBlnQWovsJogAAAABJRU5ErkJggg==
|
---|
4269 | ]]></bindata> </resource> |
---|
4270 | <resource> |
---|
4271 | <name>ajaxCalls.js</name> |
---|
4272 | <bindata><![CDATA[ZnVuY3Rpb24gZmlsbF9jb21ibyh0YXJnZXQsIGFyciwgaWR4KXsKCgl2YXIgY29udGFpbmVyID0g
|
---|
4273 | ZG9jdW1lbnQuZ2V0RWxlbWVudEJ5SWQodGFyZ2V0KTsKCWNvbnRhaW5lci5pbm5lckhUTUwgPSAi
|
---|
4274 | IjsKCQoJdmFyIHNlbGVjdCA9IGRvY3VtZW50LmNyZWF0ZUVsZW1lbnQoInNlbGVjdCIpOwoJc2Vs
|
---|
4275 | ZWN0LmlkID0gJ2NiJyArIHRhcmdldDsKCXNlbGVjdC5uYW1lID0gJ2NiJyArIHRhcmdldDsKCXNl
|
---|
4276 | bGVjdC5zZWxlY3RlZGluZGV4ID0gaWR4OwoJCQoJY29udGFpbmVyLmFwcGVuZENoaWxkKHNlbGVj
|
---|
4277 | dCk7CgoJaWYoYXJyLmxlbmd0aCA+IDEpewoJCgkJZm9yICh2YXIgaSA9IDA7IGkgPCBhcnIubGVu
|
---|
4278 | Z3RoOyBpKyspewoJCQl2YXIgb3B0aW9uID0gZG9jdW1lbnQuY3JlYXRlRWxlbWVudCgib3B0aW9u
|
---|
4279 | Iik7CgkJCW9wdGlvbi5pbm5lckhUTUwgPSBhcnJbaV0ubm9tZTsKCQkJb3B0aW9uLnZhbHVlID0g
|
---|
4280 | YXJyW2ldLmlkOwoJCQlzZWxlY3QuYXBwZW5kQ2hpbGQob3B0aW9uKTsKCQl9Cgl9IGVsc2UgewoJ
|
---|
4281 | CXZhciBvcHRpb24gPSBkb2N1bWVudC5jcmVhdGVFbGVtZW50KCJvcHRpb24iKTsKCQlvcHRpb24u
|
---|
4282 | aW5uZXJIVE1MID0gIi0tLSBTZWxlY2lvbmUgdW0gTWFjcm9wcm9jZXNzbyAtLS0iOwoJCW9wdGlv
|
---|
4283 | bi52YWx1ZSA9IDA7CgkJc2VsZWN0LmFwcGVuZENoaWxkKG9wdGlvbik7Cgl9Cn0KCmZ1bmN0aW9u
|
---|
4284 | IGdvQWpheChzdWNjZXNzLCBleGNlcHRpb24sIGVycm9yLCByZXF1ZXN0LCBkaXZfaWQsIGNsYXNz
|
---|
4285 | ZSwgcGFyYW1zKXsKCWF0dWFsaXphbmRvKGRpdl9pZCk7Cgl2YXIgbmMgPSBuZXcgTmFub0NvbnRy
|
---|
4286 | b2xsZXIoKTsKCW5jLnNldFdmVXJsKCk7CgluYy5zZXRTdWNjZXNzSGFuZGxlcihzdWNjZXNzKTsK
|
---|
4287 | CW5jLnNldEV4Y2VwdGlvbkhhbmRsZXIoZXhjZXB0aW9uKTsKCW5jLnNldEVycm9ySGFuZGxlcihl
|
---|
4288 | cnJvcik7CgluYy5hZGRWaXJ0dWFsUmVxdWVzdChyZXF1ZXN0LAoJCQl7CgkJCQlhY3Rpb24gOiBj
|
---|
4289 | bGFzc2UsCgkJCQltb2RlICAgOiByZXF1ZXN0CgkJCX0scGFyYW1zKTsKCW5jLnNlbmRSZXF1ZXN0
|
---|
4290 | KCk7Cn0KCmZ1bmN0aW9uIGF0dWFsaXphbmRvKGVsZW1lbnRfaWQpewoJZG9jdW1lbnQuZ2V0RWxl
|
---|
4291 | bWVudEJ5SWQoZWxlbWVudF9pZCkuaW5uZXJIVE1MID0gJzxzcGFuIGNsYXNzPSJhdHVhbGl6YW5k
|
---|
4292 | byI+YXR1YWxpemFuZG8uLi48L3NwYW4+JzsKfQoKZnVuY3Rpb24gZ2V0UHJvY2Vzc29zKHBhcmFt
|
---|
4293 | cyl7CQoJaWYocGFyYW1zICE9IDApewoJCXRoaXMucyA9IGZ1bmN0aW9uIGluRnVuY3Rpb24oZGFk
|
---|
4294 | b3MpewoJCQlmaWxsX2NvbWJvKCdQcm9jZXNzb3MnLCBkYWRvc1snZ2V0UHJvY2Vzc29zJ11bJ2Rh
|
---|
4295 | dGEnXSwgcGFyYW1zKTsKCQl9CgkJCgkJdGhpcy5lID0gZnVuY3Rpb24gaW5GdW5jdGlvbihkYWRv
|
---|
4296 | cyl7CgkJCXJldHVybjsKCQl9CgkJCgkJdGhpcy5yID0gZnVuY3Rpb24gaW5GdW5jdGlvbihkYWRv
|
---|
4297 | cyl7CgkJCXJldHVybjsKCQl9CQkKCQoJCWdvQWpheCgKCQkJCXRoaXMucywKCQkJCXRoaXMuZSwK
|
---|
4298 | CQkJCXRoaXMuciwKCQkJCSdnZXRQcm9jZXNzb3MnLAoJCQkJJ1Byb2Nlc3NvcycsCgkJCQknZWxh
|
---|
4299 | Ym9yYWNhbycsCgkJCQlwYXJhbXMKCQkJCSk7CQoJfSBlbHNlIHsKCQl2YXIgdGFyZ2V0ID0gZG9j
|
---|
4300 | dW1lbnQuZ2V0RWxlbWVudEJ5SWQoJ1Byb2Nlc3NvcycpOwoJCQoJCWlmKHRhcmdldC5oYXNDaGls
|
---|
4301 | ZE5vZGVzKCkpewoJCQl2YXIgY2hpbGQgPSB0YXJnZXQuZmlyc3RDaGlsZDsKCQkJdGFyZ2V0LnJl
|
---|
4302 | bW92ZUNoaWxkKGNoaWxkKTsKCQl9CgkJCgkJdmFyIHNlbGVjdCA9IGRvY3VtZW50LmNyZWF0ZUVs
|
---|
4303 | ZW1lbnQoInNlbGVjdCIpOwoJCXNlbGVjdC5pZCA9ICJjYlByb2Nlc3NvcyI7CgkJc2VsZWN0Lm5h
|
---|
4304 | bWUgPSAiY2JQcm9jZXNzb3MiOwoJCQoJCXZhciBvcHRpb24gPSBkb2N1bWVudC5jcmVhdGVFbGVt
|
---|
4305 | ZW50KCJvcHRpb24iKTsKCQlvcHRpb24uaW5uZXJIVE1MID0gIi0tLSBTZWxlY2lvbmUgdW0gbWFj
|
---|
4306 | cm9wcm9jZXNzbyAtLS0iOwoJCW9wdGlvbi52YWx1ZSA9IDA7CgkJCgkJc2VsZWN0LmFwcGVuZENo
|
---|
4307 | aWxkKG9wdGlvbik7CgkJdGFyZ2V0LmFwcGVuZENoaWxkKHNlbGVjdCk7Cgl9Cn0=
|
---|
4308 | ]]></bindata> </resource> |
---|
4309 | <resource> |
---|
4310 | <name>formatInput.js</name> |
---|
4311 | <bindata><![CDATA[ZnVuY3Rpb24gZm9ybWF0SW5wdXQoY2FtcG8sIGUsIHN0ckNoaywgaW52ZXJzbykgewoJdmFyIGlu
|
---|
4312 | dmVyc28gPSBpbnZlcnNvOwkKCXZhciBrZXkgPSAnJzsKCXZhciB2YWxvciA9ICcnOwoJdmFyIHZh
|
---|
4313 | bG9yTGltcG8gPSAnJzsKCXZhciBsZW4gPSAwOwoJdmFyIGxlbkxpbXBvID0gMDsJCgkKCWlmKHN0
|
---|
4314 | ckNoayA9PSAibnVtZXJpYyIpewoJCXN0ckNoZWNrID0gJzAxMjM0NTY3ODknOwoJCWludmVyc28g
|
---|
4315 | PSBmYWxzZTsKCX0gZWxzZSB7CgkJaWYoc3RyQ2hrID09ICJhbHBoYSIpewoJCQlzdHJDaGVjayA9
|
---|
4316 | ICcwMTIzNDU2Nzg5JzsJCQoJCQlpbnZlcnNvID0gdHJ1ZTsKCQl9IGVsc2UgewoJCQlzdHJDaGVj
|
---|
4317 | ayA9IHN0ckNoazsJCQkKCQl9Cgl9CgkJCgkvKiBwZXJtaXRlIGFsZ3VtYXMgdGVjbGFzICovCgl2
|
---|
4318 | YXIgd2hpY2hDb2RlID0gKHdpbmRvdy5ldmVudCkgPyBlLmtleUNvZGUgOiBlLndoaWNoOwoJaWYg
|
---|
4319 | KHdoaWNoQ29kZSA9PSAxMykKCQlyZXR1cm4gdHJ1ZTsgIC8vIEVudGVyCglpZiAod2hpY2hDb2Rl
|
---|
4320 | ID09IDgpCgkJcmV0dXJuIHRydWU7ICAvLyBEZWxldGUKCWlmICh3aGljaENvZGUgPT0gMCkKCQly
|
---|
4321 | ZXR1cm4gdHJ1ZTsgIC8vIFRhYgoKCS8vIHBlZ2EgbyBjb2RpZ28gYXNjaWkgZGEgdGVjbGEgcHJl
|
---|
4322 | c3Npb25hZGEKCWtleSA9IFN0cmluZy5mcm9tQ2hhckNvZGUod2hpY2hDb2RlKTsKCQoJLy8gdmVy
|
---|
4323 | aWZpY2Egc2Ug6SB1bSBjYXJhY3RlciBwZXJtaXRpZG8KCWlmKCFpbnZlcnNvKXsKCQlpZiAoc3Ry
|
---|
4324 | Q2hlY2suaW5kZXhPZihrZXkpID09IC0xKQoJCQlyZXR1cm4gZmFsc2U7ICAvLyBu428g6SB1bSBj
|
---|
4325 | YXJhY3RlcmUgduFsaWRvCgl9IGVsc2UgewoJCWlmIChzdHJDaGVjay5pbmRleE9mKGtleSkgIT0g
|
---|
4326 | LTEpCgkJCXJldHVybiBmYWxzZTsgIC8vIG7jbyDpIHVtIGNhcmFjdGVyZSB24WxpZG8JCQoJfQoJ
|
---|
4327 | Cgl2YWxvciA9IGNhbXBvLnZhbHVlOwoJbGVuID0gdmFsb3IubGVuZ3RoOwoKCWZvciAodmFyIGkg
|
---|
4328 | PSAwOyBpIDwgbGVuOyBpKyspCgkJaWYoIWludmVyc28pewoJCQlpZiAoc3RyQ2hlY2suaW5kZXhP
|
---|
4329 | Zih2YWxvci5jaGFyQXQoaSkpICE9IC0xKQoJCQkJdmFsb3JMaW1wbyArPSB2YWxvci5jaGFyQXQo
|
---|
4330 | aSk7CgkJfSBlbHNlIHsKCQkJaWYgKHN0ckNoZWNrLmluZGV4T2YodmFsb3IuY2hhckF0KGkpKSA9
|
---|
4331 | PSAtMSkKCQkJCXZhbG9yTGltcG8gKz0gdmFsb3IuY2hhckF0KGkpOwkJCQoJCX0KCQoJdmFsb3JM
|
---|
4332 | aW1wbyArPSBrZXk7CglsZW5MaW1wbyA9IHZhbG9yTGltcG8ubGVuZ3RoOwoJdmFyIHZhbG9yTm92
|
---|
4333 | byA9ICcnOwoJZm9yICh2YXIgaSA9IDA7IGkgPCBsZW5MaW1wbzsgaSsrKQkKCQl2YWxvck5vdm8g
|
---|
4334 | Kz0gdmFsb3JMaW1wby5jaGFyQXQoaSk7CgoJY2FtcG8udmFsdWUgPSB2YWxvck5vdm87CglyZXR1
|
---|
4335 | cm4gZmFsc2U7Cn0=
|
---|
4336 | ]]></bindata> </resource> |
---|
4337 | <resource> |
---|
4338 | <name>icon.png</name> |
---|
4339 | <bindata><![CDATA[iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAABGdBTUEAAK/INwWK6QAAABl0RVh0
|
---|
4340 | U29mdHdhcmUAQWRvYmUgSW1hZ2VSZWFkeXHJZTwAAAk1SURBVHjaYvz//z/DQAKAAGKkRHPntKOG
|
---|
4341 | zMws504d3Sy9alHLa6DQb1LNAAggJkocwMTE3K+iIMigoKybDeTyAzEzqWYABBCT5ZQnD4yaTpgD
|
---|
4342 | 2WykhEj3jOOFOuqi9h4OSgyCwpJJQCFBIGYl1QEAAQQMgf+MbIKSa8Rt4xTLGleqtk8+aAQNGZyO
|
---|
4343 | 6ZhyWJGDnbXe0UqegZ2NmcFAW1oiIqHOESjFRWq0AgQQ05/vn6cL87LLxKXW3BAVlzvNwsq+r7h2
|
---|
4344 | qQ9Qjh2XYcwsrP1An/ODLP/37z8DKBqU1IwCgFLcQMwCUiOXeiRQNvnwRun4PVOAXA5c0Q0QQMx8
|
---|
4345 | Sia3GYSUSnyNBBm+Pn/HzsjIyMHJxWP/8cPrLc8e3/oEVPMXWUPX9OOB8jIC9bZmsgygDARygJAA
|
---|
4346 | J8P9pz9V2dl5jsWltcR4BOesefuLOV5aWkD9xZufZgxMbDt/PT/7Bqj9D7oDAAKI+c3ZjT+knNPU
|
---|
4347 | RUX4dAT/fGPgYGVi4ORk55WU0dI+sGvJZqCan0D8D6S4Z+ZJAQ52lgPBnuoc7OwsDKAsDHLA37//
|
---|
4348 | gPg/g7yydpi7g5qNtBgPB+vXzwzWVooMV+9/Yvj8g+X/t9ubjgKN+AEzCwYAAggULH///vy28eT9
|
---|
4349 | bwxSKhIMP3/+YeDnZWews9J0KKpdUgyU54EF3////xqsjKX5+YDyMMthDtBQEWb48uU3gxA/B4OS
|
---|
4350 | LD8D0B8ML6/eY3A0l2Zg5Jb0Bmrnw5ZIAQIInG2e7515S8ghO1FZho+P8/sXBjYWJgZhAQ4GEVEx
|
---|
4351 | 639M/MevXjz0uGv6MRt5GcHpLrYKYI0wy2EYlB6evvzCwMfNxsDBzszw8/c/hufPPzHIqkkyHL3w
|
---|
4352 | luc/t+Kjn48PXIGGKLz0AwggWL79L26XIv6Pmd1aifc/w9eP3xh+/vrL4OOswvDhB58DCyvPQXkl
|
---|
4353 | nSX+7mr83FysUN8zQH0PccBvoIU8QMuv3nrDICfFxyAIDInLN98wMAND4uN/NobHL/9w/bizdivQ
|
---|
4354 | rm/I6QoggGAp89+PNw/mX3zwlYFJSAAePI+ffWII8tSWtHYM22ltIisnJsyF5Pt/YBrkGIiD/jHI
|
---|
4355 | SPAwPH/9Fej4PwwcwBAREeJk+Pb6PYODmRQDMK/bsIgaSUNzFxwABBA8a1zr873z9/uXHdffgcIF
|
---|
4356 | EjB3HrxnAFlqYyrL++PXX6xBj4y/f//NoKooxPDw6Sewg3TURBj+/fnLIMz6Fxwi7KpRYdCyAl5i
|
---|
4357 | AgQQct78+/vrh8XHb35iEJQVYXj15ivDpy+/wFGhDTTo6s3X4GwH8zFyIoThHz9+M+hrijLcfvAB
|
---|
4358 | HEVSotzgtPHp8QsGZ1t5YGJUCEdPjAABhOyA/1c7bde8fv/tydO/QNcCsxkoR4AsBqV6WWC83nnw
|
---|
4359 | DsVCZMfAMBMwfbGyMjN8+foLWFcwMCgCc8TvL98YTHVFQTISbFp5KCUmQAChl05//nz/suzU7c8M
|
---|
4360 | TNyQ+L7z8AOYBocCMIHhiwIQ/gq0GKT22p134BBTVxSEBO/bdwyWZjIMTPxaKCUmQAChO+Dfz7cP
|
---|
4361 | 51+485GBQYCfARbvr95+Axe3T55/Zvj0+SdeB/z+/ZdBUYYPnCVBfC4OFnAIfn/xmsHKXI7hP6uI
|
---|
4362 | J5OgITwxAgQQRvl8b07YnT8/v+24/hYYp9DMcu7yCzANrP0Ybtx9izXoYVECCcZ/DJxAi1+++QZO
|
---|
4363 | jKBQACVGWWDsCwlyMjDKBEVAQ4EZIICwVRB//wIT47ErbxmEZEQYPgJ9DEqIIGykIw7OGdh8DnEI
|
---|
4364 | MFyBhdiLN9/ABokCsyFIDBQiIPDjzXsGFycVYNUkB0+MAAGEzQH/785wX/Pq7dcnr/+zgxMiKNhB
|
---|
4365 | FoOCkp+PHVw+YHMECPDycTIcP/eUwVxfHFFXAH2vriTE8PPtewYLYylgZcAqwSCfDk6MAAGEq0X0
|
---|
4366 | 59+PL8vOABMjjzAfOEeAEiAIaKmKMDx79QUj+EGAh4ed4dzVVwwSIlzAuGeFy4MASAzcBvz8EVhJ
|
---|
4367 | AYtzXg1wYgQIIFwO+Pfz/ZP5Ry8C8z4fL7hMAGdJoCMU5QQZnr38zPDr9z+U4GdiYmT49vMfw8PH
|
---|
4368 | Hxh0VIXhUQIDEiKc4BD8+eoNg7WtErD9JerJwKcvDRBAONuEz1bF3fn368exs09+M7AJ8gELpZ8M
|
---|
4369 | J88/BRezirICDE9efEIJehERHobjZx8zmOmJo4QOLGRef/gJ9gQ3sAhSFGMDqgemQcmACIAAwteI
|
---|
4370 | /M+p4HDj9jPGUCNTOXauP98Z/gItfw3Mkqb60gznrjxjkBHnA1vCxcXGcPfRB4b/QMfISvKBfQ5s
|
---|
4371 | 2DBwcLIy3H/ymeHI2WfA3POOgQVYM30DFtegEopVWJDhytUPIgABhLcV++X6hhfscrbPLz/4729l
|
---|
4372 | Ic/A9OUz1Gf/GH7/+cPACUwboOzGwsbCcPrCUwZDLXFwLmAC1iUXgTXh0TNPgVnxK8RScPYCVtti
|
---|
4373 | Igx/+YUYLl5+yXDv/kchgABiJKLfwCEavG6KnLxMUqEfsHHx7i24rhIDBiEob5sayAJT/WMGJWDa
|
---|
4374 | YAL67Pqdtwy37r9nYAMWxz+hBRkjCzMDp5QEw4vvzAx7D95nOHr4HgPDrzcnGD6cXgsQQIxE9h24
|
---|
4375 | RYI27bE2UzILN+Rg+PvlC9A3fxlYWRgZdDUkgVn0Ldjyl6+/AX3PxPD12x+Gv8DoYGJnZ+CSk2Y4
|
---|
4376 | dfU9w+69txkePQAGx48nexhebl3N8O7YA6C5nwACiNgmNBOnZpQ8p3rMxcRQbV5jnk8MTMBoAEUF
|
---|
4377 | MKrBCZGRCRS/fxn+AIP5PxcPwwcmbob9p14yHD50j+Hb5w/3GD5f28Bwb8IWoFlfQRYD8UcQGyCA
|
---|
4378 | SGnDs3BbNtvzyZjvKU7QYpD48Qoc///+/QVXvSCL//EJMdx4y8ywc989hjOnHwMbXy/2MLw5sJbh
|
---|
4379 | 5ZaroCQFtfQTtFX0C5QsAAKI1L4hO4/D3EoRKfn6hgJTBi42JnDj7tunrwwHz79j2L7rLsPrF29e
|
---|
4380 | /f/6aPf/RwtWM3y7/wrJtyAHfIf2H+EtY4AAItUBIPVcXPaLFv1n5g36D2qWAVvEoOz3/8f7y3/f
|
---|
4381 | nVv///7MfejBDG2I/kFujMIAQACR0zsGJUpeIBYHYgFYvQ5taH6HWvwJyv6F3rFBBwABBgBNVXhf
|
---|
4382 | LJLgYAAAAABJRU5ErkJggg==
|
---|
4383 | ]]></bindata> </resource> |
---|
4384 | <resource> |
---|
4385 | <name>icon_ajuda.png</name> |
---|
4386 | <bindata><![CDATA[iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAMAAAAoLQ9TAAAAA3NCSVQICAjb4U/gAAAB3VBMVEX/
|
---|
4387 | ///9/f37+/v++fn19fX78fHz8/P67+/v7+//4+Ps4uLn4+Pm4uLq4OD/19f/09P/zc31zMz+vr7d
|
---|
4388 | wsLFxcXrtbX9qqr8n5/noKD/l5fTn5//jY3+i4vmkZHekZHekJDthobshobQi4v/fX2zhob9cnLJ
|
---|
4389 | f3//bW3TeHjPdXXSdXXgcXHQc3PoaGjmZ2f/YGDSaGj/Wlq+a2vQZWX5WlrFaGj6WFjCZmb/VFT/
|
---|
4390 | UFD/SkqcZWX3TEz/SUmYZWX6SUnAWFjAWVn3SEj/Q0P/QED/Pj7KS0v/Ozv/OTn/ODj/Nzf+MjKs
|
---|
4391 | SEjfOjreOjqsRkb+Li7VNTWlQECmQED8JyfjLi6nPDz3Jia0ODiIQUGmOjqMQED7ISG3MTG1Li75
|
---|
4392 | Ghr1GRmhJyfOGhrNGRmeJCTvDAzxDAzoDQ3pDQ3PDQ3hBATgBATXAADYAADQAADKAAC3BATGAADJ
|
---|
4393 | AAC0BATFAACNDw+9AAC5AAC6AACJDAy3AACvAACpAACoAACnAAClAAB/CQmhAACfAAB+CQmZAACb
|
---|
4394 | AACVAACWAACNAABuCQmPAABqCQl9AgKBAAB/AACDAAB9AAB7AQF3AABuAABnAABmAABgAABeAABi
|
---|
4395 | AABXAABPAQFQAABGAQFFAAD///9rkaloAAAAn3RSTlP/////////////////////////////////
|
---|
4396 | ////////////////////////////////////////////////////////////////////////////
|
---|
4397 | ////////////////////////////////////////////////////////////////////////////
|
---|
4398 | /////////////////////////wDyfu8yAAAACXBIWXMAAAsSAAALEgHS3X78AAAAJXRFWHRTb2Z0
|
---|
4399 | d2FyZQBNYWNyb21lZGlhIEZpcmV3b3JrcyBNWCAyMDA0h3aszwAAABZ0RVh0Q3JlYXRpb24gVGlt
|
---|
4400 | ZQAxMi8wNy8wNN9SCncAAADZSURBVHicY5iHBhhABLOco09YhDE7TEBUTUvXxN43LkUHIiCqpCAj
|
---|
4401 | wMAgZJNcaQ4SYFZTVOZkkJRmFEwvnsgLFJDXVFXn43f1YOLIyusLAgo46OkbWlh5ibHI5hS1NwAF
|
---|
4402 | /M0sbZ3dxdkkcvPL6qcABaKcXDwDYjiEM0sqqltmAAUi/LxD4tO03cqrqxsndQIFDGLDE1JDpYxq
|
---|
4403 | Wlu7ZkYDBVgTkzKyA0VUmjr6p8ziATlMo7Qgr7Cqrr13+lxriNNNe3raG7smz55jB/McV3Dz1Knd
|
---|
4404 | kdxw3yIDAHqGaHheXhnDAAAAAElFTkSuQmCC
|
---|
4405 | ]]></bindata> </resource> |
---|
4406 | <resource> |
---|
4407 | <name>icon_edit.png</name> |
---|
4408 | <bindata><![CDATA[iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABGdBTUEAANkE3LLaAgAAAgVJREFU
|
---|
4409 | eJyFkUtoU0EYhb87N0iQ20hRiGSThQtX7pJAsFoRl6UquLDWGElrcaMguJAobqyiWKxCFwUJQkHr
|
---|
4410 | K0Wy8AESKtaERtM0VC1GVKgLLQSq0BiazL3jKpfmpQd+mMc55//PjAaQTCbXLMuq0gJCCH15eTnb
|
---|
4411 | 19d3CPgJEOnt7TjlqZ7tHn92C8MwDkopVbsql8uqUCioWCyWAVwAEyPDxysT0d/+LcZuB6BadV6P
|
---|
4412 | UqlEOBz2VyqV56bSk3v395x/eP1c+fOvVc3xP7HD4UBKSbFYZMf2zcGd2+aCY/fvmGfGH1+UktcY
|
---|
4413 | hnHgXxGklCqVSqnJiRGlvgZV+pJTuTudjwAdQNQ6KaXalvzzjcN7EuTjWfKdV2DDpmnArDNoh7dv
|
---|
4414 | nrDLe5OFyRSzG68xePI0uq5bdsTawrKsJnE2nSC49QbzU3leaRcYDJ9ofqN2Bu9mHtDlHWU+/pHZ
|
---|
4415 | jqsMhIdQqvnDWhrkMk/p8oyyEH9PkiiR/gimaSKEaOLaBtVqFSEEc6l7dHvHyE4VmHEOEwoN2I/Z
|
---|
4416 | KqZtIKVkaek73d4ffEgsMq1FCR2NIIRoKbQNTNO0J1j7kuF26hOrnsscCR0DoHZfg1Kq7syeIJfL
|
---|
4417 | 8eJlmn09/fh8PpvciMZpbINAIIDf78flctWRGgW6rtftNcDrdruHrHXMdpkty9IAVlZW7gKLAH8B
|
---|
4418 | dF05E3mheIkAAAAASUVORK5CYII=
|
---|
4419 | ]]></bindata> </resource> |
---|
4420 | <resource> |
---|
4421 | <name>icon_msg_erro.png</name> |
---|
4422 | <bindata><![CDATA[iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAMAAAAoLQ9TAAAAA3NCSVQICAjb4U/gAAAB+FBMVEX/
|
---|
4423 | ///+/f369/f88fH38vL87+/x7+/57Ozv5OT44OD539/t4eHj4ODk39/10dHk09Pk0dHrx8fywMDx
|
---|
4424 | v7/SwMDot7fJwMDvsbHtpaXsoKDUp6fEpqblkZG9mpq7mJjliYmjkJDgfHzRdXXfbm6zeXnScXG1
|
---|
4425 | dnbgZWXIamrgY2O2a2veW1u9YmLeWVmrZWXeV1fRVFTcUVHcTk7ZT0+gXl6mXFzaSEjaRkayT0/a
|
---|
4426 | RETZQ0PZQUGYUlLYQEDZPz/YPj6TSkrXODiiRETXNjaQRUXWMTGmPj7WMDDVLy/FLy+LPT3UKCjU
|
---|
4427 | JyecNjbCKirTJCTTIyOHNTXSISHSICCrKirSHx+HMzPRHR3KHh7KHR2EMDC5HByhIyPQFhaBKyvO
|
---|
4428 | FRXLFhbPERHOEBCOISF+JibODw+IHh7GCwvNCQmBHR27Dg7CBganDQ2kDAzHAgK+AQF2FRWfCgrE
|
---|
4429 | AAB7FBS/AADAAAC6AAC0AgK7AACzAQGyAACwAACqAACtAAClAACiAACkAACfAACaAACUAACTAACS
|
---|
4430 | AACWAACLAACGAABuBgaBAACDAAB8AAB4AAB6AAByAABiAwNoAgJsAABjAABlAABeAABgAABdAABY
|
---|
4431 | AABUAABSAABQAABNAABMAABPAABHAABKAABEAABDAAA/AABBAAA6AAA9AAD////QczQWAAAAqHRS
|
---|
4432 | TlP/////////////////////////////////////////////////////////////////////////
|
---|
4433 | ////////////////////////////////////////////////////////////////////////////
|
---|
4434 | /////////////////////////////////////////////////////////////////////////wCZ
|
---|
4435 | X+z0AAAACXBIWXMAAAsSAAALEgHS3X78AAAAJXRFWHRTb2Z0d2FyZQBNYWNyb21lZGlhIEZpcmV3
|
---|
4436 | b3JrcyBNWCAyMDA0h3aszwAAABZ0RVh0Q3JlYXRpb24gVGltZQAxMi8wNy8wNN9SCncAAADiSURB
|
---|
4437 | VHicY1iOBhiAmMPGwcUrMCouhR8qoKehbWhm7+wRkgkREFBTN7J2dPcOiiyWAwkwqqhqSur7BFvK
|
---|
4438 | RxROYAMK6GjpmkswB4RyymSXT+pZzsBkYmDlGsonLiSUl1/VNouXwcnCzj04MYiVK7WorLZxyhQG
|
---|
4439 | XzdX/9gMWwYG45KqhrapUxlYwvzCk+LZlRW5o+va+hbyMCyPSU5IFxQtLZWSbu6YOx3kjoIcT6Ws
|
---|
4440 | qppc07Rpy8AOk+2srKypb2rt6F+qAHH6xO6mpvb2rt55S6B+EZkxY/bs2fPnLxaDCqAAAHBIbIOa
|
---|
4441 | qRNcAAAAAElFTkSuQmCC
|
---|
4442 | ]]></bindata> </resource> |
---|
4443 | <resource> |
---|
4444 | <name>icon_msg_sucesso.png</name> |
---|
4445 | <bindata><![CDATA[iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAMAAAAoLQ9TAAAAA3NCSVQICAjb4U/gAAACClBMVEX/
|
---|
4446 | ///+/v79/f38/Pz7+/v4+fj19fX09PTv8e/s7+zs7Ozq6urp6enh4eHg4uDh4uHg4eDf4d99x312
|
---|
4447 | wXZow2hnwmddvl1Wu1ZRuVGEo4SDpINPuU9Lt0tJsklCs0I+sj5Xp1dMq0w9sT08sTxZpFk9rT0z
|
---|
4448 | rTNjmWMxrTFqlmoyrTJkmWRApkB3j3cwrDAvrC8uqy5ok2h1inUnqCcoqChpjGklqCUipyIhpiFV
|
---|
4449 | kFUgpiAfox8eoh4coxwZoxlUilQ0ljQVoRUToRMSoBIRnxE1jzUUnRQTnBMNng0LnQsJmwkHmwcL
|
---|
4450 | mAsHmQcFmgUBmQECmQILkwsClgIAkgBKdEoTiRMXhxcAkQABjwEAjgBHcUcBjQEAjAAAjQABiQEA
|
---|
4451 | igAAiAABhwEAhwAIgwgAhQAAhAAAgwAAgQADfwMAgAAAfwAlbyUAfAAnaycAewAsaCwAeQAAdgAq
|
---|
4452 | ZipAXEACcgIAdAAAcwAAcAAuXi49WD0AcQAAbwAAbgAAbAAAawA3VDcSYBIAZwAAZgA0UTQAYgAM
|
---|
4453 | WQwAXwAAXgAAXAAAWgAAVwAGVAYAUgAQSRAATQAhQSEATgAASwAbPxsASAAARwAARgALQAsAQwAA
|
---|
4454 | QQAINwgAOQAANwAINAgBNgEANgAANQAANAAAMwAALQAAKQAAKAACJAIAJAAAIwAAHwAAIAAAGwAA
|
---|
4455 | GgAAFQD///8XRQuZAAAArnRSTlP/////////////////////////////////////////////////
|
---|
4456 | ////////////////////////////////////////////////////////////////////////////
|
---|
4457 | ////////////////////////////////////////////////////////////////////////////
|
---|
4458 | /////////////////////////////wD8ZqXnAAAACXBIWXMAAAsSAAALEgHS3X78AAAAJXRFWHRT
|
---|
4459 | b2Z0d2FyZQBNYWNyb21lZGlhIEZpcmV3b3JrcyBNWCAyMDA0h3aszwAAABZ0RVh0Q3JlYXRpb24g
|
---|
4460 | VGltZQAxMi8wNy8wNN9SCncAAAEFSURBVHicY1gLBKyWIcX1FdmcIDYDEGvraqoo6rgWTWqFCJhK
|
---|
4461 | CovJyKuZ2ITOnAsSUJcSEpVW1jOzdQvMmDdhLQOrkbCIuJyBuZ2LD1di9QpBBntDMQk5LQtHDy+2
|
---|
4462 | 6KSshTMYohRklPStnL38mNliYnJ6FjFUyirpmzt5+zOyBMenF7asYmhW1WBg8AxgYAiKTMmpalvN
|
---|
4463 | UOFgzMTky8ISFJGUVVg7ZQlDbr61OxsbW3h4Sk5ZXcvieQwc/WGBXFw8CQk55U3tU9fwM6xt6E2O
|
---|
4464 | 401NLahq6py4chbI6dPmlGRmlpY2dkxfvQziue6lC/o6O2csXzMf6tu1fJMXrVq1ZLYAiA0A6fpi
|
---|
4465 | XYDvZ60AAAAASUVORK5CYII=
|
---|
4466 | ]]></bindata> </resource> |
---|
4467 | <resource> |
---|
4468 | <name>toggleDetails.js</name> |
---|
4469 | <bindata><![CDATA[ZnVuY3Rpb24gZXhwYW5kaXJEZXRhbGhlcygpewoJdmFyIHRhcmdldCA9IGRvY3VtZW50LmdldEVs
|
---|
4470 | ZW1lbnRCeUlkKCdkZXRhbGhlc19idXR0b24nKTsKCXRhcmdldC5pbm5lckhUTUwgPSAnPGlucHV0
|
---|
4471 | IHR5cGU9ImJ1dHRvbiIgY2xhc3M9ImZvcm1fYm90YW8iIHZhbHVlPSJFc2NvbmRlciBEZXRhbGhl
|
---|
4472 | cyIgb25DbGljaz0iZXNjb25kZXJEZXRhbGhlcygpIj4nCgkKCXNob3dfZGl2KCk7Cn0KCmZ1bmN0
|
---|
4473 | aW9uIGVzY29uZGVyRGV0YWxoZXMoKXsKCXZhciB0YXJnZXQgPSBkb2N1bWVudC5nZXRFbGVtZW50
|
---|
4474 | QnlJZCgnZGV0YWxoZXNfYnV0dG9uJyk7Cgl0YXJnZXQuaW5uZXJIVE1MID0gJzxpbnB1dCB0eXBl
|
---|
4475 | PSJidXR0b24iIGNsYXNzPSJmb3JtX2JvdGFvIiB2YWx1ZT0iRXhwYW5kaXIgRGV0YWxoZXMiIG9u
|
---|
4476 | Q2xpY2s9ImV4cGFuZGlyRGV0YWxoZXMoKSI+JwoJCglzaG93X2RpdigpOwp9CgpmdW5jdGlvbiBz
|
---|
4477 | aG93X2RpdigpewoJJCgiZGV0YWxoZXMiKS50b2dnbGUoKTsKfQo=
|
---|
4478 | ]]></bindata> </resource> |
---|
4479 | <resource> |
---|
4480 | <name>view.png</name> |
---|
4481 | <bindata><![CDATA[iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABGdBTUEAAK/INwWK6QAAABl0RVh0
|
---|
4482 | U29mdHdhcmUAQWRvYmUgSW1hZ2VSZWFkeXHJZTwAAAORSURBVHjaYiwt7WMQFuRh4uDmDfjCIVr8
|
---|
4483 | mUNEj4GVjYGf4fM3ti9vtjB8etv94/uPGz9//WZgYmJkQAcAAcTCxPif+csflqqHHFr1zPKKzPwi
|
---|
4484 | 7AzsrAwM3/8z8fz99S2J8dZlt793ryQzMTHsYmTENAAggFh+/mX0fiOg2yikr8OoLPePgZsDqPkH
|
---|
4485 | A8P7D78Z2Pi4GdglzWVef/047cPli3b/mRifMTCgGgIQQEyfmHjz2FXUGRWk/zOoiTMx6AkwMfAw
|
---|
4486 | MzDISwO9wfufQVSCmUHSSkf5NxOT3/ev3xh+/PiJggECiOUbm6CxuBg3AxfHPwYhoBPZf/1nYGVl
|
---|
4487 | ZBDmYmT4wcPIwMb4n4FPQ5rhHCuL+8cPn2cws7GhuAAggFj+sPGyc7H9Y/jw8S/DuR//GLi4mBik
|
---|
4488 | +JgYgBQDF1AB238GBhZmJoZfP37yfPz0hYGVHdUAgABi+f3++Q9GVmbOv7/+MvwD6uLiBLoC6AUm
|
---|
4489 | oEZhkAFA/OvvP4YvHz5++PT5KwPLzz8MjEBXwQBAADG9vXXp6Ld3nxh+MzAz/PzNwPAPGFU/gRLA
|
---|
4490 | sGTgBWJZoLeuHj7H8Oje083fgZr/fP/A8OvbR4afXz8y/PjykQEggJh5mIUeMTKxRmo6GbBysjOB
|
---|
4491 | o5CHhYGBE6hZGKj59ftPDHOnLGf48f33JCepWw/suU8wiP1/xMD78wED+9cHDAABxCwurv74/b3b
|
---|
4492 | L75/+Okoo6XMLgBMBxzAqOIGar5x9R7DzN4FDMxMHAw6Mn9lDb5tVvj2m/Ha95//v30DBvaPX/8Y
|
---|
4493 | AAIAQQC+/wQBAgIA/vv5ndGsqdLjzMhzGiMdNwkLCAP26+7w5Nrfrh0dHsoZEvRjI//EUiIhDkP2
|
---|
4494 | 1u80+/4GXv8A//D/AAEAAogFFBCMzMxA5r/TH589i2D8D4wJXm6GD89eMnx695FBS/U/A/P1FRLK
|
---|
4495 | ofJBOo7RDGyrl/q+Ovp+yYuPrAlArW8AAgjkBUSUAKOIR1CAgYOTg+H3jx8Mv34xMCjxf2LgeX3i
|
---|
4496 | 1q3b77jFlWQtNB0sGHg+3FK7//CrxquvzHsAAghhADBmmFhYGDj5eIF5iRUYwl+BAfeLQU6UlYHn
|
---|
4497 | y83fLz7823nqyC1+aRV5C313cwaJ73fUr9z5qg4QQEwMRAJ2Nub/r97/KetuXNt38coHBl4DWwYm
|
---|
4498 | YXl/gABiYSABsLIy/3736W9lV80qBSEVHbdbjObnAQIMANvRQ2FQMvqFAAAAAElFTkSuQmCC
|
---|
4499 | ]]></bindata> </resource> |
---|
4500 | <resource> |
---|
4501 | <name>normas.css</name> |
---|
4502 | <bindata><![CDATA[LyogRGVmYXVsdCBzdHlsZXMgKi8KCi5zdXBlcl90YWJsZQp7Cgl3aWR0aDogMTAwJTsKfQoKLnN1
|
---|
4503 | cGVyX3RhYmxlIHRkCnsKCXBhZGRpbmc6IDNweDsKfQoKLm5vcm1hX3RhYmxlCnsKCXdpZHRoOiAx
|
---|
4504 | MDAlOwoJYm9yZGVyOiAxcHggc29saWQgYmxhY2s7Cglib3JkZXItY29sbGFwc2U6IGNvbGxhcHNl
|
---|
4505 | Owp9Cgoubm9ybWFfdGFibGVfaGVhZGVyCnsKCXdpZHRoOiAxMDAlOwoJYmFja2dyb3VuZC1jb2xv
|
---|
4506 | cjogIzNiMDAwMDsKCWJvcmRlci1jb2xsYXBzZTogY29sbGFwc2U7Cgljb2xvcjogI0ZGRkZGRjsK
|
---|
4507 | CWZvbnQtd2VpZ2h0OiBib2xkOwp9Cgoubm9ybWFfdGFibGVfdGl0dWxvIHsKCWNvbG9yOiNGRkZG
|
---|
4508 | RkYgIWltcG9ydGFudDsKCWZvbnQtZmFtaWx5OlZlcmRhbmEsQXJpYWwsSGVsdmV0aWNhLHNhbnMt
|
---|
4509 | c2VyaWYgIWltcG9ydGFudDsKCWZvbnQtc2l6ZToxNXB4ICFpbXBvcnRhbnQ7Cglmb250LXdlaWdo
|
---|
4510 | dDpib2xkOwp9CgouYXR1YWxpemFuZG8gewoJZm9udC1zdHlsZTogaXRhbGljOwoJY29sb3I6IGJs
|
---|
4511 | dWU7Cn0KCi50b3BpY28gewoJZm9udC13ZWlnaHQ6IGJvbGQ7Cgl0ZXh0LWFsaWduOiBsZWZ0Owp9
|
---|
4512 | CgoKLnRpdHVsb19ub3JtYSB7Cglmb250LXdlaWdodDogYm9sZCAhaW1wb3J0YW50OwoJY29sb3I6
|
---|
4513 | ICNGRkZGRkYgIWltcG9ydGFudDsKCWZvbnQtc2l6ZToxNXB4ICFpbXBvcnRhbnQ7Cn0KCi50aXR1
|
---|
4514 | bG9fbm9ybWE6bGluayB7Cglmb250LXdlaWdodDogYm9sZCAhaW1wb3J0YW50OwoJY29sb3I6ICNG
|
---|
4515 | RkZGRkYgIWltcG9ydGFudDsKfQoKLnRpdHVsb19ub3JtYTpob3ZlciB7Cglmb250LXdlaWdodDog
|
---|
4516 | Ym9sZCAhaW1wb3J0YW50OwoJY29sb3I6ICNGRkZGRkYgIWltcG9ydGFudDsKCXRleHQtZGVjb3Jh
|
---|
4517 | dGlvbjogbm9uZSAhaW1wb3J0YW50Owp9CgoudGl0dWxvX25vcm1hOnZpc2l0ZWQgewoJZm9udC13
|
---|
4518 | ZWlnaHQ6IGJvbGQgIWltcG9ydGFudDsKCWNvbG9yOiAjRkZGRkZGICFpbXBvcnRhbnQ7Cn0KCi50
|
---|
4519 | aXR1bG9fbm9ybWE6Zm9jdXMgewoJZm9udC13ZWlnaHQ6IGJvbGQgIWltcG9ydGFudDsKCWNvbG9y
|
---|
4520 | OiAjRkZGRkZGICFpbXBvcnRhbnQ7Cn0K
|
---|
4521 | ]]></bindata> </resource> |
---|
4522 | </resources> |
---|
4523 | <transitions> |
---|
4524 | <transition> |
---|
4525 | <from>Elaborar</from> |
---|
4526 | <to>end</to> |
---|
4527 | </transition> |
---|
4528 | </transitions> |
---|
4529 | </process> |
---|