Commit b4b0a66ad444b478f6658a77ab435586abf18596

Authored by Edmar Moretti
1 parent 51618b02
Exists in master

remocão de arquivos desnecessarios

.buildpath 0 → 100644
@@ -0,0 +1,5 @@ @@ -0,0 +1,5 @@
  1 +<?xml version="1.0" encoding="UTF-8"?>
  2 +<buildpath>
  3 + <buildpathentry kind="src" path=""/>
  4 + <buildpathentry kind="con" path="org.eclipse.php.core.LANGUAGE"/>
  5 +</buildpath>
.project 0 → 100644
@@ -0,0 +1,28 @@ @@ -0,0 +1,28 @@
  1 +<?xml version="1.0" encoding="UTF-8"?>
  2 +<projectDescription>
  3 + <name>v6</name>
  4 + <comment></comment>
  5 + <projects>
  6 + </projects>
  7 + <buildSpec>
  8 + <buildCommand>
  9 + <name>org.eclipse.wst.common.project.facet.core.builder</name>
  10 + <arguments>
  11 + </arguments>
  12 + </buildCommand>
  13 + <buildCommand>
  14 + <name>org.eclipse.wst.validation.validationbuilder</name>
  15 + <arguments>
  16 + </arguments>
  17 + </buildCommand>
  18 + <buildCommand>
  19 + <name>org.eclipse.dltk.core.scriptbuilder</name>
  20 + <arguments>
  21 + </arguments>
  22 + </buildCommand>
  23 + </buildSpec>
  24 + <natures>
  25 + <nature>org.eclipse.php.core.PHPNature</nature>
  26 + <nature>org.eclipse.wst.common.project.facet.core.nature</nature>
  27 + </natures>
  28 +</projectDescription>
.settings/org.eclipse.php.core.prefs 0 → 100644
@@ -0,0 +1,2 @@ @@ -0,0 +1,2 @@
  1 +eclipse.preferences.version=1
  2 +include_path=0;/v6
.settings/org.eclipse.wst.common.project.facet.core.xml 0 → 100644
@@ -0,0 +1,7 @@ @@ -0,0 +1,7 @@
  1 +<?xml version="1.0" encoding="UTF-8"?>
  2 +<faceted-project>
  3 + <fixed facet="php.component"/>
  4 + <fixed facet="php.core.component"/>
  5 + <installed facet="php.core.component" version="1"/>
  6 + <installed facet="php.component" version="5.6"/>
  7 +</faceted-project>
admin/php/admin.php
@@ -38,8 +38,8 @@ if(!isset($locaplic) || !isset($dir_tmp)){ @@ -38,8 +38,8 @@ if(!isset($locaplic) || !isset($dir_tmp)){
38 include(dirname(__FILE__)."/../../ms_configura.php"); 38 include(dirname(__FILE__)."/../../ms_configura.php");
39 } 39 }
40 if(!file_exists($dir_tmp)){ 40 if(!file_exists($dir_tmp)){
41 - @mkdir ($dir_tmp,0774);  
42 - chmod($dir_tmp,0774); 41 + @mkdir ($dir_tmp,0744);
  42 + chmod($dir_tmp,0744);
43 } 43 }
44 include_once($locaplic."/classesphp/pega_variaveis.php"); 44 include_once($locaplic."/classesphp/pega_variaveis.php");
45 error_reporting(0); 45 error_reporting(0);
@@ -313,6 +313,38 @@ function i3GeoAdminInsertUnico($pdo,$tabela,$data,$colTemp,$colId){ @@ -313,6 +313,38 @@ function i3GeoAdminInsertUnico($pdo,$tabela,$data,$colTemp,$colId){
313 return "UPDATE ID "; 313 return "UPDATE ID ";
314 } 314 }
315 } 315 }
  316 +function i3GeoAdminOrdena($pdo,$ordem,$tabela,$colunaid){
  317 + global $esquemaadmin;
  318 + $pdo->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);
  319 + $arr = array();
  320 + $n = count($ordem) + 1;
  321 + for($i = 1; $i < $n; $i++){
  322 + $arr[$ordem[$i - 1]] = $i;
  323 + }
  324 + $str_ids = implode(',', array_keys($arr));
  325 + $str_when_then = "";
  326 + foreach($arr as $id => $ordem) {
  327 + $str_when_then .= sprintf(" WHEN " . $colunaid . " = %d THEN %s ",
  328 + $id,
  329 + $ordem // note, you'd sanitize this if from user input
  330 + );
  331 + }
  332 + //whitespace + appends included in example for readability
  333 + $template = "UPDATE '".$esquemaadmin . $tabela."' "
  334 + . " SET 'ordem' = CASE "
  335 + . " %s "
  336 + . " END "
  337 + . " WHERE " . $colunaid . " IN (%s);";
  338 + $sql = sprintf($template, $str_when_then, $str_ids);
  339 +
  340 + try {
  341 + $resultado = $pdo->query($sql);
  342 + } catch (PDOException $e) {
  343 + return false;
  344 + }
  345 + i3GeoAdminInsertLog($pdo,$sql,array());
  346 + return true;
  347 +}
