Commit fd2e6af16b2df9f78a2e0b2abe220ed360f5813c
1 parent
4a6cb44c
Exists in
master
correção nas opções de upload
Showing
4 changed files
with
26 additions
and
7 deletions
Show diff stats
ferramentas/aplicarsld/upload.php
... | ... | @@ -13,6 +13,7 @@ $postgis_mapa = $_SESSION["postgis_mapa"]; |
13 | 13 | ?> |
14 | 14 | <html> |
15 | 15 | <head> |
16 | +<link rel="stylesheet" type="text/css" href="../../css/input.css" /> | |
16 | 17 | <link rel="stylesheet" type="text/css" href="../../css/geral.css" /> |
17 | 18 | <title></title> |
18 | 19 | </head> |
... | ... | @@ -27,10 +28,13 @@ if (isset($_FILES['i3GEOaplicarsld']['name'])) |
27 | 28 | echo "<p class='paragrafo' >Carregando o arquivo...</p>"; |
28 | 29 | $dirmap = dirname($map_file); |
29 | 30 | //verifica nomes |
30 | - verificaNome($_FILES['i3GEOaplicarsld']['name']); | |
31 | + $ArquivoDest = $_FILES['i3GEOaplicarsld']['name']; | |
32 | + $ArquivoDest = str_replace(".sld","",$ArquivoDest).".sld"; | |
33 | + verificaNome($ArquivoDest); | |
34 | + | |
31 | 35 | //sobe arquivo |
32 | 36 | $Arquivo = $_FILES['i3GEOaplicarsld']['tmp_name']; |
33 | - $status = move_uploaded_file($Arquivo,$dirmap."/".$_FILES['i3GEOaplicarsld']['name']); | |
37 | + $status = move_uploaded_file($Arquivo,$dirmap."/".$ArquivoDest); | |
34 | 38 | |
35 | 39 | if($status != 1) |
36 | 40 | {echo "<p class='paragrafo' >Ocorreu um erro no envio do arquivo SLD";paraAguarde();exit;} | ... | ... |
ferramentas/carregamapa/upload.php
... | ... | @@ -12,6 +12,7 @@ $postgis_mapa = $_SESSION["postgis_mapa"]; |
12 | 12 | ?> |
13 | 13 | <html> |
14 | 14 | <head> |
15 | +<link rel="stylesheet" type="text/css" href="../../css/input.css" /> | |
15 | 16 | <link rel="stylesheet" type="text/css" href="../../css/geral.css" /> |
16 | 17 | <title></title> |
17 | 18 | </head> |
... | ... | @@ -23,6 +24,8 @@ if (isset($_FILES['i3GEOcarregamapafilemap']['name'])) |
23 | 24 | echo "<p class='paragrafo' >Carregando o arquivo...</p>"; |
24 | 25 | $dirmap = $dir_tmp; |
25 | 26 | $Arquivo = $_FILES['i3GEOcarregamapafilemap']['name']; |
27 | + $Arquivo = str_replace(".map","",$Arquivo).".map"; | |
28 | + | |
26 | 29 | verificaNome($Arquivo); |
27 | 30 | /* |
28 | 31 | $statusNome = 1; |
... | ... | @@ -69,6 +72,7 @@ if (isset($_FILES['i3GEOcarregamapafilemap']['name'])) |
69 | 72 | $layertemp->setmetadata("permiteogc","nao"); |
70 | 73 | $layertemp->setmetadata("editorsql","nao"); |
71 | 74 | $layertemp->setmetadata("EDITAVEL","nao"); |
75 | + $layertemp->setmetadata("PLUGINI3GEO",""); | |
72 | 76 | if ($testa == 1) |
73 | 77 | { |
74 | 78 | echo "<p class='paragrafo' >Problemas em ".($layer->name).". Removido.</p><br>"; | ... | ... |
ferramentas/importarwmc/upload.php
... | ... | @@ -10,6 +10,7 @@ $map_file = $_SESSION["map_file"]; |
10 | 10 | ?> |
11 | 11 | <html> |
12 | 12 | <head> |
13 | +<link rel="stylesheet" type="text/css" href="../../css/input.css" /> | |
13 | 14 | <link rel="stylesheet" type="text/css" href="../../css/geral.css" /> |
14 | 15 | <title></title> |
15 | 16 | </head> |
... | ... | @@ -24,10 +25,12 @@ if(isset($_FILES['i3GEOimportarwmc']['name']) && !($_POST["i3GEOimportarwmcurl"] |
24 | 25 | { |
25 | 26 | echo "<p class='paragrafo' >Carregando o arquivo...</p>"; |
26 | 27 | //verifica nomes |
27 | - verificaNome($_FILES['i3GEOimportarwmc']['name']); | |
28 | + $ArquivoDest = $_FILES['i3GEOimportarwmc']['name']; | |
29 | + $ArquivoDest = str_replace(".xml","",$ArquivoDest).".xml"; | |
30 | + verificaNome($ArquivoDest); | |
28 | 31 | //sobe arquivo |
29 | 32 | $Arquivo = $_FILES['i3GEOimportarwmc']['tmp_name']; |
30 | - $status = move_uploaded_file($Arquivo,$dirmap."/".$_FILES['i3GEOimportarwmc']['name']); | |
33 | + $status = move_uploaded_file($Arquivo,$dirmap."/".$ArquivoDest); | |
31 | 34 | $arquivo = $dirmap."/".$_FILES['i3GEOimportarwmc']['name']; |
32 | 35 | } |
33 | 36 | if($_POST["i3GEOimportarwmcurl"]) | ... | ... |
ferramentas/uploadsimbolo/upload.php
... | ... | @@ -12,6 +12,7 @@ if (ob_get_level() == 0) ob_start(); |
12 | 12 | <html> |
13 | 13 | <head> |
14 | 14 | <META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=ISO-8859-1"> |
15 | +<link rel="stylesheet" type="text/css" href="../../css/input.css" /> | |
15 | 16 | <link rel="stylesheet" type="text/css" href="../../css/geral.css" /> |
16 | 17 | <title></title> |
17 | 18 | </head> |
... | ... | @@ -26,16 +27,23 @@ if (isset($_FILES['i3GEOuploadsimboloarq']['name'])){ |
26 | 27 | sleep(1); |
27 | 28 | include_once(dirname(__FILE__)."/../../admin/php/login.php"); |
28 | 29 | if(verificaOperacaoSessao("admin/php/editortexto") == false){ |
29 | - echo "Vc nao pode realizar salvar os dados no servidor em uma pasta específica";exit; | |
30 | + echo "Vc nao pode salvar os dados no servidor em uma pasta específica";exit; | |
30 | 31 | } |
31 | 32 | if(!isset($dirDestino) || $dirDestino == ""){ |
32 | 33 | $dirDestino = $locaplic."/symbols/images"; |
33 | 34 | } |
34 | - if(!file_exists($dirDestino)) | |
35 | - {echo "<p class='paragrafo' >Pasta não existe no servidor";paraAguarde();exit;} | |
35 | + if(!file_exists($dirDestino)){ | |
36 | + $dirDestino = dirname($locaplic)."/".$dirDestino; | |
37 | + if(!file_exists($dirDestino)){ | |
38 | + echo "<p class='paragrafo' >Pasta não existe no servidor";paraAguarde();exit; | |
39 | + } | |
40 | + } | |
36 | 41 | //verifica nomes |
37 | 42 | |
38 | 43 | $nome = basename($_FILES['i3GEOuploadsimboloarq']['name']); |
44 | + | |
45 | + $nome = str_replace(".png","",$nome).".png"; | |
46 | + | |
39 | 47 | verificaNome($nome); |
40 | 48 | //sobe arquivo |
41 | 49 | $Arquivo = $_FILES['i3GEOuploadsimboloarq']['tmp_name']; | ... | ... |