Commit 005165d9eafadf6a3522e55da3fd06918993b3b9
1 parent
df14fa25
Exists in
master
and in
7 other branches
#69
Showing
11 changed files
with
298 additions
and
272 deletions
Show diff stats
admin/php/admin.php
@@ -46,13 +46,13 @@ if(!isset($locaplic)) | @@ -46,13 +46,13 @@ if(!isset($locaplic)) | ||
46 | } | 46 | } |
47 | } | 47 | } |
48 | include_once($locaplic."/classesphp/pega_variaveis.php"); | 48 | include_once($locaplic."/classesphp/pega_variaveis.php"); |
49 | - | ||
50 | error_reporting(0); | 49 | error_reporting(0); |
51 | // | 50 | // |
52 | //carrega o phpmapscript | 51 | //carrega o phpmapscript |
53 | // | 52 | // |
54 | include_once ($locaplic."/classesphp/carrega_ext.php"); | 53 | include_once ($locaplic."/classesphp/carrega_ext.php"); |
55 | include_once ($locaplic."/classesphp/funcoes_gerais.php"); | 54 | include_once ($locaplic."/classesphp/funcoes_gerais.php"); |
55 | + | ||
56 | // | 56 | // |
57 | //verifica se o cliente pode editar | 57 | //verifica se o cliente pode editar |
58 | //se funcao for verificaEditores vai para case específico | 58 | //se funcao for verificaEditores vai para case específico |
aplicmap/geral1.map
@@ -275,7 +275,7 @@ MAP | @@ -275,7 +275,7 @@ MAP | ||
275 | "wms_format" "image/png" | 275 | "wms_format" "image/png" |
276 | "wms_formatlist" "image/gif,image/png,image/png; mode=24bit,image/jpeg,image/wbmp,image/tiff" | 276 | "wms_formatlist" "image/gif,image/png,image/png; mode=24bit,image/jpeg,image/wbmp,image/tiff" |
277 | "wms_connectiontimeout" "30" | 277 | "wms_connectiontimeout" "30" |
278 | - "TEMA" "Base cartografica" | 278 | + "TEMA" "Base cartográfica" |
279 | "wms_server_version" "1.1.1" | 279 | "wms_server_version" "1.1.1" |
280 | "wms_style" "default" | 280 | "wms_style" "default" |
281 | "MENSAGEM" "As cartas RASTER são mostradas apenas em determinadas escalas. Aproxime o mapa até a escala 1:250.000 para que os dados sejam mostrados." | 281 | "MENSAGEM" "As cartas RASTER são mostradas apenas em determinadas escalas. Aproxime o mapa até a escala 1:250.000 para que os dados sejam mostrados." |
aplicmap/geral1windows.map
@@ -279,7 +279,7 @@ SYMBOLSET "c:\ms4w\apache\htdocs\i3geo/symbols/simbolos.sym" | @@ -279,7 +279,7 @@ SYMBOLSET "c:\ms4w\apache\htdocs\i3geo/symbols/simbolos.sym" | ||
279 | "wms_format" "image/png" | 279 | "wms_format" "image/png" |
280 | "wms_formatlist" "image/gif,image/png,image/png; mode=24bit,image/jpeg,image/wbmp,image/tiff" | 280 | "wms_formatlist" "image/gif,image/png,image/png; mode=24bit,image/jpeg,image/wbmp,image/tiff" |
281 | "wms_connectiontimeout" "30" | 281 | "wms_connectiontimeout" "30" |
282 | - "TEMA" "Base cartografica" | 282 | + "TEMA" "Base cartográfica" |
283 | "wms_server_version" "1.1.1" | 283 | "wms_server_version" "1.1.1" |
284 | "wms_style" "default" | 284 | "wms_style" "default" |
285 | "MENSAGEM" "As cartas RASTER são mostradas apenas em determinadas escalas. Aproxime o mapa até a escala 1:250.000 para que os dados sejam mostrados." | 285 | "MENSAGEM" "As cartas RASTER são mostradas apenas em determinadas escalas. Aproxime o mapa até a escala 1:250.000 para que os dados sejam mostrados." |
classesphp/atlas_controle.php
@@ -80,25 +80,27 @@ if (!isset($atlasxml) || $atlasxml == "")// || !isset($editores)) | @@ -80,25 +80,27 @@ if (!isset($atlasxml) || $atlasxml == "")// || !isset($editores)) | ||
80 | //se as extensões já estiverem carregadas no PHP, vc pode comentar essa linha para que o processamento fique mais rápido | 80 | //se as extensões já estiverem carregadas no PHP, vc pode comentar essa linha para que o processamento fique mais rápido |
81 | // | 81 | // |
82 | include_once("carrega_ext.php"); | 82 | include_once("carrega_ext.php"); |
83 | -include_once("../pacotes/cpaint/cpaint2.inc.php"); | 83 | +include_once("funcoes_gerais.php"); |
84 | +//include_once("../pacotes/cpaint/cpaint2.inc.php"); | ||
84 | 85 | ||
85 | // | 86 | // |
86 | //cria objeto cpaint para uso com ajax | 87 | //cria objeto cpaint para uso com ajax |
87 | // | 88 | // |
88 | -$cp = new cpaint(); | ||
89 | -$cp->set_data(""); | 89 | +//$cp = new cpaint(); |
90 | +//$cp->set_data(""); | ||
90 | // | 91 | // |
91 | //verifica se o usuário está tentando utilizar um link que não funciona mais | 92 | //verifica se o usuário está tentando utilizar um link que não funciona mais |
92 | // | 93 | // |
93 | if (!isset($map_file)) | 94 | if (!isset($map_file)) |
94 | { | 95 | { |
95 | //nesse caso é necessário criar o diretório temporário e iniciar o mapa | 96 | //nesse caso é necessário criar o diretório temporário e iniciar o mapa |
96 | - $cp->set_data("linkquebrado"); | ||
97 | - $cp->return_data(); | 97 | + //$cp->set_data("linkquebrado"); |
98 | + //$cp->return_data(); | ||
99 | + cpjson(array("erro"=>"linkquebrado")); | ||
98 | exit; | 100 | exit; |
99 | } | 101 | } |
100 | include_once("classe_vermultilayer.php"); | 102 | include_once("classe_vermultilayer.php"); |
101 | -include_once("funcoes_gerais.php"); | 103 | + |
102 | if ($map_file != "") | 104 | if ($map_file != "") |
103 | { | 105 | { |
104 | // | 106 | // |
@@ -134,8 +136,7 @@ atlasxml {string} - nome do arquivo xml que contém a lista de atlas (veja em i3g | @@ -134,8 +136,7 @@ atlasxml {string} - nome do arquivo xml que contém a lista de atlas (veja em i3g | ||
134 | case "pegaListaDeAtlas": | 136 | case "pegaListaDeAtlas": |
135 | include_once("classe_atlas.php"); | 137 | include_once("classe_atlas.php"); |
136 | $atl = new Atlas($xml,$atlasxml); | 138 | $atl = new Atlas($xml,$atlasxml); |
137 | - $resultado = $atl->pegaListaDeAtlas($tituloInstituicao); | ||
138 | - $cp->set_data($resultado); | 139 | + $retorno = $atl->pegaListaDeAtlas($tituloInstituicao); |
139 | break; | 140 | break; |
140 | /* | 141 | /* |
141 | Opcao: criaAtlas | 142 | Opcao: criaAtlas |
@@ -186,8 +187,7 @@ atlasId {string} - identificador do atlas | @@ -186,8 +187,7 @@ atlasId {string} - identificador do atlas | ||
186 | case "pegaListaDePranchas": | 187 | case "pegaListaDePranchas": |
187 | include_once("classe_atlas.php"); | 188 | include_once("classe_atlas.php"); |
188 | $atl = new Atlas($xml,$atlasxml); | 189 | $atl = new Atlas($xml,$atlasxml); |
189 | - $resultado = $atl->pegaListaDePranchas($atlasId); | ||
190 | - $cp->set_data($resultado); | 190 | + $retorno = $atl->pegaListaDePranchas($atlasId); |
191 | break; | 191 | break; |
192 | /* | 192 | /* |
193 | Opcao: abrePrancha | 193 | Opcao: abrePrancha |
@@ -205,10 +205,8 @@ pranchaId {string} - identificador da prancha | @@ -205,10 +205,8 @@ pranchaId {string} - identificador da prancha | ||
205 | case "abrePrancha": | 205 | case "abrePrancha": |
206 | include_once("classe_atlas.php"); | 206 | include_once("classe_atlas.php"); |
207 | $atl = new Atlas($xml,$atlasxml); | 207 | $atl = new Atlas($xml,$atlasxml); |
208 | - $resultado = $atl->abrePrancha($atlasId,$pranchaId,$map_file,$locaplic); | ||
209 | - $cp->set_data($resultado); | 208 | + $retorno = $atl->abrePrancha($atlasId,$pranchaId,$map_file,$locaplic); |
210 | break; | 209 | break; |
211 | - | ||
212 | } | 210 | } |
213 | 211 | ||
214 | if (!connection_aborted()) | 212 | if (!connection_aborted()) |
@@ -217,7 +215,7 @@ if (!connection_aborted()) | @@ -217,7 +215,7 @@ if (!connection_aborted()) | ||
217 | { | 215 | { |
218 | restauraCon($map_file,$postgis_mapa); | 216 | restauraCon($map_file,$postgis_mapa); |
219 | } | 217 | } |
220 | - $cp->return_data(); | 218 | + cpjson($retorno); |
221 | } | 219 | } |
222 | else | 220 | else |
223 | {exit();} | 221 | {exit();} |
classesphp/funcoes_gerais.php
@@ -96,7 +96,7 @@ Include: | @@ -96,7 +96,7 @@ Include: | ||
96 | */ | 96 | */ |
97 | function fusaoGrafico() | 97 | function fusaoGrafico() |
98 | { | 98 | { |
99 | - global $imagem,$grafico,$dir_tmp,$cp,$map_file; | 99 | + global $imagem,$grafico,$dir_tmp,$map_file; |
100 | include_once("classe_imagem.php"); | 100 | include_once("classe_imagem.php"); |
101 | if($map_file != "") | 101 | if($map_file != "") |
102 | { | 102 | { |
@@ -110,7 +110,7 @@ function fusaoGrafico() | @@ -110,7 +110,7 @@ function fusaoGrafico() | ||
110 | $m = new Imagem(dirname($dir_tmp).$imagem); | 110 | $m = new Imagem(dirname($dir_tmp).$imagem); |
111 | $i = $m->fundeIm(dirname($dir_tmp).$grafico); | 111 | $i = $m->fundeIm(dirname($dir_tmp).$grafico); |
112 | imagepng($i,dirname($dir_tmp).$imagem); | 112 | imagepng($i,dirname($dir_tmp).$imagem); |
113 | - $cp->set_data($imagem); | 113 | + return ($imagem); |
114 | } | 114 | } |
115 | /* | 115 | /* |
116 | Section: R | 116 | Section: R |
@@ -601,7 +601,7 @@ $dir_tmp - Diretório temporário. | @@ -601,7 +601,7 @@ $dir_tmp - Diretório temporário. | ||
601 | */ | 601 | */ |
602 | function listaTrueType() | 602 | function listaTrueType() |
603 | { | 603 | { |
604 | - global $cp,$locaplic,$imgdir,$dir_tmp; | 604 | + global $locaplic,$imgdir,$dir_tmp; |
605 | if (!file_exists($dir_tmp."/comum/truetype.inc")) | 605 | if (!file_exists($dir_tmp."/comum/truetype.inc")) |
606 | { | 606 | { |
607 | $arq = $locaplic."/symbols/fontes.txt"; | 607 | $arq = $locaplic."/symbols/fontes.txt"; |
@@ -619,7 +619,7 @@ function listaTrueType() | @@ -619,7 +619,7 @@ function listaTrueType() | ||
619 | } | 619 | } |
620 | else | 620 | else |
621 | {include ($dir_tmp."/comum/truetype.inc");} | 621 | {include ($dir_tmp."/comum/truetype.inc");} |
622 | - $cp->set_data($res); | 622 | + return($res); |
623 | } | 623 | } |
624 | /* | 624 | /* |
625 | Section: mapa | 625 | Section: mapa |
@@ -724,7 +724,7 @@ Objeto cpaint com uma string contendo variáveis no formato javascript | @@ -724,7 +724,7 @@ Objeto cpaint com uma string contendo variáveis no formato javascript | ||
724 | */ | 724 | */ |
725 | function retornaReferencia() | 725 | function retornaReferencia() |
726 | { | 726 | { |
727 | - global $cp,$nomeImagem,$objMapa,$utilizacgi,$locmapserv,$map_file; | 727 | + global $nomeImagem,$objMapa,$utilizacgi,$locmapserv,$map_file; |
728 | // | 728 | // |
729 | //pega a extensao original caso ela tenha sido registrada no modo dinamico | 729 | //pega a extensao original caso ela tenha sido registrada no modo dinamico |
730 | // | 730 | // |
@@ -750,7 +750,7 @@ function retornaReferencia() | @@ -750,7 +750,7 @@ function retornaReferencia() | ||
750 | $s = "g_celularef = ".$d.";"; | 750 | $s = "g_celularef = ".$d.";"; |
751 | $s .= "var extentref = '".$em->minx." ".$em->miny." ".$em->maxx." ".$em->maxy."';"; | 751 | $s .= "var extentref = '".$em->minx." ".$em->miny." ".$em->maxx." ".$em->maxy."';"; |
752 | $s .= "var refimagem='".$nomer."';var refwidth=".$objImagem->width.";var refheight=".$objImagem->height.";var refpath='".$objImagem->imagepath."';var refurl='".$objImagem->imageurl."'"; | 752 | $s .= "var refimagem='".$nomer."';var refwidth=".$objImagem->width.";var refheight=".$objImagem->height.";var refpath='".$objImagem->imagepath."';var refurl='".$objImagem->imageurl."'"; |
753 | - $cp->set_data($s); | 753 | + return($s); |
754 | } | 754 | } |
755 | /* | 755 | /* |
756 | function: retornaReferenciaDinamica | 756 | function: retornaReferenciaDinamica |
@@ -777,7 +777,7 @@ Objeto cpaint com uma string contendo variáveis no formato javascript | @@ -777,7 +777,7 @@ Objeto cpaint com uma string contendo variáveis no formato javascript | ||
777 | */ | 777 | */ |
778 | function retornaReferenciaDinamica() | 778 | function retornaReferenciaDinamica() |
779 | { | 779 | { |
780 | - global $cp,$nomeImagem,$map_file,$utilizacgi,$locmapserv,$locaplic,$zoom,$tipo; | 780 | + global $nomeImagem,$map_file,$utilizacgi,$locmapserv,$locaplic,$zoom,$tipo; |
781 | // | 781 | // |
782 | //adiciona o tema com o web service com o mapa mundi | 782 | //adiciona o tema com o web service com o mapa mundi |
783 | // | 783 | // |
@@ -844,7 +844,7 @@ function retornaReferenciaDinamica() | @@ -844,7 +844,7 @@ function retornaReferenciaDinamica() | ||
844 | $r->set("maxx",$emt->maxx); | 844 | $r->set("maxx",$emt->maxx); |
845 | $r->set("maxy",$emt->maxy); | 845 | $r->set("maxy",$emt->maxy); |
846 | $mapa->save($map_file); | 846 | $mapa->save($map_file); |
847 | - $cp->set_data($s); | 847 | + return($s); |
848 | } | 848 | } |
849 | /* | 849 | /* |
850 | function: testaMapa | 850 | function: testaMapa |
@@ -2231,4 +2231,54 @@ function criaDirMapa($dir_tmp) | @@ -2231,4 +2231,54 @@ function criaDirMapa($dir_tmp) | ||
2231 | else | 2231 | else |
2232 | {return false;} | 2232 | {return false;} |
2233 | } | 2233 | } |
2234 | +/* | ||
2235 | +Function: array2json | ||
2236 | + | ||
2237 | +Converte um array em uma string no formato JSON. Utiliza as funções nativas do PHP para gerar o objeto. | ||
2238 | + | ||
2239 | +$cpaint - {boolean} se for true é acrescentado o elemento "data" como chave no array, mantendo a compatibilidade da resposta com o CPAINT | ||
2240 | +*/ | ||
2241 | +function array2json($a,$cpaint=true) | ||
2242 | +{ | ||
2243 | + if($cpaint == true) | ||
2244 | + {$a = array("data"=>$a);} | ||
2245 | + return json_encode($a); | ||
2246 | +} | ||
2247 | +/* | ||
2248 | +Function: echojson | ||
2249 | + | ||
2250 | +Retorna para o navegador uma string (JSON) e para o processamento | ||
2251 | + | ||
2252 | +$a - string | ||
2253 | +*/ | ||
2254 | +function echojson($a) | ||
2255 | +{ | ||
2256 | + //ob_clean(); | ||
2257 | + if(extension_loaded('zlib')) | ||
2258 | + {ob_start('ob_gzhandler');} | ||
2259 | + header("Content-type: text/html"); | ||
2260 | + echo $a; | ||
2261 | + if(extension_loaded('zlib')) | ||
2262 | + {ob_end_flush();} | ||
2263 | + exit; | ||
2264 | +} | ||
2265 | +/* | ||
2266 | +Function: cpjson | ||
2267 | + | ||
2268 | +Converte um array em um objeto JSON e retorna para o navegador | ||
2269 | + | ||
2270 | +$obj - objeto que será convertido | ||
2271 | +*/ | ||
2272 | +function cpjson($obj){ | ||
2273 | + if(function_exists("json_encode")) | ||
2274 | + { | ||
2275 | + echojson(array2json($obj)); | ||
2276 | + } | ||
2277 | + else | ||
2278 | + { | ||
2279 | + include_once("../pacotes/cpaint/cpaint2.inc.php"); | ||
2280 | + $cp = new cpaint(); | ||
2281 | + $cp->set_data($obj); | ||
2282 | + } | ||
2283 | +} | ||
2234 | ?> | 2284 | ?> |
2235 | \ No newline at end of file | 2285 | \ No newline at end of file |
classesphp/graficos.php
@@ -73,7 +73,7 @@ function graficoPizza() | @@ -73,7 +73,7 @@ function graficoPizza() | ||
73 | */ | 73 | */ |
74 | function graficoBarras() | 74 | function graficoBarras() |
75 | { | 75 | { |
76 | - global $cp,$map_file,$itemvalores,$itemclasses,$tema,$exclui,$tipo,$R_path; | 76 | + global $map_file,$itemvalores,$itemclasses,$tema,$exclui,$tipo,$R_path; |
77 | global $setasdv,$percentual,$nome,$margem,$margemexterna,$margeminterna,$grid,$border,$cexaxis,$las,$space,$lwd,$fontlab,$collab,$cexlab,$xlab,$ylab,$fontsub,$fontmain,$locaplic,$dir_tmp,$gw,$gh,$res,$bg,$fg,$colmain,$font,$main,$cexmain,$sub,$cexsub; | 77 | global $setasdv,$percentual,$nome,$margem,$margemexterna,$margeminterna,$grid,$border,$cexaxis,$las,$space,$lwd,$fontlab,$collab,$cexlab,$xlab,$ylab,$fontsub,$fontmain,$locaplic,$dir_tmp,$gw,$gh,$res,$bg,$fg,$colmain,$font,$main,$cexmain,$sub,$cexsub; |
78 | //pega os valores | 78 | //pega os valores |
79 | $dir = dirname(dirname($map_file)); | 79 | $dir = dirname(dirname($map_file)); |
@@ -116,14 +116,14 @@ function graficoBarras() | @@ -116,14 +116,14 @@ function graficoBarras() | ||
116 | $map = ms_newMapObj($map_file); | 116 | $map = ms_newMapObj($map_file); |
117 | $webo = $map->web; | 117 | $webo = $map->web; |
118 | $url = dirname($webo->imageurl)."/"; | 118 | $url = dirname($webo->imageurl)."/"; |
119 | - $cp->set_data($url.$gfile_name.".png,".$url.(basename($nome)).",".$nome); | 119 | + return($url.$gfile_name.".png,".$url.(basename($nome)).",".$nome); |
120 | } | 120 | } |
121 | /** | 121 | /** |
122 | * Gera gráfico de histograma. | 122 | * Gera gráfico de histograma. |
123 | */ | 123 | */ |
124 | function graficoHist() | 124 | function graficoHist() |
125 | { | 125 | { |
126 | - global $cp,$map_file,$itemvalores,$itemclasses,$tema,$exclui,$tipo,$R_path; | 126 | + global $map_file,$itemvalores,$itemclasses,$tema,$exclui,$tipo,$R_path; |
127 | global $densidade,$percentual,$nome,$margem,$margemexterna,$margeminterna,$corbarras,$grid,$breaks,$border,$cexaxis,$las,$lwd,$fontlab,$collab,$cexlab,$xlab,$ylab,$fontsub,$fontmain,$locaplic,$dir_tmp,$gw,$gh,$res,$bg,$fg,$colmain,$font,$main,$cexmain,$sub,$cexsub; | 127 | global $densidade,$percentual,$nome,$margem,$margemexterna,$margeminterna,$corbarras,$grid,$breaks,$border,$cexaxis,$las,$lwd,$fontlab,$collab,$cexlab,$xlab,$ylab,$fontsub,$fontmain,$locaplic,$dir_tmp,$gw,$gh,$res,$bg,$fg,$colmain,$font,$main,$cexmain,$sub,$cexsub; |
128 | $dir = dirname(dirname($map_file)); | 128 | $dir = dirname(dirname($map_file)); |
129 | if($nome == "") | 129 | if($nome == "") |
@@ -165,14 +165,14 @@ function graficoHist() | @@ -165,14 +165,14 @@ function graficoHist() | ||
165 | $map = ms_newMapObj($map_file); | 165 | $map = ms_newMapObj($map_file); |
166 | $webo = $map->web; | 166 | $webo = $map->web; |
167 | $url = dirname($webo->imageurl)."/"; | 167 | $url = dirname($webo->imageurl)."/"; |
168 | - $cp->set_data($url.$gfile_name.".png,".$url.(basename($nome)).",".$nome); | 168 | + return($url.$gfile_name.".png,".$url.(basename($nome)).",".$nome); |
169 | } | 169 | } |
170 | /** | 170 | /** |
171 | * Gera gráfico de linhas. | 171 | * Gera gráfico de linhas. |
172 | */ | 172 | */ |
173 | function graficoLinhas() | 173 | function graficoLinhas() |
174 | { | 174 | { |
175 | - global $cp,$map_file,$itemvalores,$itemclasses,$tema,$exclui,$tipo,$R_path; | 175 | + global $map_file,$itemvalores,$itemclasses,$tema,$exclui,$tipo,$R_path; |
176 | global $percentual,$nome,$margem,$margemexterna,$margeminterna,$xlab,$ylab,$grid,$ppontos,$spline,$locaplic,$dir_tmp,$gw,$gh,$res,$bg,$collab,$colaxis,$cexlab,$cexaxis,$fontlab,$las,$tck,$cexmain,$border,$lty,$lwd,$lty,$lwd,$pch,$tpt,$main,$colmain,$fontmain,$nome; | 176 | global $percentual,$nome,$margem,$margemexterna,$margeminterna,$xlab,$ylab,$grid,$ppontos,$spline,$locaplic,$dir_tmp,$gw,$gh,$res,$bg,$collab,$colaxis,$cexlab,$cexaxis,$fontlab,$las,$tck,$cexmain,$border,$lty,$lwd,$lty,$lwd,$pch,$tpt,$main,$colmain,$fontmain,$nome; |
177 | //pega os valores | 177 | //pega os valores |
178 | $dir = dirname(dirname($map_file)); | 178 | $dir = dirname(dirname($map_file)); |
@@ -211,14 +211,14 @@ function graficoLinhas() | @@ -211,14 +211,14 @@ function graficoLinhas() | ||
211 | $map = ms_newMapObj($map_file); | 211 | $map = ms_newMapObj($map_file); |
212 | $webo = $map->web; | 212 | $webo = $map->web; |
213 | $url = dirname($webo->imageurl)."/"; | 213 | $url = dirname($webo->imageurl)."/"; |
214 | - $cp->set_data($url.$gfile_name.".png,".$url.(basename($nome)).",".$nome); | 214 | + return($url.$gfile_name.".png,".$url.(basename($nome)).",".$nome); |
215 | } | 215 | } |
216 | /** | 216 | /** |
217 | * Gera gráfico de distribuição de pontos (scatter). | 217 | * Gera gráfico de distribuição de pontos (scatter). |
218 | */ | 218 | */ |
219 | function graficoScatter() | 219 | function graficoScatter() |
220 | { | 220 | { |
221 | - global $cp,$map_file,$itemvalores,$itemclasses,$tema,$exclui,$tipo,$R_path; | 221 | + global $map_file,$itemvalores,$itemclasses,$tema,$exclui,$tipo,$R_path; |
222 | global $percentual,$nome,$margem,$margemexterna,$margeminterna,$corlinha,$grid,$ppontos,$locaplic,$dir_tmp,$gw,$gh,$res,$bg,$collab,$colaxis,$cexlab,$cexaxis,$fontlab,$las,$tck,$cexmain,$border,$lty,$lwd,$lty,$lwd,$pch,$tpt,$main,$colmain,$fontmain,$ylab,$xlab; | 222 | global $percentual,$nome,$margem,$margemexterna,$margeminterna,$corlinha,$grid,$ppontos,$locaplic,$dir_tmp,$gw,$gh,$res,$bg,$collab,$colaxis,$cexlab,$cexaxis,$fontlab,$las,$tck,$cexmain,$border,$lty,$lwd,$lty,$lwd,$pch,$tpt,$main,$colmain,$fontmain,$ylab,$xlab; |
223 | //pega os valores | 223 | //pega os valores |
224 | $dir = dirname(dirname($map_file)); | 224 | $dir = dirname(dirname($map_file)); |
@@ -243,14 +243,14 @@ function graficoScatter() | @@ -243,14 +243,14 @@ function graficoScatter() | ||
243 | $map = ms_newMapObj($map_file); | 243 | $map = ms_newMapObj($map_file); |
244 | $webo = $map->web; | 244 | $webo = $map->web; |
245 | $url = dirname($webo->imageurl)."/"; | 245 | $url = dirname($webo->imageurl)."/"; |
246 | - $cp->set_data($url.$gfile_name.".png,".$url.(basename($nome)).",".$nome); | 246 | + return ($url.$gfile_name.".png,".$url.(basename($nome)).",".$nome); |
247 | } | 247 | } |
248 | /** | 248 | /** |
249 | * Gera gráfico de distribuição de pontos (scatter) com agrupamento em pixels. | 249 | * Gera gráfico de distribuição de pontos (scatter) com agrupamento em pixels. |
250 | */ | 250 | */ |
251 | function graficoScatterBins() | 251 | function graficoScatterBins() |
252 | { | 252 | { |
253 | - global $cp,$map_file,$itemvalores,$itemclasses,$tema,$exclui,$tipo,$R_path; | 253 | + global $map_file,$itemvalores,$itemclasses,$tema,$exclui,$tipo,$R_path; |
254 | global $plota3d,$nbins,$percentual,$nome,$margem,$margemexterna,$margeminterna,$corlinha,$grid,$ppontos,$locaplic,$dir_tmp,$gw,$gh,$res,$bg,$collab,$colaxis,$cexlab,$cexaxis,$fontlab,$las,$tck,$cexmain,$border,$lty,$lwd,$lty,$lwd,$pch,$tpt,$main,$colmain,$fontmain,$ylab,$xlab; | 254 | global $plota3d,$nbins,$percentual,$nome,$margem,$margemexterna,$margeminterna,$corlinha,$grid,$ppontos,$locaplic,$dir_tmp,$gw,$gh,$res,$bg,$collab,$colaxis,$cexlab,$cexaxis,$fontlab,$las,$tck,$cexmain,$border,$lty,$lwd,$lty,$lwd,$pch,$tpt,$main,$colmain,$fontmain,$ylab,$xlab; |
255 | //pega os valores | 255 | //pega os valores |
256 | $dir = dirname(dirname($map_file)); | 256 | $dir = dirname(dirname($map_file)); |
@@ -286,7 +286,7 @@ function graficoScatterBins() | @@ -286,7 +286,7 @@ function graficoScatterBins() | ||
286 | $map = ms_newMapObj($map_file); | 286 | $map = ms_newMapObj($map_file); |
287 | $webo = $map->web; | 287 | $webo = $map->web; |
288 | $url = dirname($webo->imageurl)."/"; | 288 | $url = dirname($webo->imageurl)."/"; |
289 | - $cp->set_data($url.$gfile_name.".png,".$url.(basename($nome)).",".$nome); | 289 | + return($url.$gfile_name.".png,".$url.(basename($nome)).",".$nome); |
290 | } | 290 | } |
291 | 291 | ||
292 | /** | 292 | /** |
@@ -294,7 +294,7 @@ function graficoScatterBins() | @@ -294,7 +294,7 @@ function graficoScatterBins() | ||
294 | */ | 294 | */ |
295 | function graficoEstrela() | 295 | function graficoEstrela() |
296 | { | 296 | { |
297 | - global $cp,$map_file,$itemvalores,$itemclasses,$tema,$exclui,$tipo,$R_path; | 297 | + global $map_file,$itemvalores,$itemclasses,$tema,$exclui,$tipo,$R_path; |
298 | global $font,$cex,$grid,$ppontos,$locaplic,$dir_tmp,$w,$h,$res,$bg,$collab,$colaxis,$cexlab,$cexaxis,$fontlab,$las,$tck,$cexmain,$border,$lty,$lwd,$lty,$lwd,$pch,$tpt,$main,$colmain,$fontmain,$ylab,$xlab; | 298 | global $font,$cex,$grid,$ppontos,$locaplic,$dir_tmp,$w,$h,$res,$bg,$collab,$colaxis,$cexlab,$cexaxis,$fontlab,$las,$tck,$cexmain,$border,$lty,$lwd,$lty,$lwd,$pch,$tpt,$main,$colmain,$fontmain,$ylab,$xlab; |
299 | //pega os valores | 299 | //pega os valores |
300 | $map = ms_newMapObj($map_file); | 300 | $map = ms_newMapObj($map_file); |
@@ -333,7 +333,7 @@ function graficoEstrela() | @@ -333,7 +333,7 @@ function graficoEstrela() | ||
333 | $map = ms_newMapObj($map_file); | 333 | $map = ms_newMapObj($map_file); |
334 | $webo = $map->web; | 334 | $webo = $map->web; |
335 | $url = dirname($webo->imageurl)."/"; | 335 | $url = dirname($webo->imageurl)."/"; |
336 | - $cp->set_data($url.$gfile_name.".png,".$url.(basename($nomeV))); | 336 | + return($url.$gfile_name.".png,".$url.(basename($nomeV))); |
337 | } | 337 | } |
338 | function iniciaParGrafico($gw,$gh,$res,$dir_tmp,$gfile_name,$margem,$margemexterna,$margeminterna,$locaplic) | 338 | function iniciaParGrafico($gw,$gh,$res,$dir_tmp,$gfile_name,$margem,$margemexterna,$margeminterna,$locaplic) |
339 | { | 339 | { |
classesphp/mapa_controle.php
@@ -44,7 +44,12 @@ funcao - opção que será executada. | @@ -44,7 +44,12 @@ funcao - opção que será executada. | ||
44 | 44 | ||
45 | Retorno: | 45 | Retorno: |
46 | 46 | ||
47 | -cp - o resultado da operação será retornado em um objeto CPAINT. | 47 | +O resultado da operação será retornado em um objeto CPAINT. |
48 | + | ||
49 | +A construção da string JSON é feita preferencialmente pelas funções nativas do PHP. | ||
50 | +Para efeitos de compatibilidade, uma vez que até a versão 4.2 a string JSON era construida pelo CPAINT, | ||
51 | +o objeto CPAINT ainda é definido, porém, a função cpjson verifica se as funções nativas do PHPO (json) | ||
52 | +estão instaladas, se estiverem, utiliza-se a função nativa, se não, utiliza-se o CPAINT para gerar o JSON. | ||
48 | 53 | ||
49 | Exemplo de chamada CPAINT (Ajax) do lado do cliente (javascript): | 54 | Exemplo de chamada CPAINT (Ajax) do lado do cliente (javascript): |
50 | 55 | ||
@@ -129,12 +134,13 @@ if (isset($debug) && $debug == "sim") | @@ -129,12 +134,13 @@ if (isset($debug) && $debug == "sim") | ||
129 | //se as extensões já estiverem carregadas no PHP, vc pode comentar essa linha para que o processamento fique mais rápido | 134 | //se as extensões já estiverem carregadas no PHP, vc pode comentar essa linha para que o processamento fique mais rápido |
130 | // | 135 | // |
131 | include_once ("carrega_ext.php"); | 136 | include_once ("carrega_ext.php"); |
132 | -include_once("../pacotes/cpaint/cpaint2.inc.php"); | 137 | +include_once("funcoes_gerais.php"); |
138 | +//include_once("../pacotes/cpaint/cpaint2.inc.php"); | ||
133 | // | 139 | // |
134 | //cria objeto cpaint para uso com ajax | 140 | //cria objeto cpaint para uso com ajax |
135 | // | 141 | // |
136 | -$cp = new cpaint(); | ||
137 | -$cp->set_data(""); | 142 | +//$cp = new cpaint(); |
143 | +//$cp->set_data(""); | ||
138 | if ($funcao == "criaMapa") | 144 | if ($funcao == "criaMapa") |
139 | { | 145 | { |
140 | session_destroy(); | 146 | session_destroy(); |
@@ -151,20 +157,22 @@ if ($funcao == "criaMapa") | @@ -151,20 +157,22 @@ if ($funcao == "criaMapa") | ||
151 | chdir($locaplic); | 157 | chdir($locaplic); |
152 | $interface = "mashup"; | 158 | $interface = "mashup"; |
153 | include_once("ms_criamapa.php"); | 159 | include_once("ms_criamapa.php"); |
154 | - $cp->set_data(session_id()); | ||
155 | - $cp->return_data(); | 160 | + //$cp->set_data(session_id()); |
161 | + //$cp->return_data(); | ||
162 | + cpjson(session_id(),$cp); | ||
156 | return; | 163 | return; |
157 | -} | 164 | +} |
158 | if (!isset($map_file)) | 165 | if (!isset($map_file)) |
159 | { | 166 | { |
160 | //nesse caso é necessário criar o diretório temporário e iniciar o mapa | 167 | //nesse caso é necessário criar o diretório temporário e iniciar o mapa |
161 | - $cp->set_data(array("erro"=>"linkquebrado")); | ||
162 | - $cp->return_data(); | 168 | + //$cp->set_data(array("erro"=>"linkquebrado")); |
169 | + //$cp->return_data(); | ||
170 | + cpjson(array("erro"=>"linkquebrado")); | ||
163 | exit; | 171 | exit; |
164 | } | 172 | } |
165 | include_once("classe_vermultilayer.php"); | 173 | include_once("classe_vermultilayer.php"); |
166 | include_once("classe_estatistica.php"); | 174 | include_once("classe_estatistica.php"); |
167 | -include_once("funcoes_gerais.php"); | 175 | + |
168 | if (isset($debug) && $debug == "sim") | 176 | if (isset($debug) && $debug == "sim") |
169 | {error_reporting(E_ALL);} | 177 | {error_reporting(E_ALL);} |
170 | // | 178 | // |
@@ -179,13 +187,19 @@ $urli3geo = str_replace("/classesphp/mapa_controle.php","",$protocolo.$_SERVER[" | @@ -179,13 +187,19 @@ $urli3geo = str_replace("/classesphp/mapa_controle.php","",$protocolo.$_SERVER[" | ||
179 | if($funcao != "recuperamapa") | 187 | if($funcao != "recuperamapa") |
180 | { | 188 | { |
181 | if(!substituiCon($map_file,$postgis_mapa)) | 189 | if(!substituiCon($map_file,$postgis_mapa)) |
182 | - {$cp->set_data("erro");$cp->return_data();return;} | 190 | + { |
191 | + //$cp->set_data("erro"); | ||
192 | + //$cp->return_data(); | ||
193 | + cpjson("erro",$cp); | ||
194 | + return; | ||
195 | + } | ||
183 | } | 196 | } |
184 | //set_time_limit(240); | 197 | //set_time_limit(240); |
185 | 198 | ||
186 | // | 199 | // |
187 | //faz a busca da função que deve ser executada | 200 | //faz a busca da função que deve ser executada |
188 | // | 201 | // |
202 | +$retorno = ""; //string que será retornada ao browser via JSON | ||
189 | switch ($funcao) | 203 | switch ($funcao) |
190 | { | 204 | { |
191 | /* | 205 | /* |
@@ -203,10 +217,11 @@ Include: | @@ -203,10 +217,11 @@ Include: | ||
203 | */ | 217 | */ |
204 | case "inicia": | 218 | case "inicia": |
205 | include_once("mapa_inicia.php"); | 219 | include_once("mapa_inicia.php"); |
206 | - $cp->register('iniciaMapa'); | ||
207 | - $cp->start(); | ||
208 | - if ($cp->get_data() == "") | ||
209 | - {$cp->set_data("erro");} | 220 | + iniciaMapa(); |
221 | + //$cp->register('iniciaMapa'); | ||
222 | + //$cp->start(); | ||
223 | + //if ($cp->get_data() == "") | ||
224 | + //{$cp->set_data("erro");} | ||
210 | break; | 225 | break; |
211 | /* | 226 | /* |
212 | Property: montaFlamingo | 227 | Property: montaFlamingo |
@@ -218,7 +233,7 @@ Esse gerador, recebe como parâmetro o id da seção atual e transforma o mapfile a | @@ -218,7 +233,7 @@ Esse gerador, recebe como parâmetro o id da seção atual e transforma o mapfile a | ||
218 | */ | 233 | */ |
219 | case "montaFlamingo": | 234 | case "montaFlamingo": |
220 | include("flamingo.inc"); | 235 | include("flamingo.inc"); |
221 | - $cp->set_data($host."/ms_tmp/".basename(dirname($map_file))."/flamingo.xml"); | 236 | + $retorno = $host."/ms_tmp/".basename(dirname($map_file))."/flamingo.xml"; |
222 | break; | 237 | break; |
223 | /* | 238 | /* |
224 | Section: Análise de geometrias | 239 | Section: Análise de geometrias |
@@ -238,8 +253,7 @@ Include: | @@ -238,8 +253,7 @@ Include: | ||
238 | case "incmapageometrias": | 253 | case "incmapageometrias": |
239 | include_once("classe_analise.php"); | 254 | include_once("classe_analise.php"); |
240 | $m = new Analise($map_file,""); | 255 | $m = new Analise($map_file,""); |
241 | - $resultado = $m->incmapageometrias($dir_tmp,$imgdir,$lista); | ||
242 | - $cp->set_data($resultado); | 256 | + $retorno = $m->incmapageometrias($dir_tmp,$imgdir,$lista); |
243 | break; | 257 | break; |
244 | /* | 258 | /* |
245 | Property: chavegoogle | 259 | Property: chavegoogle |
@@ -249,7 +263,7 @@ Retorna o valor da chave registrada para a API do Google maps | @@ -249,7 +263,7 @@ Retorna o valor da chave registrada para a API do Google maps | ||
249 | Essa chave deve ser registrada em i3geo/ms_configura.php | 263 | Essa chave deve ser registrada em i3geo/ms_configura.php |
250 | */ | 264 | */ |
251 | case "chavegoogle": | 265 | case "chavegoogle": |
252 | - $cp->set_data($googleApiKey); | 266 | + $retorno = $googleApiKey; |
253 | break; | 267 | break; |
254 | 268 | ||
255 | /* | 269 | /* |
@@ -264,8 +278,7 @@ Include: | @@ -264,8 +278,7 @@ Include: | ||
264 | case "funcoesGeometrias": | 278 | case "funcoesGeometrias": |
265 | include_once("classe_analise.php"); | 279 | include_once("classe_analise.php"); |
266 | $m = new Analise($map_file,""); | 280 | $m = new Analise($map_file,""); |
267 | - $resultado = $m->funcoesGeometrias($dir_tmp,$imgdir,$lista,$operacao); | ||
268 | - $cp->set_data($resultado); | 281 | + $retorno = $m->funcoesGeometrias($dir_tmp,$imgdir,$lista,$operacao); |
269 | break; | 282 | break; |
270 | /* | 283 | /* |
271 | Property: calculaGeometrias | 284 | Property: calculaGeometrias |
@@ -279,8 +292,7 @@ Include: | @@ -279,8 +292,7 @@ Include: | ||
279 | case "calculaGeometrias": | 292 | case "calculaGeometrias": |
280 | include_once("classe_analise.php"); | 293 | include_once("classe_analise.php"); |
281 | $m = new Analise($map_file,""); | 294 | $m = new Analise($map_file,""); |
282 | - $resultado = $m->calculaGeometrias($dir_tmp,$imgdir,$lista,$operacao,$postgis_con,$srid_area); | ||
283 | - $cp->set_data($resultado); | 295 | + $retorno = $m->calculaGeometrias($dir_tmp,$imgdir,$lista,$operacao,$postgis_con,$srid_area); |
284 | break; | 296 | break; |
285 | /* | 297 | /* |
286 | Property: listageometrias | 298 | Property: listageometrias |
@@ -296,8 +308,7 @@ Include: | @@ -296,8 +308,7 @@ Include: | ||
296 | include_once("classe_temas.php"); | 308 | include_once("classe_temas.php"); |
297 | if(!isset($tema)){$tema = "";} | 309 | if(!isset($tema)){$tema = "";} |
298 | $m = new Temas($map_file,$tema); | 310 | $m = new Temas($map_file,$tema); |
299 | - $resultado = $m->listaGeometrias($dir_tmp,$imgdir); | ||
300 | - $cp->set_data($resultado); | 311 | + $retorno = $m->listaGeometrias($dir_tmp,$imgdir); |
301 | break; | 312 | break; |
302 | /* | 313 | /* |
303 | Property: capturageometrias | 314 | Property: capturageometrias |
@@ -312,8 +323,7 @@ Include: | @@ -312,8 +323,7 @@ Include: | ||
312 | case "capturageometrias": | 323 | case "capturageometrias": |
313 | include_once("classe_temas.php"); | 324 | include_once("classe_temas.php"); |
314 | $m = new Temas($map_file,$tema); | 325 | $m = new Temas($map_file,$tema); |
315 | - $resultado = $m->capturaGeometrias($dir_tmp,$imgdir,$nome); | ||
316 | - $cp->set_data($resultado); | 326 | + $retorno = $m->capturaGeometrias($dir_tmp,$imgdir,$nome); |
317 | break; | 327 | break; |
318 | /* | 328 | /* |
319 | Property: removergeometrias | 329 | Property: removergeometrias |
@@ -329,8 +339,7 @@ Include: | @@ -329,8 +339,7 @@ Include: | ||
329 | include_once("classe_temas.php"); | 339 | include_once("classe_temas.php"); |
330 | if(!isset($tema)){$tema = "";} | 340 | if(!isset($tema)){$tema = "";} |
331 | $m = new Temas($map_file,$tema); | 341 | $m = new Temas($map_file,$tema); |
332 | - $resultado = $m->removerGeometrias($dir_tmp,$imgdir,$lista); | ||
333 | - $cp->set_data($resultado); | 342 | + $retorno = $m->removerGeometrias($dir_tmp,$imgdir,$lista); |
334 | break; | 343 | break; |
335 | /* | 344 | /* |
336 | Section: Open Layers | 345 | Section: Open Layers |
@@ -358,8 +367,7 @@ Include: | @@ -358,8 +367,7 @@ Include: | ||
358 | include_once("classe_mapa.php"); | 367 | include_once("classe_mapa.php"); |
359 | $m = New Mapa($map_file); | 368 | $m = New Mapa($map_file); |
360 | $par = $m->parametrosTemas(); | 369 | $par = $m->parametrosTemas(); |
361 | - $resultado = array("mapfile"=>$map_file,"mapext"=>$mapext,"locmapserv"=>$locmapserv,"parametros"=>$par); | ||
362 | - $cp->set_data($resultado); | 370 | + $retorno = array("mapfile"=>$map_file,"mapext"=>$mapext,"locmapserv"=>$locmapserv,"parametros"=>$par); |
363 | break; | 371 | break; |
364 | /* | 372 | /* |
365 | Section: Mapa | 373 | Section: Mapa |
@@ -372,8 +380,7 @@ Pega as mensagens do metadata 'mensagem'. | @@ -372,8 +380,7 @@ Pega as mensagens do metadata 'mensagem'. | ||
372 | case "pegaMensagens": | 380 | case "pegaMensagens": |
373 | include_once("classe_mapa.php"); | 381 | include_once("classe_mapa.php"); |
374 | $m = new Mapa($map_file); | 382 | $m = new Mapa($map_file); |
375 | - $cp->set_data($m->pegaMensagens()); | ||
376 | - | 383 | + $retorno = $m->pegaMensagens(); |
377 | break; | 384 | break; |
378 | /* | 385 | /* |
379 | Property: reiniciaMapa | 386 | Property: reiniciaMapa |
@@ -385,7 +392,7 @@ Reinicia um mapa restaurando a cópia de segurança. | @@ -385,7 +392,7 @@ Reinicia um mapa restaurando a cópia de segurança. | ||
385 | {unlink($map_file."qy");} | 392 | {unlink($map_file."qy");} |
386 | unlink($map_file); | 393 | unlink($map_file); |
387 | copy(str_replace(".map","reinc.map",$map_file),$map_file); | 394 | copy(str_replace(".map","reinc.map",$map_file),$map_file); |
388 | - $cp->set_data("ok"); | 395 | + $retorno = "ok"; |
389 | break; | 396 | break; |
390 | /* | 397 | /* |
391 | Property: recuperamapa | 398 | Property: recuperamapa |
@@ -406,7 +413,7 @@ Recupera o mapfile de segurança. | @@ -406,7 +413,7 @@ Recupera o mapfile de segurança. | ||
406 | $nmf = str_replace(".map","reinc.map",$map_file); | 413 | $nmf = str_replace(".map","reinc.map",$map_file); |
407 | copy($nmf,$map_file); | 414 | copy($nmf,$map_file); |
408 | } | 415 | } |
409 | - $cp->set_data("ok"); | 416 | + $retorno = "ok"; |
410 | break; | 417 | break; |
411 | /* | 418 | /* |
412 | Property: ativalogo | 419 | Property: ativalogo |
@@ -420,7 +427,7 @@ Include: | @@ -420,7 +427,7 @@ Include: | ||
420 | include_once("classe_mapa.php"); | 427 | include_once("classe_mapa.php"); |
421 | copiaSeguranca($map_file); | 428 | copiaSeguranca($map_file); |
422 | $m = new Mapa($map_file); | 429 | $m = new Mapa($map_file); |
423 | - $cp->set_data($m->ativalogo()); | 430 | + $m->ativalogo(); |
424 | $m->salva(); | 431 | $m->salva(); |
425 | redesenhaMapa(); | 432 | redesenhaMapa(); |
426 | break; | 433 | break; |
@@ -436,7 +443,7 @@ Include: | @@ -436,7 +443,7 @@ Include: | ||
436 | include_once("classe_mapa.php"); | 443 | include_once("classe_mapa.php"); |
437 | copiaSeguranca($map_file); | 444 | copiaSeguranca($map_file); |
438 | $m = new Mapa($map_file); | 445 | $m = new Mapa($map_file); |
439 | - $cp->set_data($m->ativalegenda()); | 446 | + $m->ativalegenda(); |
440 | $m->salva(); | 447 | $m->salva(); |
441 | redesenhaMapa(); | 448 | redesenhaMapa(); |
442 | break; | 449 | break; |
@@ -457,7 +464,7 @@ Include: | @@ -457,7 +464,7 @@ Include: | ||
457 | include_once("classe_mapa.php"); | 464 | include_once("classe_mapa.php"); |
458 | $m = new Mapa($map_file); | 465 | $m = new Mapa($map_file); |
459 | $m->mudaQS($largura,$altura); | 466 | $m->mudaQS($largura,$altura); |
460 | - $cp->set_data("ok"); | 467 | + $retorno = "ok"; |
461 | break; | 468 | break; |
462 | /* | 469 | /* |
463 | Property: gradeCoord | 470 | Property: gradeCoord |
@@ -471,7 +478,7 @@ Include: | @@ -471,7 +478,7 @@ Include: | ||
471 | include_once("classe_mapa.php"); | 478 | include_once("classe_mapa.php"); |
472 | copiaSeguranca($map_file); | 479 | copiaSeguranca($map_file); |
473 | $m = new Mapa($map_file); | 480 | $m = new Mapa($map_file); |
474 | - $cp->set_data($m->gradeCoord($intervalo,$corlinha,$larguralinha,$tipolinha,$tamanhotexto,$fonte,$cortexto,$incluitexto,$mascara,$shadowcolor,$shadowsizex,$shadowsizey)); | 481 | + $m->gradeCoord($intervalo,$corlinha,$larguralinha,$tipolinha,$tamanhotexto,$fonte,$cortexto,$incluitexto,$mascara,$shadowcolor,$shadowsizex,$shadowsizey); |
475 | $m->salva(); | 482 | $m->salva(); |
476 | redesenhaMapa(); | 483 | redesenhaMapa(); |
477 | break; | 484 | break; |
@@ -487,8 +494,7 @@ Include: | @@ -487,8 +494,7 @@ Include: | ||
487 | include_once("classe_mapa.php"); | 494 | include_once("classe_mapa.php"); |
488 | $m = new Mapa($map_file); | 495 | $m = new Mapa($map_file); |
489 | if(!isset($h)){$h = "";} | 496 | if(!isset($h)){$h = "";} |
490 | - $resultado = $m->converteWS($locmapserv,$h); | ||
491 | - $cp->set_data($resultado); | 497 | + $retorno = $m->converteWS($locmapserv,$h); |
492 | break; | 498 | break; |
493 | /* | 499 | /* |
494 | Property: querymapcor | 500 | Property: querymapcor |
@@ -502,7 +508,7 @@ Include: | @@ -502,7 +508,7 @@ Include: | ||
502 | include_once("classe_mapa.php"); | 508 | include_once("classe_mapa.php"); |
503 | copiaSeguranca($map_file); | 509 | copiaSeguranca($map_file); |
504 | $m = new Mapa($map_file); | 510 | $m = new Mapa($map_file); |
505 | - $cp->set_data($m->corQM($cor)); | 511 | + $m->corQM($cor); |
506 | $m->salva(); | 512 | $m->salva(); |
507 | redesenhaMapa(); | 513 | redesenhaMapa(); |
508 | break; | 514 | break; |
@@ -517,7 +523,7 @@ Include: | @@ -517,7 +523,7 @@ Include: | ||
517 | case "pegaquerymapcor": | 523 | case "pegaquerymapcor": |
518 | include_once("classe_mapa.php"); | 524 | include_once("classe_mapa.php"); |
519 | $m = new Mapa($map_file); | 525 | $m = new Mapa($map_file); |
520 | - $cp->set_data($m->corQM("")); | 526 | + $retorno = $m->corQM(""); |
521 | break; | 527 | break; |
522 | /* | 528 | /* |
523 | Property: corfundo | 529 | Property: corfundo |
@@ -531,7 +537,7 @@ Include: | @@ -531,7 +537,7 @@ Include: | ||
531 | include_once("classe_mapa.php"); | 537 | include_once("classe_mapa.php"); |
532 | copiaSeguranca($map_file); | 538 | copiaSeguranca($map_file); |
533 | $m = new Mapa($map_file); | 539 | $m = new Mapa($map_file); |
534 | - $cp->set_data($m->corfundo($cor)); | 540 | + $m->corfundo($cor); |
535 | $m->salva(); | 541 | $m->salva(); |
536 | redesenhaMapa(); | 542 | redesenhaMapa(); |
537 | break; | 543 | break; |
@@ -546,7 +552,7 @@ Include: | @@ -546,7 +552,7 @@ Include: | ||
546 | case "pegacorfundo": | 552 | case "pegacorfundo": |
547 | include_once("classe_mapa.php"); | 553 | include_once("classe_mapa.php"); |
548 | $m = new Mapa($map_file); | 554 | $m = new Mapa($map_file); |
549 | - $cp->set_data($m->corfundo("")); | 555 | + $retorno = $m->corfundo(""); |
550 | break; | 556 | break; |
551 | /* | 557 | /* |
552 | Property: corpo | 558 | Property: corpo |
@@ -570,8 +576,7 @@ Include: | @@ -570,8 +576,7 @@ Include: | ||
570 | case "corpoentorno": | 576 | case "corpoentorno": |
571 | include_once("classe_mapa.php"); | 577 | include_once("classe_mapa.php"); |
572 | $m = new Mapa($map_file); | 578 | $m = new Mapa($map_file); |
573 | - $resultado = $m->redesenhaEntorno(); | ||
574 | - $cp->set_data($resultado); | 579 | + $retorno = $m->redesenhaEntorno(); |
575 | break; | 580 | break; |
576 | /* | 581 | /* |
577 | Property: adicionaTemaGeoRSS | 582 | Property: adicionaTemaGeoRSS |
@@ -586,12 +591,11 @@ Include: | @@ -586,12 +591,11 @@ Include: | ||
586 | copiaSeguranca($map_file); | 591 | copiaSeguranca($map_file); |
587 | $m = new Mapa($map_file); | 592 | $m = new Mapa($map_file); |
588 | $retorno = $m->adicionaTemaGeoRSS($servico,$dir_tmp,$locaplic,$canal); | 593 | $retorno = $m->adicionaTemaGeoRSS($servico,$dir_tmp,$locaplic,$canal); |
589 | - $cp->set_data($retorno); | ||
590 | if ($retorno != "erro") | 594 | if ($retorno != "erro") |
591 | {$m->salva();redesenhaMapa();} | 595 | {$m->salva();redesenhaMapa();} |
592 | else | 596 | else |
593 | { | 597 | { |
594 | - $cp->set_data("erro.Nenhum dado espacializado foi encontrado."); | 598 | + $retorno = "erro.Nenhum dado espacializado foi encontrado."; |
595 | } | 599 | } |
596 | break; | 600 | break; |
597 | /* | 601 | /* |
@@ -607,12 +611,11 @@ Include: | @@ -607,12 +611,11 @@ Include: | ||
607 | copiaSeguranca($map_file); | 611 | copiaSeguranca($map_file); |
608 | $m = new Mapa($map_file); | 612 | $m = new Mapa($map_file); |
609 | $retorno = $m->adicionaTemaSHP($arq); | 613 | $retorno = $m->adicionaTemaSHP($arq); |
610 | - $cp->set_data($retorno); | ||
611 | if ($retorno != "erro") | 614 | if ($retorno != "erro") |
612 | {$m->salva();redesenhaMapa();} | 615 | {$m->salva();redesenhaMapa();} |
613 | else | 616 | else |
614 | { | 617 | { |
615 | - $cp->set_data("erro.Nenhum dado espacializado foi encontrado."); | 618 | + $retorno = "erro.Nenhum dado espacializado foi encontrado."; |
616 | } | 619 | } |
617 | break; | 620 | break; |
618 | /* | 621 | /* |
@@ -628,12 +631,11 @@ Include: | @@ -628,12 +631,11 @@ Include: | ||
628 | copiaSeguranca($map_file); | 631 | copiaSeguranca($map_file); |
629 | $m = new Mapa($map_file); | 632 | $m = new Mapa($map_file); |
630 | $retorno = $m->adicionaTemaIMG($arq); | 633 | $retorno = $m->adicionaTemaIMG($arq); |
631 | - $cp->set_data($retorno); | ||
632 | if ($retorno != "erro") | 634 | if ($retorno != "erro") |
633 | {$m->salva();redesenhaMapa();} | 635 | {$m->salva();redesenhaMapa();} |
634 | else | 636 | else |
635 | { | 637 | { |
636 | - $cp->set_data("erro.Nenhum dado espacializado foi encontrado."); | 638 | + $retorno = "erro.Nenhum dado espacializado foi encontrado."; |
637 | } | 639 | } |
638 | break; | 640 | break; |
639 | /* | 641 | /* |
@@ -647,8 +649,8 @@ Include: | @@ -647,8 +649,8 @@ Include: | ||
647 | case "listatemas": | 649 | case "listatemas": |
648 | include_once("classe_mapa.php"); | 650 | include_once("classe_mapa.php"); |
649 | $m = new Mapa($map_file); | 651 | $m = new Mapa($map_file); |
650 | - $resultado = $m->listaTemas($tipo); | ||
651 | - $cp->set_data(array_reverse($resultado)); | 652 | + $retorno = $m->listaTemas($tipo); |
653 | + $retorno = array_reverse($retorno); | ||
652 | break; | 654 | break; |
653 | /* | 655 | /* |
654 | Property: listatemaslocais | 656 | Property: listatemaslocais |
@@ -661,8 +663,7 @@ Include: | @@ -661,8 +663,7 @@ Include: | ||
661 | case "listatemaslocais": | 663 | case "listatemaslocais": |
662 | include_once("classe_mapa.php"); | 664 | include_once("classe_mapa.php"); |
663 | $m = new Mapa($map_file); | 665 | $m = new Mapa($map_file); |
664 | - $resultado = $m->listaTemasLocais(); | ||
665 | - $cp->set_data($resultado); | 666 | + $retorno = $m->listaTemasLocais(); |
666 | break; | 667 | break; |
667 | /* | 668 | /* |
668 | Property: listatemasTipo | 669 | Property: listatemasTipo |
@@ -676,8 +677,7 @@ Include: | @@ -676,8 +677,7 @@ Include: | ||
676 | include_once("classe_mapa.php"); | 677 | include_once("classe_mapa.php"); |
677 | $m = new Mapa($map_file); | 678 | $m = new Mapa($map_file); |
678 | if(!isset($selecao)){$selecao = "nao";} | 679 | if(!isset($selecao)){$selecao = "nao";} |
679 | - $resultado = $m->listaTemasTipo($tipo,$selecao); | ||
680 | - $cp->set_data($resultado); | 680 | + $retorno = $m->listaTemasTipo($tipo,$selecao); |
681 | break; | 681 | break; |
682 | /* | 682 | /* |
683 | Property: listatemascomsel | 683 | Property: listatemascomsel |
@@ -690,8 +690,7 @@ Include: | @@ -690,8 +690,7 @@ Include: | ||
690 | case "listatemascomsel": | 690 | case "listatemascomsel": |
691 | include_once("classe_mapa.php"); | 691 | include_once("classe_mapa.php"); |
692 | $m = new Mapa($map_file); | 692 | $m = new Mapa($map_file); |
693 | - $resultado = $m->listaTemasComSel(); | ||
694 | - $cp->set_data($resultado); | 693 | + $retorno = $m->listaTemasComSel(); |
695 | break; | 694 | break; |
696 | /* | 695 | /* |
697 | Property: ligatemas | 696 | Property: ligatemas |
@@ -705,7 +704,7 @@ Include: | @@ -705,7 +704,7 @@ Include: | ||
705 | include_once("classe_mapa.php"); | 704 | include_once("classe_mapa.php"); |
706 | copiaSeguranca($map_file); | 705 | copiaSeguranca($map_file); |
707 | $m = new Mapa($map_file,$locaplic); | 706 | $m = new Mapa($map_file,$locaplic); |
708 | - $cp->set_data($m->ligaDesligaTemas($ligar,$desligar,$adicionar)); | 707 | + $retorno = $m->ligaDesligaTemas($ligar,$desligar,$adicionar); |
709 | $m->salva(); | 708 | $m->salva(); |
710 | break; | 709 | break; |
711 | /* | 710 | /* |
@@ -723,13 +722,13 @@ Include: | @@ -723,13 +722,13 @@ Include: | ||
723 | $salvar = $m->adicionaTema($temas,$locaplic); | 722 | $salvar = $m->adicionaTema($temas,$locaplic); |
724 | if($salvar) | 723 | if($salvar) |
725 | $m->salva(); | 724 | $m->salva(); |
726 | - $cp->set_data("ok"); | 725 | + $retorno = "ok"; |
727 | $teste = testaMapa($map_file,$postgis_mapa); | 726 | $teste = testaMapa($map_file,$postgis_mapa); |
728 | if ($teste == "ok") | 727 | if ($teste == "ok") |
729 | - {$cp->set_data("ok");} | 728 | + {$retorno = "ok";} |
730 | else | 729 | else |
731 | { | 730 | { |
732 | - $cp->set_data(array("erro"=>"A camada nao pode ser adicionada. ".$teste)); | 731 | + $retorno = array("erro"=>"A camada nao pode ser adicionada. ".$teste); |
733 | } | 732 | } |
734 | break; | 733 | break; |
735 | /* | 734 | /* |
@@ -744,7 +743,7 @@ Include: | @@ -744,7 +743,7 @@ Include: | ||
744 | include_once("classe_mapa.php"); | 743 | include_once("classe_mapa.php"); |
745 | copiaSeguranca($map_file); | 744 | copiaSeguranca($map_file); |
746 | $m = new Mapa($map_file); | 745 | $m = new Mapa($map_file); |
747 | - $cp->set_data($m->excluiTemas($temas)); | 746 | + $m->excluiTemas($temas); |
748 | $m->salva(); | 747 | $m->salva(); |
749 | redesenhaMapa(); | 748 | redesenhaMapa(); |
750 | break; | 749 | break; |
@@ -763,10 +762,10 @@ Include: | @@ -763,10 +762,10 @@ Include: | ||
763 | $m->adicionatemawms($tema,$servico,$nome,$proj,$formato,$locaplic,$tipo,$versao,$nomecamada,$dir_tmp,$imgdir,$imgurl,$tiporep,$suportasld,$formatosinfo,$time); | 762 | $m->adicionatemawms($tema,$servico,$nome,$proj,$formato,$locaplic,$tipo,$versao,$nomecamada,$dir_tmp,$imgdir,$imgurl,$tiporep,$suportasld,$formatosinfo,$time); |
764 | $teste = testaMapa($map_file,$postgis_mapa); | 763 | $teste = testaMapa($map_file,$postgis_mapa); |
765 | if ($teste == "ok") | 764 | if ($teste == "ok") |
766 | - {$cp->set_data("ok");} | 765 | + {$retorno = "ok";} |
767 | else | 766 | else |
768 | { | 767 | { |
769 | - $cp->set_data(array("erro"=>"A camada nao pode ser adicionada. ".$teste)); | 768 | + $retorno = array("erro"=>"A camada nao pode ser adicionada. ".$teste); |
770 | } | 769 | } |
771 | break; | 770 | break; |
772 | /* | 771 | /* |
@@ -777,8 +776,7 @@ Gera a imagem do mapa de referência. | @@ -777,8 +776,7 @@ Gera a imagem do mapa de referência. | ||
777 | case "referencia": | 776 | case "referencia": |
778 | $objMapa = ms_newMapObj($map_file); | 777 | $objMapa = ms_newMapObj($map_file); |
779 | $nomeImagem = nomeRandomico(); | 778 | $nomeImagem = nomeRandomico(); |
780 | - $cp->register('retornaReferencia'); | ||
781 | - $cp->start(); | 779 | + $retorno = retornaReferencia(); |
782 | break; | 780 | break; |
783 | /* | 781 | /* |
784 | Property: referenciadinamica | 782 | Property: referenciadinamica |
@@ -788,8 +786,7 @@ Gera a imagem do mapa de referência de forma dinâmica, variando com a escala do | @@ -788,8 +786,7 @@ Gera a imagem do mapa de referência de forma dinâmica, variando com a escala do | ||
788 | case "referenciadinamica": | 786 | case "referenciadinamica": |
789 | //$objMapa = ms_newMapObj($map_file); | 787 | //$objMapa = ms_newMapObj($map_file); |
790 | $nomeImagem = nomeRandomico(); | 788 | $nomeImagem = nomeRandomico(); |
791 | - $cp->register('retornaReferenciaDinamica'); | ||
792 | - $cp->start(); | 789 | + $retorno = retornaReferenciaDinamica(); |
793 | break; | 790 | break; |
794 | /* | 791 | /* |
795 | Section: Temas | 792 | Section: Temas |
@@ -817,7 +814,6 @@ Include: | @@ -817,7 +814,6 @@ Include: | ||
817 | if (gethostbyname($n["ip"]) == $ipcliente) | 814 | if (gethostbyname($n["ip"]) == $ipcliente) |
818 | {$retorno[] = $n["drives"];} | 815 | {$retorno[] = $n["drives"];} |
819 | } | 816 | } |
820 | - $cp->set_data($retorno); | ||
821 | break; | 817 | break; |
822 | /* | 818 | /* |
823 | Property: alterarepresentacao | 819 | Property: alterarepresentacao |
@@ -831,7 +827,7 @@ Include: | @@ -831,7 +827,7 @@ Include: | ||
831 | include_once("classe_temas.php"); | 827 | include_once("classe_temas.php"); |
832 | copiaSeguranca($map_file); | 828 | copiaSeguranca($map_file); |
833 | $m = new Temas($map_file,$tema); | 829 | $m = new Temas($map_file,$tema); |
834 | - $cp->set_data($m->alteraRepresentacao()); | 830 | + $m->alteraRepresentacao(); |
835 | $m->salva(); | 831 | $m->salva(); |
836 | redesenhaMapa(); | 832 | redesenhaMapa(); |
837 | break; | 833 | break; |
@@ -846,7 +842,7 @@ Include: | @@ -846,7 +842,7 @@ Include: | ||
846 | case "geradestaque": | 842 | case "geradestaque": |
847 | include_once("classe_temas.php"); | 843 | include_once("classe_temas.php"); |
848 | $m = new Temas($map_file,$tema); | 844 | $m = new Temas($map_file,$tema); |
849 | - $cp->set_data($m->geraDestaque()); | 845 | + $retorno = $m->geraDestaque(); |
850 | break; | 846 | break; |
851 | /* | 847 | /* |
852 | Property: download | 848 | Property: download |
@@ -854,7 +850,7 @@ Property: download | @@ -854,7 +850,7 @@ Property: download | ||
854 | Gera os arquivos para download de um tema. | 850 | Gera os arquivos para download de um tema. |
855 | */ | 851 | */ |
856 | case "download": | 852 | case "download": |
857 | - $cp->set_data(downloadTema($map_file,$tema,$locaplic,$dir_tmp)); | 853 | + $retorno = downloadTema($map_file,$tema,$locaplic,$dir_tmp); |
858 | break; | 854 | break; |
859 | /* | 855 | /* |
860 | function: insereFeature | 856 | function: insereFeature |
@@ -869,9 +865,9 @@ Include: | @@ -869,9 +865,9 @@ Include: | ||
869 | copiaSeguranca($map_file); | 865 | copiaSeguranca($map_file); |
870 | $m = new Temas($map_file,""); | 866 | $m = new Temas($map_file,""); |
871 | if(!isset($marca)){$marca="";} | 867 | if(!isset($marca)){$marca="";} |
872 | - $cp->set_data($m->insereFeature($marca,$tipo,$xy,$texto,$position,$partials,$offsetx,$offsety,$minfeaturesize,$mindistance,$force,$shadowcolor,$shadowsizex,$shadowsizey,$outlinecolor,$cor,$sombray,$sombrax,$sombra,$fundo,$angulo,$tamanho,$fonte)); | 868 | + $m->insereFeature($marca,$tipo,$xy,$texto,$position,$partials,$offsetx,$offsety,$minfeaturesize,$mindistance,$force,$shadowcolor,$shadowsizex,$shadowsizey,$outlinecolor,$cor,$sombray,$sombrax,$sombra,$fundo,$angulo,$tamanho,$fonte); |
873 | $m->salva(); | 869 | $m->salva(); |
874 | - redesenhaMapa(); | 870 | + redesenhaMapa(); |
875 | break; | 871 | break; |
876 | /* | 872 | /* |
877 | Property: sobetema | 873 | Property: sobetema |
@@ -885,7 +881,7 @@ Include: | @@ -885,7 +881,7 @@ Include: | ||
885 | include_once("classe_temas.php"); | 881 | include_once("classe_temas.php"); |
886 | copiaSeguranca($map_file); | 882 | copiaSeguranca($map_file); |
887 | $m = new Temas($map_file,$tema); | 883 | $m = new Temas($map_file,$tema); |
888 | - $cp->set_data($m->sobeTema()); | 884 | + $m->sobeTema(); |
889 | $m->salva(); | 885 | $m->salva(); |
890 | redesenhaMapa(); | 886 | redesenhaMapa(); |
891 | break; | 887 | break; |
@@ -901,7 +897,7 @@ Include: | @@ -901,7 +897,7 @@ Include: | ||
901 | include_once("classe_temas.php"); | 897 | include_once("classe_temas.php"); |
902 | copiaSeguranca($map_file); | 898 | copiaSeguranca($map_file); |
903 | $m = new Temas($map_file,$tema); | 899 | $m = new Temas($map_file,$tema); |
904 | - $cp->set_data($m->desceTema()); | 900 | + $m->desceTema(); |
905 | $m->salva(); | 901 | $m->salva(); |
906 | redesenhaMapa(); | 902 | redesenhaMapa(); |
907 | break; | 903 | break; |
@@ -916,7 +912,7 @@ Include: | @@ -916,7 +912,7 @@ Include: | ||
916 | case "fontetema": | 912 | case "fontetema": |
917 | include_once("classe_temas.php"); | 913 | include_once("classe_temas.php"); |
918 | $m = new Temas($map_file,null,$locaplic); | 914 | $m = new Temas($map_file,null,$locaplic); |
919 | - $cp->set_data($m->fonteTema($tema)); | 915 | + $retorno = $m->fonteTema($tema); |
920 | break; | 916 | break; |
921 | /* | 917 | /* |
922 | Property: reordenatemas | 918 | Property: reordenatemas |
@@ -930,7 +926,7 @@ Include: | @@ -930,7 +926,7 @@ Include: | ||
930 | include_once("classe_temas.php"); | 926 | include_once("classe_temas.php"); |
931 | copiaSeguranca($map_file); | 927 | copiaSeguranca($map_file); |
932 | $m = new Temas($map_file); | 928 | $m = new Temas($map_file); |
933 | - $cp->set_data($m->reordenatemas($lista)); | 929 | + $m->reordenatemas($lista); |
934 | $m->salva(); | 930 | $m->salva(); |
935 | redesenhaMapa(); | 931 | redesenhaMapa(); |
936 | break; | 932 | break; |
@@ -946,7 +942,7 @@ Include: | @@ -946,7 +942,7 @@ Include: | ||
946 | include_once("classe_temas.php"); | 942 | include_once("classe_temas.php"); |
947 | copiaSeguranca($map_file); | 943 | copiaSeguranca($map_file); |
948 | $m = new Temas($map_file,$tema); | 944 | $m = new Temas($map_file,$tema); |
949 | - $cp->set_data($m->zoomTema()); | 945 | + $m->zoomTema(); |
950 | $m->salva(); | 946 | $m->salva(); |
951 | redesenhaMapa(); | 947 | redesenhaMapa(); |
952 | break; | 948 | break; |
@@ -962,7 +958,7 @@ Include: | @@ -962,7 +958,7 @@ Include: | ||
962 | include_once("classe_temas.php"); | 958 | include_once("classe_temas.php"); |
963 | copiaSeguranca($map_file); | 959 | copiaSeguranca($map_file); |
964 | $m = new Temas($map_file,$tema); | 960 | $m = new Temas($map_file,$tema); |
965 | - $cp->set_data($m->zoomSel()); | 961 | + $m->zoomSel(); |
966 | $m->salva(); | 962 | $m->salva(); |
967 | redesenhaMapa(); | 963 | redesenhaMapa(); |
968 | break; | 964 | break; |
@@ -979,7 +975,7 @@ Include: | @@ -979,7 +975,7 @@ Include: | ||
979 | copiaSeguranca($map_file); | 975 | copiaSeguranca($map_file); |
980 | $m = new Temas($map_file,$tema); | 976 | $m = new Temas($map_file,$tema); |
981 | if(!isset($testa)){$testa="";} | 977 | if(!isset($testa)){$testa="";} |
982 | - {$cp->set_data($m->insereFiltro($filtro,$testa));} | 978 | + {$retorno = $m->insereFiltro($filtro,$testa);} |
983 | if($testa != "sim") | 979 | if($testa != "sim") |
984 | { | 980 | { |
985 | $m->salva(); | 981 | $m->salva(); |
@@ -997,7 +993,7 @@ Include: | @@ -997,7 +993,7 @@ Include: | ||
997 | case "pegafiltro": | 993 | case "pegafiltro": |
998 | include_once("classe_temas.php"); | 994 | include_once("classe_temas.php"); |
999 | $m = new Temas($map_file,$tema); | 995 | $m = new Temas($map_file,$tema); |
1000 | - $cp->set_data($m->pegaFiltro()); | 996 | + $retorno = $m->pegaFiltro(); |
1001 | break; | 997 | break; |
1002 | /* | 998 | /* |
1003 | Property: aplicaProcessos | 999 | Property: aplicaProcessos |
@@ -1078,25 +1074,23 @@ Include: | @@ -1078,25 +1074,23 @@ Include: | ||
1078 | copiaSeguranca($map_file); | 1074 | copiaSeguranca($map_file); |
1079 | $m = new Alteraclasse($map_file,$tema); | 1075 | $m = new Alteraclasse($map_file,$tema); |
1080 | if ($opcao == "adicionaclasse") | 1076 | if ($opcao == "adicionaclasse") |
1081 | - {$cp->set_data($m->adicionaclasse());} | 1077 | + {$retorno = $m->adicionaclasse();} |
1082 | if ($opcao == "valorunico") | 1078 | if ($opcao == "valorunico") |
1083 | - {$cp->set_data($m->valorunico($item,$ignorar));} | 1079 | + {$retorno = $m->valorunico($item,$ignorar);} |
1084 | if ($opcao == "intervalosiguais") | 1080 | if ($opcao == "intervalosiguais") |
1085 | - {$cp->set_data($m->intervalosiguais($item,$nclasses,$ignorar));} | 1081 | + {$retorno = $m->intervalosiguais($item,$nclasses,$ignorar);} |
1086 | if ($opcao == "quartis") | 1082 | if ($opcao == "quartis") |
1087 | {$cp->set_data($m->quartis($item,$ignorar));} | 1083 | {$cp->set_data($m->quartis($item,$ignorar));} |
1088 | if ($opcao == "alteraclasses") | 1084 | if ($opcao == "alteraclasses") |
1089 | { | 1085 | { |
1090 | //esta operação é chamada com POST via cpaint | 1086 | //esta operação é chamada com POST via cpaint |
1091 | //por isso precisa ser executada com start | 1087 | //por isso precisa ser executada com start |
1092 | - $cp->register('alteraclassesPost'); | ||
1093 | - $cp->start(); | 1088 | + alteraclassesPost(); |
1094 | restauraCon($map_file,$postgis_mapa); | 1089 | restauraCon($map_file,$postgis_mapa); |
1095 | - $cp->return_data(); | ||
1096 | - exit; | 1090 | + cpjson(""); |
1097 | } | 1091 | } |
1098 | if ($opcao == "simbolounico") | 1092 | if ($opcao == "simbolounico") |
1099 | - {$cp->set_data($m->simbolounico());} | 1093 | + {$retorno = $m->simbolounico();} |
1100 | $salvo = $m->salva(); | 1094 | $salvo = $m->salva(); |
1101 | break; | 1095 | break; |
1102 | /* | 1096 | /* |
@@ -1111,7 +1105,7 @@ Include: | @@ -1111,7 +1105,7 @@ Include: | ||
1111 | include_once("classe_alteraclasse.php"); | 1105 | include_once("classe_alteraclasse.php"); |
1112 | copiaSeguranca($map_file); | 1106 | copiaSeguranca($map_file); |
1113 | $m = new Alteraclasse($map_file,$tema); | 1107 | $m = new Alteraclasse($map_file,$tema); |
1114 | - $cp->set_data($m->inverteCoresClasses()); | 1108 | + $retorno = $m->inverteCoresClasses(); |
1115 | $m->salva(); | 1109 | $m->salva(); |
1116 | break; | 1110 | break; |
1117 | /* | 1111 | /* |
@@ -1126,7 +1120,7 @@ Include: | @@ -1126,7 +1120,7 @@ Include: | ||
1126 | include_once("classe_alteraclasse.php"); | 1120 | include_once("classe_alteraclasse.php"); |
1127 | copiaSeguranca($map_file); | 1121 | copiaSeguranca($map_file); |
1128 | $m = new Alteraclasse($map_file,$tema); | 1122 | $m = new Alteraclasse($map_file,$tema); |
1129 | - $cp->set_data($m->calculaTamanhoClasses()); | 1123 | + $retorno = $m->calculaTamanhoClasses(); |
1130 | $m->salva(); | 1124 | $m->salva(); |
1131 | break; | 1125 | break; |
1132 | /* | 1126 | /* |
@@ -1141,7 +1135,7 @@ Include: | @@ -1141,7 +1135,7 @@ Include: | ||
1141 | include_once("classe_alteraclasse.php"); | 1135 | include_once("classe_alteraclasse.php"); |
1142 | copiaSeguranca($map_file); | 1136 | copiaSeguranca($map_file); |
1143 | $m = new Alteraclasse($map_file,$tema); | 1137 | $m = new Alteraclasse($map_file,$tema); |
1144 | - $cp->set_data($m->alteraCoresClasses($cori,$corf)); | 1138 | + $retorno = $m->alteraCoresClasses($cori,$corf); |
1145 | $m->salva(); | 1139 | $m->salva(); |
1146 | break; | 1140 | break; |
1147 | /* | 1141 | /* |
@@ -1156,7 +1150,7 @@ Include: | @@ -1156,7 +1150,7 @@ Include: | ||
1156 | include_once("classe_alteraclasse.php"); | 1150 | include_once("classe_alteraclasse.php"); |
1157 | copiaSeguranca($map_file); | 1151 | copiaSeguranca($map_file); |
1158 | $m = new Alteraclasse($map_file,$tema); | 1152 | $m = new Alteraclasse($map_file,$tema); |
1159 | - $cp->set_data($m->statusClasse($classe)); | 1153 | + $retorno = $m->statusClasse($classe); |
1160 | $m->salva(); | 1154 | $m->salva(); |
1161 | break; | 1155 | break; |
1162 | /* | 1156 | /* |
@@ -1176,7 +1170,7 @@ Include: | @@ -1176,7 +1170,7 @@ Include: | ||
1176 | { | 1170 | { |
1177 | $res[] = $cores[0].",".$cores[1].",".$cores[2]; | 1171 | $res[] = $cores[0].",".$cores[1].",".$cores[2]; |
1178 | } | 1172 | } |
1179 | - $cp->set_data(implode("*",$res)); | 1173 | + $retorno = implode("*",$res); |
1180 | break; | 1174 | break; |
1181 | /* | 1175 | /* |
1182 | Section: Análise geográfica | 1176 | Section: Análise geográfica |
@@ -1197,7 +1191,7 @@ Include: | @@ -1197,7 +1191,7 @@ Include: | ||
1197 | include_once("classe_analise.php"); | 1191 | include_once("classe_analise.php"); |
1198 | copiaSeguranca($map_file); | 1192 | copiaSeguranca($map_file); |
1199 | $m = new Analise($map_file,$tema); | 1193 | $m = new Analise($map_file,$tema); |
1200 | - $cp->set_data($m->dissolvePoligono($item,$locaplic)); | 1194 | + $retorno = $m->dissolvePoligono($item,$locaplic); |
1201 | $m->salva(); | 1195 | $m->salva(); |
1202 | break; | 1196 | break; |
1203 | /* | 1197 | /* |
@@ -1214,7 +1208,7 @@ Include: | @@ -1214,7 +1208,7 @@ Include: | ||
1214 | include_once("classe_analise.php"); | 1208 | include_once("classe_analise.php"); |
1215 | copiaSeguranca($map_file); | 1209 | copiaSeguranca($map_file); |
1216 | $m = new Analise($map_file,$tema); | 1210 | $m = new Analise($map_file,$tema); |
1217 | - $cp->set_data($m->agrupaElementos($item,$locaplic)); | 1211 | + $retorno = $m->agrupaElementos($item,$locaplic); |
1218 | $m->salva(); | 1212 | $m->salva(); |
1219 | break; | 1213 | break; |
1220 | /* | 1214 | /* |
@@ -1231,7 +1225,7 @@ Include: | @@ -1231,7 +1225,7 @@ Include: | ||
1231 | include_once("classe_analise.php"); | 1225 | include_once("classe_analise.php"); |
1232 | copiaSeguranca($map_file); | 1226 | copiaSeguranca($map_file); |
1233 | $m = new Analise($map_file,$tema); | 1227 | $m = new Analise($map_file,$tema); |
1234 | - $cp->set_data($m->pontoEmPoligono($temaPt,$temasPo,$locaplic)); | 1228 | + $retorno = $m->pontoEmPoligono($temaPt,$temasPo,$locaplic); |
1235 | $m->salva(); | 1229 | $m->salva(); |
1236 | break; | 1230 | break; |
1237 | /* | 1231 | /* |
@@ -1248,7 +1242,7 @@ Include: | @@ -1248,7 +1242,7 @@ Include: | ||
1248 | include_once("classe_analise.php"); | 1242 | include_once("classe_analise.php"); |
1249 | copiaSeguranca($map_file); | 1243 | copiaSeguranca($map_file); |
1250 | $m = new Analise($map_file,$tema); | 1244 | $m = new Analise($map_file,$tema); |
1251 | - $cp->set_data($m->nptPol($temaPt,$temaPo,$locaplic)); | 1245 | + $retorno = $m->nptPol($temaPt,$temaPo,$locaplic); |
1252 | $m->salva(); | 1246 | $m->salva(); |
1253 | break; | 1247 | break; |
1254 | /* | 1248 | /* |
@@ -1265,7 +1259,7 @@ Include: | @@ -1265,7 +1259,7 @@ Include: | ||
1265 | include_once("classe_analise.php"); | 1259 | include_once("classe_analise.php"); |
1266 | copiaSeguranca($map_file); | 1260 | copiaSeguranca($map_file); |
1267 | $m = new Analise($map_file,$tema); | 1261 | $m = new Analise($map_file,$tema); |
1268 | - $cp->set_data($m->criaBuffer($distancia,$locaplic,$unir)); | 1262 | + $retorno = $m->criaBuffer($distancia,$locaplic,$unir); |
1269 | $m->salva(); | 1263 | $m->salva(); |
1270 | //limpa selecao | 1264 | //limpa selecao |
1271 | if (file_exists($map_file."qy")) | 1265 | if (file_exists($map_file."qy")) |
@@ -1286,7 +1280,7 @@ Include: | @@ -1286,7 +1280,7 @@ Include: | ||
1286 | copiaSeguranca($map_file); | 1280 | copiaSeguranca($map_file); |
1287 | $m = new Analise($map_file,$temaorigem); | 1281 | $m = new Analise($map_file,$temaorigem); |
1288 | $temaoverlay = $m->criaBuffer($distancia,$locaplic); | 1282 | $temaoverlay = $m->criaBuffer($distancia,$locaplic); |
1289 | - $cp->set_data($m->distanciaptpt($temaorigem,$temadestino,$temaoverlay,$locaplic,$itemorigem,$itemdestino)); | 1283 | + $retorno = $m->distanciaptpt($temaorigem,$temadestino,$temaoverlay,$locaplic,$itemorigem,$itemdestino); |
1290 | $m->salva(); | 1284 | $m->salva(); |
1291 | break; | 1285 | break; |
1292 | /* | 1286 | /* |
@@ -1303,7 +1297,7 @@ Include: | @@ -1303,7 +1297,7 @@ Include: | ||
1303 | include_once("classe_analise.php"); | 1297 | include_once("classe_analise.php"); |
1304 | copiaSeguranca($map_file); | 1298 | copiaSeguranca($map_file); |
1305 | $m = new Analise($map_file,$tema); | 1299 | $m = new Analise($map_file,$tema); |
1306 | - $cp->set_data($m->criaCentroide($locaplic)); | 1300 | + $retorno = $m->criaCentroide($locaplic); |
1307 | $m->salva(); | 1301 | $m->salva(); |
1308 | break; | 1302 | break; |
1309 | /* | 1303 | /* |
@@ -1324,9 +1318,8 @@ Include: | @@ -1324,9 +1318,8 @@ Include: | ||
1324 | if(!isset($limitepontos)) | 1318 | if(!isset($limitepontos)) |
1325 | {$limitepontos = "";} | 1319 | {$limitepontos = "";} |
1326 | $m = new Analise($map_file,$tema); | 1320 | $m = new Analise($map_file,$tema); |
1327 | - $res = $m->analiseDistriPt($locaplic,$dir_tmp,$R_path,$numclasses,$tipo,$cori,$corf,$tmpurl,$sigma,$limitepontos,$tema2,$extendelimite); | 1321 | + $retorno = $m->analiseDistriPt($locaplic,$dir_tmp,$R_path,$numclasses,$tipo,$cori,$corf,$tmpurl,$sigma,$limitepontos,$tema2,$extendelimite); |
1328 | $m->salva(); | 1322 | $m->salva(); |
1329 | - $cp->set_data($res); | ||
1330 | break; | 1323 | break; |
1331 | /* | 1324 | /* |
1332 | Property: gradeDePontos | 1325 | Property: gradeDePontos |
@@ -1343,7 +1336,7 @@ Include: | @@ -1343,7 +1336,7 @@ Include: | ||
1343 | copiaSeguranca($map_file); | 1336 | copiaSeguranca($map_file); |
1344 | if(!isset($tema)){$tema = "";} | 1337 | if(!isset($tema)){$tema = "";} |
1345 | $m = new Analise($map_file,$tema); | 1338 | $m = new Analise($map_file,$tema); |
1346 | - $cp->set_data($m->gradeDePontos($xdd,$ydd,$px,$py,$locaplic,$nptx,$npty)); | 1339 | + $retorno = $m->gradeDePontos($xdd,$ydd,$px,$py,$locaplic,$nptx,$npty); |
1347 | $m->salva(); | 1340 | $m->salva(); |
1348 | break; | 1341 | break; |
1349 | /* | 1342 | /* |
@@ -1361,7 +1354,7 @@ Include: | @@ -1361,7 +1354,7 @@ Include: | ||
1361 | copiaSeguranca($map_file); | 1354 | copiaSeguranca($map_file); |
1362 | if(!isset($tema)){$tema = "";} | 1355 | if(!isset($tema)){$tema = "";} |
1363 | $m = new Analise($map_file,$tema); | 1356 | $m = new Analise($map_file,$tema); |
1364 | - $cp->set_data($m->gradeDePol($xdd,$ydd,$px,$py,$locaplic,$nptx,$npty)); | 1357 | + $retorno = $m->gradeDePol($xdd,$ydd,$px,$py,$locaplic,$nptx,$npty); |
1365 | $m->salva(); | 1358 | $m->salva(); |
1366 | break; | 1359 | break; |
1367 | /* | 1360 | /* |
@@ -1379,7 +1372,7 @@ Include: | @@ -1379,7 +1372,7 @@ Include: | ||
1379 | copiaSeguranca($map_file); | 1372 | copiaSeguranca($map_file); |
1380 | $m = new Analise($map_file,$tema); | 1373 | $m = new Analise($map_file,$tema); |
1381 | if(!isset($tema)){$tema = "";} | 1374 | if(!isset($tema)){$tema = "";} |
1382 | - $cp->set_data($m->gradeDeHex($xdd,$ydd,$px,$py,$locaplic,$nptx,$npty)); | 1375 | + $retorno = $m->gradeDeHex($xdd,$ydd,$px,$py,$locaplic,$nptx,$npty); |
1383 | $m->salva(); | 1376 | $m->salva(); |
1384 | break; | 1377 | break; |
1385 | /* | 1378 | /* |
@@ -1400,7 +1393,7 @@ Include: | @@ -1400,7 +1393,7 @@ Include: | ||
1400 | case "sphPT2shp": | 1393 | case "sphPT2shp": |
1401 | include_once("classe_shp.php"); | 1394 | include_once("classe_shp.php"); |
1402 | $m = new SHP($map_file,$tema); | 1395 | $m = new SHP($map_file,$tema); |
1403 | - $cp->set_data($m->shpPT2shp($locaplic,$para)); | 1396 | + $retorno = $m->shpPT2shp($locaplic,$para); |
1404 | $m->salva(); | 1397 | $m->salva(); |
1405 | break; | 1398 | break; |
1406 | /* | 1399 | /* |
@@ -1414,7 +1407,7 @@ Include: | @@ -1414,7 +1407,7 @@ Include: | ||
1414 | case "listaPontosShape": | 1407 | case "listaPontosShape": |
1415 | include_once("classe_shp.php"); | 1408 | include_once("classe_shp.php"); |
1416 | $m = new SHP($map_file,$tema); | 1409 | $m = new SHP($map_file,$tema); |
1417 | - $cp->set_data($m->listaPontosShape()); | 1410 | + $retorno = $m->listaPontosShape(); |
1418 | break; | 1411 | break; |
1419 | /* | 1412 | /* |
1420 | Property: criashpvazio | 1413 | Property: criashpvazio |
@@ -1429,7 +1422,7 @@ Include: | @@ -1429,7 +1422,7 @@ Include: | ||
1429 | $m = new SHP($map_file); | 1422 | $m = new SHP($map_file); |
1430 | if(!isset($tituloTema)) | 1423 | if(!isset($tituloTema)) |
1431 | {$tituloTema = "";} | 1424 | {$tituloTema = "";} |
1432 | - $cp->set_data($m->criaSHPvazio($tituloTema)); | 1425 | + $retorno = $m->criaSHPvazio($tituloTema); |
1433 | $m->salva(); | 1426 | $m->salva(); |
1434 | break; | 1427 | break; |
1435 | /* | 1428 | /* |
@@ -1459,7 +1452,7 @@ Include: | @@ -1459,7 +1452,7 @@ Include: | ||
1459 | case "pegaxyUltimoPonto": | 1452 | case "pegaxyUltimoPonto": |
1460 | include_once("classe_shp.php"); | 1453 | include_once("classe_shp.php"); |
1461 | $m = new SHP($map_file,$tema); | 1454 | $m = new SHP($map_file,$tema); |
1462 | - $cp->set_data($m->ultimoXY()); | 1455 | + $retorno = $m->ultimoXY(); |
1463 | break; | 1456 | break; |
1464 | 1457 | ||
1465 | /* | 1458 | /* |
@@ -1476,7 +1469,7 @@ Include: | @@ -1476,7 +1469,7 @@ Include: | ||
1476 | include_once("classe_shp.php"); | 1469 | include_once("classe_shp.php"); |
1477 | copiaSeguranca($map_file); | 1470 | copiaSeguranca($map_file); |
1478 | $m = new SHP($map_file,$tema,$locaplic); | 1471 | $m = new SHP($map_file,$tema,$locaplic); |
1479 | - $cp->set_data($m->insereSHPgrafico($x,$y,$itens,$width,$inclinacao,$shadow_height)); | 1472 | + $retorno = $m->insereSHPgrafico($x,$y,$itens,$width,$inclinacao,$shadow_height); |
1480 | break; | 1473 | break; |
1481 | /* | 1474 | /* |
1482 | Property: mostrawkt | 1475 | Property: mostrawkt |
@@ -1486,7 +1479,7 @@ Gera string wkt de um conjunto de pontos. | @@ -1486,7 +1479,7 @@ Gera string wkt de um conjunto de pontos. | ||
1486 | */ | 1479 | */ |
1487 | case "mostrawkt": | 1480 | case "mostrawkt": |
1488 | $res = xy2wkt($xy); | 1481 | $res = xy2wkt($xy); |
1489 | - $cp->set_data(array($res["ponto"],$res["linha"],$res["poligono"])); | 1482 | + $retorno = array($res["ponto"],$res["linha"],$res["poligono"]); |
1490 | break; | 1483 | break; |
1491 | /* | 1484 | /* |
1492 | Section: Gráficos | 1485 | Section: Gráficos |
@@ -1505,7 +1498,7 @@ Pega os dados necessários para a geração dos gráficos da ferramenta seleção | @@ -1505,7 +1498,7 @@ Pega os dados necessários para a geração dos gráficos da ferramenta seleção | ||
1505 | {$exclui = "";} | 1498 | {$exclui = "";} |
1506 | if(!isset($tipo)) | 1499 | if(!isset($tipo)) |
1507 | {$tipo = "nenhum";} | 1500 | {$tipo = "nenhum";} |
1508 | - $cp->set_data(iniciaDadosGrafico($map_file,$tema,$exclui,$itemclasses,$itemvalores,$tipo,false)); | 1501 | + $retorno = iniciaDadosGrafico($map_file,$tema,$exclui,$itemclasses,$itemvalores,$tipo,false); |
1509 | break; | 1502 | break; |
1510 | /* | 1503 | /* |
1511 | Property: graficotema | 1504 | Property: graficotema |
@@ -1536,8 +1529,7 @@ Include: | @@ -1536,8 +1529,7 @@ Include: | ||
1536 | //$_SESSION["utilizacgi"] = "nao"; | 1529 | //$_SESSION["utilizacgi"] = "nao"; |
1537 | //$utilizacgi = "nao"; | 1530 | //$utilizacgi = "nao"; |
1538 | restauraCon($map_file,$postgis_mapa); | 1531 | restauraCon($map_file,$postgis_mapa); |
1539 | - $cp->register('fusaoGrafico'); | ||
1540 | - $cp->start(); | 1532 | + $retorno = fusaoGrafico(); |
1541 | break; | 1533 | break; |
1542 | /* | 1534 | /* |
1543 | Property: graficoestrela | 1535 | Property: graficoestrela |
@@ -1549,8 +1541,7 @@ Include: | @@ -1549,8 +1541,7 @@ Include: | ||
1549 | */ | 1541 | */ |
1550 | case "graficoestrela": | 1542 | case "graficoestrela": |
1551 | include_once("graficos.php"); | 1543 | include_once("graficos.php"); |
1552 | - $cp->register('graficoEstrela'); | ||
1553 | - $cp->start(); | 1544 | + $retorno = graficoEstrela(); |
1554 | break; | 1545 | break; |
1555 | /* | 1546 | /* |
1556 | Property: graficoscatter | 1547 | Property: graficoscatter |
@@ -1562,8 +1553,7 @@ Include: | @@ -1562,8 +1553,7 @@ Include: | ||
1562 | */ | 1553 | */ |
1563 | case "graficoscatter": | 1554 | case "graficoscatter": |
1564 | include_once("graficos.php"); | 1555 | include_once("graficos.php"); |
1565 | - $cp->register('graficoScatter'); | ||
1566 | - $cp->start(); | 1556 | + $retorno = graficoScatter(); |
1567 | break; | 1557 | break; |
1568 | /* | 1558 | /* |
1569 | Property: graficoscatterbins | 1559 | Property: graficoscatterbins |
@@ -1575,8 +1565,7 @@ Include: | @@ -1575,8 +1565,7 @@ Include: | ||
1575 | */ | 1565 | */ |
1576 | case "graficoscatterbins": | 1566 | case "graficoscatterbins": |
1577 | include_once("graficos.php"); | 1567 | include_once("graficos.php"); |
1578 | - $cp->register('graficoScatterBins'); | ||
1579 | - $cp->start(); | 1568 | + $retorno = graficoScatterBins(); |
1580 | break; | 1569 | break; |
1581 | /* | 1570 | /* |
1582 | Property: graficolinhas | 1571 | Property: graficolinhas |
@@ -1588,8 +1577,7 @@ Include: | @@ -1588,8 +1577,7 @@ Include: | ||
1588 | */ | 1577 | */ |
1589 | case "graficolinhas": | 1578 | case "graficolinhas": |
1590 | include_once("graficos.php"); | 1579 | include_once("graficos.php"); |
1591 | - $cp->register('graficoLinhas'); | ||
1592 | - $cp->start(); | 1580 | + $retorno = graficoLinhas(); |
1593 | break; | 1581 | break; |
1594 | /* | 1582 | /* |
1595 | Property: graficohist | 1583 | Property: graficohist |
@@ -1601,8 +1589,7 @@ Include: | @@ -1601,8 +1589,7 @@ Include: | ||
1601 | */ | 1589 | */ |
1602 | case "graficohist": | 1590 | case "graficohist": |
1603 | include_once("graficos.php"); | 1591 | include_once("graficos.php"); |
1604 | - $cp->register('graficoHist'); | ||
1605 | - $cp->start(); | 1592 | + $retorno = graficoHist(); |
1606 | break; | 1593 | break; |
1607 | /* | 1594 | /* |
1608 | Property: graficobarras | 1595 | Property: graficobarras |
@@ -1614,8 +1601,7 @@ Include: | @@ -1614,8 +1601,7 @@ Include: | ||
1614 | */ | 1601 | */ |
1615 | case "graficobarras": | 1602 | case "graficobarras": |
1616 | include_once("graficos.php"); | 1603 | include_once("graficos.php"); |
1617 | - $cp->register('graficoBarras'); | ||
1618 | - $cp->start(); | 1604 | + $retorno = graficoBarras(); |
1619 | break; | 1605 | break; |
1620 | /* | 1606 | /* |
1621 | Property: graficopizza | 1607 | Property: graficopizza |
@@ -1627,8 +1613,7 @@ Include: | @@ -1627,8 +1613,7 @@ Include: | ||
1627 | */ | 1613 | */ |
1628 | case "graficopizza": | 1614 | case "graficopizza": |
1629 | include_once("graficos.php"); | 1615 | include_once("graficos.php"); |
1630 | - $cp->register('graficoPizza'); | ||
1631 | - $cp->start(); | 1616 | + $retorno = graficoPizza(); |
1632 | break; | 1617 | break; |
1633 | /* | 1618 | /* |
1634 | Section: Menu de temas | 1619 | Section: Menu de temas |
@@ -1651,7 +1636,7 @@ Pega a lista de tags registrados nos menus de temas. | @@ -1651,7 +1636,7 @@ Pega a lista de tags registrados nos menus de temas. | ||
1651 | } | 1636 | } |
1652 | include_once("classe_menutemas.php"); | 1637 | include_once("classe_menutemas.php"); |
1653 | $m = new Menutemas($map_file,$perfil,$locsistemas,$locaplic,$menutemas,$urli3geo); | 1638 | $m = new Menutemas($map_file,$perfil,$locsistemas,$locaplic,$menutemas,$urli3geo); |
1654 | - $cp->set_data($m->listatags($rss,$nrss)); | 1639 | + $retorno = $m->listatags($rss,$nrss); |
1655 | break; | 1640 | break; |
1656 | /* | 1641 | /* |
1657 | Property: pegalistademenus | 1642 | Property: pegalistademenus |
@@ -1670,7 +1655,7 @@ Parametros: | @@ -1670,7 +1655,7 @@ Parametros: | ||
1670 | } | 1655 | } |
1671 | include_once("classe_menutemas.php"); | 1656 | include_once("classe_menutemas.php"); |
1672 | $m = new Menutemas($map_file,$perfil,$locsistemas,$locaplic,$menutemas,$urli3geo,$editores); | 1657 | $m = new Menutemas($map_file,$perfil,$locsistemas,$locaplic,$menutemas,$urli3geo,$editores); |
1673 | - $cp->set_data($m->pegaListaDeMenus()); | 1658 | + $retorno = $m->pegaListaDeMenus(); |
1674 | break; | 1659 | break; |
1675 | /* | 1660 | /* |
1676 | Property: pegalistadegrupos | 1661 | Property: pegalistadegrupos |
@@ -1703,7 +1688,7 @@ Include: | @@ -1703,7 +1688,7 @@ Include: | ||
1703 | if(!isset($idmenu)){$idmenu="";} | 1688 | if(!isset($idmenu)){$idmenu="";} |
1704 | if(!isset($listasistemas)){$listasistemas="nao";} | 1689 | if(!isset($listasistemas)){$listasistemas="nao";} |
1705 | if(!isset($listasgrupos)){$listasgrupos="nao";} | 1690 | if(!isset($listasgrupos)){$listasgrupos="nao";} |
1706 | - $cp->set_data(array("idmenu"=>$idmenu,"grupos"=>$m->pegaListaDeGrupos($idmenu,$listasistemas,$listasgrupos))); | 1691 | + $retorno = array("idmenu"=>$idmenu,"grupos"=>$m->pegaListaDeGrupos($idmenu,$listasistemas,$listasgrupos)); |
1707 | break; | 1692 | break; |
1708 | /* | 1693 | /* |
1709 | Property: pegaSistemas | 1694 | Property: pegaSistemas |
@@ -1720,7 +1705,7 @@ Pega a lista de sistemas. | @@ -1720,7 +1705,7 @@ Pega a lista de sistemas. | ||
1720 | } | 1705 | } |
1721 | include_once("classe_menutemas.php"); | 1706 | include_once("classe_menutemas.php"); |
1722 | $m = new Menutemas($map_file,$perfil,$locsistemas,$locaplic,"","",$editores); | 1707 | $m = new Menutemas($map_file,$perfil,$locsistemas,$locaplic,"","",$editores); |
1723 | - $cp->set_data($m->pegaSistemas()); | 1708 | + $retorno = $m->pegaSistemas(); |
1724 | break; | 1709 | break; |
1725 | 1710 | ||
1726 | /* | 1711 | /* |
@@ -1742,7 +1727,7 @@ Include: | @@ -1742,7 +1727,7 @@ Include: | ||
1742 | include_once("classe_menutemas.php"); | 1727 | include_once("classe_menutemas.php"); |
1743 | $m = new Menutemas($map_file,$perfil,$locsistemas,$locaplic,$menutemas,$urli3geo,$editores); | 1728 | $m = new Menutemas($map_file,$perfil,$locsistemas,$locaplic,$menutemas,$urli3geo,$editores); |
1744 | if(!isset($idmenu)){$idmenu = "";} | 1729 | if(!isset($idmenu)){$idmenu = "";} |
1745 | - $cp->set_data($m->pegaListaDeSubGrupos($grupo,$idmenu)); | 1730 | + $retorno = $m->pegaListaDeSubGrupos($grupo,$idmenu); |
1746 | break; | 1731 | break; |
1747 | /* | 1732 | /* |
1748 | Property: pegalistadetemas | 1733 | Property: pegalistadetemas |
@@ -1763,7 +1748,7 @@ Include: | @@ -1763,7 +1748,7 @@ Include: | ||
1763 | include_once("classe_menutemas.php"); | 1748 | include_once("classe_menutemas.php"); |
1764 | $m = new Menutemas($map_file,$perfil,$locsistemas,$locaplic,$menutemas,$urli3geo,$editores); | 1749 | $m = new Menutemas($map_file,$perfil,$locsistemas,$locaplic,$menutemas,$urli3geo,$editores); |
1765 | if(!isset($idmenu)){$idmenu = "";} | 1750 | if(!isset($idmenu)){$idmenu = "";} |
1766 | - $cp->set_data(array("temas"=>$m->pegaListaDeTemas($grupo,$subgrupo,$idmenu))); | 1751 | + $retorno = array("temas"=>$m->pegaListaDeTemas($grupo,$subgrupo,$idmenu)); |
1767 | break; | 1752 | break; |
1768 | /* | 1753 | /* |
1769 | Property: procurartemas | 1754 | Property: procurartemas |
@@ -1783,7 +1768,7 @@ Include: | @@ -1783,7 +1768,7 @@ Include: | ||
1783 | } | 1768 | } |
1784 | include_once("classe_menutemas.php"); | 1769 | include_once("classe_menutemas.php"); |
1785 | $m = new Menutemas($map_file,$perfil,$locsistemas,$locaplic,$menutemas,$urli3geo,$editores); | 1770 | $m = new Menutemas($map_file,$perfil,$locsistemas,$locaplic,$menutemas,$urli3geo,$editores); |
1786 | - $cp->set_data($m->procurartemas($procurar)); | 1771 | + $retorno = $m->procurartemas($procurar); |
1787 | break; | 1772 | break; |
1788 | /* | 1773 | /* |
1789 | Property: pegaMapas | 1774 | Property: pegaMapas |
@@ -1805,7 +1790,7 @@ Include: | @@ -1805,7 +1790,7 @@ Include: | ||
1805 | {include_once($locaplic."/ms_configura.php");} | 1790 | {include_once($locaplic."/ms_configura.php");} |
1806 | } | 1791 | } |
1807 | $m = new Menutemas($map_file,$perfil,$locsistemas,$locaplic,$menutemas,$urli3geo); | 1792 | $m = new Menutemas($map_file,$perfil,$locsistemas,$locaplic,$menutemas,$urli3geo); |
1808 | - $cp->set_data($m->pegaListaDeMapas($locmapas)); | 1793 | + $retorno = $m->pegaListaDeMapas($locmapas); |
1809 | break; | 1794 | break; |
1810 | /* | 1795 | /* |
1811 | Section: Webservices | 1796 | Section: Webservices |
@@ -1819,7 +1804,7 @@ Lista os canais de um georss. | @@ -1819,7 +1804,7 @@ Lista os canais de um georss. | ||
1819 | 1804 | ||
1820 | */ | 1805 | */ |
1821 | case "georssCanais": | 1806 | case "georssCanais": |
1822 | - $cp->set_data(georssCanais($servico,$map_file,$dir_tmp,$locaplic)); | 1807 | + $retorno = georssCanais($servico,$map_file,$dir_tmp,$locaplic); |
1823 | break; | 1808 | break; |
1824 | /* | 1809 | /* |
1825 | Property: getcapabilities | 1810 | Property: getcapabilities |
@@ -1831,9 +1816,8 @@ Include: | @@ -1831,9 +1816,8 @@ Include: | ||
1831 | */ | 1816 | */ |
1832 | case "getcapabilities": | 1817 | case "getcapabilities": |
1833 | include_once("wmswfs.php"); | 1818 | include_once("wmswfs.php"); |
1834 | - $cp->register('getcapabilities'); | 1819 | + $retorno = getcapabilities(); |
1835 | restauraCon($map_file,$postgis_mapa); | 1820 | restauraCon($map_file,$postgis_mapa); |
1836 | - $cp->start(); | ||
1837 | break; | 1821 | break; |
1838 | /* | 1822 | /* |
1839 | Property: getcapabilities2 | 1823 | Property: getcapabilities2 |
@@ -1845,9 +1829,8 @@ Include: | @@ -1845,9 +1829,8 @@ Include: | ||
1845 | */ | 1829 | */ |
1846 | case "getcapabilities2": | 1830 | case "getcapabilities2": |
1847 | include_once("wmswfs.php"); | 1831 | include_once("wmswfs.php"); |
1848 | - $cp->register('getcapabilities2'); | 1832 | + $retorno = getcapabilities2(); |
1849 | restauraCon($map_file,$postgis_mapa); | 1833 | restauraCon($map_file,$postgis_mapa); |
1850 | - $cp->start(); | ||
1851 | break; | 1834 | break; |
1852 | /* | 1835 | /* |
1853 | Property: getcapabilities3 | 1836 | Property: getcapabilities3 |
@@ -1859,9 +1842,8 @@ Include: | @@ -1859,9 +1842,8 @@ Include: | ||
1859 | */ | 1842 | */ |
1860 | case "getcapabilities3": | 1843 | case "getcapabilities3": |
1861 | include_once("wmswfs.php"); | 1844 | include_once("wmswfs.php"); |
1862 | - $cp->register('getcapabilities3'); | 1845 | + $retorno = getcapabilities3(); |
1863 | restauraCon($map_file,$postgis_mapa); | 1846 | restauraCon($map_file,$postgis_mapa); |
1864 | - $cp->start(); | ||
1865 | break; | 1847 | break; |
1866 | /* | 1848 | /* |
1867 | Property: temaswms | 1849 | Property: temaswms |
@@ -1874,8 +1856,7 @@ Include: | @@ -1874,8 +1856,7 @@ Include: | ||
1874 | case "temaswms": | 1856 | case "temaswms": |
1875 | include_once("wmswfs.php"); | 1857 | include_once("wmswfs.php"); |
1876 | restauraCon($map_file,$postgis_mapa); | 1858 | restauraCon($map_file,$postgis_mapa); |
1877 | - $cp->register('temaswms'); | ||
1878 | - $cp->start(); | 1859 | + $retorno = temaswms(); |
1879 | break; | 1860 | break; |
1880 | /* | 1861 | /* |
1881 | Property: listaLayersWMS | 1862 | Property: listaLayersWMS |
@@ -1887,8 +1868,7 @@ Include: | @@ -1887,8 +1868,7 @@ Include: | ||
1887 | */ | 1868 | */ |
1888 | case "listaLayersWMS": | 1869 | case "listaLayersWMS": |
1889 | include_once("wmswfs.php"); | 1870 | include_once("wmswfs.php"); |
1890 | - $cp->register('listaLayersWMS'); | ||
1891 | - $cp->start(); | 1871 | + $retorno = listaLayersWMS(); |
1892 | break; | 1872 | break; |
1893 | /* | 1873 | /* |
1894 | Section: Atributos | 1874 | Section: Atributos |
@@ -1904,7 +1884,7 @@ Include: | @@ -1904,7 +1884,7 @@ Include: | ||
1904 | <classe_atributos.php> | 1884 | <classe_atributos.php> |
1905 | */ | 1885 | */ |
1906 | case "buscaRapida": | 1886 | case "buscaRapida": |
1907 | - $cp->set_data(buscaRapida($servico,$palavra)); | 1887 | + $retorno = buscaRapida($servico,$palavra); |
1908 | break; | 1888 | break; |
1909 | /* | 1889 | /* |
1910 | Property: listaitens | 1890 | Property: listaitens |
@@ -1917,7 +1897,7 @@ Include: | @@ -1917,7 +1897,7 @@ Include: | ||
1917 | case "listaitens": | 1897 | case "listaitens": |
1918 | include_once("classe_atributos.php"); | 1898 | include_once("classe_atributos.php"); |
1919 | $m = new Atributos($map_file,$tema); | 1899 | $m = new Atributos($map_file,$tema); |
1920 | - $cp->set_data($m->listaItens()); | 1900 | + $retorno = $m->listaItens(); |
1921 | break; | 1901 | break; |
1922 | /* | 1902 | /* |
1923 | Property: listavaloresitens | 1903 | Property: listavaloresitens |
@@ -1931,7 +1911,7 @@ Include: | @@ -1931,7 +1911,7 @@ Include: | ||
1931 | include_once("classe_atributos.php"); | 1911 | include_once("classe_atributos.php"); |
1932 | if(!isset($tema)){$tema = "";} | 1912 | if(!isset($tema)){$tema = "";} |
1933 | $m = new Atributos($map_file,$tema); | 1913 | $m = new Atributos($map_file,$tema); |
1934 | - $cp->set_data($m->buscaRegistros($palavra,$lista,$tipo,$onde)); | 1914 | + $retorno = $m->buscaRegistros($palavra,$lista,$tipo,$onde); |
1935 | break; | 1915 | break; |
1936 | /* | 1916 | /* |
1937 | Property: identifica | 1917 | Property: identifica |
@@ -1948,7 +1928,7 @@ Include: | @@ -1948,7 +1928,7 @@ Include: | ||
1948 | if (!isset($resolucao)){$resolucao = 5;} | 1928 | if (!isset($resolucao)){$resolucao = 5;} |
1949 | include_once("classe_atributos.php"); | 1929 | include_once("classe_atributos.php"); |
1950 | $m = new Atributos($map_file,$tema); | 1930 | $m = new Atributos($map_file,$tema); |
1951 | - $cp->set_data($m->identifica($opcao,$xy,$resolucao)); | 1931 | + $retorno = $m->identifica($opcao,$xy,$resolucao); |
1952 | break; | 1932 | break; |
1953 | /* | 1933 | /* |
1954 | Property: identifica2 | 1934 | Property: identifica2 |
@@ -1963,7 +1943,7 @@ Include: | @@ -1963,7 +1943,7 @@ Include: | ||
1963 | if (!isset($resolucao)){$resolucao = 5;} | 1943 | if (!isset($resolucao)){$resolucao = 5;} |
1964 | include_once("classe_atributos.php"); | 1944 | include_once("classe_atributos.php"); |
1965 | $m = new Atributos($map_file,$tema); | 1945 | $m = new Atributos($map_file,$tema); |
1966 | - $cp->set_data($m->identifica2($opcao,$xy,$resolucao)); | 1946 | + $retorno = $m->identifica2($opcao,$xy,$resolucao); |
1967 | break; | 1947 | break; |
1968 | 1948 | ||
1969 | /* | 1949 | /* |
@@ -1979,7 +1959,7 @@ Include: | @@ -1979,7 +1959,7 @@ Include: | ||
1979 | include_once("classe_atributos.php"); | 1959 | include_once("classe_atributos.php"); |
1980 | $m = new Atributos($map_file,$tema); | 1960 | $m = new Atributos($map_file,$tema); |
1981 | $xy = explode(",",$xy); | 1961 | $xy = explode(",",$xy); |
1982 | - $cp->set_data($m->identificaQBP($tema,$xy[0],$xy[1],$map_file,$resolucao,$item,$tiporetorno="unico")); | 1962 | + $retorno = $m->identificaQBP($tema,$xy[0],$xy[1],$map_file,$resolucao,$item,$tiporetorno="unico"); |
1983 | break; | 1963 | break; |
1984 | /* | 1964 | /* |
1985 | Property: estatistica | 1965 | Property: estatistica |
@@ -1992,7 +1972,7 @@ Include: | @@ -1992,7 +1972,7 @@ Include: | ||
1992 | case "estatistica": | 1972 | case "estatistica": |
1993 | include_once("classe_atributos.php"); | 1973 | include_once("classe_atributos.php"); |
1994 | $m = new Atributos($map_file,$tema); | 1974 | $m = new Atributos($map_file,$tema); |
1995 | - $cp->set_data($m->estatDescritivas($item,$exclui)); | 1975 | + $retorno = $m->estatDescritivas($item,$exclui); |
1996 | break; | 1976 | break; |
1997 | /* | 1977 | /* |
1998 | Property: listatexto | 1978 | Property: listatexto |
@@ -2005,7 +1985,7 @@ Include: | @@ -2005,7 +1985,7 @@ Include: | ||
2005 | case "listatexto": | 1985 | case "listatexto": |
2006 | include_once("classe_atributos.php"); | 1986 | include_once("classe_atributos.php"); |
2007 | $m = new Atributos($map_file,$tema); | 1987 | $m = new Atributos($map_file,$tema); |
2008 | - $cp->set_data($m->itensTexto($tipo)); | 1988 | + $retorno = $m->itensTexto($tipo); |
2009 | break; | 1989 | break; |
2010 | /* | 1990 | /* |
2011 | Property: listaregistros | 1991 | Property: listaregistros |
@@ -2023,7 +2003,8 @@ Include: | @@ -2023,7 +2003,8 @@ Include: | ||
2023 | if(!isset($fim)){$fim = "";} | 2003 | if(!isset($fim)){$fim = "";} |
2024 | if(!isset($tipolista)){$tipolista = "";} | 2004 | if(!isset($tipolista)){$tipolista = "";} |
2025 | if(!isset($itemtema)){$itemtema = "";} | 2005 | if(!isset($itemtema)){$itemtema = "";} |
2026 | - $cp->set_data($m->listaRegistros($itemtema,$tipo,"",$inicio,$fim,$tipolista)); | 2006 | + //$cp->set_data($m->listaRegistros($itemtema,$tipo,"",$inicio,$fim,$tipolista)); |
2007 | + $retorno = $m->listaRegistros($itemtema,$tipo,"",$inicio,$fim,$tipolista); | ||
2027 | break; | 2008 | break; |
2028 | /* | 2009 | /* |
2029 | Property: extregistros | 2010 | Property: extregistros |
@@ -2036,7 +2017,7 @@ Include: | @@ -2036,7 +2017,7 @@ Include: | ||
2036 | case "extregistros": | 2017 | case "extregistros": |
2037 | include_once("classe_atributos.php"); | 2018 | include_once("classe_atributos.php"); |
2038 | $m = new Atributos($map_file,$tema); | 2019 | $m = new Atributos($map_file,$tema); |
2039 | - $cp->set_data($m->extensaoRegistro($registro)); | 2020 | + $retorno = $m->extensaoRegistro($registro); |
2040 | $m->salva(); | 2021 | $m->salva(); |
2041 | break; | 2022 | break; |
2042 | /* | 2023 | /* |
@@ -2051,7 +2032,7 @@ Retorna coordenadas utm a partir de coordenadas geo | @@ -2051,7 +2032,7 @@ Retorna coordenadas utm a partir de coordenadas geo | ||
2051 | */ | 2032 | */ |
2052 | case "geo2utm": | 2033 | case "geo2utm": |
2053 | $zona = geo2zonaUTM($x); | 2034 | $zona = geo2zonaUTM($x); |
2054 | - $cp->set_data(geo2utm($x,$y,$zona)); | 2035 | + $retorno = geo2utm($x,$y,$zona); |
2055 | break; | 2036 | break; |
2056 | /* | 2037 | /* |
2057 | Property: desativacgi | 2038 | Property: desativacgi |
@@ -2061,7 +2042,7 @@ Desativa o modo cgi. | @@ -2061,7 +2042,7 @@ Desativa o modo cgi. | ||
2061 | */ | 2042 | */ |
2062 | case "desativacgi": | 2043 | case "desativacgi": |
2063 | $_SESSION["utilizacgi"] = "nao"; | 2044 | $_SESSION["utilizacgi"] = "nao"; |
2064 | - $cp->set_data($_SESSION["utilizacgi"]); | 2045 | + $retorno = $_SESSION["utilizacgi"]; |
2065 | break; | 2046 | break; |
2066 | 2047 | ||
2067 | /* | 2048 | /* |
@@ -2159,7 +2140,7 @@ Include: | @@ -2159,7 +2140,7 @@ Include: | ||
2159 | $m = new Navegacao($map_file); | 2140 | $m = new Navegacao($map_file); |
2160 | $m->aplicaResolucao($resolucao); | 2141 | $m->aplicaResolucao($resolucao); |
2161 | //$m->desabilitaRASTER(); | 2142 | //$m->desabilitaRASTER(); |
2162 | - $cp->set_data(($m->mapa->width).",".($m->mapa->height).",".$m->gravaImagemCorpo()); | 2143 | + $retorno = ($m->mapa->width).",".($m->mapa->height).",".$m->gravaImagemCorpo(); |
2163 | break; | 2144 | break; |
2164 | /* | 2145 | /* |
2165 | Property: localizaIP | 2146 | Property: localizaIP |
@@ -2180,7 +2161,7 @@ Include: | @@ -2180,7 +2161,7 @@ Include: | ||
2180 | $ip = pegaIPcliente2(); | 2161 | $ip = pegaIPcliente2(); |
2181 | $r = ip2geo($ip); | 2162 | $r = ip2geo($ip); |
2182 | } | 2163 | } |
2183 | - $cp->set_data($r); | 2164 | + $retorno = $r; |
2184 | break; | 2165 | break; |
2185 | 2166 | ||
2186 | /* | 2167 | /* |
@@ -2223,33 +2204,33 @@ Include: | @@ -2223,33 +2204,33 @@ Include: | ||
2223 | $m = new Legenda($map_file,$locaplic,$tema); | 2204 | $m = new Legenda($map_file,$locaplic,$tema); |
2224 | if ($opcao == "excluiestilo") | 2205 | if ($opcao == "excluiestilo") |
2225 | { | 2206 | { |
2226 | - $cp->set_data($m->excluiEstilo($classe,$estilo)); | 2207 | + $retorno = $m->excluiEstilo($classe,$estilo); |
2227 | $m->salva(); | 2208 | $m->salva(); |
2228 | } | 2209 | } |
2229 | if ($opcao == "adicionaestilo") | 2210 | if ($opcao == "adicionaestilo") |
2230 | { | 2211 | { |
2231 | - $cp->set_data($m->adicionaEstilo($classe,$estilo)); | 2212 | + $retorno = $m->adicionaEstilo($classe,$estilo); |
2232 | $m->salva(); | 2213 | $m->salva(); |
2233 | } | 2214 | } |
2234 | if ($opcao == "sobeestilo") | 2215 | if ($opcao == "sobeestilo") |
2235 | { | 2216 | { |
2236 | - $cp->set_data($m->sobeEstilo ($classe,$estilo)); | 2217 | + $retorno = $m->sobeEstilo ($classe,$estilo); |
2237 | $m->salva(); | 2218 | $m->salva(); |
2238 | } | 2219 | } |
2239 | if ($opcao == "desceestilo") | 2220 | if ($opcao == "desceestilo") |
2240 | { | 2221 | { |
2241 | - $cp->set_data($m->desceEstilo ($classe,$estilo)); | 2222 | + $retorno = $m->desceEstilo ($classe,$estilo); |
2242 | $m->salva(); | 2223 | $m->salva(); |
2243 | } | 2224 | } |
2244 | if ($opcao == "aplica") | 2225 | if ($opcao == "aplica") |
2245 | { | 2226 | { |
2246 | - $cp->set_data($m->aplicaParametro($classe,$estilo,$outlinecolor,$backgroundcolor,$color,$symbolname,$size)); | 2227 | + $retorno = $m->aplicaParametro($classe,$estilo,$outlinecolor,$backgroundcolor,$color,$symbolname,$size); |
2247 | $m->salva(); | 2228 | $m->salva(); |
2248 | } | 2229 | } |
2249 | if ($opcao == "listaSimbolos") | 2230 | if ($opcao == "listaSimbolos") |
2250 | - {$cp->set_data($m->listaSimbolos($tipo,$dir_tmp,$imgdir,$onclick));} | 2231 | + {$retorno = $m->listaSimbolos($tipo,$dir_tmp,$imgdir,$onclick);} |
2251 | if ($opcao == "pegaparametros") | 2232 | if ($opcao == "pegaparametros") |
2252 | - {$cp->set_data($m->pegaParametros($classe));} | 2233 | + {$retorno = $m->pegaParametros($classe);} |
2253 | break; | 2234 | break; |
2254 | /* | 2235 | /* |
2255 | Property: editalegenda | 2236 | Property: editalegenda |
@@ -2264,7 +2245,7 @@ Include: | @@ -2264,7 +2245,7 @@ Include: | ||
2264 | $m = new Legenda($map_file,$locaplic,$tema); | 2245 | $m = new Legenda($map_file,$locaplic,$tema); |
2265 | $r = $m->tabelaLegenda(); | 2246 | $r = $m->tabelaLegenda(); |
2266 | if (!$r){$r = "erro.Erro legenda nao disponivel";} | 2247 | if (!$r){$r = "erro.Erro legenda nao disponivel";} |
2267 | - $cp->set_data($r); | 2248 | + $retorno = $r; |
2268 | break; | 2249 | break; |
2269 | /* | 2250 | /* |
2270 | Property: criaLegendaHTML | 2251 | Property: criaLegendaHTML |
@@ -2281,7 +2262,7 @@ Include: | @@ -2281,7 +2262,7 @@ Include: | ||
2281 | $m = new Legenda($map_file,$locaplic,$tema,$templateLegenda); | 2262 | $m = new Legenda($map_file,$locaplic,$tema,$templateLegenda); |
2282 | $r = $m->criaLegenda(); | 2263 | $r = $m->criaLegenda(); |
2283 | if(!$r){$r = "erro. Legenda nao disponivel";} | 2264 | if(!$r){$r = "erro. Legenda nao disponivel";} |
2284 | - $cp->set_data($r); | 2265 | + $retorno = $r; |
2285 | break; | 2266 | break; |
2286 | /* | 2267 | /* |
2287 | Property: testaLegenda | 2268 | Property: testaLegenda |
@@ -2296,7 +2277,7 @@ Include: | @@ -2296,7 +2277,7 @@ Include: | ||
2296 | copy($map_file,str_replace(".map","testeleg.map",$map_file)); | 2277 | copy($map_file,str_replace(".map","testeleg.map",$map_file)); |
2297 | $m = new Legenda(str_replace(".map","testeleg.map",$map_file)); | 2278 | $m = new Legenda(str_replace(".map","testeleg.map",$map_file)); |
2298 | $m->aplicaParametrosLegImg($fonte,$imagecolor,$position,$status,$outlinecolor,$keyspacingy,$keyspacingx,$keysizey,$keysizex,$height,$width,$labelsize); | 2279 | $m->aplicaParametrosLegImg($fonte,$imagecolor,$position,$status,$outlinecolor,$keyspacingy,$keyspacingx,$keysizey,$keysizex,$height,$width,$labelsize); |
2299 | - $cp->set_data($m->legendaGrafica()); | 2280 | + $retorno = $m->legendaGrafica(); |
2300 | break; | 2281 | break; |
2301 | /* | 2282 | /* |
2302 | Property: contagemclasse | 2283 | Property: contagemclasse |
@@ -2311,7 +2292,7 @@ Include: | @@ -2311,7 +2292,7 @@ Include: | ||
2311 | $m = new Legenda($map_file,$locaplic,$tema); | 2292 | $m = new Legenda($map_file,$locaplic,$tema); |
2312 | $r = $m->tabelaLegenda("sim"); | 2293 | $r = $m->tabelaLegenda("sim"); |
2313 | if (!$r){$r = "erro.Erro legenda nao disponivel";} | 2294 | if (!$r){$r = "erro.Erro legenda nao disponivel";} |
2314 | - $cp->set_data($r); | 2295 | + $retorno = $r; |
2315 | break; | 2296 | break; |
2316 | /* | 2297 | /* |
2317 | Property: criaLegendaImagem | 2298 | Property: criaLegendaImagem |
@@ -2324,7 +2305,7 @@ Include: | @@ -2324,7 +2305,7 @@ Include: | ||
2324 | case "criaLegendaImagem": | 2305 | case "criaLegendaImagem": |
2325 | include_once("classe_legenda.php"); | 2306 | include_once("classe_legenda.php"); |
2326 | $m = new Legenda($map_file); | 2307 | $m = new Legenda($map_file); |
2327 | - $cp->set_data($m->legendaGrafica()); | 2308 | + $retorno = $m->legendaGrafica(); |
2328 | break; | 2309 | break; |
2329 | /* | 2310 | /* |
2330 | Property: pegaParametrosLegImg | 2311 | Property: pegaParametrosLegImg |
@@ -2337,7 +2318,7 @@ Include: | @@ -2337,7 +2318,7 @@ Include: | ||
2337 | case "pegaParametrosLegImg": | 2318 | case "pegaParametrosLegImg": |
2338 | include_once("classe_legenda.php"); | 2319 | include_once("classe_legenda.php"); |
2339 | $m = new Legenda($map_file); | 2320 | $m = new Legenda($map_file); |
2340 | - $cp->set_data($m->pegaParametrosLegImg()); | 2321 | + $retorno = $m->pegaParametrosLegImg(); |
2341 | break; | 2322 | break; |
2342 | /* | 2323 | /* |
2343 | Property: aplicaParametrosLegImg | 2324 | Property: aplicaParametrosLegImg |
@@ -2358,7 +2339,7 @@ Include: | @@ -2358,7 +2339,7 @@ Include: | ||
2358 | $utilizacgi = "nao"; | 2339 | $utilizacgi = "nao"; |
2359 | } | 2340 | } |
2360 | $m = new Legenda($map_file); | 2341 | $m = new Legenda($map_file); |
2361 | - $cp->set_data($m->aplicaParametrosLegImg($fonte,$imagecolor,$position,$status,$outlinecolor,$keyspacingy,$keyspacingx,$keysizey,$keysizex,$height,$width,$labelsize)); | 2342 | + $retorno = $m->aplicaParametrosLegImg($fonte,$imagecolor,$position,$status,$outlinecolor,$keyspacingy,$keyspacingx,$keysizey,$keysizex,$height,$width,$labelsize); |
2362 | $m->salva(); | 2343 | $m->salva(); |
2363 | break; | 2344 | break; |
2364 | /* | 2345 | /* |
@@ -2377,7 +2358,7 @@ Include: | @@ -2377,7 +2358,7 @@ Include: | ||
2377 | case "escalagrafica": | 2358 | case "escalagrafica": |
2378 | include_once("classe_escala.php"); | 2359 | include_once("classe_escala.php"); |
2379 | $m = new Escala($map_file); | 2360 | $m = new Escala($map_file); |
2380 | - $cp->set_data($m->retornaBarraEscala()); | 2361 | + $retorno = $m->retornaBarraEscala(); |
2381 | break; | 2362 | break; |
2382 | /* | 2363 | /* |
2383 | Property: testaescalagrafica | 2364 | Property: testaescalagrafica |
@@ -2390,7 +2371,7 @@ Include: | @@ -2390,7 +2371,7 @@ Include: | ||
2390 | case "testaescalagrafica": | 2371 | case "testaescalagrafica": |
2391 | include_once("classe_escala.php"); | 2372 | include_once("classe_escala.php"); |
2392 | $m = new Escala($map_file); | 2373 | $m = new Escala($map_file); |
2393 | - $cp->set_data($m->testaescalagrafica($w,$h,$estilo,$intervalos,$unidade,$cor,$bcor,$ocor)); | 2374 | + $retorno = $m->testaescalagrafica($w,$h,$estilo,$intervalos,$unidade,$cor,$bcor,$ocor); |
2394 | break; | 2375 | break; |
2395 | /* | 2376 | /* |
2396 | Property: escalaparametros | 2377 | Property: escalaparametros |
@@ -2403,7 +2384,7 @@ Include: | @@ -2403,7 +2384,7 @@ Include: | ||
2403 | case "escalaparametros": | 2384 | case "escalaparametros": |
2404 | include_once("classe_escala.php"); | 2385 | include_once("classe_escala.php"); |
2405 | $m = new Escala($map_file); | 2386 | $m = new Escala($map_file); |
2406 | - $cp->set_data($m->parametrosBarraEscala()); | 2387 | + $retorno = $m->parametrosBarraEscala(); |
2407 | break; | 2388 | break; |
2408 | /* | 2389 | /* |
2409 | Property: mudaescalagrafica | 2390 | Property: mudaescalagrafica |
@@ -2417,7 +2398,7 @@ Include: | @@ -2417,7 +2398,7 @@ Include: | ||
2417 | include_once("classe_escala.php"); | 2398 | include_once("classe_escala.php"); |
2418 | copiaSeguranca($map_file); | 2399 | copiaSeguranca($map_file); |
2419 | $m = new Escala($map_file); | 2400 | $m = new Escala($map_file); |
2420 | - $cp->set_data($m->mudaEscalaGrafica($w,$h,$estilo,$intervalos,$unidade,$cor,$bcor,$ocor)); | 2401 | + $retorno = $m->mudaEscalaGrafica($w,$h,$estilo,$intervalos,$unidade,$cor,$bcor,$ocor); |
2421 | break; | 2402 | break; |
2422 | /* | 2403 | /* |
2423 | Section: Seleção | 2404 | Section: Seleção |
@@ -2442,7 +2423,7 @@ Include: | @@ -2442,7 +2423,7 @@ Include: | ||
2442 | $m = new Selecao($map_file,$tema); | 2423 | $m = new Selecao($map_file,$tema); |
2443 | $ok[] = $m->selecaoPT($xy,$tipo,$tolerancia); | 2424 | $ok[] = $m->selecaoPT($xy,$tipo,$tolerancia); |
2444 | } | 2425 | } |
2445 | - $cp->set_data(implode(",",$ok)); | 2426 | + $retorno = implode(",",$ok); |
2446 | break; | 2427 | break; |
2447 | /* | 2428 | /* |
2448 | Property: selecaoext | 2429 | Property: selecaoext |
@@ -2461,7 +2442,7 @@ Include: | @@ -2461,7 +2442,7 @@ Include: | ||
2461 | $m = new Selecao($map_file,$tema); | 2442 | $m = new Selecao($map_file,$tema); |
2462 | $ok[] = $m->selecaoEXT($tipo); | 2443 | $ok[] = $m->selecaoEXT($tipo); |
2463 | } | 2444 | } |
2464 | - $cp->set_data(implode(",",$ok)); | 2445 | + $retorno = implode(",",$ok); |
2465 | break; | 2446 | break; |
2466 | /* | 2447 | /* |
2467 | Property: selecaobox | 2448 | Property: selecaobox |
@@ -2480,7 +2461,7 @@ Include: | @@ -2480,7 +2461,7 @@ Include: | ||
2480 | $m = new Selecao($map_file,$tema); | 2461 | $m = new Selecao($map_file,$tema); |
2481 | $ok[] = $m->selecaoBOX($tipo,$ext); | 2462 | $ok[] = $m->selecaoBOX($tipo,$ext); |
2482 | } | 2463 | } |
2483 | - $cp->set_data(implode(",",$ok)); | 2464 | + $retorno = implode(",",$ok); |
2484 | break; | 2465 | break; |
2485 | 2466 | ||
2486 | /* | 2467 | /* |
@@ -2495,7 +2476,7 @@ Include: | @@ -2495,7 +2476,7 @@ Include: | ||
2495 | include_once("classe_selecao.php"); | 2476 | include_once("classe_selecao.php"); |
2496 | copiaSeguranca($map_file); | 2477 | copiaSeguranca($map_file); |
2497 | $m = new Selecao($map_file,$tema); | 2478 | $m = new Selecao($map_file,$tema); |
2498 | - $cp->set_data($m->selecaoAtributos($tipo,$item,$operador,$valor)); | 2479 | + $retorno = $m->selecaoAtributos($tipo,$item,$operador,$valor); |
2499 | break; | 2480 | break; |
2500 | /* | 2481 | /* |
2501 | Property: selecaoatrib2 | 2482 | Property: selecaoatrib2 |
@@ -2509,7 +2490,7 @@ Include: | @@ -2509,7 +2490,7 @@ Include: | ||
2509 | include_once("classe_selecao.php"); | 2490 | include_once("classe_selecao.php"); |
2510 | copiaSeguranca($map_file); | 2491 | copiaSeguranca($map_file); |
2511 | $m = new Selecao($map_file,$tema); | 2492 | $m = new Selecao($map_file,$tema); |
2512 | - $cp->set_data($m->selecaoAtributos2($filtro,$tipo)); | 2493 | + $retorno = $m->selecaoAtributos2($filtro,$tipo); |
2513 | break; | 2494 | break; |
2514 | /* | 2495 | /* |
2515 | Property: selecaotema | 2496 | Property: selecaotema |
@@ -2528,7 +2509,7 @@ Include: | @@ -2528,7 +2509,7 @@ Include: | ||
2528 | $m = new Selecao($map_file,$tema); | 2509 | $m = new Selecao($map_file,$tema); |
2529 | $ok[] = $m->selecaoTema($temao,$tipo); | 2510 | $ok[] = $m->selecaoTema($temao,$tipo); |
2530 | } | 2511 | } |
2531 | - $cp->set_data(implode(",",$ok)); | 2512 | + $retorno = implode(",",$ok); |
2532 | break; | 2513 | break; |
2533 | /* | 2514 | /* |
2534 | Property: selecaoPoli | 2515 | Property: selecaoPoli |
@@ -2542,10 +2523,8 @@ Include: | @@ -2542,10 +2523,8 @@ Include: | ||
2542 | //esta operação é chamada com POST via cpaint | 2523 | //esta operação é chamada com POST via cpaint |
2543 | //por isso precisa ser executada com start | 2524 | //por isso precisa ser executada com start |
2544 | copiaSeguranca($map_file); | 2525 | copiaSeguranca($map_file); |
2545 | - $cp->register('selecaoPoli'); | ||
2546 | - $cp->start(); | 2526 | + $retorno = selecaoPoli(); |
2547 | restauraCon($map_file,$postgis_mapa); | 2527 | restauraCon($map_file,$postgis_mapa); |
2548 | - $cp->return_data(); | ||
2549 | break; | 2528 | break; |
2550 | /* | 2529 | /* |
2551 | Property: limpasel | 2530 | Property: limpasel |
@@ -2558,7 +2537,7 @@ Include: | @@ -2558,7 +2537,7 @@ Include: | ||
2558 | case "limpasel": | 2537 | case "limpasel": |
2559 | include_once("classe_selecao.php"); | 2538 | include_once("classe_selecao.php"); |
2560 | $m = new Selecao($map_file,$tema); | 2539 | $m = new Selecao($map_file,$tema); |
2561 | - $cp->set_data($m->selecaoLimpa()); | 2540 | + $retorno = $m->selecaoLimpa(); |
2562 | break; | 2541 | break; |
2563 | /* | 2542 | /* |
2564 | Property: incluisel | 2543 | Property: incluisel |
@@ -2571,7 +2550,7 @@ Include: | @@ -2571,7 +2550,7 @@ Include: | ||
2571 | case "incluisel": | 2550 | case "incluisel": |
2572 | include_once("classe_selecao.php"); | 2551 | include_once("classe_selecao.php"); |
2573 | $m = new Selecao($map_file,$tema); | 2552 | $m = new Selecao($map_file,$tema); |
2574 | - $cp->set_data($m->incluiSel($ids)); | 2553 | + $retorno = $m->incluiSel($ids); |
2575 | break; | 2554 | break; |
2576 | /* | 2555 | /* |
2577 | Property: criatemasel | 2556 | Property: criatemasel |
@@ -2585,7 +2564,7 @@ Include: | @@ -2585,7 +2564,7 @@ Include: | ||
2585 | include_once("classe_selecao.php"); | 2564 | include_once("classe_selecao.php"); |
2586 | copiaSeguranca($map_file); | 2565 | copiaSeguranca($map_file); |
2587 | $m = new Selecao($map_file,$tema); | 2566 | $m = new Selecao($map_file,$tema); |
2588 | - $cp->set_data($m->selecao2tema($locaplic,$dir_tmp)); | 2567 | + $retorno = $m->selecao2tema($locaplic,$dir_tmp); |
2589 | $m->salva(); | 2568 | $m->salva(); |
2590 | break; | 2569 | break; |
2591 | /* | 2570 | /* |
@@ -2606,7 +2585,7 @@ Include: | @@ -2606,7 +2585,7 @@ Include: | ||
2606 | copiaSeguranca($map_file); | 2585 | copiaSeguranca($map_file); |
2607 | $m = new Toponimia($map_file,$tema); | 2586 | $m = new Toponimia($map_file,$tema); |
2608 | if(!isset($tipo)){$tipo="";} | 2587 | if(!isset($tipo)){$tipo="";} |
2609 | - $cp->set_data($m->criaToponimia($item,$position,$partials,$offsetx,$offsety,$minfeaturesize,$mindistance,$force,$shadowcolor,$shadowsizex,$shadowsizey,$outlinecolor,$cor,$sombray,$sombrax,$sombra,$fundo,$angulo,$tamanho,$fonte,$tipo)); | 2588 | + $retorno = $m->criaToponimia($item,$position,$partials,$offsetx,$offsety,$minfeaturesize,$mindistance,$force,$shadowcolor,$shadowsizex,$shadowsizey,$outlinecolor,$cor,$sombray,$sombrax,$sombra,$fundo,$angulo,$tamanho,$fonte,$tipo); |
2610 | if ($tipo != "teste") | 2589 | if ($tipo != "teste") |
2611 | {$m->salva();} | 2590 | {$m->salva();} |
2612 | break; | 2591 | break; |
@@ -2622,7 +2601,7 @@ Include: | @@ -2622,7 +2601,7 @@ Include: | ||
2622 | include_once("classe_toponimia.php"); | 2601 | include_once("classe_toponimia.php"); |
2623 | copiaSeguranca($map_file); | 2602 | copiaSeguranca($map_file); |
2624 | $m = new Toponimia($map_file,$tema); | 2603 | $m = new Toponimia($map_file,$tema); |
2625 | - $cp->set_data($m->ativaEtiquetas($item)); | 2604 | + $retorno = $m->ativaEtiquetas($item); |
2626 | $m->salva(); | 2605 | $m->salva(); |
2627 | break; | 2606 | break; |
2628 | /* | 2607 | /* |
@@ -2637,7 +2616,7 @@ Include: | @@ -2637,7 +2616,7 @@ Include: | ||
2637 | include_once("classe_toponimia.php"); | 2616 | include_once("classe_toponimia.php"); |
2638 | copiaSeguranca($map_file); | 2617 | copiaSeguranca($map_file); |
2639 | $m = new Toponimia($map_file,$tema); | 2618 | $m = new Toponimia($map_file,$tema); |
2640 | - $cp->set_data($m->removeEtiquetas()); | 2619 | + $retorno = $m->removeEtiquetas(); |
2641 | $m->salva(); | 2620 | $m->salva(); |
2642 | break; | 2621 | break; |
2643 | /* | 2622 | /* |
@@ -2649,9 +2628,8 @@ Include: | @@ -2649,9 +2628,8 @@ Include: | ||
2649 | <classe_toponimia.php> | 2628 | <classe_toponimia.php> |
2650 | */ | 2629 | */ |
2651 | case "listatruetype": | 2630 | case "listatruetype": |
2652 | - $cp->register('listaTrueType'); | 2631 | + $retorno = listaTrueType(); |
2653 | restauraCon($map_file,$postgis_mapa); | 2632 | restauraCon($map_file,$postgis_mapa); |
2654 | - $cp->start(); | ||
2655 | break; | 2633 | break; |
2656 | /* | 2634 | /* |
2657 | Section: Outros | 2635 | Section: Outros |
@@ -2668,7 +2646,7 @@ Parameter: | @@ -2668,7 +2646,7 @@ Parameter: | ||
2668 | celsize - tamanho de cada pixel em dd | 2646 | celsize - tamanho de cada pixel em dd |
2669 | */ | 2647 | */ |
2670 | case "areaPixel": | 2648 | case "areaPixel": |
2671 | - $cp->set_data(calculaAreaPixel($map_file,$celsize)); | 2649 | + $retorno = calculaAreaPixel($map_file,$celsize); |
2672 | break; | 2650 | break; |
2673 | /* | 2651 | /* |
2674 | Property: listaEpsg | 2652 | Property: listaEpsg |
@@ -2677,7 +2655,7 @@ Pega os códigos de projeção EPSG. | @@ -2677,7 +2655,7 @@ Pega os códigos de projeção EPSG. | ||
2677 | 2655 | ||
2678 | */ | 2656 | */ |
2679 | case "listaEpsg": | 2657 | case "listaEpsg": |
2680 | - $cp->set_data(listaEpsg()); | 2658 | + $retorno = listaEpsg(); |
2681 | break; | 2659 | break; |
2682 | /* | 2660 | /* |
2683 | Property: listaDiretorios | 2661 | Property: listaDiretorios |
@@ -2686,7 +2664,7 @@ Lista os diretórios de um diretório. | @@ -2686,7 +2664,7 @@ Lista os diretórios de um diretório. | ||
2686 | 2664 | ||
2687 | */ | 2665 | */ |
2688 | case "listaDiretorios": | 2666 | case "listaDiretorios": |
2689 | - $cp->set_data(listaDiretorios($diretorio)); | 2667 | + $retorno = listaDiretorios($diretorio); |
2690 | break; | 2668 | break; |
2691 | /* | 2669 | /* |
2692 | Property: listaArquivos* | 2670 | Property: listaArquivos* |
@@ -2694,14 +2672,15 @@ Property: listaArquivos* | @@ -2694,14 +2672,15 @@ Property: listaArquivos* | ||
2694 | Lista os arquivos de um diretório. | 2672 | Lista os arquivos de um diretório. |
2695 | */ | 2673 | */ |
2696 | case "listaArquivos": | 2674 | case "listaArquivos": |
2697 | - $cp->set_data(listaArquivos($diretorio)); | 2675 | + $retorno = listaArquivos($diretorio); |
2698 | break; | 2676 | break; |
2699 | } | 2677 | } |
2700 | if (!connection_aborted()) | 2678 | if (!connection_aborted()) |
2701 | { | 2679 | { |
2702 | if(isset($map_file) && isset($postgis_mapa) && $map_file != "") | 2680 | if(isset($map_file) && isset($postgis_mapa) && $map_file != "") |
2703 | restauraCon($map_file,$postgis_mapa); | 2681 | restauraCon($map_file,$postgis_mapa); |
2704 | - $cp->return_data(); | 2682 | + //$cp->return_data(); |
2683 | + cpjson($retorno); | ||
2705 | } | 2684 | } |
2706 | else | 2685 | else |
2707 | {exit();} | 2686 | {exit();} |
@@ -2715,7 +2694,7 @@ Include: | @@ -2715,7 +2694,7 @@ Include: | ||
2715 | */ | 2694 | */ |
2716 | function alteraclassesPost($ids,$nomes,$exps) | 2695 | function alteraclassesPost($ids,$nomes,$exps) |
2717 | { | 2696 | { |
2718 | - global $map_file,$tema,$cp; | 2697 | + global $map_file,$tema; |
2719 | $m = new Alteraclasse($map_file,$tema); | 2698 | $m = new Alteraclasse($map_file,$tema); |
2720 | $m->alteraclasses($ids,$nomes,$exps); | 2699 | $m->alteraclasses($ids,$nomes,$exps); |
2721 | $m->salva(); | 2700 | $m->salva(); |
@@ -2730,7 +2709,7 @@ Include: | @@ -2730,7 +2709,7 @@ Include: | ||
2730 | */ | 2709 | */ |
2731 | function selecaoPoli($xs,$ys,$tema,$tipo) | 2710 | function selecaoPoli($xs,$ys,$tema,$tipo) |
2732 | { | 2711 | { |
2733 | - global $map_file,$cp; | 2712 | + global $map_file; |
2734 | include_once("classe_selecao.php"); | 2713 | include_once("classe_selecao.php"); |
2735 | $temas = explode(",",$tema); | 2714 | $temas = explode(",",$tema); |
2736 | foreach($temas as $tema) | 2715 | foreach($temas as $tema) |
@@ -2739,7 +2718,7 @@ function selecaoPoli($xs,$ys,$tema,$tipo) | @@ -2739,7 +2718,7 @@ function selecaoPoli($xs,$ys,$tema,$tipo) | ||
2739 | $ok[] = $m->selecaoPorPoligono($tipo,$xs,$ys); | 2718 | $ok[] = $m->selecaoPorPoligono($tipo,$xs,$ys); |
2740 | $m->salva(); | 2719 | $m->salva(); |
2741 | } | 2720 | } |
2742 | - $cp->set_data(implode(",",$ok)); | 2721 | + return implode(",",$ok); |
2743 | } | 2722 | } |
2744 | /* | 2723 | /* |
2745 | Function: redesenhaMapa | 2724 | Function: redesenhaMapa |
@@ -2785,8 +2764,9 @@ function redesenhaMapa() | @@ -2785,8 +2764,9 @@ function redesenhaMapa() | ||
2785 | restauraCon($map_file,$postgis_mapa); | 2764 | restauraCon($map_file,$postgis_mapa); |
2786 | ob_clean(); | 2765 | ob_clean(); |
2787 | if (($par == "") || ($imagem == "")) | 2766 | if (($par == "") || ($imagem == "")) |
2788 | - {$cp->set_data("erro");} | 2767 | + {$retorno = "erro";} |
2789 | else | 2768 | else |
2790 | - {$cp->set_data(array("variaveis"=>($mensagens.";".$imagem.";var tempo=".(microtime(1) - $tempo)),"temas"=>$par));} | 2769 | + {$retorno = array("variaveis"=>($mensagens.";".$imagem.";var tempo=".(microtime(1) - $tempo)),"temas"=>$par);} |
2770 | + cpjson($retorno); | ||
2791 | } | 2771 | } |
2792 | ?> | 2772 | ?> |
2793 | \ No newline at end of file | 2773 | \ No newline at end of file |
classesphp/mapa_inicia.php
@@ -79,7 +79,7 @@ Se $expoeMapfile = "nao", o nome do mapfile não é retornado | @@ -79,7 +79,7 @@ Se $expoeMapfile = "nao", o nome do mapfile não é retornado | ||
79 | */ | 79 | */ |
80 | function iniciaMapa() | 80 | function iniciaMapa() |
81 | { | 81 | { |
82 | - global $mensagemInicia,$kmlurl,$tituloInstituicao,$tempo,$navegadoresLocais,$locaplic,$cp,$embedLegenda,$map_file,$mapext,$w,$h,$locsistemas,$locidentifica,$R_path,$locmapas,$locmapserv,$postgis_con,$utilizacgi,$expoeMapfile,$interface; | 82 | + global $mensagemInicia,$kmlurl,$tituloInstituicao,$tempo,$navegadoresLocais,$locaplic,$embedLegenda,$map_file,$mapext,$w,$h,$locsistemas,$locidentifica,$R_path,$locmapas,$locmapserv,$postgis_con,$utilizacgi,$expoeMapfile,$interface; |
83 | error_reporting(E_ALL); | 83 | error_reporting(E_ALL); |
84 | // | 84 | // |
85 | //pega o xml com os sietmas para identificação | 85 | //pega o xml com os sietmas para identificação |
@@ -225,6 +225,7 @@ function iniciaMapa() | @@ -225,6 +225,7 @@ function iniciaMapa() | ||
225 | $res .= "var mensagemInicia ='".$mensagemInicia."';"; | 225 | $res .= "var mensagemInicia ='".$mensagemInicia."';"; |
226 | copy($map_file,(str_replace(".map","reinc.map",$map_file))); | 226 | copy($map_file,(str_replace(".map","reinc.map",$map_file))); |
227 | copy($map_file,(str_replace(".map","seguranca.map",$map_file))); | 227 | copy($map_file,(str_replace(".map","seguranca.map",$map_file))); |
228 | - $cp->set_data(array("variaveis"=>$res,"temas"=>$temas)); | 228 | + //$cp->set_data(array("variaveis"=>$res,"temas"=>$temas)); |
229 | + cpjson(array("variaveis"=>$res,"temas"=>$temas)); | ||
229 | } | 230 | } |
230 | ?> | 231 | ?> |
231 | \ No newline at end of file | 232 | \ No newline at end of file |
classesphp/wmswfs.php
@@ -138,13 +138,11 @@ Chama a função getcapabilities e retorna o resultado. | @@ -138,13 +138,11 @@ Chama a função getcapabilities e retorna o resultado. | ||
138 | parameters: | 138 | parameters: |
139 | $servico - Endereço do web service. | 139 | $servico - Endereço do web service. |
140 | 140 | ||
141 | -$cp - Objeto CPAINT. | ||
142 | - | ||
143 | $id_ws - id do wms se estiver sendo utilizado o banco de administração do i3geo | 141 | $id_ws - id do wms se estiver sendo utilizado o banco de administração do i3geo |
144 | */ | 142 | */ |
145 | function getcapabilities() | 143 | function getcapabilities() |
146 | { | 144 | { |
147 | - global $servico,$cp,$id_ws; | 145 | + global $servico,$id_ws; |
148 | $teste = explode("=",$servico); | 146 | $teste = explode("=",$servico); |
149 | if ( count($teste) > 1 ){$servico = $servico."&";} | 147 | if ( count($teste) > 1 ){$servico = $servico."&";} |
150 | $wms_service_request = $servico . "REQUEST=GetCapabilities&SERVICE=WMS&version=1.1.0"; | 148 | $wms_service_request = $servico . "REQUEST=GetCapabilities&SERVICE=WMS&version=1.1.0"; |
@@ -157,7 +155,7 @@ function getcapabilities() | @@ -157,7 +155,7 @@ function getcapabilities() | ||
157 | return; | 155 | return; |
158 | } | 156 | } |
159 | $wms_capabilities = implode("",$wms_capabilities); | 157 | $wms_capabilities = implode("",$wms_capabilities); |
160 | - $cp->set_data(xml2html($wms_capabilities)); | 158 | + return(xml2html($wms_capabilities)); |
161 | } | 159 | } |
162 | /* | 160 | /* |
163 | function: getcapabilities2 | 161 | function: getcapabilities2 |
@@ -167,11 +165,10 @@ Chama a função getcapabilities e retorna o resultado formatado (WMS). | @@ -167,11 +165,10 @@ Chama a função getcapabilities e retorna o resultado formatado (WMS). | ||
167 | parameters: | 165 | parameters: |
168 | $servico - Endereço do web service. | 166 | $servico - Endereço do web service. |
169 | 167 | ||
170 | -$cp - Objeto CPAINT. | ||
171 | */ | 168 | */ |
172 | function getcapabilities2() | 169 | function getcapabilities2() |
173 | { | 170 | { |
174 | - global $servico,$cp; | 171 | + global $servico; |
175 | $teste = explode("=",$servico); | 172 | $teste = explode("=",$servico); |
176 | if ( count($teste) > 1 ){$servico = $servico."&";} | 173 | if ( count($teste) > 1 ){$servico = $servico."&";} |
177 | $wms_service_request = $servico . "REQUEST=GetCapabilities&SERVICE=WMS&version=1.1.0"; | 174 | $wms_service_request = $servico . "REQUEST=GetCapabilities&SERVICE=WMS&version=1.1.0"; |
@@ -218,7 +215,7 @@ function getcapabilities2() | @@ -218,7 +215,7 @@ function getcapabilities2() | ||
218 | foreach ($entries as $entry){$temp .= $entry->nodeValue.".";} | 215 | foreach ($entries as $entry){$temp .= $entry->nodeValue.".";} |
219 | $retorno .= "<br><br><b>Contato: </b>".$temp; | 216 | $retorno .= "<br><br><b>Contato: </b>".$temp; |
220 | 217 | ||
221 | - $cp->set_data($retorno); | 218 | + return($retorno); |
222 | } | 219 | } |
223 | /* | 220 | /* |
224 | function: getcapabilities3 | 221 | function: getcapabilities3 |
@@ -229,11 +226,10 @@ parameters: | @@ -229,11 +226,10 @@ parameters: | ||
229 | 226 | ||
230 | $servico - Endereço do web service. | 227 | $servico - Endereço do web service. |
231 | 228 | ||
232 | -$cp - Objeto CPAINT. | ||
233 | */ | 229 | */ |
234 | function getcapabilities3() | 230 | function getcapabilities3() |
235 | { | 231 | { |
236 | - global $servico,$cp; | 232 | + global $servico; |
237 | $teste = explode("=",$servico); | 233 | $teste = explode("=",$servico); |
238 | if ( count($teste) > 1 ){$servico = $servico."&";} | 234 | if ( count($teste) > 1 ){$servico = $servico."&";} |
239 | $wms_service_request = $servico . "request=getcapabilities&service=wfs&version=1.0.0"; | 235 | $wms_service_request = $servico . "request=getcapabilities&service=wfs&version=1.0.0"; |
@@ -263,7 +259,7 @@ function getcapabilities3() | @@ -263,7 +259,7 @@ function getcapabilities3() | ||
263 | {$temp .= $v->nodeValue;} | 259 | {$temp .= $v->nodeValue;} |
264 | $retorno .= "<br><br><b>Título: </b>".$temp; | 260 | $retorno .= "<br><br><b>Título: </b>".$temp; |
265 | } | 261 | } |
266 | - $cp->set_data($retorno); | 262 | + return($retorno); |
267 | } | 263 | } |
268 | /* | 264 | /* |
269 | function: temaswms | 265 | function: temaswms |
@@ -274,11 +270,10 @@ parameters: | @@ -274,11 +270,10 @@ parameters: | ||
274 | 270 | ||
275 | $servico - Endereço do web service. | 271 | $servico - Endereço do web service. |
276 | 272 | ||
277 | -$cp - Objeto CPAINT. | ||
278 | */ | 273 | */ |
279 | function temaswms() | 274 | function temaswms() |
280 | { | 275 | { |
281 | - global $servico,$cp,$id_ws; | 276 | + global $servico,$id_ws; |
282 | $wms_service_request = gravaCacheWMS($servico); | 277 | $wms_service_request = gravaCacheWMS($servico); |
283 | # ------------------------------------------------------------- | 278 | # ------------------------------------------------------------- |
284 | # Test that the capabilites file has successfully downloaded. | 279 | # Test that the capabilites file has successfully downloaded. |
@@ -377,7 +372,7 @@ function temaswms() | @@ -377,7 +372,7 @@ function temaswms() | ||
377 | $retorna[] = "<br>Formatos info:<input size=30 id=formatosinfo type=text class=digitar value='".implode(",",wms_formatsinfo($dom))."'/><br><br>"; | 372 | $retorna[] = "<br>Formatos info:<input size=30 id=formatosinfo type=text class=digitar value='".implode(",",wms_formatsinfo($dom))."'/><br><br>"; |
378 | $retorna[] = "<br>Versao:<input size=30 id=versao type=text class=digitar value='".(wms_version($dom))."'/><br><br>"; | 373 | $retorna[] = "<br>Versao:<input size=30 id=versao type=text class=digitar value='".(wms_version($dom))."'/><br><br>"; |
379 | $retorna[] = "<br>Suporta SLD:<input size=30 id=suportasld type=text class=digitar value='".$suporta."'/><br><br><br>"; | 374 | $retorna[] = "<br>Suporta SLD:<input size=30 id=suportasld type=text class=digitar value='".$suporta."'/><br><br><br>"; |
380 | - $cp->set_data(implode($retorna)); | 375 | + return(implode($retorna)); |
381 | } | 376 | } |
382 | /* | 377 | /* |
383 | function: listaLayersWMS | 378 | function: listaLayersWMS |
@@ -388,15 +383,13 @@ parameters: | @@ -388,15 +383,13 @@ parameters: | ||
388 | 383 | ||
389 | $servico - Endereço do web service. | 384 | $servico - Endereço do web service. |
390 | 385 | ||
391 | -$cp - Objeto CPAINT. | ||
392 | - | ||
393 | $nivel - nível do layer na hierarquia existente no getcapabilities (string do tipo | 386 | $nivel - nível do layer na hierarquia existente no getcapabilities (string do tipo |
394 | 387 | ||
395 | $nomelayer - nome do layer que contém os próximos layers | 388 | $nomelayer - nome do layer que contém os próximos layers |
396 | */ | 389 | */ |
397 | function listaLayersWMS() | 390 | function listaLayersWMS() |
398 | { | 391 | { |
399 | - global $servico,$cp,$nivel,$id_ws,$nomelayer; | 392 | + global $servico,$nivel,$id_ws,$nomelayer; |
400 | if(!isset($nomelayer)){$nomelayer = "undefined";} | 393 | if(!isset($nomelayer)){$nomelayer = "undefined";} |
401 | $wms_service_request = gravaCacheWMS($servico); | 394 | $wms_service_request = gravaCacheWMS($servico); |
402 | include_once("../admin/php/admin.php"); | 395 | include_once("../admin/php/admin.php"); |
@@ -468,7 +461,7 @@ function listaLayersWMS() | @@ -468,7 +461,7 @@ function listaLayersWMS() | ||
468 | {$res[] = array("nome"=>$r["nome"],"titulo"=>$r["titulo"],"estilos"=>$r["estilos"],"srs"=>wms_srs($dom),"formats"=>wms_formats($dom),"version"=>wms_version($dom),"formatsinfo"=>wms_formatsinfo($dom));} | 461 | {$res[] = array("nome"=>$r["nome"],"titulo"=>$r["titulo"],"estilos"=>$r["estilos"],"srs"=>wms_srs($dom),"formats"=>wms_formats($dom),"version"=>wms_version($dom),"formatsinfo"=>wms_formatsinfo($dom));} |
469 | } | 462 | } |
470 | } | 463 | } |
471 | - $cp->set_data($res); | 464 | + return($res); |
472 | } | 465 | } |
473 | 466 | ||
474 | function imprimeEstilos($es,$suporta,$retorna,$tval,$tituloalternativo) | 467 | function imprimeEstilos($es,$suporta,$retorna,$tval,$tituloalternativo) |
menutemas/admin.db
No preview for this file type
temas/testept.map
1 | MAP | 1 | MAP |
2 | -SYMBOLSET ../symbols/simbolos.sym | ||
3 | -FONTSET "../symbols/fontes.txt" | 2 | + FONTSET "../symbols/fontes.txt" |
3 | + SYMBOLSET "../symbols/simbolos.sym" | ||
4 | LAYER | 4 | LAYER |
5 | CONNECTION "" | 5 | CONNECTION "" |
6 | DATA "c:\ms4w\Apache\htdocs\geodados\brasil\limitespol\localidades.shp" | 6 | DATA "c:\ms4w\Apache\htdocs\geodados\brasil\limitespol\localidades.shp" |
@@ -8,12 +8,16 @@ FONTSET "../symbols/fontes.txt" | @@ -8,12 +8,16 @@ FONTSET "../symbols/fontes.txt" | ||
8 | METADATA | 8 | METADATA |
9 | "CLASSE" "SIM" | 9 | "CLASSE" "SIM" |
10 | "palletestep" "" | 10 | "palletestep" "" |
11 | - "description_template" "" | 11 | + "permitekmz" "nao" |
12 | "ITENSDESC" "Nome,Ano,UF" | 12 | "ITENSDESC" "Nome,Ano,UF" |
13 | + "description_template" "" | ||
13 | "palletefile" "" | 14 | "palletefile" "" |
15 | + "permitedownload" "sim" | ||
14 | "download" "SIM" | 16 | "download" "SIM" |
15 | - "ITENS" "NOMEMUN,ANOCRIA,ESTADO" | ||
16 | "arquivodownload" "" | 17 | "arquivodownload" "" |
18 | + "ITENS" "NOMEMUN,ANOCRIA,ESTADO" | ||
19 | + "permitekml" "sim" | ||
20 | + "permiteogc" "sim" | ||
17 | "TEMA" "Teste de pontos" | 21 | "TEMA" "Teste de pontos" |
18 | END | 22 | END |
19 | NAME "testept" | 23 | NAME "testept" |