Commit 321a0f0bcb8718ad5ab767d27629b6442f744f50
1 parent
d224e8a0
Exists in
master
and in
7 other branches
Correção nos formulários de upload de arquivos
Showing
9 changed files
with
22 additions
and
23 deletions
Show diff stats
admin/admin.db
No preview for this file type
ferramentas/aplicarsld/index.js
... | ... | @@ -105,7 +105,7 @@ i3GEOF.aplicarsld = { |
105 | 105 | */ |
106 | 106 | html:function(){ |
107 | 107 | var ins = '<form id=i3GEOaplicarsldf target="i3GEOaplicarsldiframe" action="'+i3GEO.configura.locaplic+'/ferramentas/aplicarsld/upload.php?tema='+i3GEO.temaAtivo+'" method="post" ENCTYPE="multipart/form-data">' + |
108 | - '<p class="paragrafo" >Arquivo SLD: <br><input class=digitar type="file" size=42 name="i3GEOaplicarsld" style="top:0px;left:0px;cursor:pointer;"></p>' + | |
108 | + '<p class="paragrafo" >Arquivo SLD: <br><input type="file" size=42 name="i3GEOaplicarsld" style="top:0px;left:0px;cursor:pointer;"></p>' + | |
109 | 109 | '<br><p class="paragrafo" ><input id=i3GEOaplicarsldbotao1 type="button" value="Aplicar" size=12 name="submit">' + |
110 | 110 | '<input type=hidden name=g_sid value="'+i3GEO.configura.sid+'" >' + |
111 | 111 | '<input type="hidden" name="MAX_FILE_SIZE" value="100000">' + | ... | ... |
ferramentas/carregamapa/index.js
... | ... | @@ -84,6 +84,7 @@ i3GEOF.carregaMapa = { |
84 | 84 | inicia: function(iddiv){ |
85 | 85 | try{ |
86 | 86 | $i(iddiv).innerHTML += i3GEOF.carregaMapa.html(); |
87 | + document.body.scrollTop = document.documentElement.scrollTop = 0; | |
87 | 88 | new YAHOO.widget.Button( |
88 | 89 | "i3GEOcarregamapabotao1", |
89 | 90 | {onclick:{fn: i3GEOF.carregaMapa.submete}} |
... | ... | @@ -102,17 +103,16 @@ i3GEOF.carregaMapa = { |
102 | 103 | */ |
103 | 104 | html:function(){ |
104 | 105 | var ins = ''; |
105 | - ins += '<p class="paragrafo" >Digite o nome do arquivo .map (não utilize espaço em branco ou caracteres acentuados) ou busque com o navegador de arquivos:'; | |
106 | - ins += '<br><br>'; | |
107 | - ins += '<form id=i3GEOcarregamapaf target="i3GEOcarregamaiframe" action="'+i3GEO.configura.locaplic+'/ferramentas/carregamapa/upload.php" method="post" ENCTYPE="multipart/form-data">'; | |
108 | - ins += '<p class="paragrafo" ><input id="i3GEOcarregamapafilemap" type="file" name="i3GEOcarregamapafilemap" size="22" style="top:0px;left:0px;cursor:pointer;">'; | |
109 | - ins += '<br><br>'; | |
110 | - ins += '<p class="paragrafo" ><input id=i3GEOcarregamapabotao1 type="button" value="Carregar arquivo" size=12 name="submit">'; | |
111 | - ins += '<input type=hidden name=g_sid value="'+i3GEO.configura.sid+'" >'; | |
112 | - ins += '<input type="hidden" name="MAX_FILE_SIZE" value="10000">'; | |
113 | - ins += '<input type=hidden id=i3GEOcarregamapanomearq name=i3GEOcarregamapanomearq value="" >'; | |
114 | - ins += '</form>'; | |
115 | - ins += '<br><iframe name=i3GEOcarregamaiframe width="98%" height="70px" style="text-align:left;border:1px solid gray;" ></iframe>'; | |
106 | + ins += '<form id=i3GEOcarregamapaf target="i3GEOcarregamaiframe" action="'+i3GEO.configura.locaplic+'/ferramentas/carregamapa/upload.php" method="post" ENCTYPE="multipart/form-data" >' + | |
107 | + '<p class="paragrafo" >Arquivo para upload:' + | |
108 | + '<br><br>' + | |
109 | + '<p class="paragrafo" ><input type="file" name="i3GEOcarregamapafilemap" size="22" style="top:0px;left:0px;cursor:pointer;">' + | |
110 | + '<br><br>' + | |
111 | + '<p class="paragrafo" ><input id=i3GEOcarregamapabotao1 type="button" value="Carregar arquivo" size=12 name="submit"><br>' + | |
112 | + '<input type=hidden name=g_sid value="'+i3GEO.configura.sid+'" >' + | |
113 | + '<input type="hidden" name="MAX_FILE_SIZE" value="100000" >' + | |
114 | + '</form>' + | |
115 | + '<br><iframe name=i3GEOcarregamaiframe width="98%" height="70px" style="text-align:left;border:1px solid gray;" ></iframe>'; | |
116 | 116 | return ins; |
117 | 117 | }, |
118 | 118 | /* |
... | ... | @@ -144,8 +144,9 @@ i3GEOF.carregaMapa = { |
144 | 144 | Envia o arquivo para o servidor |
145 | 145 | */ |
146 | 146 | submete: function(){ |
147 | + if(i3GEOF.carregaMapa.aguarde.visibility==="visible") | |
148 | + {return;} | |
147 | 149 | i3GEOF.carregaMapa.aguarde.visibility="visible"; |
148 | - $i("i3GEOcarregamapanomearq").value = $i("i3GEOcarregamapafilemap").value; | |
149 | 150 | $i("i3GEOcarregamapaf").submit(); |
150 | 151 | } |
151 | 152 | }; | ... | ... |
ferramentas/carregamapa/upload.php
... | ... | @@ -2,7 +2,6 @@ |
2 | 2 | require_once("../../classesphp/pega_variaveis.php"); |
3 | 3 | require_once("../../classesphp/funcoes_gerais.php"); |
4 | 4 | include_once ("../../classesphp/carrega_ext.php"); |
5 | -error_reporting(E_ALL); | |
6 | 5 | session_name("i3GeoPHP"); |
7 | 6 | if (isset($g_sid)) |
8 | 7 | {session_id($g_sid);} |
... | ... | @@ -18,7 +17,6 @@ $postgis_mapa = $_SESSION["postgis_mapa"]; |
18 | 17 | </head> |
19 | 18 | <body bgcolor="white" style="background-color:white"> |
20 | 19 | <p> |
21 | - | |
22 | 20 | <?php |
23 | 21 | if (isset($_FILES['i3GEOcarregamapafilemap']['name'])) |
24 | 22 | { | ... | ... |
ferramentas/importarwmc/index.js
... | ... | @@ -105,8 +105,8 @@ i3GEOF.importarwmc = { |
105 | 105 | */ |
106 | 106 | html:function(){ |
107 | 107 | var ins = '<form id=i3GEOimportarwmcf target="i3GEOimportarwmciframe" action="'+i3GEO.configura.locaplic+'/ferramentas/importarwmc/upload.php" method="post" ENCTYPE="multipart/form-data">' + |
108 | - '<p class="paragrafo" >Arquivo: <br><input class=digitar type="file" size=35 name="i3GEOimportarwmc" style="top:0px;left:0px;cursor:pointer;"></p>' + | |
109 | - '<p class="paragrafo" >Ou URL: <br><input class=digitar type="text" size=35 name="i3GEOimportarwmcurl" style="top:0px;left:0px;cursor:text;"></p>' + | |
108 | + '<p class="paragrafo" >Arquivo: <br><input type="file" size=35 name="i3GEOimportarwmc" style="top:0px;left:0px;cursor:pointer;"></p>' + | |
109 | + '<p class="paragrafo" >Ou URL: <br><input type="text" size=35 name="i3GEOimportarwmcurl" style="top:0px;left:0px;cursor:text;"></p>' + | |
110 | 110 | '<br><p class="paragrafo" ><input id=i3GEOimportarwmcbotao1 type="button" value="Importar" size=12 name="submit">' + |
111 | 111 | '<input type=hidden name=g_sid value="'+i3GEO.configura.sid+'" >' + |
112 | 112 | '<input type="hidden" name="MAX_FILE_SIZE" value="100000">' + | ... | ... |
ferramentas/upload/index.js
... | ... | @@ -105,9 +105,9 @@ i3GEOF.upload = { |
105 | 105 | */ |
106 | 106 | html:function(){ |
107 | 107 | var ins = '<form id=i3GEOuploadf target="i3GEOuploadiframe" action="'+i3GEO.configura.locaplic+'/ferramentas/upload/upload.php" method="post" ENCTYPE="multipart/form-data">' + |
108 | - '<p class="paragrafo" >shp: <br><input class=digitar type="file" size=22 name="i3GEOuploadshp" style="top:0px;left:0px;cursor:pointer;"></p>' + | |
109 | - '<p class="paragrafo" >shx: <br><input class=digitar type="file" size=22 name="i3GEOuploadshx" style="top:0px;left:0px;cursor:pointer;"></p>' + | |
110 | - '<p class="paragrafo" >dbf: <br><input class=digitar type="file" size=22 name="i3GEOuploaddbf" style="top:0px;left:0px;cursor:pointer;"></p>'; | |
108 | + '<p class="paragrafo" >shp: <br><input type="file" size=22 name="i3GEOuploadshp" style="top:0px;left:0px;cursor:pointer;"></p>' + | |
109 | + '<p class="paragrafo" >shx: <br><input type="file" size=22 name="i3GEOuploadshx" style="top:0px;left:0px;cursor:pointer;"></p>' + | |
110 | + '<p class="paragrafo" >dbf: <br><input type="file" size=22 name="i3GEOuploaddbf" style="top:0px;left:0px;cursor:pointer;"></p>'; | |
111 | 111 | if(i3GEO.parametros.editor === "sim") |
112 | 112 | {ins += '<p class="paragrafo" >pasta no servidor onde os dados<br>serão armazenados (opcional):<br><input class=digitar type="text" size=45 name="dirDestino" style="top:0px;left:0px;cursor:pointer;"></p>';} |
113 | 113 | ins += '<p class="paragrafo" >Tipo de geometria: ' + | ... | ... |
ferramentas/uploaddbf/index.js
... | ... | @@ -115,7 +115,7 @@ i3GEOF.uploaddbf = { |
115 | 115 | '<p class="paragrafo" >nome da coluna x: <br><input class=digitar type="text" size=32 name="i3GEOuploaddbfnomex" style="top:0px;left:0px"></p>' + |
116 | 116 | '<p class="paragrafo" >nome da coluna y: <br><input class=digitar type="text" size=32 name="i3GEOuploaddbfnomey" style="top:0px;left:0px"></p>' + |
117 | 117 | |
118 | - '<p class="paragrafo" >arquivo: <br><input class=digitar type="file" size=22 name="i3GEOuploaddbffile" style="top:0px;left:0px;cursor:pointer;"></p>' + | |
118 | + '<p class="paragrafo" >arquivo: <br><input type="file" size=22 name="i3GEOuploaddbffile" style="top:0px;left:0px;cursor:pointer;"></p>' + | |
119 | 119 | '<p class=paragrafo >Projeção:</p>' + |
120 | 120 | '<div id=i3GEOuploaddbfListaepsg width="98%" style="text-align:left;border:1px solid gray;left:0px;overflow:auto;height:60px"></div>' + |
121 | 121 | '<br><p class="paragrafo" ><input id=i3GEOuploaddbfbotao1 type="button" value="Criar camada" size=12 name="submit">' + | ... | ... |
ferramentas/uploadgpx/index.js
... | ... | @@ -111,7 +111,7 @@ i3GEOF.uploadgpx = { |
111 | 111 | */ |
112 | 112 | html:function(){ |
113 | 113 | var ins = '<form id=i3GEOuploadgpxf target="i3GEOuploadgpxiframe" action="'+i3GEO.configura.locaplic+'/ferramentas/uploadgpx/upload.php" method="post" ENCTYPE="multipart/form-data">' + |
114 | - '<p class="paragrafo" >Arquivo gpx: <br><input class=digitar type="file" size=22 name="i3GEOuploadgpx" style="top:0px;left:0px;cursor:pointer;"></p>' + | |
114 | + '<p class="paragrafo" >Arquivo gpx: <br><input type="file" size=22 name="i3GEOuploadgpx" style="top:0px;left:0px;cursor:pointer;"></p>' + | |
115 | 115 | '<p class=paragrafo >Projeção:</p>' + |
116 | 116 | '<div id=i3GEOuploadgpxListaepsg width="98%" style="text-align:left;border:1px solid gray;left:0px;overflow:auto;height:60px"></div>' + |
117 | 117 | '<br><p class="paragrafo" ><input id=i3GEOuploadgpxbotao1 type="button" value="Criar camada" size=12 name="submit">' + | ... | ... |
ferramentas/uploadkml/index.js
... | ... | @@ -112,7 +112,7 @@ i3GEOF.uploadkml = { |
112 | 112 | html:function(){ |
113 | 113 | var ins = '<form id=i3GEOuploadkmlf target="i3GEOuploadkmliframe" action="'+i3GEO.configura.locaplic+'/ferramentas/uploadkml/upload.php" method="post" ENCTYPE="multipart/form-data">' + |
114 | 114 | '<p class="paragrafo" style=color:red >Não use arquivos ou nome de layer com espaços em branco ou acentuação</p>' + |
115 | - '<p class="paragrafo" >Arquivo kml: <br><input class=digitar type="file" size=22 name="i3GEOuploadkml" style="top:0px;left:0px;cursor:pointer;"></p>' + | |
115 | + '<p class="paragrafo" >Arquivo kml: <br><input type="file" size=22 name="i3GEOuploadkml" style="top:0px;left:0px;cursor:pointer;"></p>' + | |
116 | 116 | '<p class=paragrafo >Nome do layer KML: <br><input type=text size=42 name=layerkml value=""/></p>' + |
117 | 117 | '<p class=paragrafo >Projeção:</p>' + |
118 | 118 | '<div id=i3GEOuploadkmlListaepsg width="98%" style="text-align:left;border:1px solid gray;left:0px;overflow:auto;height:60px"></div>' + | ... | ... |