Commit fd2e6af16b2df9f78a2e0b2abe220ed360f5813c

Authored by Edmar Moretti
1 parent 4a6cb44c
Exists in master

correção nas opções de upload

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