diff --git a/admin/admin.db b/admin/admin.db index d5161f8..6cd4e06 100755 Binary files a/admin/admin.db and b/admin/admin.db differ diff --git a/admin/php/admin.php b/admin/php/admin.php index a354f6a..d26ff78 100755 --- a/admin/php/admin.php +++ b/admin/php/admin.php @@ -100,22 +100,6 @@ function retornaJSON($obj) if (!mb_detect_encoding($texto,"UTF-8",true)) $texto = utf8_encode($texto); echo $texto; - //} - /* - include_once($locaplic."/pacotes/cpaint/JSON/json2.php"); - error_reporting(0); - $j = new Services_JSON(); - $texto = $j->encode($obj); - if (!mb_detect_encoding($texto,"UTF-8",true)) - $texto = utf8_encode($texto); - header("Content-type: text/ascii; charset=UTF-8"); - header('Expires: Fri, 14 Mar 1980 20:53:00 GMT'); - header('Last-Modified: ' . gmdate('D, d M Y H:i:s') . ' GMT'); - header('Cache-Control: no-cache, must-revalidate'); - header('Pragma: no-cache'); - echo $texto; - exit; - */ } /* Function: verificaDuplicados diff --git a/admin/php/atlas.php b/admin/php/atlas.php index f3d530c..ec0d823 100755 --- a/admin/php/atlas.php +++ b/admin/php/atlas.php @@ -385,14 +385,26 @@ function movimentaNo() if($movimento == "sobe") { $menos = $ordematual - 1; - $dbhw->query("UPDATE ".$esquemaadmin."i3geoadmin_$tabela SET ordem_$posfixo = $ordematual where $where ordem_$posfixo = '$menos'"); - $dbhw->query("UPDATE ".$esquemaadmin."i3geoadmin_$tabela SET ordem_$posfixo = $menos where id_$posfixo = '$id'"); + $dataCol = array( + "ordem_".$posfixo=>$ordematual + ); + i3GeoAdminUpdate($dbhw,"i3geoadmin_".$tabela,$dataCol,"WHERE $where ordem_$posfixo = '$menos'"); + $dataCol = array( + "ordem_".$posfixo=>$menos + ); + i3GeoAdminUpdate($dbhw,"i3geoadmin_".$tabela,$dataCol,"WHERE $where id_$posfixo = '$id'"); } if($movimento == "desce") { $mais = $ordematual + 1; - $dbhw->query("UPDATE ".$esquemaadmin."i3geoadmin_$tabela SET ordem_$posfixo = $ordematual where $where ordem_$posfixo = '$mais'"); - $dbhw->query("UPDATE ".$esquemaadmin."i3geoadmin_$tabela SET ordem_$posfixo = $mais where id_$posfixo = '$id'"); + $dataCol = array( + "ordem_".$posfixo=>$ordematual + ); + i3GeoAdminUpdate($dbhw,"i3geoadmin_".$tabela,$dataCol,"WHERE $where ordem_$posfixo = '$mais'"); + $dataCol = array( + "ordem_".$posfixo=>$mais + ); + i3GeoAdminUpdate($dbhw,"i3geoadmin_".$tabela,$dataCol,"WHERE $where id_$posfixo = '$id'"); } $dbhw = null; $dbh = null; @@ -566,7 +578,9 @@ function excluirPrancha() try { include("conexao.php"); - $dbhw->query("DELETE from ".$esquemaadmin."i3geoadmin_atlasp WHERE id_prancha = $id"); + $sql = "DELETE from ".$esquemaadmin."i3geoadmin_atlasp WHERE id_prancha = $id"; + $dbhw->query($sql); + i3GeoAdminInsertLog($dbhw,$sql); $dbhw = null; $dbh = null; return "ok"; @@ -582,7 +596,9 @@ function excluirTema() try { include("conexao.php"); - $dbhw->query("DELETE from ".$esquemaadmin."i3geoadmin_atlast WHERE id_tema = $id"); + $sql = "DELETE from ".$esquemaadmin."i3geoadmin_atlast WHERE id_tema = $id"; + $dbhw->query($sql); + i3GeoAdminInsertLog($dbhw,$sql); $dbhw = null; $dbh = null; return "ok"; @@ -598,7 +614,9 @@ function excluirAtlas() try { include("conexao.php"); - $dbhw->query("DELETE from ".$esquemaadmin."i3geoadmin_atlas WHERE id_atlas = $id"); + $sql = "DELETE from ".$esquemaadmin."i3geoadmin_atlas WHERE id_atlas = $id"; + $dbhw->query($sql); + i3GeoAdminInsertLog($dbhw,$sql); $dbhw = null; $dbh = null; return "ok"; -- libgit2 0.21.2