Commit d7412ec6e68ae73dfc5b92525fd77561776d691f

Authored by Edmar Moretti
1 parent 520c4231

#544

admin/php/identifica.php
@@ -178,42 +178,4 @@ function excluirFuncoes() @@ -178,42 +178,4 @@ function excluirFuncoes()
178 return "Error!: " . $e->getMessage(); 178 return "Error!: " . $e->getMessage();
179 } 179 }
180 } 180 }
181 -function importarXmlI()  
182 -{  
183 - global $xml,$esquemaadmin;  
184 - if(!file_exists($xml))  
185 - {  
186 - return "<br><b>Arquivo $xml n&atilde;o encontrado";  
187 - }  
188 - include_once("../../classesphp/funcoes_gerais.php");  
189 - include("conexao.php");  
190 - $xml = simplexml_load_file($xml);  
191 - //  
192 - //importa os grupos  
193 - //  
194 - $wsExistentes = array();  
195 - $q = $dbh->query("select * from ".$esquemaadmin."i3geoadmin_identifica");  
196 - $resultado = $q->fetchAll();  
197 - foreach($resultado as $r)  
198 - {  
199 - $iExistentes[$r["nome_i"]] = 0;  
200 - }  
201 - foreach($xml->FUNCAO as $item)  
202 - {  
203 - $nome_i = html_entity_decode(ixml($item,"NOMESIS"));  
204 - if($convUTF)  
205 - {  
206 - $nome_i = utf8_encode($nome_i);  
207 - }  
208 - $target_i = ixml($item,"TARGET");  
209 - $abrir_i = ixml($item,"ABRIR");  
210 - if(!isset($iExistentes[$nome_i]))  
211 - $dbhw->query("INSERT INTO ".$esquemaadmin."i3geoadmin_identifica (publicado_i,nome_i,target_i,abrir_i) VALUES ('','$nome_i','$target_i','$abrir_i')");  
212 - $iExistentes[$nome_i] = 0;  
213 - }  
214 - $dbhw = null;  
215 - $dbh = null;  
216 - return "Dados importados.";  
217 -}  
218 -  
219 ?> 181 ?>
220 \ No newline at end of file 182 \ No newline at end of file
admin/php/sistemas.php
@@ -336,52 +336,5 @@ function excluirSistemas() @@ -336,52 +336,5 @@ function excluirSistemas()
336 return "Error!: " . $e->getMessage(); 336 return "Error!: " . $e->getMessage();
337 } 337 }
338 } 338 }
339 -function importarXmlSistemas()  
340 -{  
341 - global $xml,$tipo,$esquemaadmin;  
342 - if(!file_exists($xml))  
343 - {return "<br><b>Arquivo $xml n&atilde;o encontrado";}  
344 - include_once("../../classesphp/funcoes_gerais.php");  
345 - include("conexao.php");  
346 - $xml = simplexml_load_file($xml);  
347 - //  
348 - //importa os grupos  
349 - //  
350 - $sistemasExistentes = array();  
351 - $q = $dbh->query("select * from ".$esquemaadmin."i3geoadmin_sistemas");  
352 - $resultado = $q->fetchAll();  
353 - foreach($resultado as $r)  
354 - {$sistemasExistentes[$r["nome_sistema"]] = 0;}  
355 - foreach($xml->SISTEMA as $item)  
356 - {  
357 - $nome = html_entity_decode(ixml($item,"NOMESIS"));  
358 - if($convUTF)  
359 - {  
360 - $nome = utf8_encode($nome);  
361 - }  
362 - $perfil = ixml($item,"PERFIL");  
363 - if(!isset($sistemasExistentes[$nome]))  
364 - $dbhw->query("INSERT INTO ".$esquemaadmin."i3geoadmin_sistemas (publicado_sistema,nome_sistema,perfil_sistema) VALUES ('','$nome','$perfil')");  
365 - $sistemasExistentes[$nome] = 0;  
366 - $id_sistema = $dbh->query("SELECT id_sistema FROM ".$esquemaadmin."i3geoadmin_sistemas");  
367 - $id_sistema = $id_sistema->fetchAll();  
368 - $id_sistema = intval($id_sistema[count($id_sistema)-1]['id_sistema']);  
369 - foreach ($item->FUNCAO as $funcao)  
370 - {  
371 - $abrir_funcao = ixml($funcao,"ABRIR");  
372 - $nome_funcao = html_entity_decode(ixml($funcao,"NOMEFUNCAO"));  
373 - if($convUTF)  
374 - {  
375 - $nome_funcao = utf8_encode($nome_funcao);  
376 - }  
377 - $w_funcao = ixml($funcao,"JANELAW");  
378 - $h_funcao = ixml($funcao,"JANELAH");  
379 - $perfil_funcao = ixml($funcao,"PERFIL");  
380 - $dbhw->query("INSERT INTO ".$esquemaadmin."i3geoadmin_sistemasf (nome_funcao,abrir_funcao,perfil_funcao,w_funcao,h_funcao,id_sistema) VALUES ('$nome_funcao','$abrir_funcao','$perfil_funcao','$w_funcao','$h_funcao','$id_sistema')");  
381 - }  
382 - }  
383 - $dbhw = null;  
384 - $dbh = null;  
385 - return "Dados importados.";  
386 -} 339 +
387 ?> 340 ?>
388 \ No newline at end of file 341 \ No newline at end of file