Commit 88b52b42bf344aea94514a79d0931604e64bc1ea
1 parent
5e8b35bd
Exists in
master
and in
7 other branches
Inclusão de log de operações em php/atlas.php #62
Showing
3 changed files
with
25 additions
and
23 deletions
Show diff stats
admin/admin.db
No preview for this file type
admin/php/admin.php
| @@ -100,22 +100,6 @@ function retornaJSON($obj) | @@ -100,22 +100,6 @@ function retornaJSON($obj) | ||
| 100 | if (!mb_detect_encoding($texto,"UTF-8",true)) | 100 | if (!mb_detect_encoding($texto,"UTF-8",true)) |
| 101 | $texto = utf8_encode($texto); | 101 | $texto = utf8_encode($texto); |
| 102 | echo $texto; | 102 | echo $texto; |
| 103 | - //} | ||
| 104 | - /* | ||
| 105 | - include_once($locaplic."/pacotes/cpaint/JSON/json2.php"); | ||
| 106 | - error_reporting(0); | ||
| 107 | - $j = new Services_JSON(); | ||
| 108 | - $texto = $j->encode($obj); | ||
| 109 | - if (!mb_detect_encoding($texto,"UTF-8",true)) | ||
| 110 | - $texto = utf8_encode($texto); | ||
| 111 | - header("Content-type: text/ascii; charset=UTF-8"); | ||
| 112 | - header('Expires: Fri, 14 Mar 1980 20:53:00 GMT'); | ||
| 113 | - header('Last-Modified: ' . gmdate('D, d M Y H:i:s') . ' GMT'); | ||
| 114 | - header('Cache-Control: no-cache, must-revalidate'); | ||
| 115 | - header('Pragma: no-cache'); | ||
| 116 | - echo $texto; | ||
| 117 | - exit; | ||
| 118 | - */ | ||
| 119 | } | 103 | } |
| 120 | /* | 104 | /* |
| 121 | Function: verificaDuplicados | 105 | Function: verificaDuplicados |
admin/php/atlas.php
| @@ -385,14 +385,26 @@ function movimentaNo() | @@ -385,14 +385,26 @@ function movimentaNo() | ||
| 385 | if($movimento == "sobe") | 385 | if($movimento == "sobe") |
| 386 | { | 386 | { |
| 387 | $menos = $ordematual - 1; | 387 | $menos = $ordematual - 1; |
| 388 | - $dbhw->query("UPDATE ".$esquemaadmin."i3geoadmin_$tabela SET ordem_$posfixo = $ordematual where $where ordem_$posfixo = '$menos'"); | ||
| 389 | - $dbhw->query("UPDATE ".$esquemaadmin."i3geoadmin_$tabela SET ordem_$posfixo = $menos where id_$posfixo = '$id'"); | 388 | + $dataCol = array( |
| 389 | + "ordem_".$posfixo=>$ordematual | ||
| 390 | + ); | ||
| 391 | + i3GeoAdminUpdate($dbhw,"i3geoadmin_".$tabela,$dataCol,"WHERE $where ordem_$posfixo = '$menos'"); | ||
| 392 | + $dataCol = array( | ||
| 393 | + "ordem_".$posfixo=>$menos | ||
| 394 | + ); | ||
| 395 | + i3GeoAdminUpdate($dbhw,"i3geoadmin_".$tabela,$dataCol,"WHERE $where id_$posfixo = '$id'"); | ||
| 390 | } | 396 | } |
| 391 | if($movimento == "desce") | 397 | if($movimento == "desce") |
| 392 | { | 398 | { |
| 393 | $mais = $ordematual + 1; | 399 | $mais = $ordematual + 1; |
| 394 | - $dbhw->query("UPDATE ".$esquemaadmin."i3geoadmin_$tabela SET ordem_$posfixo = $ordematual where $where ordem_$posfixo = '$mais'"); | ||
| 395 | - $dbhw->query("UPDATE ".$esquemaadmin."i3geoadmin_$tabela SET ordem_$posfixo = $mais where id_$posfixo = '$id'"); | 400 | + $dataCol = array( |
| 401 | + "ordem_".$posfixo=>$ordematual | ||
| 402 | + ); | ||
| 403 | + i3GeoAdminUpdate($dbhw,"i3geoadmin_".$tabela,$dataCol,"WHERE $where ordem_$posfixo = '$mais'"); | ||
| 404 | + $dataCol = array( | ||
| 405 | + "ordem_".$posfixo=>$mais | ||
| 406 | + ); | ||
| 407 | + i3GeoAdminUpdate($dbhw,"i3geoadmin_".$tabela,$dataCol,"WHERE $where id_$posfixo = '$id'"); | ||
| 396 | } | 408 | } |
| 397 | $dbhw = null; | 409 | $dbhw = null; |
| 398 | $dbh = null; | 410 | $dbh = null; |
| @@ -566,7 +578,9 @@ function excluirPrancha() | @@ -566,7 +578,9 @@ function excluirPrancha() | ||
| 566 | try | 578 | try |
| 567 | { | 579 | { |
| 568 | include("conexao.php"); | 580 | include("conexao.php"); |
| 569 | - $dbhw->query("DELETE from ".$esquemaadmin."i3geoadmin_atlasp WHERE id_prancha = $id"); | 581 | + $sql = "DELETE from ".$esquemaadmin."i3geoadmin_atlasp WHERE id_prancha = $id"; |
| 582 | + $dbhw->query($sql); | ||
| 583 | + i3GeoAdminInsertLog($dbhw,$sql); | ||
| 570 | $dbhw = null; | 584 | $dbhw = null; |
| 571 | $dbh = null; | 585 | $dbh = null; |
| 572 | return "ok"; | 586 | return "ok"; |
| @@ -582,7 +596,9 @@ function excluirTema() | @@ -582,7 +596,9 @@ function excluirTema() | ||
| 582 | try | 596 | try |
| 583 | { | 597 | { |
| 584 | include("conexao.php"); | 598 | include("conexao.php"); |
| 585 | - $dbhw->query("DELETE from ".$esquemaadmin."i3geoadmin_atlast WHERE id_tema = $id"); | 599 | + $sql = "DELETE from ".$esquemaadmin."i3geoadmin_atlast WHERE id_tema = $id"; |
| 600 | + $dbhw->query($sql); | ||
| 601 | + i3GeoAdminInsertLog($dbhw,$sql); | ||
| 586 | $dbhw = null; | 602 | $dbhw = null; |
| 587 | $dbh = null; | 603 | $dbh = null; |
| 588 | return "ok"; | 604 | return "ok"; |
| @@ -598,7 +614,9 @@ function excluirAtlas() | @@ -598,7 +614,9 @@ function excluirAtlas() | ||
| 598 | try | 614 | try |
| 599 | { | 615 | { |
| 600 | include("conexao.php"); | 616 | include("conexao.php"); |
| 601 | - $dbhw->query("DELETE from ".$esquemaadmin."i3geoadmin_atlas WHERE id_atlas = $id"); | 617 | + $sql = "DELETE from ".$esquemaadmin."i3geoadmin_atlas WHERE id_atlas = $id"; |
| 618 | + $dbhw->query($sql); | ||
| 619 | + i3GeoAdminInsertLog($dbhw,$sql); | ||
| 602 | $dbhw = null; | 620 | $dbhw = null; |
| 603 | $dbh = null; | 621 | $dbh = null; |
| 604 | return "ok"; | 622 | return "ok"; |