From 81cdb8e8fa0ebe0cf54e4d4759a09b179998c28e Mon Sep 17 00:00:00 2001 From: Edmar Moretti Date: Sat, 2 Dec 2017 20:24:10 -0200 Subject: [PATCH] Inclusão da opção UNDO no editor de mapfiles --- admin/admin.db | Bin 352256 -> 0 bytes admin/catalogo/mapfile/editor/exec.php | 15 +++++++++++++++ admin/catalogo/mapfile/editor/funcoes.php | 8 ++++++++ admin/catalogo/mapfile/editor/index.js | 24 +++++++++++++++++++++++- admin/catalogo/mapfile/editor/index.php | 46 ++++++++++++++++++++++++++-------------------- temas/_lbiomashp.map | 3 +++ 6 files changed, 75 insertions(+), 21 deletions(-) diff --git a/admin/admin.db b/admin/admin.db index de1ea0d..8286f8a 100755 Binary files a/admin/admin.db and b/admin/admin.db differ diff --git a/admin/catalogo/mapfile/editor/exec.php b/admin/catalogo/mapfile/editor/exec.php index 26a232c..e4c0895 100755 --- a/admin/catalogo/mapfile/editor/exec.php +++ b/admin/catalogo/mapfile/editor/exec.php @@ -62,5 +62,20 @@ switch ($funcao) { "dados" => $dados ) ); break; + case "UNDO" : + $mapfile = $_SESSION["dir_tmp"] . "/" . $codigo . "backupEditor.map"; + if (file_exists($mapfile)) { + $status = copy($mapfile,$_SESSION["locaplic"]."/temas/".$codigo.".map"); + if($status == false){ + header ( "HTTP/1.1 500 nao foi possivel restaurar o arquivo" ); + } else { + //ob_clean(); + //echo ""; + //echo ""; + } + } else { + header ( "HTTP/1.1 500 arquivo de backup nao encontrado" ); + } + break; } ?> \ No newline at end of file diff --git a/admin/catalogo/mapfile/editor/funcoes.php b/admin/catalogo/mapfile/editor/funcoes.php index bdf605e..3293b5c 100755 --- a/admin/catalogo/mapfile/editor/funcoes.php +++ b/admin/catalogo/mapfile/editor/funcoes.php @@ -1,6 +1,14 @@
@@ -84,34 +82,23 @@ $textoMapfile = \admin\catalogo\mapfile\editor\textoMapfile ( $codigo );
-
-
- -
- -
- - -
-
-
- +
+ + +
@@ -166,8 +153,27 @@ $(document).ready(function(){ protocolo = protocolo.split(":")[0]; i3GEOadmin.editor.servidorPreview = protocolo + "://" + window.location.host + "//admin/catalogo/mapfile/preview/index.php"; - }); + + +
+
+ +
+ +
+ + +
+
+
+ + diff --git a/temas/_lbiomashp.map b/temas/_lbiomashp.map index 855cccb..d94e362 100755 --- a/temas/_lbiomashp.map +++ b/temas/_lbiomashp.map @@ -102,3 +102,6 @@ MAP END # CLASS END # LAYER END # MAP + + + -- libgit2 0.21.2