Commit a81e8fc1ed6effaf709639262c0def9b3f0c8ebb

Authored by Edmar Moretti
1 parent ce0d3eac

--no commit message

ferramentas/adminmapfile/index.htm
... ... @@ -1,57 +0,0 @@
1   -<html>
2   -<head>
3   -<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=ISO-8859-1">
4   -<link rel="stylesheet" type="text/css" href="../../css/ferramentas.css">
5   -</head>
6   -<body class="yui-skin-sam">
7   -<div id=fundo >
8   - <div class="guias" id="guias">
9   - <div class=guia id=guia1 >&nbsp;Temas atuais&nbsp;</div>
10   - <div class=guia id=guia2 >&nbsp;Temas gravados&nbsp;</div>
11   - <div class=guia id=guia3 >&nbsp;MapFile atual&nbsp;</div>
12   - </div>
13   - <span id=geral >
14   - <div id=guia3obj style="width:90%;">
15   - <div style="width:90%;position:relative;top:5px;left:0px">
16   - <input class=executar style="cursor:pointer" size=15 onclick="salvaMapFileAtual()" type=buttom value="Salvar"/>
17   - </div>
18   - <div style="width:90%;position:relative;top:5px;left:0px">
19   - <textarea id=mapfileatual cols=53 rows=18 ></textarea>
20   - </div>
21   - </div>
22   - <div id=guia2obj style="width:90%;display:none;">
23   - <div style="width:90%;position:relative;top:5px;left:0px">
24   - Lista dos mapfiles existentes no diretório "temas" do I3Geo. Escolha um para editar:<br>
25   - <div id=listaMaps style="width:70%;left:0px">
26   - </div>
27   - <br>
28   - <input class=executar style="cursor:pointer" size=9 onclick="salvaMapFileTema()" type=buttom value="Salvar"/>
29   - <input class=digitar type=text size=12 id=nomemap value="" />
30   - &nbsp;<input class=executar style="cursor:pointer" size=9 onclick="testaMapFileTema()" type=buttom value="Testar"/>
31   - &nbsp;<input class=executar style="cursor:pointer" size=18 onclick="incluirTema()" type=buttom value="Incluir no mapa"/>
32   - </div>
33   - <div style="width:90%;position:relative;top:5px;left:0px">
34   - <textarea id=mapfiletema cols=53 rows=14 ></textarea>
35   - </div>
36   - </div>
37   - <div id=guia1obj style="width:90%;display:none;">
38   - <div style="width:90%;position:relative;top:5px;left:0px">
39   - Lista dos mapfiles existentes no mapa atual. Escolha um para editar:<br>
40   - <div id=listaCamadas style="width:70%;left:0px">
41   - </div>
42   - <br>
43   - <input class=executar style="cursor:pointer" size=15 onclick="salvaTemaAtual()" type=buttom value="Salvar"/>
44   - <input class=digitar type=text size=20 id=nometemaatual value="" />
45   - &nbsp;<input class=executar style="cursor:pointer" size=15 onclick="testaTemaAtual()" type=buttom value="Testar"/>
46   - </div>
47   - <div style="width:90%;position:relative;top:5px;left:0px">
48   - <textarea id=mapfiletemaatual cols=53 rows=14 ></textarea>
49   - </div>
50   - </div>
51   - </span>
52   -</div>
53   -<script language="JavaScript" type="text/javascript" src="../funcoes.js"></script>
54   -<script src="../../classesjs/cpaint/cpaint2.inc.compressed.js" type="text/javascript"></script>
55   -<script language="JavaScript" type="text/javascript" src="index.js"></script>
56   -</body>
57   -</html>
58 0 \ No newline at end of file
ferramentas/adminmapfile/index.js
... ... @@ -1,239 +0,0 @@
1   -/*
2   -About: Licença
3   -
4   -I3Geo Interface Integrada de Ferramentas de Geoprocessamento para Internet
5   -
6   -Direitos Autorais Reservados (c) 2006 Ministério do Meio Ambiente Brasil
7   -Desenvolvedor: Edmar Moretti edmar.moretti@mma.gov.br
8   -
9   -Este programa é software livre; você pode redistribuí-lo
10   -e/ou modificá-lo sob os termos da Licença Pública Geral
11   -GNU conforme publicada pela Free Software Foundation;
12   -tanto a versão 2 da Licença.
13   -Este programa é distribuído na expectativa de que seja útil,
14   -porém, SEM NENHUMA GARANTIA; nem mesmo a garantia implícita
15   -de COMERCIABILIDADE OU ADEQUAÇÃO A UMA FINALIDADE ESPECÍFICA.
16   -Consulte a Licença Pública Geral do GNU para mais detalhes.
17   -Você deve ter recebido uma cópia da Licença Pública Geral do
18   -GNU junto com este programa; se não, escreva para a
19   -Free Software Foundation, Inc., no endereço
20   -59 Temple Street, Suite 330, Boston, MA 02111-1307 USA.
21   -*/
22   -
23   -//inicializa
24   -parametrosURL()
25   -//eventos das guias
26   -$i("guia1").onclick = function()
27   -{$i("guia1obj").style.display="block";carregaMapFileAtual()}
28   -$i("guia2").onclick = function()
29   -{$i("guia2obj").style.display="block";listaMapsTemas()}
30   -$i("guia3").onclick = function()
31   -{$i("guia3obj").style.display="block";listaCamadasAtuais()}
32   -carregaMapFileAtual()
33   -if(navm)
34   -{
35   - $i("mapfileatual").cols = 55
36   - $i("mapfileatual").rows = 19
37   - $i("mapfiletema").cols = 55
38   - $i("mapfiletema").rows = 19
39   -}
40   -function salvaTemaAtual()
41   -{
42   - var testaMapa = function testaMapa(retorno)
43   - {
44   - alert(retorno.data)
45   - }
46   - if(window.confirm("O arquivo "+$i("nometemaatual").value+".map será sobreposto. Continua?"))
47   - {
48   - var texto = $i("mapfiletemaatual").value
49   - var r = new RegExp("\\n","g")
50   - texto = texto.replace(r,"###");
51   - var r = new RegExp("\\t","g")
52   - texto = texto.replace(r," ");
53   - var p = g_locaplic+"/classesphp/admin.php?g_sid="+g_sid+"&funcao=salvaMapFileTema"
54   - var cp = new cpaint();
55   - //cp.set_debug(2)
56   - cp.set_response_type("JSON");
57   - cp.set_transfer_mode('POST');
58   - cp.call(p,"salvaMapFileTema",testaMapa,texto,"x",$i("nometemaatual").value+".map");
59   - }
60   -}
61   -function testaTemaAtual()
62   -{
63   - var testaMapa = function testaMapa()
64   - {
65   - window.open("../../testamapfile.php?map=temas/testamapa.map")
66   - }
67   - var texto = $i("mapfiletemaatual").value
68   - var r = new RegExp("\\n","g")
69   - texto = texto.replace(r,"###");
70   - var r = new RegExp("\\t","g")
71   - texto = texto.replace(r," ");
72   - var p = g_locaplic+"/classesphp/admin.php?g_sid="+g_sid+"&funcao=salvaMapFileTema"
73   - var cp = new cpaint();
74   - //cp.set_debug(2)
75   - cp.set_response_type("JSON");
76   - cp.set_transfer_mode('POST');
77   - cp.call(p,"salvaMapFileTema",testaMapa,texto,"x","testamapa.map");
78   -}
79   -//le o mapfile atual
80   -function carregaMapFileAtual()
81   -{
82   - $i("mapfileatual").value = ""
83   - aguarde("block")
84   - var p = g_locaplic+"/classesphp/admin.php?g_sid="+g_sid+"&funcao=carregaMapFileAtual"
85   - var cp = new cpaint();
86   - //cp.set_debug(2)
87   - cp.set_response_type("JSON");
88   - var executa = function(retorno)
89   - {
90   - $i("mapfileatual").value = retorno.data;
91   - aguarde("none")
92   - }
93   - cp.call(p,"carregaMapFileAtual",executa);
94   -}
95   -function salvaMapFileAtual()
96   -{
97   - aguarde("block")
98   - var texto = $i("mapfileatual").value
99   - var r = new RegExp("\\n","g")
100   - texto = texto.replace(r,"###");
101   - var r = new RegExp("\\t","g")
102   - texto = texto.replace(r," ");
103   - var p = g_locaplic+"/classesphp/admin.php?g_sid="+g_sid+"&funcao=salvaMapFileAtual"
104   - var cp = new cpaint();
105   - //cp.set_debug(2)
106   - cp.set_response_type("JSON");
107   - cp.set_transfer_mode('POST');
108   - cp.call(p,"salvaMapFileAtual",window.parent.remapaf(),texto,"x");
109   -}
110   -function listaCamadasAtuais()
111   -{
112   - $i("mapfiletemaatual").value = ""
113   - aguarde("block")
114   - var p = g_locaplic+"/classesphp/admin.php?g_sid="+g_sid+"&funcao=listaCamadasAtuais"
115   - var cp = new cpaint();
116   - //cp.set_debug(2)
117   - cp.set_response_type("JSON");
118   - var executa = function(retorno)
119   - {
120   - if (retorno.data)
121   - {
122   - var combo = "<select id='comboCamadas' onchange='carregaCamadaAtual()'>"
123   - combo += '<option value="" selected >----</option>'
124   - var lista = retorno.data.split(",")
125   - for (i=0;i<lista.length;i++)
126   - {combo +='<option value="'+lista[i]+'">'+lista[i]+'</option>'}
127   - combo += "</select>"
128   - $i("listaCamadas").innerHTML = combo;
129   - }
130   - else
131   - {$i("listaCamadas").innerHTML = "<span style=color:red >Nenhum tema para editar.</span>"}
132   - aguarde("none")
133   - }
134   - cp.call(p,"listaCamadasAtuais",executa);
135   -}
136   -function carregaCamadaAtual()
137   -{
138   - $i("mapfiletemaatual").value = ""
139   - var tema = $i("comboCamadas").value
140   - if (tema != "")
141   - {
142   - var p = g_locaplic+"/classesphp/admin.php?g_sid="+g_sid+"&funcao=textoCamadaAtual&tema="+tema
143   - var cp = new cpaint();
144   - //cp.set_debug(2)
145   - cp.set_response_type("JSON");
146   - var executa = function(retorno)
147   - {
148   - $i("mapfiletemaatual").value = retorno.data
149   - }
150   - cp.call(p,"textoCamadaAtual",executa);
151   - }
152   - $i("nometemaatual").value = tema
153   -}
154   -function listaMapsTemas()
155   -{
156   - $i("mapfiletema").value = ""
157   - aguarde("block")
158   - var p = g_locaplic+"/classesphp/admin.php?g_sid="+g_sid+"&funcao=listaMapsTemas"
159   - var cp = new cpaint();
160   - //cp.set_debug(2)
161   - cp.set_response_type("JSON");
162   - var executa = function(retorno)
163   - {
164   - var combo = "<select id='comboMaps' onchange='carregaMapFileTema()'>"
165   - combo += '<option value="0" selected >----</option>'
166   - var lista = retorno.data.split(",")
167   - for (i=0;i<lista.length;i++)
168   - {combo +='<option value="'+lista[i]+'">'+lista[i]+'</option>'}
169   - combo += "</select>"
170   - $i("listaMaps").innerHTML = combo;
171   - aguarde("none")
172   - }
173   - cp.call(p,"listaMapsTemas",executa);
174   -}
175   -function carregaMapFileTema()
176   -{
177   - $i("nomemap").value = $i("comboMaps").value
178   - var p = g_locaplic+"/classesphp/admin.php?g_sid="+g_sid+"&funcao=carregaMapFileTema&tema="+$i("comboMaps").value
179   - var cp = new cpaint();
180   - //cp.set_debug(2)
181   - cp.set_response_type("JSON");
182   - var executa = function(retorno)
183   - {
184   - $i("mapfiletema").value = retorno.data;
185   - }
186   - cp.call(p,"carregaMapFileTema",executa);
187   -}
188   -function testaMapFileTema()
189   -{
190   - var testaMapa = function testaMapa()
191   - {
192   - window.open("../../testamapfile.php?map=temas/testamapa.map")
193   - }
194   - var texto = $i("mapfiletema").value
195   - var r = new RegExp("\\n","g")
196   - texto = texto.replace(r,"###");
197   - var r = new RegExp("\\t","g")
198   - texto = texto.replace(r," ");
199   - var p = g_locaplic+"/classesphp/admin.php?g_sid="+g_sid+"&funcao=salvaMapFileTema"
200   - var cp = new cpaint();
201   - //cp.set_debug(2)
202   - cp.set_response_type("JSON");
203   - cp.set_transfer_mode('POST');
204   - cp.call(p,"salvaMapFileTema",testaMapa,texto,"x","testamapa.map");
205   -}
206   -function salvaMapFileTema()
207   -{
208   - var testaMapa = function testaMapa(retorno)
209   - {
210   - alert(retorno.data)
211   - }
212   - if(window.confirm("O arquivo "+$i("nomemap").value+" será sobreposto. Continua?"))
213   - {
214   - var texto = $i("mapfiletema").value
215   - var r = new RegExp("\\n","g")
216   - texto = texto.replace(r,"###");
217   - var r = new RegExp("\\t","g")
218   - texto = texto.replace(r," ");
219   - var p = g_locaplic+"/classesphp/admin.php?g_sid="+g_sid+"&funcao=salvaMapFileTema"
220   - var cp = new cpaint();
221   - //cp.set_debug(2)
222   - cp.set_response_type("JSON");
223   - cp.set_transfer_mode('POST');
224   - cp.call(p,"salvaMapFileTema",testaMapa,texto,"x",$i("nomemap").value);
225   - }
226   -}
227   -function incluirTema()
228   -{
229   - var testaMapa = function testaMapa(retorno)
230   - {
231   - window.parent.remapaf()
232   - }
233   - var p = g_locaplic+"/classesphp/admin.php?g_sid="+g_sid+"&funcao=incluirTema&tema="+$i("nomemap").value
234   - var cp = new cpaint();
235   - //cp.set_debug(2)
236   - cp.set_response_type("JSON");
237   - cp.set_transfer_mode('GET');
238   - cp.call(p,"incluirTema",testaMapa);
239   -}
240 0 \ No newline at end of file