Commit faad436d75aead960fe49b09475eb99839ae5236
1 parent
d68ef852
Exists in
master
and in
7 other branches
Correção nas ferramentas de upload
Showing
5 changed files
with
7 additions
and
7 deletions
Show diff stats
admin/php/estat_mapa_upload.php
... | ... | @@ -28,7 +28,7 @@ if (isset($_FILES['uploadimagem']['name'])){ |
28 | 28 | //sobe arquivo |
29 | 29 | $Arquivo = $_FILES['uploadimagem']['tmp_name']; |
30 | 30 | //echo $Arquivo; |
31 | - $status = move_uploaded_file($Arquivo,$arq); | |
31 | + $status = move_uploaded_file($Arquivo,str_replace(".png","",$arq).".png"); | |
32 | 32 | if($status != 1) |
33 | 33 | {echo "<p class='paragrafo' >Ocorreu um erro no envio do arquivo. Verifique as permissoes de escrita";exit;} |
34 | 34 | if($status == 1){ | ... | ... |
admin/php/metaestat_mapa_uploadimagem.php
... | ... | @@ -32,12 +32,11 @@ if (isset($_FILES['uploadimagem']['name'])){ |
32 | 32 | //sobe arquivo |
33 | 33 | $Arquivo = $_FILES['uploadimagem']['tmp_name']; |
34 | 34 | //echo $Arquivo; |
35 | - $status = move_uploaded_file($Arquivo,$arq); | |
35 | + $status = move_uploaded_file($Arquivo,str_replace(".png","",$arq).".png"); | |
36 | 36 | if($status != 1) |
37 | 37 | {echo "<p class='paragrafo' >Ocorreu um erro no envio do arquivo. Verifique as permissoes de escrita";exit;} |
38 | 38 | if($status == 1){ |
39 | 39 | echo "<p class='paragrafo' >Arquivo enviado.</p>"; |
40 | - chmod($arq,0777); | |
41 | 40 | } |
42 | 41 | else{ |
43 | 42 | echo "<p class='paragrafo' >Erro ao enviar o arquivo.</p>"; | ... | ... |
admin/php/metaestat_uploadcsv_submit.php
... | ... | @@ -38,7 +38,7 @@ if (ob_get_level() == 0) ob_start(); |
38 | 38 | sleep(1); |
39 | 39 | $arqcsv = $_FILES['i3GEOuploadcsv']['tmp_name']; |
40 | 40 | $nomePrefixo = str_replace(" ","_",removeAcentos($_FILES['i3GEOuploadcsv']['name'])); |
41 | - $nomePrefixo = $nomePrefixo."_".(nomeRandomico(4)); | |
41 | + $nomePrefixo = $nomePrefixo."_".(nomeRandomico(4)).".csv"; | |
42 | 42 | |
43 | 43 | $Arquivo = $_FILES['i3GEOuploadcsv']['tmp_name']; |
44 | 44 | $status = move_uploaded_file($Arquivo,$dir_tmp."/".$nomePrefixo); | ... | ... |
admin/php/metaestat_uploaddados_submit.php
... | ... | @@ -7,7 +7,7 @@ if (isset($_FILES['i3GEOuploadArquivo']['name'])) |
7 | 7 | { |
8 | 8 | require_once (dirname(__FILE__)."/../../ms_configura.php"); |
9 | 9 | $Arquivoup = $_FILES['i3GEOuploadArquivo']['tmp_name']; |
10 | - $nomearquivoserv = $dir_tmp."/upload".basename($Arquivoup); | |
10 | + $nomearquivoserv = $dir_tmp."/upload".basename($Arquivoup).".csv"; | |
11 | 11 | //echo $nomearquivoserv; |
12 | 12 | if(file_exists($nomearquivoserv)){ |
13 | 13 | unlink($nomearquivoserv); | ... | ... |
admin/php/uploadgvp.php
... | ... | @@ -22,9 +22,10 @@ if (isset($_FILES['i3GEOuploadgvp']['name'])){ |
22 | 22 | ob_flush(); |
23 | 23 | flush(); |
24 | 24 | sleep(1); |
25 | - $arq = $locaplic."/temas/".$_FILES['i3GEOuploadgvp']['name']; | |
26 | - //verifica nomes | |
27 | 25 | verificaNome($_FILES['i3GEOuploadgvp']['name']); |
26 | + $ArquivoDest = $_FILES['i3GEOuploadgvp']['name']; | |
27 | + $ArquivoDest = str_replace(".gvp","",$ArquivoDest).".gvp"; | |
28 | + $arq = $locaplic."/temas/".$ArquivoDest; | |
28 | 29 | if(file_exists($arq)){ |
29 | 30 | unlink($arq); |
30 | 31 | } | ... | ... |