316 //$logTransacoes vem do ms_configura.php 348 //$logTransacoes vem do ms_configura.php
317 //ver tambem classe_metaestat.php 349 //ver tambem classe_metaestat.php
318 function i3GeoAdminInsertLog($pdo,$sql,$data=array()){ 350 function i3GeoAdminInsertLog($pdo,$sql,$data=array()){
admin/php/conexao.php
@@ -65,7 +65,7 @@ if(!isset($logTransacoes)){ @@ -65,7 +65,7 @@ if(!isset($logTransacoes)){
65 $convUTF = true; 65 $convUTF = true;
66 if($conexaoadmin == ""){ 66 if($conexaoadmin == ""){
67 $arquivosqlite = $locaplic."/admin/admin.db"; 67 $arquivosqlite = $locaplic."/admin/admin.db";
68 - chmod($arquivosqlite,0774); 68 + chmod($arquivosqlite,0777);
69 //echo $arquivosqlite;exit; 69 //echo $arquivosqlite;exit;
70 if(!file_exists($arquivosqlite)){ 70 if(!file_exists($arquivosqlite)){
71 echo "O arquivo admin.db n&atilde;o existe. Utilize i3geo/admin/criabanco.php para criar o banco de dados SQLITE."; 71 echo "O arquivo admin.db n&atilde;o existe. Utilize i3geo/admin/criabanco.php para criar o banco de dados SQLITE.";
admin/php/editormapfile.php
@@ -2466,7 +2466,7 @@ function removeCabecalho($arq,$symbolset=true) @@ -2466,7 +2466,7 @@ function removeCabecalho($arq,$symbolset=true)
2466 $nomeMapfileTmp = $dir_tmp."/ogc_".md5($arq).".map"; 2466 $nomeMapfileTmp = $dir_tmp."/ogc_".md5($arq).".map";
2467 $nomeMapfileTmp = str_replace(",","",$nomeMapfileTmp); 2467 $nomeMapfileTmp = str_replace(",","",$nomeMapfileTmp);
2468 $nomeMapfileTmp = str_replace(" ","",$nomeMapfileTmp); 2468 $nomeMapfileTmp = str_replace(" ","",$nomeMapfileTmp);
2469 - chmod($nomeMapfileTmp,0774); 2469 + chmod($nomeMapfileTmp,0777);
2470 unlink($nomeMapfileTmp); 2470 unlink($nomeMapfileTmp);
2471 //echo $nomeMapfileTmp;exit; 2471 //echo $nomeMapfileTmp;exit;
2472 //remove o cache OGC 2472 //remove o cache OGC
@@ -2537,11 +2537,11 @@ function removeCabecalho($arq,$symbolset=true) @@ -2537,11 +2537,11 @@ function removeCabecalho($arq,$symbolset=true)
2537 } 2537 }
2538 function rrmdir($dir) { 2538 function rrmdir($dir) {
2539 if (is_dir($dir)) { 2539 if (is_dir($dir)) {
2540 - chmod($dir,0774); 2540 + chmod($dir,0777);
2541 $objects = scandir($dir); 2541 $objects = scandir($dir);
2542 foreach ($objects as $object) { 2542 foreach ($objects as $object) {
2543 if ($object != "." && $object != "..") { 2543 if ($object != "." && $object != "..") {
2544 - chmod($dir."/".$object,0774); 2544 + chmod($dir."/".$object,0777);
2545 if (filetype($dir."/".$object) == "dir") rrmdir($dir."/".$object); else unlink($dir."/".$object); 2545 if (filetype($dir."/".$object) == "dir") rrmdir($dir."/".$object); else unlink($dir."/".$object);
2546 } 2546 }
2547 } 2547 }
admin/php/estat_mapa_upload.php
@@ -33,7 +33,7 @@ if (isset($_FILES[&#39;uploadimagem&#39;][&#39;name&#39;])){ @@ -33,7 +33,7 @@ if (isset($_FILES[&#39;uploadimagem&#39;][&#39;name&#39;])){
33 {echo "<p class='paragrafo' >Ocorreu um erro no envio do arquivo. Verifique as permissoes de escrita";exit;} 33 {echo "<p class='paragrafo' >Ocorreu um erro no envio do arquivo. Verifique as permissoes de escrita";exit;}
34 if($status == 1){ 34 if($status == 1){
35 echo "<p class='paragrafo' >Arquivo enviado.</p>"; 35 echo "<p class='paragrafo' >Arquivo enviado.</p>";
36 - chmod($arq,0774); 36 + chmod($arq,0777);
37 } 37 }
38 else{ 38 else{
39 echo "<p class='paragrafo' >Erro ao enviar o arquivo.</p>"; 39 echo "<p class='paragrafo' >Erro ao enviar o arquivo.</p>";
@@ -56,4 +56,4 @@ function verificaNome($nome) @@ -56,4 +56,4 @@ function verificaNome($nome)
56 } 56 }
57 ?> 57 ?>
58 </body> 58 </body>
59 -</html> 59 -</html>
  60 +</html>
60 \ No newline at end of file 61 \ No newline at end of file
classesjs/compactajs.php
@@ -365,7 +365,7 @@ function packer($src,$out,$tipo=&quot;None&quot;) @@ -365,7 +365,7 @@ function packer($src,$out,$tipo=&quot;None&quot;)
365 $time = sprintf('%.4f', ($t2 - $t1) ); 365 $time = sprintf('%.4f', ($t2 - $t1) );
366 echo 'script ', $src, ' packed in ' , $out, ', in ', $time, ' s.', "\n"; 366 echo 'script ', $src, ' packed in ' , $out, ', in ', $time, ' s.', "\n";
367 file_put_contents($out, $packed); 367 file_put_contents($out, $packed);
368 - chmod($out,0774); 368 + chmod($out,0744);
369 } 369 }
370 function salvatudojs($jsfiles,$buffer,$final,$tipo) 370 function salvatudojs($jsfiles,$buffer,$final,$tipo)
371 { 371 {
@@ -409,7 +409,7 @@ function salvatudojs($jsfiles,$buffer,$final,$tipo) @@ -409,7 +409,7 @@ function salvatudojs($jsfiles,$buffer,$final,$tipo)
409 $fecha = fclose ($abre); 409 $fecha = fclose ($abre);
410 410
411 411
412 - chmod($final,0774); 412 + chmod($final,0744);
413 //gzip 413 //gzip
414 $abre = fopen($final, "r"); 414 $abre = fopen($final, "r");
415 if ($tipo == "js") 415 if ($tipo == "js")
@@ -424,7 +424,7 @@ function salvatudojs($jsfiles,$buffer,$final,$tipo) @@ -424,7 +424,7 @@ function salvatudojs($jsfiles,$buffer,$final,$tipo)
424 $abre = fopen($final.".php", "wt"); 424 $abre = fopen($final.".php", "wt");
425 $escreve = fwrite ($abre,$buffer); 425 $escreve = fwrite ($abre,$buffer);
426 $fecha = fclose ($abre); 426 $fecha = fclose ($abre);
427 - chmod($final.".php",0774); 427 + chmod($final.".php",0744);
428 } 428 }
429 ?> 429 ?>
430 <p>Notas importantes:</p> 430 <p>Notas importantes:</p>
classesjs/compactajs_closurecompiler.php
@@ -106,7 +106,7 @@ foreach($lista as $l){ @@ -106,7 +106,7 @@ foreach($lista as $l){
106 $saida = shell_exec("java -jar {$java} --warning_level DEFAULT --js {$input} --js_output_file {$output}"); 106 $saida = shell_exec("java -jar {$java} --warning_level DEFAULT --js {$input} --js_output_file {$output}");
107 echo "<pre>".$saida."</pre>"; 107 echo "<pre>".$saida."</pre>";
108 unlink($input); 108 unlink($input);
109 - chmod($output,0774); 109 + chmod($output,0744);
110 } 110 }
111 111
112 112
@@ -235,7 +235,7 @@ foreach ($cssfiles as $f) @@ -235,7 +235,7 @@ foreach ($cssfiles as $f)
235 $abre = fopen("../css/i3geo_ferramentas6.css", "wt"); 235 $abre = fopen("../css/i3geo_ferramentas6.css", "wt");
236 $escreve = fwrite ($abre,$buffer); 236 $escreve = fwrite ($abre,$buffer);
237 $fecha = fclose ($abre); 237 $fecha = fclose ($abre);
238 -chmod("../css/i3geo_ferramentas6.css",0774); 238 +chmod("../css/i3geo_ferramentas6.css",0744);
239 // 239 //
240 //compacta os codigos para o Mashup do OpenLayers 240 //compacta os codigos para o Mashup do OpenLayers
241 // 241 //
@@ -322,7 +322,7 @@ function packer($src,$out,$tipo=&quot;None&quot;) @@ -322,7 +322,7 @@ function packer($src,$out,$tipo=&quot;None&quot;)
322 $time = sprintf('%.4f', ($t2 - $t1) ); 322 $time = sprintf('%.4f', ($t2 - $t1) );
323 echo 'script ', $src, ' packed in ' , $out, ', in ', $time, ' s.', "\n"; 323 echo 'script ', $src, ' packed in ' , $out, ', in ', $time, ' s.', "\n";
324 file_put_contents($out, $packed); 324 file_put_contents($out, $packed);
325 - chmod($out,0774); 325 + chmod($out,0744);
326 } 326 }
327 function removeconsole($src,$out,$tipo="None") 327 function removeconsole($src,$out,$tipo="None")
328 { 328 {
@@ -372,7 +372,7 @@ function salvatudojs($jsfiles,$buffer,$final,$tipo) @@ -372,7 +372,7 @@ function salvatudojs($jsfiles,$buffer,$final,$tipo)
372 $fecha = fclose ($abre); 372 $fecha = fclose ($abre);
373 373
374 374
375 - chmod($final,0774); 375 + chmod($final,0744);
376 //gzip 376 //gzip
377 $abre = fopen($final, "r"); 377 $abre = fopen($final, "r");
378 if ($tipo == "js") 378 if ($tipo == "js")
@@ -387,6 +387,6 @@ function salvatudojs($jsfiles,$buffer,$final,$tipo) @@ -387,6 +387,6 @@ function salvatudojs($jsfiles,$buffer,$final,$tipo)
387 $abre = fopen($final.".php", "wt"); 387 $abre = fopen($final.".php", "wt");
388 $escreve = fwrite ($abre,$buffer); 388 $escreve = fwrite ($abre,$buffer);
389 $fecha = fclose ($abre); 389 $fecha = fclose ($abre);
390 - chmod($final.".php",0774); 390 + chmod($final.".php",0744);
391 } 391 }
392 ?> 392 ?>
classesphp/mapa_openlayers.php
@@ -496,8 +496,8 @@ function salvaCacheImagem($cachedir,$map,$tms){ @@ -496,8 +496,8 @@ function salvaCacheImagem($cachedir,$map,$tms){
496 } 496 }
497 $nome = $nome.".png"; 497 $nome = $nome.".png";
498 if(!file_exists($nome)){ 498 if(!file_exists($nome)){
499 - @mkdir(dirname($nome),0774,true);  
500 - chmod(dirname($nome),0774); 499 + @mkdir(dirname($nome),0744,true);
  500 + chmod(dirname($nome),0744);
501 $img->saveImage($nome); 501 $img->saveImage($nome);
502 // 502 //
503 //corta a imagem gerada para voltar ao tamanho normal 503 //corta a imagem gerada para voltar ao tamanho normal
@@ -505,7 +505,7 @@ function salvaCacheImagem($cachedir,$map,$tms){ @@ -505,7 +505,7 @@ function salvaCacheImagem($cachedir,$map,$tms){
505 if($cortePixels > 0){ 505 if($cortePixels > 0){
506 $img = cortaImagemDisco($nome,$cortePixels,256); 506 $img = cortaImagemDisco($nome,$cortePixels,256);
507 } 507 }
508 - chmod($nome,0774); 508 + chmod($nome,0744);
509 } 509 }
510 return $nome; 510 return $nome;
511 } 511 }
ferramentas/congelamapa/openlayers.php
@@ -15,7 +15,7 @@ $base = basename($map_file); @@ -15,7 +15,7 @@ $base = basename($map_file);
15 $dir = dirname($map_file); 15 $dir = dirname($map_file);
16 $novo_mapfile = $dir."/".nomeRandomico(5).$base; 16 $novo_mapfile = $dir."/".nomeRandomico(5).$base;
17 copy($map_file,$novo_mapfile); 17 copy($map_file,$novo_mapfile);
18 -chmod($novo_mapfile,0774); 18 +chmod($novo_mapfile,0744);
19 $mapa = ms_newMapObj($novo_mapfile); 19 $mapa = ms_newMapObj($novo_mapfile);
20 $mapa->setProjection(pegaProjecaoDefault("proj4")); 20 $mapa->setProjection(pegaProjecaoDefault("proj4"));
21 $numlayers = $mapa->numlayers; 21 $numlayers = $mapa->numlayers;
ferramentas/congelamapa/openlayers3.php
@@ -15,7 +15,7 @@ $base = basename($map_file); @@ -15,7 +15,7 @@ $base = basename($map_file);
15 $dir = dirname($map_file); 15 $dir = dirname($map_file);
16 $novo_mapfile = $dir."/".nomeRandomico(5).$base; 16 $novo_mapfile = $dir."/".nomeRandomico(5).$base;
17 copy($map_file,$novo_mapfile); 17 copy($map_file,$novo_mapfile);
18 -chmod($novo_mapfile,0774); 18 +chmod($novo_mapfile,0744);
19 $mapa = ms_newMapObj($novo_mapfile); 19 $mapa = ms_newMapObj($novo_mapfile);
20 $mapa->setProjection(pegaProjecaoDefault("proj4")); 20 $mapa->setProjection(pegaProjecaoDefault("proj4"));
21 $numlayers = $mapa->numlayers; 21 $numlayers = $mapa->numlayers;
ferramentas/melhorcaminho/exec.php
@@ -50,7 +50,7 @@ switch (strtoupper($funcao)) @@ -50,7 +50,7 @@ switch (strtoupper($funcao))
50 if(file_exists($cost_surface_path)){ 50 if(file_exists($cost_surface_path)){
51 $pathresult = $dir_tmp."/melhorcaminho_".nomeRandomico(); 51 $pathresult = $dir_tmp."/melhorcaminho_".nomeRandomico();
52 //cria a pasta onde os resultados serao armazenados 52 //cria a pasta onde os resultados serao armazenados
53 - mkdir ($pathresult,0774); 53 + mkdir ($pathresult,0744);
54 54
55 //parametros para o calculo de melhor caminho e linha reta 55 //parametros para o calculo de melhor caminho e linha reta
56 $best = array( 56 $best = array(
ferramentas/parametrossql/ogc.php
@@ -538,8 +538,8 @@ function salvaCacheImagem($cachedir,$map,$tms, $plugin, $tema){ @@ -538,8 +538,8 @@ function salvaCacheImagem($cachedir,$map,$tms, $plugin, $tema){
538 else{ 538 else{
539 $nome = $cachedir.$tms; 539 $nome = $cachedir.$tms;
540 } 540 }
541 - @mkdir(dirname($nome),0774,true);  
542 - chmod(dirname($nome),0774); 541 + @mkdir(dirname($nome),0744,true);
  542 + chmod(dirname($nome),0744);
543 $img->saveImage($nome); 543 $img->saveImage($nome);
544 // 544 //
545 //corta a imagem gerada para voltar ao tamanho normal 545 //corta a imagem gerada para voltar ao tamanho normal
@@ -556,7 +556,7 @@ function salvaCacheImagem($cachedir,$map,$tms, $plugin, $tema){ @@ -556,7 +556,7 @@ function salvaCacheImagem($cachedir,$map,$tms, $plugin, $tema){
556 imagecopy($imgc, $img, 0 , 0 , $cortePixels , $cortePixels , 256, 256); 556 imagecopy($imgc, $img, 0 , 0 , $cortePixels , $cortePixels , 256, 256);
557 imagepng($imgc,$nome); 557 imagepng($imgc,$nome);
558 } 558 }
559 - chmod($nome,0774); 559 + chmod($nome,0744);
560 header('Content-Length: '.filesize($nome)); 560 header('Content-Length: '.filesize($nome));
561 header('Content-Type: image/png'); 561 header('Content-Type: image/png');
562 header('Cache-Control: max-age=3600, must-revalidate'); 562 header('Cache-Control: max-age=3600, must-revalidate');
init/index.php
@@ -21,16 +21,16 @@ if (! empty ( $_GET [&quot;customDir&quot;] )) { @@ -21,16 +21,16 @@ if (! empty ( $_GET [&quot;customDir&quot;] )) {
21 $customDir = "interface"; 21 $customDir = "interface";
22 } 22 }
23 if (! file_exists ( $dir_tmp )) { 23 if (! file_exists ( $dir_tmp )) {
24 - @mkdir ( $dir_tmp, 0774 ); 24 + @mkdir ( $dir_tmp, 0744 );
25 } 25 }
26 if (file_exists ( $dir_tmp )) { 26 if (file_exists ( $dir_tmp )) {
27 - @mkdir ( $dir_tmp . "/comum", 0774 );  
28 - @mkdir ( $dir_tmp . "/saiku-datasources", 0774 );  
29 - chmod ( $dir_tmp . "/saiku-datasources", 0774 );  
30 - @mkdir ( $dir_tmp . "/cache", 0774 );  
31 - chmod ( $dir_tmp . "/cache", 0774 );  
32 - @mkdir ( $dir_tmp . "/cache/googlemaps", 0774 );  
33 - chmod ( $dir_tmp . "/cache/googlemaps", 0774 ); 27 + @mkdir ( $dir_tmp . "/comum", 0744 );
  28 + @mkdir ( $dir_tmp . "/saiku-datasources", 0744 );
  29 + chmod ( $dir_tmp . "/saiku-datasources", 0744 );
  30 + @mkdir ( $dir_tmp . "/cache", 0744 );
  31 + chmod ( $dir_tmp . "/cache", 0744 );
  32 + @mkdir ( $dir_tmp . "/cache/googlemaps", 0744 );
  33 + chmod ( $dir_tmp . "/cache/googlemaps", 0744 );
34 } 34 }
35 error_reporting ( 0 ); 35 error_reporting ( 0 );
36 include "head.php"; 36 include "head.php";
mapas/index.php
@@ -7,16 +7,16 @@ if (! empty ( $_GET [&quot;customDir&quot;] )) { @@ -7,16 +7,16 @@ if (! empty ( $_GET [&quot;customDir&quot;] )) {
7 $customDir = "interface"; 7 $customDir = "interface";
8 } 8 }
9 if (! file_exists ( $dir_tmp )) { 9 if (! file_exists ( $dir_tmp )) {
10 - @mkdir ( $dir_tmp, 0774 ); 10 + @mkdir ( $dir_tmp, 0744 );
11 } 11 }
12 if (file_exists ( $dir_tmp )) { 12 if (file_exists ( $dir_tmp )) {
13 - @mkdir ( $dir_tmp . "/comum", 0774 );  
14 - @mkdir ( $dir_tmp . "/saiku-datasources", 0774 );  
15 - chmod ( $dir_tmp . "/saiku-datasources", 0774 );  
16 - @mkdir ( $dir_tmp . "/cache", 0774 );  
17 - chmod ( $dir_tmp . "/cache", 0774 );  
18 - @mkdir ( $dir_tmp . "/cache/googlemaps", 0774 );  
19 - chmod ( $dir_tmp . "/cache/googlemaps", 0774 ); 13 + @mkdir ( $dir_tmp . "/comum", 0744 );
  14 + @mkdir ( $dir_tmp . "/saiku-datasources", 0744 );
  15 + chmod ( $dir_tmp . "/saiku-datasources", 0744 );
  16 + @mkdir ( $dir_tmp . "/cache", 0744 );
  17 + chmod ( $dir_tmp . "/cache", 0744 );
  18 + @mkdir ( $dir_tmp . "/cache/googlemaps", 0744 );
  19 + chmod ( $dir_tmp . "/cache/googlemaps", 0744 );
20 } 20 }
21 error_reporting ( 0 ); 21 error_reporting ( 0 );
22 include "../init/head.php"; 22 include "../init/head.php";
mashups/openlayers.php
@@ -11,16 +11,16 @@ include_once(dirname(__FILE__).&quot;/../classesphp/funcoes_gerais.php&quot;); @@ -11,16 +11,16 @@ include_once(dirname(__FILE__).&quot;/../classesphp/funcoes_gerais.php&quot;);
11 error_reporting(0); 11 error_reporting(0);
12 //cria as pastas temporarias caso nao existam 12 //cria as pastas temporarias caso nao existam
13 if (! file_exists ( $dir_tmp )) { 13 if (! file_exists ( $dir_tmp )) {
14 - @mkdir ( $dir_tmp, 0774 ); 14 + @mkdir ( $dir_tmp, 0744 );
15 } 15 }
16 if (file_exists ( $dir_tmp )) { 16 if (file_exists ( $dir_tmp )) {
17 - @mkdir ( $dir_tmp . "/comum", 0774 );  
18 - @mkdir ( $dir_tmp . "/saiku-datasources", 0774 );  
19 - chmod ( $dir_tmp . "/saiku-datasources", 0774 );  
20 - @mkdir ( $dir_tmp . "/cache", 0774 );  
21 - chmod ( $dir_tmp . "/cache", 0774 );  
22 - @mkdir ( $dir_tmp . "/cache/googlemaps", 0774 );  
23 - chmod ( $dir_tmp . "/cache/googlemaps", 0774 ); 17 + @mkdir ( $dir_tmp . "/comum", 0744 );
  18 + @mkdir ( $dir_tmp . "/saiku-datasources", 0744 );
  19 + chmod ( $dir_tmp . "/saiku-datasources", 0744 );
  20 + @mkdir ( $dir_tmp . "/cache", 0744 );
  21 + chmod ( $dir_tmp . "/cache", 0744 );
  22 + @mkdir ( $dir_tmp . "/cache/googlemaps", 0744 );
  23 + chmod ( $dir_tmp . "/cache/googlemaps", 0744 );
24 } 24 }
25 //variaveis utilizadas 25 //variaveis utilizadas
26 $parurl = array_merge($_GET,$_POST); 26 $parurl = array_merge($_GET,$_POST);
mashups/osm.php
@@ -11,16 +11,16 @@ include_once(dirname(__FILE__).&quot;/../classesphp/funcoes_gerais.php&quot;); @@ -11,16 +11,16 @@ include_once(dirname(__FILE__).&quot;/../classesphp/funcoes_gerais.php&quot;);
11 error_reporting(0); 11 error_reporting(0);
12 //cria as pastas temporarias caso nao existam 12 //cria as pastas temporarias caso nao existam
13 if (! file_exists ( $dir_tmp )) { 13 if (! file_exists ( $dir_tmp )) {
14 - @mkdir ( $dir_tmp, 0774 ); 14 + @mkdir ( $dir_tmp, 0744 );
15 } 15 }
16 if (file_exists ( $dir_tmp )) { 16 if (file_exists ( $dir_tmp )) {
17 - @mkdir ( $dir_tmp . "/comum", 0774 );  
18 - @mkdir ( $dir_tmp . "/saiku-datasources", 0774 );  
19 - chmod ( $dir_tmp . "/saiku-datasources", 0774 );  
20 - @mkdir ( $dir_tmp . "/cache", 0774 );  
21 - chmod ( $dir_tmp . "/cache", 0774 );  
22 - @mkdir ( $dir_tmp . "/cache/googlemaps", 0774 );  
23 - chmod ( $dir_tmp . "/cache/googlemaps", 0774 ); 17 + @mkdir ( $dir_tmp . "/comum", 0744 );
  18 + @mkdir ( $dir_tmp . "/saiku-datasources", 0744 );
  19 + chmod ( $dir_tmp . "/saiku-datasources", 0744 );
  20 + @mkdir ( $dir_tmp . "/cache", 0744 );
  21 + chmod ( $dir_tmp . "/cache", 0744 );
  22 + @mkdir ( $dir_tmp . "/cache/googlemaps", 0744 );
  23 + chmod ( $dir_tmp . "/cache/googlemaps", 0744 );
24 } 24 }
25 //variaveis utilizadas 25 //variaveis utilizadas
26 $parurl = array_merge($_GET,$_POST); 26 $parurl = array_merge($_GET,$_POST);
ms_criamapa.php
@@ -595,7 +595,7 @@ $projecao = pegaProjecaoDefault(&quot;proj4&quot;); @@ -595,7 +595,7 @@ $projecao = pegaProjecaoDefault(&quot;proj4&quot;);
595 if($projecao != ""){ 595 if($projecao != ""){
596 $mapn->setProjection($projecao); 596 $mapn->setProjection($projecao);
597 } 597 }
598 - 598 +$tmpfname = str_replace(".map","",$tmpfname).".map";
599 $salvo = $mapn->save($tmpfname); 599 $salvo = $mapn->save($tmpfname);
600 600
601 $_SESSION["imgurl"] = strtolower($protocolo[0])."://".$_SERVER['HTTP_HOST'].$atual.$diretorios[2]."/"; 601 $_SESSION["imgurl"] = strtolower($protocolo[0])."://".$_SERVER['HTTP_HOST'].$atual.$diretorios[2]."/";
@@ -1366,33 +1366,33 @@ Retorno: @@ -1366,33 +1366,33 @@ Retorno:
1366 function criaDirMapa($dir_tmp,$cachedir="") 1366 function criaDirMapa($dir_tmp,$cachedir="")
1367 { 1367 {
1368 if(!file_exists($dir_tmp)){ 1368 if(!file_exists($dir_tmp)){
1369 - @mkdir ($dir_tmp,0774); 1369 + @mkdir ($dir_tmp,0744);
1370 } 1370 }
1371 if(file_exists($dir_tmp)) 1371 if(file_exists($dir_tmp))
1372 { 1372 {
1373 $tmpdirname = nomeRandomico(); 1373 $tmpdirname = nomeRandomico();
1374 - $crdir = @mkdir ($dir_tmp."/".$tmpdirname,0774);  
1375 - chmod($dir_tmp."/".$tmpdirname,0774);  
1376 - $crdiri = @mkdir ($dir_tmp."/img".$tmpdirname,0774);  
1377 - chmod($dir_tmp."/img".$tmpdirname,0774); 1374 + $crdir = @mkdir ($dir_tmp."/".$tmpdirname,0744);
  1375 + chmod($dir_tmp."/".$tmpdirname,0744);
  1376 + $crdiri = @mkdir ($dir_tmp."/img".$tmpdirname,0744);
  1377 + chmod($dir_tmp."/img".$tmpdirname,0744);
1378 $mapfile = $dir_tmp."/".$tmpdirname."/".$tmpdirname.".map"; 1378 $mapfile = $dir_tmp."/".$tmpdirname."/".$tmpdirname.".map";
1379 $tmpimgname = "img".$tmpdirname; 1379 $tmpimgname = "img".$tmpdirname;
1380 - @mkdir($dir_tmp."/comum",0774); 1380 + @mkdir($dir_tmp."/comum",0744);
1381 //utilizado para armazenar os arquivos de fonte de dados do SAIKU 1381 //utilizado para armazenar os arquivos de fonte de dados do SAIKU
1382 - @mkdir($dir_tmp."/saiku-datasources",0774);  
1383 - chmod($dir_tmp."/saiku-datasources",0774); 1382 + @mkdir($dir_tmp."/saiku-datasources",0744);
  1383 + chmod($dir_tmp."/saiku-datasources",0744);
1384 // 1384 //
1385 if($cachedir == ""){ 1385 if($cachedir == ""){
1386 - @mkdir($dir_tmp."/cache",0774);  
1387 - chmod($dir_tmp."/cache",0774);  
1388 - @mkdir($dir_tmp."/cache/googlemaps",0774);  
1389 - chmod($dir_tmp."/cache/googlemaps",0774); 1386 + @mkdir($dir_tmp."/cache",0744);
  1387 + chmod($dir_tmp."/cache",0744);
  1388 + @mkdir($dir_tmp."/cache/googlemaps",0744);
  1389 + chmod($dir_tmp."/cache/googlemaps",0744);
1390 } 1390 }
1391 else{ 1391 else{
1392 - @mkdir($cachedir,0774);  
1393 - chmod($cachedir,0774);  
1394 - @mkdir($cachedir."/googlemaps",0774);  
1395 - chmod($cachedir."/googlemaps",0774); 1392 + @mkdir($cachedir,0744);
  1393 + chmod($cachedir,0744);
  1394 + @mkdir($cachedir."/googlemaps",0744);
  1395 + chmod($cachedir."/googlemaps",0744);
1396 } 1396 }
1397 if(file_exists($dir_tmp."/".$tmpdirname)) 1397 if(file_exists($dir_tmp."/".$tmpdirname))
1398 return array($mapfile,$tmpdirname,$tmpimgname); 1398 return array($mapfile,$tmpdirname,$tmpimgname);
@@ -240,7 +240,7 @@ if(strtolower($OUTPUTFORMAT) == &quot;shape-zip&quot; &amp;&amp; $ogrOutput == false){ @@ -240,7 +240,7 @@ if(strtolower($OUTPUTFORMAT) == &quot;shape-zip&quot; &amp;&amp; $ogrOutput == false){
240 exit; 240 exit;
241 } 241 }
242 // 242 //
243 -//caso seja uma requisição WMS com format 243 +//caso seja uma requisi��o WMS com format
244 // 244 //
245 $format = $_GET["format"]; 245 $format = $_GET["format"];
246 if(strpos(strtolower($format),"kml") !== false){ 246 if(strpos(strtolower($format),"kml") !== false){
@@ -1173,8 +1173,8 @@ function salvaCacheImagem($cachedir,$map,$tms){ @@ -1173,8 +1173,8 @@ function salvaCacheImagem($cachedir,$map,$tms){
1173 $nome = $cachedir.$tms; 1173 $nome = $cachedir.$tms;
1174 } 1174 }
1175 $nome = str_replace(".png","",$nome).".png"; 1175 $nome = str_replace(".png","",$nome).".png";
1176 - @mkdir(dirname($nome),0774,true);  
1177 - chmod(dirname($nome),0774); 1176 + @mkdir(dirname($nome),0744,true);
  1177 + chmod(dirname($nome),0744);
1178 1178
1179 $img->saveImage($nome); 1179 $img->saveImage($nome);
1180 // 1180 //
@@ -1192,7 +1192,7 @@ function salvaCacheImagem($cachedir,$map,$tms){ @@ -1192,7 +1192,7 @@ function salvaCacheImagem($cachedir,$map,$tms){
1192 imagecopy($imgc, $img, 0 , 0 , $cortePixels , $cortePixels , 256, 256); 1192 imagecopy($imgc, $img, 0 , 0 , $cortePixels , $cortePixels , 256, 256);
1193 imagepng($imgc,$nome); 1193 imagepng($imgc,$nome);
1194 } 1194 }
1195 - chmod($nome,0774); 1195 + chmod($nome,0744);
1196 header('Content-Length: '.filesize($nome)); 1196 header('Content-Length: '.filesize($nome));
1197 header('Content-Type: image/png'); 1197 header('Content-Type: image/png');
1198 header('Cache-Control: max-age=3600, must-revalidate'); 1198 header('Cache-Control: max-age=3600, must-revalidate');