Commit f00a4e9e5e4876893a7ee4a93ad8e5f9027850f6

Authored by Edmar Moretti
1 parent d8515c97

Correções na ferramenta de upload de shapefile

ferramentas/upload/index.js.php
... ... @@ -99,7 +99,8 @@ i3GEOF.upload = {
99 99 '<input type=hidden name=g_sid value="'+i3GEO.configura.sid+'" >' +
100 100 '<input type="hidden" name="MAX_FILE_SIZE" value="1000000">' +
101 101 '</form>' +
102   - '<br><iframe name=i3GEOuploadiframe style="text-align:left;border:1px solid gray;" width="98%" height="60px"></iframe>';
  102 + "<p class='paragrafo' style=color:red >Não utilize '_' no nome do arquivo. Apenas letras e números são aceitos!!!</p>" +
  103 + '<iframe name=i3GEOuploadiframe style="text-align:left;border:1px solid gray;" width="98%" height="60px"></iframe>';
103 104 return ins;
104 105 },
105 106 /*
... ... @@ -116,7 +117,7 @@ i3GEOF.upload = {
116 117 titulo = "Upload de shapefile <a class=ajuda_usuario target=_blank href='" + i3GEO.configura.locaplic + "/ajuda_usuario.php?idcategoria=4&idajuda=27' >&nbsp;&nbsp;&nbsp;</a>";
117 118 janela = i3GEO.janela.cria(
118 119 "355px",
119   - "450px",
  120 + "470px",
120 121 "",
121 122 "",
122 123 "",
... ...
ferramentas/upload/upload.php
... ... @@ -32,7 +32,7 @@ if (isset($_FILES[&#39;i3GEOuploadshp&#39;][&#39;name&#39;]))
32 32 $mapa = ms_newMapObj($map_file);
33 33 $dirmap = dirname($map_file);
34 34 }
35   - if(isset($dirDestino)){
  35 + if(isset($dirDestino) && $dirDestino != ""){
36 36 if(!isset($editores))
37 37 {echo "<p class='paragrafo' >Lista de editores não disponível. Não pode gravar fora do diretório temporário";paraAguarde();exit;}
38 38 $dirmap = $dirDestino;
... ... @@ -62,6 +62,10 @@ if (isset($_FILES[&#39;i3GEOuploadshp&#39;][&#39;name&#39;]))
62 62 $status = move_uploaded_file($Arquivo,$dirmap."/".$nomePrefixo.".dbf");
63 63 if($status != 1)
64 64 {echo "<p class='paragrafo' >Ocorreu um erro no envio do arquivo DBF";paraAguarde();exit;}
  65 +
  66 + if(!file_exists($dirmap."/".$nomePrefixo.".shp"))
  67 + {echo "<p class='paragrafo' >Ocorreu algum problema no envio do arquivo ".$dirmap."/".$nomePrefixo;paraAguarde();exit;}
  68 +
65 69 echo "<p class='paragrafo' >Arquivo enviado.</p>";
66 70 if(isset($map_file)){
67 71 echo "<p class='paragrafo' >Adicionando tema...</p>";
... ...
temas/testeutf8postgis.map
... ... @@ -4,7 +4,8 @@ MAP
4 4 FONTSET "../symbols/fontes.txt"
5 5 SYMBOLSET "../symbols/simbolos.sym"
6 6 LAYER
7   - CONNECTION "teste"
  7 + #CONNECTION "teste"
  8 + CONNECTION "user=postgres password=postgres dbname=postgis host=localhost port=5432 options='-c client_encoding=ISO-8859-1'"
8 9 CONNECTIONTYPE POSTGIS
9 10 DATA "the_geom FROM (select * FROM teste.estados) as foo USING UNIQUE gid USING SRID=4291"
10 11 METADATA
... ...