exec.php
2.25 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
<?php
include_once(dirname(__FILE__)."/../safe.php");
verificaBlFerramentas(basename(dirname(__FILE__)),$i3geoBlFerramentas,false);
//
//faz a busca da função que deve ser executada
//
$retorno = ""; //string que será retornada ao browser via JSON
switch (strtoupper($funcao))
{
/*
Valor: APLICAPARAMETROSLEGIMG
Aplica um parâmetro em um estilo de uma classe.
<Legenda->aplicaParametrosLegImg>
*/
case "APLICAPARAMETROSLEGIMG":
include_once(dirname(__FILE__)."/../../classesphp/classe_legenda.php");
//
//no caso da opção de legenda incluida no mapa, o modo cgi não desenha a imagem corretamente
//
if($status == 3)
{
$_SESSION["utilizacgi"] = "nao";
$utilizacgi = "nao";
}
$m = new Legenda($map_file);
$retorno = $m->aplicaParametrosLegImg($_GET["fonte"],$_GET["imagecolor"],$_GET["position"],$_GET["status"],$_GET["outlinecolor"],$_GET["keyspacingy"],$_GET["keyspacingx"],$_GET["keysizey"],$_GET["keysizex"],$_GET["height"],$_GET["width"],$_GET["labelsize"]);
$m->salva();
$_SESSION["contadorsalva"]++;
break;
/*
Valor: PEGAPARAMETROSLEGIMG
Pega os parâmetros da legenda embebida no mapa.
<Legenda->pegaParametrosLegImg>
*/
case "PEGAPARAMETROSLEGIMG":
include_once(dirname(__FILE__)."/../../classesphp/classe_legenda.php");
$m = new Legenda($map_file);
$retorno = $m->pegaParametrosLegImg();
break;
/*
Valor: TESTALEGENDA
Testa os parâmetros de definição da legenda inserida no mapa.
<Legenda->aplicaParametrosLegImg>
*/
case "TESTALEGENDA":
include_once(dirname(__FILE__)."/../../classesphp/classe_legenda.php");
$map_file = str_replace(".map","",$map_file).".map";
copy($map_file,str_replace(".map","testeleg.map",$map_file));
$m = new Legenda(str_replace(".map","testeleg.map",$map_file));
$m->aplicaParametrosLegImg($_GET["fonte"],$_GET["imagecolor"],$_GET["position"],$_GET["status"],$_GET["outlinecolor"],$_GET["keyspacingy"],$_GET["keyspacingx"],$_GET["keysizey"],$_GET["keysizex"],$_GET["height"],$_GET["width"],$_GET["labelsize"]);
$retorno = $m->legendaGrafica();
break;
}
if(isset($map_file) && isset($postgis_mapa) && $map_file != ""){
restauraCon($map_file,$postgis_mapa);
}
cpjson($retorno);
?>