Commit 7eb20f0fa9cb753123e51234a74dadd37fd4f772
1 parent
8dfb61e3
Exists in
master
and in
1 other branch
- merge de branch (2.4) revisão [623:642]
git-svn-id: http://svn.softwarepublico.gov.br/svn/cacic/cacic/trunk/gerente@643 fecfc0c7-e812-0410-ae72-849f08638ee7
Showing
9 changed files
with
112 additions
and
126 deletions
Show diff stats
admin/locais/detalhes_local.php
... | ... | @@ -29,18 +29,19 @@ AntiSpy('1,2'); // Permitido somente a estes cs_nivel_administracao... |
29 | 29 | |
30 | 30 | conecta_bd_cacic(); |
31 | 31 | |
32 | -if ($_POST['ExcluiLocal'] <> '') | |
33 | - { | |
32 | +if ($_POST['ExcluiLocal'] <> '') { | |
34 | 33 | $result = mysql_list_tables($nome_bd); //Retorna a lista de tabelas do BD do CACIC (em config.php) |
35 | 34 | while ($row = mysql_fetch_row($result)) |
36 | - { | |
37 | - $query_DEL = 'DELETE FROM '.$row[0] .' WHERE id_local = "'. $_POST['frm_id_local'] .'"'; | |
38 | - $result_DEL = @mysql_query($query_DEL); //Neste caso, o "@" inibe qualquer mensagem de erro retornada pela função MYSQL_QUERY() | |
39 | - if ($result_DEL) | |
40 | - GravaLog('DEL',$_SERVER['SCRIPT_NAME'],$row[0]); | |
35 | + { | |
36 | + if(!( $row[0] == "usuarios") ) { // Nao exclui dados de usuarios quando exclui locais | |
37 | + $query_DEL = 'DELETE FROM '.$row[0] .' WHERE id_local = "'. $_POST['frm_id_local'] .'"'; | |
38 | + $result_DEL = @mysql_query($query_DEL); //Neste caso, o "@" inibe qualquer mensagem de erro retornada pela função MYSQL_QUERY() | |
39 | + if ($result_DEL) | |
40 | + GravaLog('DEL',$_SERVER['SCRIPT_NAME'],$row[0]); | |
41 | 41 | } |
42 | + } | |
42 | 43 | header ("Location: ../../include/operacao_ok.php?chamador=../admin/locais/index.php&tempo=1"); |
43 | - } | |
44 | +} | |
44 | 45 | elseif ($_POST['GravaAlteracoes']<>'') |
45 | 46 | { |
46 | 47 | $query = "UPDATE locais | ... | ... |
admin/patrimonio/nivel2/detalhes_nivel2.php
... | ... | @@ -34,9 +34,7 @@ AntiSpy('1,2,3'); // Permitido somente a estes cs_nivel_administracao... |
34 | 34 | |
35 | 35 | if ($exclui_uon2) |
36 | 36 | { |
37 | - $query = " DELETE | |
38 | - FROM unid_organizacional_nivel2 | |
39 | - WHERE id_unid_organizacional_nivel2 = '$frm_id_unid_organizacional_nivel2_anterior'"; | |
37 | + $query = "DELETE FROM unid_organizacional_nivel2 WHERE id_unid_organizacional_nivel2 = '$frm_id_unid_organizacional_nivel2_anterior'"; | |
40 | 38 | |
41 | 39 | mysql_query($query) or die($oTranslator->_('Falha em exclusao na tabela (%1) ou sua sessao expirou!',array('unid_organizacional_nivel2'))); |
42 | 40 | GravaLog('DEL',$_SERVER['SCRIPT_NAME'],'unid_organizacional_nivel2'); |
... | ... | @@ -52,30 +50,26 @@ if ($exclui_uon2) |
52 | 50 | else if($_POST['gravainformacaoUON2']) |
53 | 51 | { |
54 | 52 | |
55 | - $query = " UPDATE unid_organizacional_nivel2 | |
56 | - SET nm_unid_organizacional_nivel2 = '".$_POST['frm_nm_unid_organizacional_nivel2']."', | |
57 | - te_endereco_uon2 = '".$_POST['frm_te_endereco_uon2']."', | |
58 | - te_bairro_uon2 = '".$_POST['frm_te_bairro_uon2']."', | |
59 | - te_cidade_uon2 = '".$_POST['frm_te_cidade_uon2']."', | |
60 | - te_uf_uon2 = '".$_POST['frm_te_uf_uon2']."', | |
61 | - nm_responsavel_uon2 = '".$_POST['frm_nm_responsavel_uon2']."', | |
62 | - te_email_responsavel_uon2 = '".$_POST['frm_te_email_responsavel_uon2']."', | |
63 | - nu_tel1_responsavel_uon2 = '".$_POST['frm_nu_tel1_responsavel_uon2']."', | |
64 | - nu_tel2_responsavel_uon2 = '".$_POST['frm_nu_tel2_responsavel_uon2']."', | |
65 | - id_unid_organizacional_nivel1a = '".$_POST['frm_id_unid_organizacional_nivel1a']."', | |
66 | - id_local = '".$_POST['frm_id_local']."' | |
67 | - WHERE id_unid_organizacional_nivel2 = ".$_POST['frm_id_unid_organizacional_nivel2_anterior']; | |
68 | - | |
69 | - $result = mysql_query($query) or die ('1-Insert falhou ou sua sessão expirou!'); | |
70 | - GravaLog('UPD',$_SERVER['SCRIPT_NAME'],'unid_organizacional_nivel2'); | |
71 | - if (!atualiza_configuracoes_uonx('2')) | |
53 | + $rowSEL = explode('#',$result_sel); | |
54 | + | |
55 | + if ($rowSEL[2] <> $frm_nm_unid_organizacional_nivel2 || $rowSEL[4] <> $frm_te_endereco_uon2 || $rowSEL[6] <> $frm_te_bairro_uon2 ||$rowSEL[8] <> $frm_te_cidade_uon2 || $rowSEL[10] <> $frm_te_uf_uon2 || $rowSEL[12] <> $frm_nm_responsavel_uon2 || $rowSEL[14] <> $frm_te_email_responsavel_uon2 || $rowSEL[16] <> $frm_nu_tel1_responsavel_uon2 || $rowSEL[18] <> $frm_nu_tel2_responsavel_uon2) | |
72 | 56 | { |
73 | - echo mensagem($oTranslator->_('Falha na exclusao de configuracoes')); | |
74 | - } | |
75 | - else | |
57 | + $query = "UPDATE unid_organizacional_nivel2 SET id_unid_organizacional_nivel1a=$frm_id_unid_organizacional_nivel1a, nm_unid_organizacional_nivel2 = '$frm_nm_unid_organizacional_nivel2', te_endereco_uon2= '$frm_te_endereco_uon2', te_bairro_uon2= '$frm_te_bairro_uon2', te_cidade_uon2= '$frm_te_cidade_uon2',te_uf_uon2= '$frm_te_uf_uon1',nm_responsavel_uon2= '$frm_nm_responsavel_uon2',te_email_responsavel_uon2 = '$frm_te_email_responsavel_uon2', nu_tel1_responsavel_uon2 = '$frm_nu_tel1_responsavel_uon2', nu_tel2_responsavel_uon2= '$frm_nu_tel2_responsavel_uon2' WHERE id_unid_organizacional_nivel2 = $frm_id_unid_organizacional_nivel2_anterior"; | |
58 | + mysql_query($query) or die($oTranslator->_('Falha na atualizacao na tabela (%1) ou sua sessao expirou!',array('unid_organizacional_nivel2'))); | |
59 | + GravaLog('DEL',$_SERVER['SCRIPT_NAME'],'unid_organizacional_nivel2'); | |
60 | + if (!atualiza_configuracoes_uonx('2')) | |
61 | + { | |
62 | + echo mensagem($oTranslator->_('Falha na atualizacao de configuracoes')); | |
63 | + } | |
64 | + else | |
65 | + { | |
66 | + header ("Location: ../../../include/operacao_ok.php?chamador=../admin/patrimonio/nivel2/index.php&tempo=1"); | |
67 | + } | |
68 | + } | |
69 | + else | |
76 | 70 | { |
77 | - header ("Location: ../../../include/operacao_ok.php?chamador=../admin/patrimonio/nivel2/index.php&tempo=1"); | |
78 | - } | |
71 | + header ("Location: ../../../include/nenhuma_operacao_realizada.php?chamador=../admin/patrimonio/nive2/index.php&tempo=1"); | |
72 | + } | |
79 | 73 | |
80 | 74 | } |
81 | 75 | else |
... | ... | @@ -94,15 +88,22 @@ else |
94 | 88 | } |
95 | 89 | return false; |
96 | 90 | } |
91 | + | |
92 | + | |
93 | + function upduon1(und1) | |
94 | + { | |
95 | + window.location.href="http://teste"; | |
96 | + } | |
97 | 97 | |
98 | 98 | function ListarUON1a(ObjLocal) |
99 | - { | |
99 | + { | |
100 | 100 | var frm_id_unid_organizacional_nivel1a =window.document.forms[0].frm_id_unid_organizacional_nivel1a; |
101 | 101 | var contaUON1a = 0; |
102 | 102 | |
103 | - frm_id_unid_organizacional_nivel1a.options.length = 0; | |
103 | + frm_id_unid_organizacional_nivel1a.options.length = 0; | |
104 | + | |
104 | 105 | for (j=0;j<document.all.listaUON1a.options.length;j++) |
105 | - { | |
106 | + { | |
106 | 107 | if (document.all.listaUON1a.options[j].id == ObjLocal.options[ObjLocal.options.selectedIndex].value) |
107 | 108 | { |
108 | 109 | frm_id_unid_organizacional_nivel1a.options[contaUON1a] = new Option(document.all.listaUON1a.options[j].text); |
... | ... | @@ -114,74 +115,60 @@ else |
114 | 115 | |
115 | 116 | return true; |
116 | 117 | |
117 | - } | |
118 | + } | |
118 | 119 | |
119 | 120 | function valida_form() |
120 | - { | |
121 | + { | |
121 | 122 | alert("<?=$oTranslator->_('Por favor, selecione');?> "+ document.form.etiqueta1.value+"."); |
122 | 123 | document.form.selectUON1.focus(); |
123 | - return false; | |
124 | - } | |
124 | + return true; | |
125 | 125 | if (document.form.frm_nm_unid_organizacional_nivel2.value == "") |
126 | - { | |
126 | + { | |
127 | 127 | alert("<?=$oTranslator->_('Por favor, preencha campo');?> "+ document.form.etiqueta2.value+"."); |
128 | 128 | document.form.frm_nm_unid_organizacional_nivel2.focus(); |
129 | - return false; | |
130 | - } | |
131 | - | |
132 | - return true; | |
133 | - } | |
134 | - | |
135 | - $queryUON1a = 'SELECT uo1a.id_unid_organizacional_nivel1a, | |
136 | - uo1a.nm_unid_organizacional_nivel1a, | |
137 | - uo1a.id_unid_organizacional_nivel1 | |
138 | - FROM unid_organizacional_nivel1a uo1a | |
139 | - ORDER BY uo1a.nm_unid_organizacional_nivel1a'; | |
140 | - | |
141 | - $queryUON2 = 'SELECT uo2.id_unid_organizacional_nivel2, | |
142 | - uo2.nm_unid_organizacional_nivel2, | |
143 | - uo2.id_unid_organizacional_nivel1a, | |
144 | - uo2.id_local | |
145 | - FROM unid_organizacional_nivel2 uo2 | |
146 | - WHERE uo2.id_unid_organizacional_nivel2 = '.$_GET['id_uon2'].' | |
147 | - ORDER BY uo2.nm_unid_organizacional_nivel2'; | |
129 | + return true; | |
130 | + } | |
131 | + | |
132 | + } | |
133 | + <? | |
134 | + | |
135 | + $queryUON1 = 'SELECT uo1.id_unid_organizacional_nivel1, uo1.nm_unid_organizacional_nivel1 FROM unid_organizacional_nivel1 uo1 ORDER BY uo1.nm_unid_organizacional_nivel1'; | |
136 | + | |
137 | + $queryUON1a = 'SELECT uo1a.id_unid_organizacional_nivel1a,uo1a.nm_unid_organizacional_nivel1a,uo1a.id_unid_organizacional_nivel1 FROM unid_organizacional_nivel1a uo1a ORDER BY uo1a.nm_unid_organizacional_nivel1a'; | |
138 | + $queryUON2 = 'SELECT * FROM unid_organizacional_nivel2 uo2 WHERE uo2.id_unid_organizacional_nivel2 = '.$_GET['id_uon2'].' ORDER BY uo2.nm_unid_organizacional_nivel2'; | |
148 | 139 | |
149 | - $queryLOCAIS= "SELECT id_local, | |
150 | - sg_local | |
151 | - FROM locais | |
152 | - ORDER BY sg_local"; | |
140 | + $queryLOCAIS= "SELECT id_local,sg_local FROM locais ORDER BY sg_local"; | |
141 | + | |
153 | 142 | |
154 | 143 | Conecta_bd_cacic(); |
155 | 144 | |
156 | - $result_UON1 = mysql_query($queryUON1); | |
157 | - $result_UON1a = mysql_query($queryUON1a); | |
145 | + | |
146 | + $result_UON1 = mysql_query($queryUON1); | |
147 | + $result_UON1a = mysql_query($queryUON1a); | |
158 | 148 | $result_UON2 = mysql_query($queryUON2); |
159 | 149 | $result_LOCAIS = mysql_query($queryLOCAIS); |
160 | 150 | |
161 | - $row_UON2 = mysql_fetch_array($result_UON2); | |
151 | + $row_UON2= mysql_fetch_array($result_UON2); | |
162 | 152 | |
163 | 153 | $id_UON1 = ''; |
164 | 154 | if(mysql_num_rows($result_UON1a)) |
165 | - { | |
155 | + { | |
166 | 156 | while($row_UON1a = mysql_fetch_array($result_UON1a)) |
167 | - { | |
157 | + { | |
168 | 158 | if ($row_UON1a['id_unid_organizacional_nivel1a'] == $row_UON2['id_unid_organizacional_nivel1a']) |
169 | - { | |
159 | + { | |
170 | 160 | $id_UON1 = $row_UON1a['id_unid_organizacional_nivel1']; |
171 | 161 | break; |
172 | - } | |
173 | - } | |
174 | - } | |
175 | - | |
176 | - ?> | |
162 | + } | |
163 | + } | |
164 | + } | |
165 | + | |
166 | + ?> | |
167 | + </script> | |
177 | 168 | <body background="../../../imgs/linha_v.gif" onLoad="Javascript: SetaCampo('frm_id_local');"> |
178 | 169 | <div id="LayerDados" style="position:absolute; width:200px; height:115px; z-index:1; left: 100px; top: 0px; visibility: hidden"> |
179 | 170 | <? |
180 | - $queryLayerUON1a = "SELECT UON1a.id_unid_organizacional_nivel1, | |
181 | - UON1a.id_unid_organizacional_nivel1a, | |
182 | - UON1a.nm_unid_organizacional_nivel1a | |
183 | - FROM unid_organizacional_nivel1a UON1a | |
184 | - ORDER BY UON1a.nm_unid_organizacional_nivel1a"; | |
171 | + $queryLayerUON1a = "SELECT UON1a.id_unid_organizacional_nivel1,UON1a.id_unid_organizacional_nivel1a,UON1a.nm_unid_organizacional_nivel1a FROM unid_organizacional_nivel1a UON1a ORDER BY UON1a.nm_unid_organizacional_nivel1a"; | |
185 | 172 | $resultLayerUON1a = mysql_query($queryLayerUON1a) or die($oTranslator->_('Falha na Consulta a tabela (%1) ou sua sessao expirou!',array('unid_organizacional_nivel1a'))); |
186 | 173 | |
187 | 174 | $intIdUON1a = 0; |
... | ... | @@ -193,10 +180,14 @@ else |
193 | 180 | |
194 | 181 | echo '<select name="listaUON1a">'; |
195 | 182 | for ($i=0; $i < count($arrUON1a);$i++) |
196 | - { | |
183 | + { | |
197 | 184 | echo $arrUON1a[$i]; |
198 | - } | |
199 | - echo '</select>'; | |
185 | + } | |
186 | + echo '</select>'; | |
187 | + $query = "SELECT * FROM unid_organizacional_nivel2 WHERE id_unid_organizacional_nivel2 = '".$row_UON2['id_unid_organizacional_nivel2']."'"; | |
188 | + $result = mysql_query($query) or die ($oTranslator->_('Falha na Consulta a tabela (%1) ou sua sessao expirou!',array('unid_organizacional_nivel2'))); | |
189 | + $fetch_result_sel = mysql_fetch_array($result); | |
190 | + $result_sel = implode('#',$fetch_result_sel); | |
200 | 191 | |
201 | 192 | ?> |
202 | 193 | </div> |
... | ... | @@ -220,9 +211,9 @@ else |
220 | 211 | <td colspan="3"><select name="frm_id_local" id="frm_id_local" class="normal" onFocus="SetaClassDigitacao(this);" onBlur="SetaClassNormal(this);"> |
221 | 212 | <? |
222 | 213 | while($row_LOCAIS = mysql_fetch_array($result_LOCAIS)) |
223 | - { | |
214 | + { | |
224 | 215 | echo '<option value="'.$row_LOCAIS['id_local'].'" '.($row_LOCAIS['id_local']==$row_UON2['id_local']?'selected':'').'>'.$row_LOCAIS['sg_local'].'</option>'; |
225 | - } | |
216 | + } | |
226 | 217 | ?> |
227 | 218 | </select></td></tr> |
228 | 219 | <tr> |
... | ... | @@ -233,12 +224,12 @@ else |
233 | 224 | <? |
234 | 225 | |
235 | 226 | if(mysql_num_rows($result_UON1)) |
236 | - { | |
227 | + { | |
237 | 228 | while($row_UON1 = mysql_fetch_array($result_UON1)) |
238 | - { | |
229 | + { | |
239 | 230 | echo "<option value='". $row_UON1['id_unid_organizacional_nivel1']."' ".($row_UON1['id_unid_organizacional_nivel1']==$id_UON1?'selected':'').'>'.$row_UON1['nm_unid_organizacional_nivel1'].'</option>'; |
240 | - } | |
241 | - } | |
231 | + } | |
232 | + } | |
242 | 233 | ?> |
243 | 234 | </select> |
244 | 235 | </div></td> |
... | ... | @@ -252,12 +243,12 @@ else |
252 | 243 | <? |
253 | 244 | mysql_data_seek($result_UON1a,0); |
254 | 245 | if(mysql_num_rows($result_UON1a)) |
255 | - { | |
246 | + { | |
256 | 247 | while($row_UON1a = mysql_fetch_array($result_UON1a)) |
257 | - { | |
258 | - echo "<option value='". $row_UON1a['id_unid_organizacional_nivel1a'] . "' " . ($row_UON1a['id_unid_organizacional_nivel1a'] == $row_UON2['id_unid_organizacional_nivel1a']?'selected':'').">".$row_UON1a['nm_unid_organizacional_nivel1a'].'</option>'; | |
259 | - } | |
260 | - } | |
248 | + { | |
249 | + echo "<option value='". $row_UON1a['id_unid_organizacional_nivel1a'] . "' " . ($row_UON1a['id_unid_organizacional_nivel1a'] == $row_UON2['id_unid_organizacional_nivel1a']?'selected':'').">".$row_UON1a['nm_unid_organizacional_nivel1a'].'</option>'; | |
250 | + } | |
251 | + } | |
261 | 252 | ?> |
262 | 253 | </select> |
263 | 254 | </div></td> | ... | ... |
admin/perfis_aplicativos_monitorados/detalhes_perfil.php
... | ... | @@ -247,7 +247,7 @@ function valida_form() { |
247 | 247 | $v_nm_aplicativo = substr($row['nm_aplicativo'], 0, strpos($row['nm_aplicativo'], "#DESATIVADO#")); |
248 | 248 | } |
249 | 249 | ?> |
250 | - <input name="frm_nm_aplicativo" type="text" id="frm_nm_aplicativo3" size="80" maxlength="100" value="<? echo $v_nm_aplicativo;?>" class="normal" onFocus="SetaClassDigitacao(this);" onBlur="SetaClassNormal(this);"<? echo ($_SESSION['cs_nivel_administracao']<>1?'readonly':'')?> > | |
250 | + <input name="frm_nm_aplicativo" type="text" id="frm_nm_aplicativo3" size="80" maxlength="150" value="<? echo $v_nm_aplicativo;?>" class="normal" onFocus="SetaClassDigitacao(this);" onBlur="SetaClassNormal(this);"<? echo ($_SESSION['cs_nivel_administracao']<>1?'readonly':'')?> > | |
251 | 251 | </td> |
252 | 252 | </tr> |
253 | 253 | <tr> |
... | ... | @@ -318,7 +318,7 @@ function valida_form() { |
318 | 318 | em Registry</option> |
319 | 319 | <option value="2" <? if ($row['cs_ide_licenca']=='2') echo 'selected';?> id="Ex.: Arquivos de Programas\Cacic\Cacic2.ini/Patrimonio/nu_CPU">Nome/Seção\Chave |
320 | 320 | de Arquivo INI</option> |
321 | - </select> <br> <input name="frm_te_ide_licenca" type="text" id="frm_te_ide_licenca" value="<? echo $row['te_ide_licenca'];?>" size="80" maxlength="100" class="normal" onFocus="SetaClassDigitacao(this);" onBlur="SetaClassNormal(this);" <? echo ($_SESSION['cs_nivel_administracao']<>1?'readonly':'')?>> | |
321 | + </select> <br> <input name="frm_te_ide_licenca" type="text" id="frm_te_ide_licenca" value="<? echo $row['te_ide_licenca'];?>" size="80" maxlength="150" class="normal" onFocus="SetaClassDigitacao(this);" onBlur="SetaClassNormal(this);" <? echo ($_SESSION['cs_nivel_administracao']<>1?'readonly':'')?>> | |
322 | 322 | <br> <input name="Ajuda1" type="text" style="border:0;font-size:9;color:#000099" size="80" maxlength="200" class="normal" onFocus="SetaClassDigitacao(this);" onBlur="SetaClassNormal(this);" > |
323 | 323 | <br> <input name="Ajuda11" type="text" style="border:0" size="80" class="normal" onFocus="SetaClassDigitacao(this);" onBlur="SetaClassNormal(this);" > |
324 | 324 | <div align="left"> <br> |
... | ... | @@ -343,7 +343,7 @@ function valida_form() { |
343 | 343 | de Arquivo de Configuração</option> |
344 | 344 | <option value="3" <? if ($row['cs_car_inst_w9x']=='3') echo 'selected';?> id="Ex.: HKEY_LOCAL_MACHINE\Software\Dataprev\Cacic2\id_versao">Caminho\Chave\Valor |
345 | 345 | em Registry</option> |
346 | - </select> <br> <input name="frm_te_car_inst_w9x" type="text" id="frm_te_car_inst_w9x3" size="80" maxlength="100" value="<? echo $row['te_car_inst_w9x'];?>" class="normal" onFocus="SetaClassDigitacao(this);" onBlur="SetaClassNormal(this);" <? echo ($_SESSION['cs_nivel_administracao']<>1?'readonly':'')?>> | |
346 | + </select> <br> <input name="frm_te_car_inst_w9x" type="text" id="frm_te_car_inst_w9x3" size="80" maxlength="150" value="<? echo $row['te_car_inst_w9x'];?>" class="normal" onFocus="SetaClassDigitacao(this);" onBlur="SetaClassNormal(this);" <? echo ($_SESSION['cs_nivel_administracao']<>1?'readonly':'')?>> | |
347 | 347 | <br> <input name="Ajuda2" type="text" style="border:0;font-size:9;color:#000099" size="80" maxlength="200"> |
348 | 348 | <br> <input name="Ajuda22" type="text" style="border:0" size="80"></td> |
349 | 349 | </tr> |
... | ... | @@ -364,7 +364,7 @@ function valida_form() { |
364 | 364 | de Arquivo INI</option> |
365 | 365 | <option value="4"<? if ($row['cs_car_ver_w9x']=='4') echo 'selected';?> id="Ex.: Cacic\modulos\col_moni.exe">Versão |
366 | 366 | de Executável</option> |
367 | - </select> <br> <input name="frm_te_car_ver_w9x" type="text" id="frm_te_car_ver_w9x3" size="80" maxlength="100" value="<? echo $row['te_car_ver_w9x'];?>" class="normal" onFocus="SetaClassDigitacao(this);" onBlur="SetaClassNormal(this);" <? echo ($_SESSION['cs_nivel_administracao']<>1?'readonly':'')?>> | |
367 | + </select> <br> <input name="frm_te_car_ver_w9x" type="text" id="frm_te_car_ver_w9x3" size="80" maxlength="150" value="<? echo $row['te_car_ver_w9x'];?>" class="normal" onFocus="SetaClassDigitacao(this);" onBlur="SetaClassNormal(this);" <? echo ($_SESSION['cs_nivel_administracao']<>1?'readonly':'')?>> | |
368 | 368 | <br> <input name="Ajuda3" type="text" style="border:0;font-size:9;color:#000099" size="80" maxlength="200"> |
369 | 369 | <br> <input name="Ajuda33" type="text" style="border:0" size="80"></td> |
370 | 370 | </tr> |
... | ... | @@ -387,7 +387,7 @@ function valida_form() { |
387 | 387 | de Arquivo de Configuração</option> |
388 | 388 | <option value="3" <? if ($row['cs_car_inst_wnt']=='3') echo 'selected';?> id="Ex.: HKEY_LOCAL_MACHINE\Software\Dataprev\Cacic2\id_versao">Caminho\Chave\Valor |
389 | 389 | em Registry</option> |
390 | - </select> <br> <input name="frm_te_car_inst_wnt" type="text" id="frm_te_car_inst_wnt3" size="80" maxlength="100" value="<? echo $row['te_car_inst_wnt'];?>" class="normal" onFocus="SetaClassDigitacao(this);" onBlur="SetaClassNormal(this);" <? echo ($_SESSION['cs_nivel_administracao']<>1?'readonly':'')?>> | |
390 | + </select> <br> <input name="frm_te_car_inst_wnt" type="text" id="frm_te_car_inst_wnt3" size="80" maxlength="150" value="<? echo $row['te_car_inst_wnt'];?>" class="normal" onFocus="SetaClassDigitacao(this);" onBlur="SetaClassNormal(this);" <? echo ($_SESSION['cs_nivel_administracao']<>1?'readonly':'')?>> | |
391 | 391 | <br> <input name="Ajuda4" type="text" style="border:0;font-size:9;color:#000099" size="80" maxlength="200"> |
392 | 392 | <br> <input name="Ajuda44" type="text" style="border:0" size="80"></td> |
393 | 393 | </tr> |
... | ... | @@ -408,7 +408,7 @@ function valida_form() { |
408 | 408 | de Arquivo INI</option> |
409 | 409 | <option value="4"<? if ($row['cs_car_ver_wnt']=='4') echo 'selected';?> id="Ex.: Cacic\modulos\col_moni.exe">Versão |
410 | 410 | de Executável</option> |
411 | - </select> <br> <input name="frm_te_car_ver_wnt" type="text" id="frm_te_car_ver_wnt3" size="80" maxlength="100" value="<? echo $row['te_car_ver_wnt'];?>" class="normal" onFocus="SetaClassDigitacao(this);" onBlur="SetaClassNormal(this);" <? echo ($_SESSION['cs_nivel_administracao']<>1?'readonly':'')?>> | |
411 | + </select> <br> <input name="frm_te_car_ver_wnt" type="text" id="frm_te_car_ver_wnt3" size="80" maxlength="150" value="<? echo $row['te_car_ver_wnt'];?>" class="normal" onFocus="SetaClassDigitacao(this);" onBlur="SetaClassNormal(this);" <? echo ($_SESSION['cs_nivel_administracao']<>1?'readonly':'')?>> | |
412 | 412 | <br> <input name="Ajuda5" type="text" style="border:0;font-size:9;color:#000099" size="80" maxlength="200"> |
413 | 413 | <br> <input name="Ajuda55" type="text" style="border:0" size="80"></td> |
414 | 414 | </tr> |
... | ... | @@ -449,4 +449,4 @@ function valida_form() { |
449 | 449 | </html> |
450 | 450 | <? |
451 | 451 | } |
452 | -?> | |
453 | 452 | \ No newline at end of file |
453 | +?> | ... | ... |
admin/perfis_aplicativos_monitorados/incluir_perfil.php
... | ... | @@ -210,7 +210,7 @@ function SetaAjuda(p_index, p_texto) |
210 | 210 | <br> |
211 | 211 | <table width="90%" border="0" align="center"> |
212 | 212 | <tr> |
213 | - <td nowrap class="label">Nome do sistema:<br> <input name="frm_nm_aplicativo" type="text" id="frm_nm_aplicativo2" size="80" maxlength="100" class="normal" onFocus="SetaClassDigitacao(this);" onBlur="SetaClassNormal(this);" ></td> | |
213 | + <td nowrap class="label">Nome do sistema:<br> <input name="frm_nm_aplicativo" type="text" id="frm_nm_aplicativo2" size="80" maxlength="150" class="normal" onFocus="SetaClassDigitacao(this);" onBlur="SetaClassNormal(this);" ></td> | |
214 | 214 | </tr> |
215 | 215 | <tr> |
216 | 216 | <td nowrap> <div align="left"> </div></td> |
... | ... | @@ -290,7 +290,7 @@ function SetaAjuda(p_index, p_texto) |
290 | 290 | de Arquivo de Configuração</option> |
291 | 291 | <option value="3" id="Ex.: HKEY_LOCAL_MACHINE\Software\Dataprev\Cacic2\id_versao">Caminho\Chave\Valor |
292 | 292 | em Registry</option> |
293 | - </select> <br> <input name="frm_te_car_inst_w9x" type="text" id="frm_te_car_inst_w9x" size="80" maxlength="100" class="normal" onFocus="SetaClassDigitacao(this);" onBlur="SetaClassNormal(this);" > | |
293 | + </select> <br> <input name="frm_te_car_inst_w9x" type="text" id="frm_te_car_inst_w9x" size="80" maxlength="150" class="normal" onFocus="SetaClassDigitacao(this);" onBlur="SetaClassNormal(this);" > | |
294 | 294 | <br> <input name="Ajuda2" type="text" style="border:0;font-size:9;color:#000099" size="80" maxlength="200"> |
295 | 295 | <br> <input name="Ajuda22" type="text" style="border:0" size="80"> </td> |
296 | 296 | </tr> |
... | ... | @@ -309,7 +309,7 @@ function SetaAjuda(p_index, p_texto) |
309 | 309 | de Arquivo INI</option> |
310 | 310 | <option value="4" id="Ex.: C:\Cacic\modulos\col_moni.exe">Versão |
311 | 311 | de Executável</option> |
312 | - </select> <br> <input name="frm_te_car_ver_w9x" type="text" id="frm_te_car_ver_w9x" size="80" maxlength="100"> | |
312 | + </select> <br> <input name="frm_te_car_ver_w9x" type="text" id="frm_te_car_ver_w9x" size="80" maxlength="150"> | |
313 | 313 | <br> <input name="Ajuda3" type="text" style="border:0;font-size:9;color:#000099" size="80" maxlength="200"> |
314 | 314 | <br> <input name="Ajuda33" type="text" style="border:0" size="80"> </td> |
315 | 315 | </tr> |
... | ... | @@ -329,7 +329,7 @@ function SetaAjuda(p_index, p_texto) |
329 | 329 | de Arquivo de Configuração</option> |
330 | 330 | <option value="3" id="Ex.: HKEY_LOCAL_MACHINE\Software\Dataprev\Cacic2\id_versao">Caminho\Chave\Valor |
331 | 331 | em Registry</option> |
332 | - </select> <br> <input name="frm_te_car_inst_wnt" type="text" id="frm_te_car_inst_wnt" size="80" maxlength="100" class="normal" onFocus="SetaClassDigitacao(this);" onBlur="SetaClassNormal(this);" > | |
332 | + </select> <br> <input name="frm_te_car_inst_wnt" type="text" id="frm_te_car_inst_wnt" size="80" maxlength="150" class="normal" onFocus="SetaClassDigitacao(this);" onBlur="SetaClassNormal(this);" > | |
333 | 333 | <br> <input name="Ajuda4" type="text" style="border:0;font-size:9;color:#000099" size="80" maxlength="200"> |
334 | 334 | <br> <input name="Ajuda44" type="text" style="border:0" size="80"> </td> |
335 | 335 | </tr> |
... | ... | @@ -348,7 +348,7 @@ function SetaAjuda(p_index, p_texto) |
348 | 348 | de Arquivo INI</option> |
349 | 349 | <option value="4" id="Ex.: C:\Cacic\modulos\col_moni.exe">Versão |
350 | 350 | de Executável</option> |
351 | - </select> <br> <input name="frm_te_car_ver_wnt" type="text" id="frm_te_car_ver_wnt" size="80" maxlength="100" class="normal" onFocus="SetaClassDigitacao(this);" onBlur="SetaClassNormal(this);" > | |
351 | + </select> <br> <input name="frm_te_car_ver_wnt" type="text" id="frm_te_car_ver_wnt" size="80" maxlength="150" class="normal" onFocus="SetaClassDigitacao(this);" onBlur="SetaClassNormal(this);" > | |
352 | 352 | <br> <input name="Ajuda5" type="text" style="border:0;font-size:9;color:#000099" size="80" maxlength="200"> |
353 | 353 | <br> <input name="Ajuda55" type="text" style="border:0" size="80"> </td> |
354 | 354 | </tr> |
... | ... | @@ -413,7 +413,7 @@ function SetaAjuda(p_index, p_texto) |
413 | 413 | <tr> |
414 | 414 | <td nowrap><div align="left"><font size="2" face="Verdana, Arial, Helvetica, sans-serif"> |
415 | 415 | </font><font size="2" face="Verdana, Arial, Helvetica, sans-serif"> |
416 | - <input name="frm_te_arq_ver_pat_w9x" type="text" id="frm_te_arq_ver_pat_w9x" size="101" maxlength="100"> | |
416 | + <input name="frm_te_arq_ver_pat_w9x" type="text" id="frm_te_arq_ver_pat_w9x" size="101" maxlength="150"> | |
417 | 417 | <br> |
418 | 418 | <input name="Ajuda7" type="text" style="border:0;font-size:9;color:#000099" size="90" value="Ex.: Trend\pattern32.vxd"> |
419 | 419 | |
... | ... | @@ -460,7 +460,7 @@ function SetaAjuda(p_index, p_texto) |
460 | 460 | </tr> |
461 | 461 | <tr> |
462 | 462 | <td nowrap><div align="left"><font size="2" face="Verdana, Arial, Helvetica, sans-serif"> |
463 | - <input name="frm_te_arq_ver_pat_wnt" type="text" id="frm_te_arq_ver_pat_wnt" size="101" maxlength="100"> | |
463 | + <input name="frm_te_arq_ver_pat_wnt" type="text" id="frm_te_arq_ver_pat_wnt" size="101" maxlength="150"> | |
464 | 464 | <br> |
465 | 465 | <input name="Ajuda8" type="text" style="border:0;font-size:9;color:#000099" size="90" value="Ex.: Trend\pattern-nt.vxd"> |
466 | 466 | ... | ... |
admin/usuarios/detalhes_usuario.php
... | ... | @@ -31,8 +31,7 @@ if ($_POST['ExcluiUsuario']) |
31 | 31 | { |
32 | 32 | $query = "DELETE |
33 | 33 | FROM usuarios |
34 | - WHERE id_usuario = '". $_POST['frm_id_usuario'] ."' AND | |
35 | - id_local = ".$_REQUEST['id_local']; | |
34 | + WHERE id_usuario = '". $_POST['frm_id_usuario'] ."'"; | |
36 | 35 | mysql_query($query) or die($oTranslator->_('kciq_msg delete row on table fail', array('usuarios'))."! ".$oTranslator->_('kciq_msg session fail',false,true)); |
37 | 36 | GravaLog('DEL',$_SERVER['SCRIPT_NAME'],'usuarios'); |
38 | 37 | header ("Location: ../../include/operacao_ok.php?chamador=../admin/usuarios/index.php&tempo=1"); |
... | ... | @@ -67,8 +66,7 @@ elseif ($_POST['ReinicializaSenha']) |
67 | 66 | { |
68 | 67 | $query = "UPDATE usuarios |
69 | 68 | SET te_senha = PASSWORD('".$_POST['frm_nm_usuario_acesso']."') |
70 | - WHERE id_usuario = ". $_POST['frm_id_usuario'] ." AND | |
71 | - id_local = ".$_POST['frm_id_local']; | |
69 | + WHERE id_usuario = ". $_POST['frm_id_usuario'] ; | |
72 | 70 | mysql_query($query) or die($oTranslator->_('Ocorreu um erro durante a atualizacao da tabela %1 ou sua sessao expirou', array('usuarios'))); |
73 | 71 | GravaLog('UPD',$_SERVER['SCRIPT_NAME'],'usuarios'); |
74 | 72 | header ("Location: ../../include/operacao_ok.php?chamador=../admin/usuarios/index.php&tempo=1"); |
... | ... | @@ -87,8 +85,7 @@ else |
87 | 85 | loc.nm_local |
88 | 86 | FROM usuarios a, |
89 | 87 | locais loc |
90 | - WHERE a.id_usuario = ".$_GET['id_usuario']." and | |
91 | - a.id_local = loc.id_local"; | |
88 | + WHERE a.id_usuario = ".$_GET['id_usuario']; | |
92 | 89 | |
93 | 90 | $result = mysql_query($query) or die ($oTranslator->_('kciq_msg select on table fail', array('usuarios'))."! ".$oTranslator->_('kciq_msg session fail',false,true)); |
94 | 91 | $row_usuario = mysql_fetch_array($result); | ... | ... |
admin/usuarios/index.php
... | ... | @@ -51,14 +51,11 @@ $query = 'SELECT usu.id_usuario, |
51 | 51 | g_usu.id_grupo_usuarios, |
52 | 52 | loc.sg_local, |
53 | 53 | loc.id_local |
54 | - FROM usuarios usu, | |
55 | - grupo_usuarios g_usu, | |
56 | - locais loc | |
57 | - WHERE usu.id_grupo_usuarios=g_usu.id_grupo_usuarios and | |
58 | - usu.id_local=loc.id_local '. | |
59 | - $where . ' | |
54 | + FROM grupo_usuarios g_usu, usuarios usu | |
55 | + LEFT JOIN locais loc ON (loc.id_local=usu.id_local) | |
56 | + WHERE usu.id_grupo_usuarios=g_usu.id_grupo_usuarios '. $where . ' | |
60 | 57 | ORDER BY '.$ordem; |
61 | -$result = mysql_query($query); | |
58 | +$result = mysql_query($query) or die(mysql_error(). " " . $query); | |
62 | 59 | |
63 | 60 | $where = ' WHERE g_usu.cs_nivel_administracao <> 0 or |
64 | 61 | g_usu.id_grupo_usuarios = 1 or |
... | ... | @@ -222,12 +219,12 @@ else |
222 | 219 | ($_SESSION['cs_nivel_administracao'] == 3 && ($row['cs_nivel_administracao']==0 || $row['cs_nivel_administracao']==4))) |
223 | 220 | { |
224 | 221 | ?> |
225 | - <a href="detalhes_usuario.php?id_usuario=<? echo $row['id_usuario'];?>&id_local=<? echo $row['id_local'];?>&cs_nivel_administracao=<? echo $row['cs_nivel_administracao'];?>"><? echo $row['sg_local']; ?></a> | |
222 | + <a href="detalhes_usuario.php?id_usuario=<? echo $row['id_usuario'];?>&id_local=<? echo $row['id_local'];?>&cs_nivel_administracao=<? echo $row['cs_nivel_administracao'];?>"><? echo ($row['sg_local']?$row['sg_local']:"???"); ?></a> | |
226 | 223 | <? |
227 | 224 | } |
228 | 225 | else |
229 | 226 | { |
230 | - echo $row['sg_local']; | |
227 | + echo ($row['sg_local']?$row['sg_local']:"???"); | |
231 | 228 | } |
232 | 229 | ?> |
233 | 230 | </div></td> | ... | ... |
include/library.php
1 | -<? | |
1 | +<?php | |
2 | 2 | /* |
3 | 3 | Copyright 2000, 2001, 2002, 2003, 2004, 2005 Dataprev - Empresa de Tecnologia e Informações da Previdência Social, Brasil |
4 | 4 | |
... | ... | @@ -17,7 +17,7 @@ |
17 | 17 | @session_start(); |
18 | 18 | @define('CACIC',1); |
19 | 19 | |
20 | -@include_once('config.php'); | |
20 | +include_once('config.php'); | |
21 | 21 | require_once('define.php'); |
22 | 22 | |
23 | 23 | if(!include_once( TRANSLATOR_PATH.'/Translator.php')) | ... | ... |
language/pt_BR/language.pt_BR.inc.php
... | ... | @@ -702,3 +702,4 @@ pt_BR kciq_mnt_lang traducao |
702 | 702 | pt_BR kciq_mnt_tradutor Manutençãoinfo Tradução de texto do CACIC |
703 | 703 | pt_BR atualizacao especial admin info Atualizacao Especial |
704 | 704 | pt_BR mecanismo para atualizacao de arquivos diversos no servidor, no ambito da aplicacao. admin info Mecanismo para atualizacao de arquivos diversos no servidor, no ambito da aplicacao. |
705 | +pt_BR falha na atualizacao na tabela (%1) ou sua sessao expirou! admin info Falha na atualizacao na tabela (%1) ou sua sessao expirou! | ... | ... |
menu_esq.php