Пример #1
0
<style type="text/css">
body {
	margin: 20;
	padding: 20;
	font-size: 14px;
}
</style>
<link rel="stylesheet" type="text/css" href="../html/admin.css">
</head>
<body class=" yui-skin-sam fundoPonto">
	<div class="bordaSuperior">&nbsp;</div>
	<div class="mascaraPrincipal" id="divGeral" style="width: 100%;max-width:95%">
		<div id=cabecalhoPrincipal></div>
		<h1>Lista de templates para uso em aplica&ccedil;&otilde;es do sistema de metadados estat&iacute;sticos</h1>
		<?php 
$arqs = listaArquivos($locaplic . $metaestatTemplates);
$arqs = $arqs["arquivos"];
foreach ($arqs as $arq) {
    $nome = explode(".", $arq);
    $nome = $nome[0];
    $ext = explode(".", $arq);
    $ext = $ext[1];
    if ($ext == "php") {
        echo "<p>Nome do template: <i>{$arq}</i></p>";
        $nomeimg = $locaplic . $metaestatTemplates . "/" . $nome . ".png";
        if (file_exists($nomeimg)) {
            echo "<img style='border:1px solid gray' src='";
            echo "metaestat_templates.php?&nomeimg={$nomeimg}&tipo=png";
            echo "' />";
        }
    }
Пример #2
0
			  </div>
			  
		</div>
	</section>

	<section id="list_items" class="home-section bg-white">
		<div class="container">
      			  <div class="row">
				  <div class="col-md-offset-2 col-md-8">
					<div class="section-heading">
 <h2>Arquivos anexados</h2>
<h5>Se na lista abaixo, o seu arquivo começar com "http://", por favor, clique, grave em seu computador, faça o upload novamente e apague a ocorrência citada.</h5>
					</div>
			<div class="table-responsive list_info">
                         <?php 
        listaArquivos($_SESSION['idEvento']);
        ?>
			</div>
				  </div>
			  </div>  


		</div>
	</section>


<?php 
        break;
    case "ocorrencias":
        include "../include/menuEvento.php";
        if (isset($_POST['dataInicio'])) {
Пример #3
0
 function listaSimbolos($tipo, $dir_tmp, $imgdir, $onclick, $tamanho = 8, $width = 1, $forca = false)
 {
     $versao = versao();
     $versao = $versao["principal"];
     error_reporting(0);
     if ($tipo == 3) {
         $tipo = 2;
     }
     //tipo raster
     if ($imgdir == "") {
         $dir = $dir_tmp;
     } else {
         $dir = $dir_tmp . "/" . $imgdir;
     }
     if ($forca == true) {
         unlink($dir . "/simbolos" . $tipo . ".inc");
     }
     $ins = "";
     //pega imagens que podem ser usadas como simbolos
     if ($tipo == 0) {
         if (!isset($locaplic)) {
             include dirname(__FILE__) . "/../ms_configura.php";
         }
         //veja esse codigo tambem em ferramentas/uploadsimbolo/exec.php
         $pasta = $locaplic . "/temas";
         $url = "../temas";
         if ($customDir != "interface") {
             $teste = $locaplic . "/" . $customDir;
             if (file_exists($teste)) {
                 $pasta = $teste;
                 $url = "../" . $customDir;
             }
             $teste = $locaplic . "/" . $customDir . "/images";
             if (file_exists($teste)) {
                 $pasta = $teste;
                 $url = "../" . $customDir . "/images";
             }
             $teste = $locaplic . "/" . $customDir . "/imagens";
             if (file_exists($teste)) {
                 $pasta = $teste;
                 $url = "../" . $customDir . "/imagens";
             }
         }
         if (file_exists($pasta)) {
             $lista = listaArquivos($pasta, true, array("png", "PNG"));
             //var_dump($lista);exit;
             $n = count($lista["nomes"]);
             for ($i = 0; $i < $n; $i++) {
                 $ins .= "<img src='" . $url . "/" . $lista["nomes"][$i] . "' style='max-width: 80px;cursor:pointer;border: 5px solid #FFFFFF' title=" . $pasta . "/" . $lista["nomes"][$i] . " onclick='" . $onclick . "'>";
             }
         }
     }
     if (!file_exists($dir . "/simbolos" . $tipo . ".inc")) {
         $f = fopen($dir . "/simbolos" . $tipo . ".inc", "w");
         if ($tipo == 2) {
             $t = "simpolv" . $versao . ".map";
         }
         if ($tipo == 0) {
             $t = "simptv" . $versao . ".map";
         }
         if ($tipo == 1) {
             $t = "simlinv" . $versao . ".map";
             $tamanho = $tamanho / 4;
         }
         if (strtoupper(substr(PHP_OS, 0, 3) == 'WIN')) {
             $mapatemp = ms_newMapObj($this->localaplicacao . "\\aplicmap\\" . $t);
         } else {
             $mapatemp = ms_newMapObj($this->localaplicacao . "/aplicmap/" . $t);
         }
         $l = $mapatemp->getlayer(0);
         if (strtoupper(substr(PHP_OS, 0, 3) == 'WIN')) {
             $novoss = dirname($this->mapa->symbolsetfilename) . "\\" . basename($mapatemp->symbolsetfilename);
         } else {
             $novoss = dirname($this->mapa->symbolsetfilename) . "/" . basename($mapatemp->symbolsetfilename);
         }
         $this->mapa->setsymbolset($novoss);
         $ns = $this->mapa->getnumsymbols();
         $inis = 0;
         //na versao 7 nao tem o simbolo 0
         if ($this->v >= 7) {
             $inis = 1;
             //se for versao 7 inclui um primeiro simbolo com valor 0 e imagem
             $oSymbol = $this->mapa->getSymbolObjectById(1);
             $adiciona = ms_newLayerObj($this->mapa, $l);
             $nomel = $l->name;
             $tematemp = $this->mapa->getlayerbyname($nomel);
             $c = $tematemp->getClass(0);
             $e = $c->getstyle(0);
             $e->set("size", 1);
             $e->set("width", 1);
             $ico = $c->createLegendIcon(40, 40);
             $nimg = $ico->saveWebImage();
             $pat = $this->mapa->web->imageurl;
             $ins .= "<img src='" . $nimg . "' style='cursor:pointer;border: 5px solid #FFFFFF' title='0' onclick='" . $onclick . "'>";
         }
         for ($i = $inis; $i < $ns; ++$i) {
             $oSymbol = $this->mapa->getSymbolObjectById($i);
             $nomes = $oSymbol->name;
             if ($nomes == "") {
                 $nomes = $i;
             }
             $adiciona = ms_newLayerObj($this->mapa, $l);
             $nomel = $l->name;
             $tematemp = $this->mapa->getlayerbyname($nomel);
             $c = $tematemp->getClass(0);
             $e = $c->getstyle(0);
             $e->set("symbolname", $nomes);
             $e->set("size", $tamanho);
             $e->set("width", $width);
             $ico = $c->createLegendIcon(40, 40);
             $nimg = $ico->saveWebImage();
             $pat = $this->mapa->web->imageurl;
             $ins .= "<img src='" . $nimg . "' style='cursor:pointer;border: 5px solid #FFFFFF' title=" . $nomes . " onclick='" . $onclick . "'>";
         }
         fwrite($f, "<?php \$res = \"" . $ins . "\";?>");
         fclose($f);
         //copy ($dir."/simbolos".$tipo.".inc",$dir_tmp."/comum/simbolos".$tipo.".inc");
         return $ins;
     } else {
         $res = "";
         include_once $dir . "/simbolos" . $tipo . ".inc";
         return $res;
     }
 }
Пример #4
0
        //pega o caminho
        //nome
        $nome = explode("/", $_GET["diretorio"]);
        $nome = $nome[0];
        if (empty($nome)) {
            $retorno = "erro";
        } else {
            //remove o nome do caminho
            $novo = explode("/", $_GET["diretorio"]);
            $novo[0] = "";
            $_GET["diretorio"] = implode("/", $novo);
            //
            include dirname(__FILE__) . "/../../ms_configura.php";
            $d = $navegadoresLocais[0]["drives"];
            $p = "";
            foreach ($d as $n) {
                if ($n["nome"] == $nome) {
                    $p = $n["caminho"];
                }
            }
            if ($p != "" && file_exists($p)) {
                $path = $p . "/" . $_GET["diretorio"];
                $path = str_replace(".", "", $path);
                $retorno = listaArquivos($path, true);
            } else {
                $retorno = "erro";
            }
        }
        break;
}
cpjson($retorno);
Пример #5
0
 /*
  Valor: LISTAINTERFACES
 
 Lista as interfaces de abertura de mapas
 
 Pesquisa na pasta interfaces e na pasta definida em $customDir
 */
 case "LISTAINTERFACES":
     include dirname(__FILE__) . "/../ms_configura.php";
     $pesquisarEm = array($locaplic . "/interface");
     if (isset($customDir) && $customDir != "" && $customDir != "interface") {
         $pesquisarEm[] = $locaplic . "/" . $customDir;
     }
     $retorno = array();
     foreach ($pesquisarEm as $p) {
         $r = listaArquivos($p);
         //var_dump($r);exit;
         $arqs = $r["arquivos"];
         $ext = $r["extensoes"];
         $nomes = $r["nomes"];
         $n = count($arqs);
         for ($i = 0; $i < $n; $i++) {
             if (in_array($ext[$i], array("php", "phtml", "htm", "html"))) {
                 //verifica se tem a carga do js i3geo.js
                 $a = $p . "/" . $nomes[$i];
                 $handle = fopen($a, "r");
                 $conteudo = fread($handle, filesize($a));
                 fclose($handle);
                 if (strstr($conteudo, "i3geo.js")) {
                     $retorno[] = "../" . basename($p) . "/" . $nomes[$i];
                 }
Пример #6
0
 ms_ResetErrorList();
 //verifica login
 if (empty($_POST["senha"]) || empty($_POST["usuario"])) {
     exit;
 } else {
     $continua = verificaMaster($_POST["usuario"], $_POST["senha"], $i3geomaster);
     if ($continua === false) {
         echo "<div class='alert alert-warning'>Usu&aacute;rio n&atilde;o registrado em i3geo/ms_configura.php na vari&aacute;vel i3geomaster</div>";
         exit;
     }
 }
 if (ob_get_level() == 0) {
     ob_start();
 }
 error_reporting(0);
 $arqs = listaArquivos("../../../temas", true, array("map", "gvp"));
 $arqs = $arqs["arquivos"];
 sort($arqs);
 foreach ($arqs as $arq) {
     $arq = str_replace(" ", "xxxx", $arq);
     $temp = explode(".", $arq);
     if (file_exists($locaplic . '/temas/' . $arq) && $temp[count($temp) - 1] == "map" && !(strpos($temp[0], "_") === 0)) {
         echo "<div 'class=well'><h4>{$arq}</h4>";
         if ($tipo == "mini" || $tipo == "todos") {
             if (!file_exists($locaplic . '/temas/miniaturas/' . $arq . '.mini.png')) {
                 verificaMiniatura($arq, "mini");
             }
         }
         if ($tipo == "grande" || $tipo == "todos") {
             if (!file_exists($locaplic . '/temas/miniaturas/' . $arq . '.grande.png')) {
                 verificaMiniatura($arq, "grande");
Пример #7
0
        if ($temp[1] == "map" || $temp[1] == "gvp") {
            $combo .= "<option value='" . $temp[0] . "'>" . $temp[0] . "</option>";
        }
    }
    echo $combo . "</select></form><br>";
    echo '<br><input type=button value="Testa tabela" id="rodatabela" />';
}
$solegenda = $_GET["solegenda"];
$iniciar = $_GET["iniciar"];
$map = $_GET["map"];
if (isset($map) && $map != "") {
    if (!isset($solegenda) || $solegenda == "") {
        $solegenda = "nao";
    }
    if ($map == "todos") {
        $arqs = listaArquivos("temas", true, array("map"));
        sort($arqs["arquivos"]);
        $tipo = "todos";
        $conta = 0;
        echo "<br>N&uacute;mero de mapas = "******"arquivos"]) . " Faltam= " . (count($arqs["arquivos"]) - $iniciar - 10) . "<br>";
        if (!isset($iniciar)) {
            $iniciar = 0;
        }
        foreach ($arqs["arquivos"] as $arq) {
            if ($conta >= $iniciar && $conta < $iniciar + 10) {
                //arquivos php so sao validos se estiverem em i3geo/temas
                verifica($arq, $solegenda);
            }
            $conta++;
        }
        echo "<hr><br><br><a href='testamapfile.php?map=todos&iniciar=" . ($iniciar + 10) . "' >Próximos mapas</a>";
Пример #8
0
     $arq = listaArquivos($d);
     $arq["metaestatTemplates"] = $metaestatTemplates;
     retornaJSON($arq);
     exit;
     break;
     //lista os logos que o usuario pode escolher para publicar mapas
     //a pasta com alista e definida na variavel $metaestatTemplates/logos localizada no ms_configura.php
 //lista os logos que o usuario pode escolher para publicar mapas
 //a pasta com alista e definida na variavel $metaestatTemplates/logos localizada no ms_configura.php
 case "LISTALOGOSMAPA":
     if (empty($metaestatTemplates)) {
         $metaestatTemplates = dirname(__FILE__) . "/../../ferramentas/metaestat/templates";
     } else {
         $metaestatTemplates = $locaplic . $metaestatTemplates;
     }
     retornaJSON(listaArquivos($metaestatTemplates . "/logos"));
     exit;
     break;
     /*
     Valor: ALTERARVARIAVEL
     
     Altera os dados de uma variavel
     */
 /*
 Valor: ALTERARVARIAVEL
 
 Altera os dados de uma variavel
 */
 case "ALTERAVARIAVEL":
     $m = new Metaestat();
     if (empty($codigo_variavel)) {
Пример #9
0
 if (empty($_POST["senha"]) || empty($_POST["usuario"])) {
     formularioLoginMaster("geraminiatura.php");
     echo "<input type=hidden name=tipo value='{$tipo}'  />";
     exit;
 } else {
     $continua = verificaMaster($_POST["usuario"], $_POST["senha"], $i3geomaster);
     if ($continua == false) {
         echo "Usu&aacute;rio n&atilde;o registrado em i3geo/ms_configura.php na vari&aacute;vel i3geomaster";
         exit;
     }
 }
 if (ob_get_level() == 0) {
     ob_start();
 }
 error_reporting(0);
 $arqs = listaArquivos("temas");
 $arqs = $arqs["arquivos"];
 sort($arqs);
 //echo implode(" ,",$arqs["arquivos"]);
 foreach ($arqs as $arq) {
     $arq = str_replace(" ", "xxxx", $arq);
     $temp = explode(".", $arq);
     if (file_exists($locaplic . '/temas/' . $arq) && $temp[count($temp) - 1] == "map" && !(strpos($temp[0], "_") === 0)) {
         echo "<b>{$arq}</b><br>";
         //if(file_exists($locaplic.'/temas/miniaturas/'.$arq.'.mini.png') == false)
         //echo $locaplic.'/temas/miniaturas/'.$arq.'.mini.png<br>';
         if ($tipo == "mini" || $tipo == "todos") {
             if (!file_exists($locaplic . '/temas/miniaturas/' . $arq . '.mini.png')) {
                 echo "<br>" . $arq . "<br>";
                 verificaMiniatura($arq, "mini");
             }
Пример #10
0
        exit;
    }
}
$retorno = "";
//string que ser&aacute; retornada ao browser via JSON
switch (strtoupper($funcao)) {
    /*
    Valor: LISTADRIVES
    
    Pega a lista de drives registrados para o usu&aacute;rio atual.
    
    A lista de drives &eacute; definida no ms_configura e permite que o usu&aacute;rio navegue pelos arquivos do servidor.
    */
    case "LISTADRIVES":
        $retorno = $navegadoresLocais[0];
        break;
        /*
        Valor: LISTAARQUIVOS*
        
        Lista os arquivos de um diret�rio.
        */
    /*
    Valor: LISTAARQUIVOS*
    
    Lista os arquivos de um diret�rio.
    */
    case "LISTAARQUIVOS":
        $retorno = listaArquivos($_GET["diretorio"], true);
        break;
}
cpjson($retorno);