-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathconsulta_atendimento_ouvidoria.php
More file actions
executable file
·350 lines (309 loc) · 13 KB
/
consulta_atendimento_ouvidoria.php
File metadata and controls
executable file
·350 lines (309 loc) · 13 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
<?php
/*
* E-cidade Software Publico para Gestao Municipal
* Copyright (C) 2012 DBselller Servicos de Informatica
* www.dbseller.com.br
* e-cidade@dbseller.com.br
*
* Este programa e software livre; voce pode redistribui-lo e/ou
* modifica-lo sob os termos da Licenca Publica Geral GNU, conforme
* publicada pela Free Software Foundation; tanto a versao 2 da
* Licenca como (a seu criterio) qualquer versao mais nova.
*
* Este programa e distribuido na expectativa de ser util, mas SEM
* QUALQUER GARANTIA; sem mesmo a garantia implicita de
* COMERCIALIZACAO ou de ADEQUACAO A QUALQUER PROPOSITO EM
* PARTICULAR. Consulte a Licenca Publica Geral GNU para obter mais
* detalhes.
*
* Voce deve ter recebido uma copia da Licenca Publica Geral GNU
* junto com este programa; se nao, escreva para a Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
* 02111-1307, USA.
*
* Copia da licenca no diretorio licenca/licenca_en.txt
* licenca/licenca_pt.txt
*/
require_once("libs/db_stdlib.php");
require_once("libs/db_sql.php");
require_once("libs/db_utils.php");
require_once("classes/db_ouvidoriaatendimento_classe.php");
$oGet = db_utils::postMemory($_GET);
$oDaoOuvidoriaAtend = new cl_ouvidoriaatendimento();
$sCamposAtendimentoLocal = "ov01_sequencial,";
$sCamposAtendimentoLocal .= "p51_codigo ||' - '|| p51_descr as tipo_processo,";
$sCamposAtendimentoLocal .= "ov01_numero ||' / '|| ov01_anousu as numero_atendimento,";
$sCamposAtendimentoLocal .= "ov01_solicitacao,";
$sCamposAtendimentoLocal .= "ov01_executado,";
$sCamposAtendimentoLocal .= "nome as nome_ouvidor,";
$sCamposAtendimentoLocal .= "ov01_dataatend as data_atendimento,";
$sCamposAtendimentoLocal .= "ov01_horaatend as hora_atendimento,";
$sCamposAtendimentoLocal .= "ov01_requerente as nome_requerente,";
$sCamposAtendimentoLocal .= "ov25_sequencial ||' - '|| ov25_descricao as local,";
$sCamposAtendimentoLocal .= "ov01_depart ||' - '|| descrdepto as departamento_inicial,";
$sCamposAtendimentoLocal .= "(select procarquiv.p67_dtarq ";
$sCamposAtendimentoLocal .= " from arqproc ";
$sCamposAtendimentoLocal .= " inner join procarquiv on p68_codarquiv = p67_codarquiv ";
$sCamposAtendimentoLocal .= " where p68_codproc = p58_codproc) as data_arquivamento, ";
$sCamposAtendimentoLocal .= "p58_codproc as numero_processo";
$sWhereAtendimentoLocal = "ouvidoriaatendimento.ov01_sequencial = {$oGet->iAtendimento}";
$sSqlOuvAtend = $oDaoOuvidoriaAtend->sql_query_atendimento_processo(null, $sCamposAtendimentoLocal, null, $sWhereAtendimentoLocal);
$rsOuviAtendimento = $oDaoOuvidoriaAtend->sql_record($sSqlOuvAtend);
if ($oDaoOuvidoriaAtend->erro_status == "0") {
db_msgbox("Não foi possível localizar o atendimento desejado.");
db_redireciona("digitaconsultaouvidorianovo.php");
exit;
}
$oAtendimento = db_utils::fieldsMemory($rsOuviAtendimento, 0);
$sDataArquivamento = "";
if ($oAtendimento->data_arquivamento != "") {
$sDataArquivamento = db_formatar($oAtendimento->data_arquivamento, "d");
}
$oAtendimento->data_arquivamento = $sDataArquivamento;
$sNumeroProcesso = "";
if ($oAtendimento->numero_processo != "") {
$sNumeroProcesso = $oAtendimento->numero_processo;
}
$oAtendimento->numero_processo = $sNumeroProcesso;
?>
<html>
<head>
<title>Consulta Atendimento Ouvidoria</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<link rel="stylesheet" type="text/css" href="include/estilodai.css" >
<script language="JavaScript" src="scripts/db_script.js"></script>
<script language="JavaScript" src="scripts/prototype.js"></script>
<style type="text/css">
<?php
db_estilosite();
?>
.valores{
width: 100%;
}
.textarea {
width: 100%;
height: 160px;
}
.buttonSpan {
width: 300px;
height: 25px;
text-align: center;
color: #000;
border-top: 2px solid #FFF;
border-left: 2px solid #FFF;
border-right: 2px solid #000;
border-bottom: 2px solid #000;
background-color: #CCCCCC;
cursor: pointer;
}
.buttonIn {
width: 300px;
height: 25px;
text-align: center;
font-weight: bold;
color: #000;
cursor: pointer;
background-color: #CCCCCC;
border-bottom: 1px solid #FFF;
border-right: 1px solid #FFF;
border-left: 1px solid #000;
border-top: 1px solid #000;
}
.buttonDisabled {
width: 300px;
height: 25px;
text-align: center;
font-weight: bold;
color: #000;
cursor: pointer;
background-color: #FFFFFF;
border-top: 2px solid #FFF;
border-left: 2px solid #FFF;
border-right: 2px solid #000;
border-bottom: 2px solid #000;
}
</style>
</head>
<body bgcolor="<?=$w01_corbody ?>">
<table width="100%" border="0" id="tabelaAtendimento">
<tr>
<td style="width: 40%;" valign="top">
<fieldset>
<legend class="titulo">
<b>Dados do Atendimento</b>
</legend>
<table border="0" width="100%">
<tr>
<td align="left" width="180px">
<span class='texto'><b>Atendimento:</b></span>
</td>
<td id='atendimento'>
<input class="valores" name="input" value="<?=$oAtendimento->numero_atendimento; ?>" readonly="readonly" />
</td>
<td align="right">
<span class='texto'><b>Processo:</b></span>
</td>
<td id='processo'>
<input class="valores" name="input" value="<?=$oAtendimento->numero_processo; ?>" readonly="readonly" />
</td>
</tr>
<tr>
<td>
<span class='texto'><b>Data do Processo:</b></span>
</td>
<td >
<input class="valores" name="input" value="<?=db_formatar($oAtendimento->data_atendimento, 'd'); ?>" readonly="readonly" />
</td>
<td align="right" nowrap="nowrap">
<span class='texto'><b>Hora Inclusão:</b></span>
</td>
<td>
<input class="valores" name="input" value="<?=$oAtendimento->hora_atendimento; ?>" readonly="readonly" />
</td>
</tr>
<tr>
<td><span class='texto'><b>Ouvidor:</b></span></td>
<td colspan="3">
<input class="valores" name="input" value="<?=$oAtendimento->nome_ouvidor; ?>" readonly="readonly" />
</td>
</tr>
<tr>
<td>
<span class='texto'><b>Departamento Inicial:</b></span>
</td>
<td colspan="3">
<input class="valores" name="input" value="<?=$oAtendimento->departamento_inicial; ?>" readonly="readonly" />
</td>
</tr>
<tr>
<td>
<span class='texto'><b>Tipo de Processo:</b></span>
</td>
<td colspan="3">
<input class="valores" name="input" value="<?=$oAtendimento->tipo_processo; ?>" readonly="readonly" />
</td>
</tr>
<tr>
<td>
<span class='texto'><b>Requerente:</b></span>
</td>
<td colspan="3">
<input class="valores" name="input" value="<?=$oAtendimento->nome_requerente; ?>" readonly="readonly" />
</td>
</tr>
<tr>
<td>
<span class='texto'><b>Local:</b></span>
</td>
<td colspan="3">
<input class="valores" name="input" value="<?=$oAtendimento->local; ?>" readonly="readonly" />
</td>
</tr>
<tr>
<td>
<span class='texto'><b>Data de arquivamento:</b></span>
</td>
<td colspan="3">
<input class="valores" name="input" value="<?=$oAtendimento->data_arquivamento; ?>" readonly="readonly" />
</td>
</tr>
</table>
</fieldset>
</td>
<td style="width: 30%;">
<fieldset>
<legend class="titulo"><b>Solicitação</b></legend>
<textarea class="textarea" readonly="readonly"><?=$oAtendimento->ov01_solicitacao; ?></textarea>
</fieldset>
</td>
<td style="width: 30%;">
<fieldset>
<legend class="titulo"><b>Executado</b></legend>
<textarea class="textarea" readonly="readonly"><?=$oAtendimento->ov01_executado; ?></textarea>
</fieldset>
</td>
</tr>
</table>
<fieldset >
<legend class="titulo">Informações Adicionais</legend>
<table id="globalInformacaoAdicional" >
<tr>
<td valign="top" width="20%">
<table class="texto" border="0" cellspacing="0">
<tr>
<td id="btnAtendimentoVinculado" width="300px;" class="buttonSpan">
<span onclick="js_atualizaFrame('btnAtendimentoVinculado');">Atendimento Vinculado</span>
</td>
</tr>
<tr>
<td id="btnDespachos" width="300px;" class="buttonSpan">
<span onclick="js_atualizaFrame('btnDespachos');">Despachos</span>
</td>
</tr>
<tr>
<td id="btnRetornosEfetuados" width="300px;" class="buttonSpan">
<span onclick="js_atualizaFrame('btnRetornosEfetuados');">Retornos Efetuados</span>
</td>
</tr>
<tr>
<td id="btnInformacoesRequerente" width="300px;" class="buttonSpan">
<span onclick="js_atualizaFrame('btnInformacoesRequerente');">Informações Requerente</span>
</td>
</tr>
</table>
</td>
<td valign="top" width="97%">
<iframe id="frameAtendimentoOuvidoria" name="frameAtendimentoOuvidoria" src="centro_pref.php" width="100%" height="300px;" style="border:hidden;"></iframe>
</td width="3%">
<td> </td>
</tr>
</table>
</fieldset>
<p align="center">
<input type="button" value="Voltar" id="btnVoltar" onclick="js_retornarConsultaAnterior();"/>
</p>
</body>
</html>
<script>
var iNumeroProcesso = '<?php echo $oAtendimento->numero_processo;?>';
function js_atualizaFrame(sNomeBotao) {
var sArquivoAbrir = "";
$('btnAtendimentoVinculado').removeClassName('buttonIn');
$('btnDespachos').removeClassName('buttonIn');
$('btnRetornosEfetuados').removeClassName('buttonIn');
$('btnInformacoesRequerente').removeClassName('buttonIn');
if (iNumeroProcesso != "") {
switch(sNomeBotao) {
case 'btnAtendimentoVinculado':
$('btnAtendimentoVinculado').addClassName('buttonIn');
sArquivoAbrir = "func_detalheatendimentoouvidoria.php?iCodProcesso="+iNumeroProcesso;
break;
case 'btnDespachos':
sArquivoAbrir = "func_detalhedespachosouvidoria.php?iCodProcesso="+iNumeroProcesso;
$('btnDespachos').addClassName('buttonIn');
break;
case 'btnRetornosEfetuados':
sArquivoAbrir = "func_detalheretornosouvidoria.php?iCodProcesso="+iNumeroProcesso;
$('btnRetornosEfetuados').addClassName('buttonIn');
break;
case 'btnInformacoesRequerente':
$('btnInformacoesRequerente').addClassName('buttonIn');
sArquivoAbrir = "func_informacoesrequerente.php?iAtendimento="+<?php echo $oAtendimento->ov01_sequencial; ?>;
break;
}
$('frameAtendimentoOuvidoria').src = sArquivoAbrir;
}
}
function js_validaNumeroProcesso() {
if (iNumeroProcesso == "") {
$('btnAtendimentoVinculado').addClassName('buttonDisabled');
$('btnDespachos').addClassName('buttonDisabled');
$('btnRetornosEfetuados').addClassName('buttonDisabled');
$('btnInformacoesRequerente').addClassName('buttonDisabled');
}
}
js_validaNumeroProcesso();
function js_retornarConsultaAnterior() {
location.href = "digitaconsultaouvidorianovo.php?lRetornoAutomatico=true";
}
</script>