Commit ea9c3a1cdc0525111179bf93c340368708ca6220

Authored by Edmar Moretti
1 parent a81e8fc1

--no commit message

ferramentas/adminnovomapfile/index.htm
... ... @@ -1,116 +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;Novo tema&nbsp;</div>
10   - </div>
11   - <span id=geral >
12   - <div id=guia1obj style="width:90%;display:block;">
13   - <div style="width:90%;position:relative;top:5px;left:0px">
14   - <input class=executar style="cursor:pointer" size=15 onclick="criaMapa('nao')" type=buttom value="Criar"/>
15   - <input class=executar style="cursor:pointer" size=15 onclick="criaMapa('sim')" type=buttom value="Testar"/>
16   - </div>
17   - <div style="width:90%;top:5px;left:0px" >
18   - <table class=lista2>
19   - <tr>
20   - <td>Código (utilizado como nome do arquivo e código do tema, não digite a extensão .map) do novo tema:</td>
21   - </tr>
22   - <tr>
23   - <td><input size=20 type=text value="" id=codigoArquivo /></td>
24   - </tr>
25   - <tr>
26   - <td>Tipo de dado:</td>
27   - </tr>
28   - <tr>
29   - <td>
30   - <select id=tipoDado onchange="mudaTipoDado(this)">
31   - <option value="---" selected >---</option>
32   - <option value="arquivo" >arquivo</option>
33   - <option value="banco" >banco de dados</option>
34   - </select>
35   - </td>
36   - </tr>
37   - <tr>
38   - <td>
39   - <table id=arquivo style="display:none" >
40   - <tr>
41   - <td>Nome do arquivo (caminho completo no servidor):</td>
42   - </tr>
43   - <tr>
44   - <td><input size=80 type=text value="" id=nomeArquivo /></td>
45   - </tr>
46   - </table>
47   - <table id=banco style="display:none" >
48   - <tr>
49   - <td>Conexão com o banco postgis:</td>
50   - </tr>
51   - <tr>
52   - <td><input size=80 type=text value="user= password= dbname= host= port=5432" id=conexaoBanco /></td>
53   - </tr>
54   - <tr>
55   - <td>Sql:</td>
56   - </tr>
57   - <tr>
58   - <td><input size=80 type=text value="the_geom FROM (select * FROM tabela) as foo USING UNIQUE gid USING SRID=4291" id=sql /></td>
59   - </tr>
60   - </table>
61   - </td>
62   - <tr>
63   - <tr>
64   - <td>
65   - Tipo de representação:
66   - </td>
67   - <tr>
68   - <td>
69   - <select id=tipoRepresentacao >
70   - <option value="---" selected >---</option>
71   - <option value=MS_LAYER_RASTER >raster</option>
72   - <option value=MS_LAYER_POLYGON >poligonal</option>
73   - <option value=MS_LAYER_POINT >pontual</option>
74   - <option value=MS_LAYER_LINE >linear</option>
75   - </select>
76   - </td>
77   - </tr>
78   - <tr>
79   - <td>Opacidade:</td>
80   - </tr>
81   - <tr>
82   - <td><input size=10 type=text value="100" id=opacidade /></td>
83   - </tr>
84   - <tr>
85   - <td>Nome do tema para a legenda:</td>
86   - </tr>
87   - <tr>
88   - <td><input size=50 type=text value="" id=nometema /></td>
89   - </tr>
90   - <tr>
91   - <td>Denominador da escala original dos dados (não digite pontos de milhar):</td>
92   - </tr>
93   - <tr>
94   - <td><input size=30 type=text value="" id=escala /></td>
95   - </tr>
96   - <tr>
97   - <td>O usuário poderá fazer o download:</td>
98   - </tr>
99   - <tr>
100   - <td>
101   - <select id=download >
102   - <option value="nao" selected >não</option>
103   - <option value="sim" >sim</option>
104   - </select>
105   - </td>
106   - </tr>
107   - </table>
108   - </div>
109   - </div>
110   - </span>
111   -</div>
112   -<script language="JavaScript" type="text/javascript" src="../funcoes.js"></script>
113   -<script src="../../classesjs/cpaint/cpaint2.inc.compressed.js" type="text/javascript"></script>
114   -<script language="JavaScript" type="text/javascript" src="index.js"></script>
115   -</body>
116   -</html>
117 0 \ No newline at end of file
ferramentas/adminnovomapfile/index.js
... ... @@ -1,103 +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   -//inicializa
23   -parametrosURL()
24   -//eventos das guias
25   -$i("guia1").onclick = function()
26   -{$i("guia1obj").style.display="block";carregaMapFileAtual()}
27   -//ativa o div conforme o tipo de dados
28   -function mudaTipoDado(combo)
29   -{
30   - $i("arquivo").style.display="none"
31   - $i("banco").style.display="none"
32   - $i(combo.value).style.display="block"
33   -}
34   -//cria o novo tema
35   -function criaMapa(testa)
36   -{
37   - function retornoCria(retorno)
38   - {
39   - alert(retorno.data)
40   - window.parent.remapaf()
41   - }
42   - //não mude o nome do testamapa
43   - var v = verificaDados()
44   - if (testa == "sim")
45   - {arquivo = "testamapa"}
46   - if (v == "ok")
47   - {
48   - aguarde("block")
49   - var p = g_locaplic+"/classesphp/admin.php?g_sid="+g_sid+"&funcao=criaTema"
50   - var cp = new cpaint();
51   - cp.set_transfer_mode('POST');
52   - //cp.set_debug(2)
53   - cp.set_response_type("JSON");
54   - cp.call(p,"criaTema",retornoCria,arquivo,tipodado,nomearquivo,conexaobanco,sql,tiporepresentacao,opacidade,nometema,escala,download);
55   - }
56   -}
57   -function verificaDados()
58   -{
59   - arquivo = $i("codigoArquivo").value
60   - tipodado = $i("tipoDado").value
61   - nomearquivo = '"'+$i("nomeArquivo").value+'"'
62   - conexaobanco = $i("conexaoBanco").value
63   - sql = $i("sql").value
64   - tiporepresentacao = $i("tipoRepresentacao").value
65   - opacidade = $i("opacidade").value
66   - nometema = $i("nometema").value
67   - escala = $i("escala").value
68   - download = $i("download").value
69   - if (arquivo == "")
70   - {alert("O nome do arquivo precisa ser preenchido");return("erro")}
71   - if (tipodado == "---")
72   - {alert("Escolha o tipo de dado");return("erro")}
73   - if (tipodado == "arquivo")
74   - {
75   - if (nomearquivo == "")
76   - {alert("Nome do arquivo não pode ficar em branco");return("erro")}
77   - }
78   - if (tipodado == "banco")
79   - {
80   - if (conexaobanco == "")
81   - {alert("Conexão não pode ficar em branco");return("erro")}
82   - if (sql == "")
83   - {alert("Sql não pode ficar em branco");return("erro")}
84   - }
85   - if (tiporepresentacao == "---")
86   - {alert("Escolha o tipo de representação");return("erro")}
87   - if (nometema == "")
88   - {alert("Escolha o nome do tema para a legenda");return("erro")}
89   - return ("ok");
90   -}
91   -
92   -function retornoCriaTema(retorno)
93   -{
94   - aguarde("none")
95   - var retorno = retorno.data
96   - var reg = /erro/gi;
97   - if (retorno.search(reg) != -1)
98   - {
99   - alert("OOps! Ocorreu um erro\n"+retorno);
100   - return;
101   - }
102   - window.parent.i3GEO.atualiza("")
103   -}
104 0 \ No newline at end of file