当前位置: 首页>>代码示例>>PHP>>正文


PHP restauraCon函数代码示例

本文整理汇总了PHP中restauraCon函数的典型用法代码示例。如果您正苦于以下问题:PHP restauraCon函数的具体用法?PHP restauraCon怎么用?PHP restauraCon使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。


在下文中一共展示了restauraCon函数的11个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: markerclusterDados

function markerclusterDados($map_file)
{
    global $dir, $layer, $coluna;
    //pega os dados e formata como uma string no formato
    // [{"lat":"-21.7079984","lng":"-47.4913629","count":"1"}]
    //os dados sao devolvidos como uma variavel javascript
    //obtem os registros
    include_once $dir . "/../../classesphp/classe_atributos.php";
    $m = new Atributos($map_file, $layer);
    $registros = $m->listaRegistrosXY($coluna, "brasil", "tudo");
    $n = count($registros);
    $resultado = array();
    if (empty($coluna)) {
        foreach ($registros as $r) {
            $resultado[] = '{"lat":"' . $r["y"] . '","lng":"' . $r["x"] . '","count":"1"}';
        }
    } else {
        foreach ($registros as $r) {
            $resultado[] = '{"lat":"' . $r["y"] . '","lng":"' . $r["x"] . '","count":"' . $r["valores"][0]["valor"] . '"}';
        }
    }
    if (isset($map_file) && isset($postgis_mapa) && $map_file != "") {
        restauraCon($map_file, $postgis_mapa);
    }
    return $resultado;
}
开发者ID:edmarmoretti,项目名称:i3geo,代码行数:26,代码来源:funcoes.php

示例2: heatmapMapfile

function heatmapMapfile()
{
    global $dir, $map_file, $layer, $base, $locaplic, $dir_tmp, $postgis_mapa;
    if (empty($map_file) && file_exists($dir . "/../../temas/{$layer}.map")) {
        $versao = versao();
        $versao = $versao["principal"];
        if (!isset($base) || $base == "") {
            if (strtoupper(substr(PHP_OS, 0, 3) == 'WIN')) {
                $base = $locaplic . "/aplicmap/geral1windowsv" . $versao . ".map";
            } else {
                if ($base == "" && file_exists('/var/www/i3geo/aplicmap/geral1debianv' . $versao . '.map')) {
                    $base = "/var/www/i3geo/aplicmap/geral1debianv" . $versao . ".map";
                }
                if ($base == "" && file_exists('/var/www/html/i3geo/aplicmap/geral1fedorav' . $versao . '.map')) {
                    $base = "/var/www/html/i3geo/aplicmap/geral1fedorav" . $versao . ".map";
                }
                if ($base == "" && file_exists('/opt/www/html/i3geo/aplicmap/geral1fedorav' . $versao . '.map')) {
                    $base = "/opt/www/html/i3geo/aplicmap/geral1v" . $versao . ".map";
                }
                if ($base == "") {
                    $base = $locaplic . "/aplicmap/geral1v" . $versao . ".map";
                }
            }
        }
        $map_file = $dir_tmp . "/" . nomeRandomico() . ".map";
        $mapa = ms_newMapObj($base);
        $tempMapa = ms_newMapObj($dir . "/../../temas/{$layer}.map");
        $layern = $tempMapa->getlayer(0);
        ms_newLayerObj($mapa, $layern);
        $mapa->save($map_file);
        if (!empty($postgis_mapa)) {
            restauraCon($map_file, $postgis_mapa);
        }
    }
    return $map_file;
}
开发者ID:edmarmoretti,项目名称:i3geo,代码行数:36,代码来源:funcoes.php

示例3: dirname

<?php

include_once dirname(__FILE__) . "/../safe.php";
verificaBlFerramentas(basename(dirname(__FILE__)), $i3geoBlFerramentas, false);
//
//faz a busca da fun&ccedil;&atilde;o que deve ser executada
//
$retorno = "";
//string que ser&aacute; retornada ao browser via JSON
switch (strtoupper($funcao)) {
    /*
    Valor: LISTATAGS
    
    Pega a lista de tags registrados nos menus de temas.
    
    <Menutemas->listatags>
    */
    case "LISTATAGS":
        include_once dirname(__FILE__) . "/../../classesphp/classe_menutemas.php";
        $m = new Menutemas($map_file, $perfil, $locaplic, $_GET["urli3geo"]);
        $retorno = $m->listatags($_GET["rss"], $_GET["nrss"]);
        break;
}
if (isset($map_file) && isset($postgis_mapa) && $map_file != "") {
    restauraCon($map_file, $postgis_mapa);
}
cpjson($retorno);
开发者ID:edmarmoretti,项目名称:i3geo,代码行数:27,代码来源:exec.php

示例4: redesenhaMapa

function redesenhaMapa()
{
    global $map_file, $tipoimagem, $cp, $postgis_mapa, $utilizacgi, $locmapserv, $interface, $mapexten;
    substituiCon($map_file, $postgis_mapa);
    if ($tipoimagem != "nenhum" && $tipoimagem != "") {
        $utilizacgi = "nao";
    }
    if (connection_aborted()) {
        exit;
    }
    if ($interface == "googleearth" && $mapexten != "") {
        include_once dirname(__FILE__) . "/../classesphp/classe_navegacao.php";
        $m = new Navegacao($map_file);
        $m->mudaExtensao($mapexten);
        $m->salva();
    }
    include_once dirname(__FILE__) . "/../classesphp/classe_mapa.php";
    $m = new Mapa($map_file);
    $par = $m->parametrosTemas();
    //
    //na interface googlemaps n&atilde;o &eacute; necess&aacute;rio gerar a imagem
    //
    $e = $m->mapa->extent;
    $ext = $e->minx . " " . $e->miny . " " . $e->maxx . " " . $e->maxy;
    $res["mapimagem"] = "";
    $res["mapexten"] = $ext;
    $res["mapres"] = "";
    $res["erro"] = "";
    $res["mapscale"] = "";
    $res["pixelsize"] = "";
    $res["mapimagem"] = "";
    $res["w"] = $m->mapa->width;
    $res["h"] = $m->mapa->height;
    $res["mappath"] = "";
    $res["mapurl"] = "";
    $res["mensagens"] = $m->pegaMensagens();
    $res["tempo"] = microtime(1) - $tempo;
    restauraCon($map_file, $postgis_mapa);
    ob_clean();
    if ($par == "") {
        $retorno = "erro";
    } else {
        $retorno = array("variaveis" => $res, "temas" => $par);
    }
    cpjson($retorno);
}
开发者ID:edmarmoretti,项目名称:i3geo,代码行数:46,代码来源:safe.php

示例5: session_name

session_name("i3GeoPHP");
session_id($g_sid);
session_start();
$fingerprint = $_SESSION["fingerprint"];
$f = explode(",", $fingerprint);
if ($f[0] != md5('I3GEOSEC' . $_SERVER['HTTP_USER_AGENT'] . session_id())) {
    echo "erro";
    return;
}
include dirname(__FILE__) . "/../../classesphp/funcoes_gerais.php";
$map_file = $_SESSION["map_file"];
if (empty($map_file)) {
    exit;
}
$map_file = str_replace(".map", "", $map_file) . ".map";
restauraCon($map_file, $_SESSION["postgis_mapa"]);
$base = basename($map_file);
$dir = dirname($map_file);
$novo_mapfile = $dir . "/" . nomeRandomico(5) . $base;
copy($map_file, $novo_mapfile);
chmod($novo_mapfile, 0744);
$mapa = ms_newMapObj($novo_mapfile);
$mapa->setProjection(pegaProjecaoDefault("proj4"));
$numlayers = $mapa->numlayers;
$layers = array();
for ($i = 0; $i < $numlayers; ++$i) {
    $l = $mapa->getLayer($i);
    $l->setmetadata("permiteogc", "sim");
    if ($l->status != MS_DEFAULT) {
        $l->set("status", MS_DELETE);
    } else {
开发者ID:edmarmoretti,项目名称:i3geo,代码行数:31,代码来源:openlayers3.php

示例6: autoClasses

            if ($lcon == " " || $lcon == "") {
                $l->set("connection", $postgis_mapa);
                $l->setmetadata("CONEXAOORIGINAL", $lcon);
            } else {
                $l->set("connection", $postgis_mapa[$lcon]);
                $l->setmetadata("CONEXAOORIGINAL", $lcon);
            }
        }
    }
}
autoClasses($l, $oMap);
ms_newLayerObj($oMap, $l);
$oMap->save($nomeMapfileTmp);
validaAcessoTemas($nomeMapfileTmp, true);
$oMap = ms_newMapobj($nomeMapfileTmp);
restauraCon($nomeMapfileTmp, $postgis_mapa);
$layer = $oMap->getlayerbyname($tema);
if ($layer == "") {
    echo "Layer nao encontrado";
    exit;
}
$data = pegaDadosJ();
$format = $_GET["format"];
$jsonp = $_GET["jsonp"];
if ($format == "storymap") {
    //parametros via URL
    $storymap = $layer->getmetadata("storymap");
    if ($storymap == "") {
        echo "Parametros nao definidos no METADATA storymap";
        exit;
    }
开发者ID:edmarmoretti,项目名称:i3geo,代码行数:31,代码来源:json.php

示例7: copiaSeguranca

function copiaSeguranca($map_file)
{
    include dirname(__FILE__) . "/../ms_configura.php";
    restauraCon($map_file, $postgis_mapa);
    if (file_exists($map_file)) {
        if ($objMapa = @ms_newMapObj($map_file)) {
            $nmf = str_replace(".map", "seguranca.map", $map_file);
            $objMapa->save($nmf);
        } else {
            $nmf = str_replace(".map", "seguranca.map", $map_file);
            if (file_exists($nmf)) {
                if ($objMapa = @ms_newMapObj($nmf)) {
                    $objMapa->save($map_file);
                }
            } else {
                $nmf = str_replace(".map", "reinc.map", $map_file);
                if ($objMapa = @ms_newMapObj($nmf)) {
                    $objMapa->save($nmf);
                }
            }
        }
    } else {
        $map_file = str_replace(".map", "", $map_file) . ".map";
        copy(str_replace(".map", "seguranca.map", $map_file), $map_file);
    }
}
开发者ID:edmarmoretti,项目名称:i3geo,代码行数:26,代码来源:funcoes_gerais.php

示例8: verifica


//.........这里部分代码省略.........
            include_once $locaplic . "/pacotes/gvsig/gvsig2mapfile/class.gvsig2mapfile.php";
            $gm = new gvsig2mapfile($gvsiggvp);
            $gvsigview = $gm->getViewsNames();
            foreach ($gvsigview as $v) {
                $dataView = $gm->getViewData($v);
                $mapa = $gm->addLayers($mapa, $v, $dataView["layerNames"]);
            }
            $next = $dataView["extent"];
            $ext = $mapa->extent;
            $ext->setextent($next[0], $next[1], $next[2], $next[3]);
        }
        if ($tipo == "mini") {
            $mapa->setsize(50, 50);
            $sca = $mapa->scalebar;
            $sca->set("status", MS_OFF);
        }
        if ($tipo == "grande") {
            $mapa->setsize(300, 300);
            $sca = $mapa->scalebar;
            $sca->set("status", MS_OFF);
        }
        if ($tipo == "todos") {
            $mapa->setsize(150, 150);
            $sca = $mapa->scalebar;
            $sca->set("status", MS_OFF);
        }
        $destino = $dir_tmp . "/" . nomeRandomico() . ".map";
        $mapa->save($destino);
        validaAcessoTemas($destino, true);
        //testa a tabela de atributos
        if (isset($_GET["tabela"])) {
            include "classesphp/classe_atributos.php";
            $t = new Atributos($destino, $map);
            restauraCon($destino, $postgis_mapa);
            $r = $t->itensTexto();
            $colunas = explode(";", $r["itens"]);
            $ncolunas = count($colunas);
            $registros = $r["valores"];
            $nregistros = count($registros);
            $error = "";
            $error = ms_GetErrorObj();
            echo "</div><div style='text-align:left;margin: auto;width:900px;overflow: auto;'>";
            while ($error && $error->code != MS_NOERR) {
                echo "<br>Error in %s: %s<br>", $error->routine, $error->message;
                $error = $error->next();
            }
            echo "Registros em UTF8 s&atilde;o convertidos para ISO-8859-1<br>";
            echo "Registros: " . $nregistros;
            "<br>";
            echo "<br><b>Tempo leitura (s): ";
            echo microtime(true) - $tempo;
            echo "</b>";
            echo "<table>";
            echo "<tr>";
            foreach ($colunas as $co) {
                echo "<td><b>" . $co . "</b></td>";
            }
            echo "</tr>";
            foreach ($registros as $reg) {
                echo "<tr>";
                $cc = explode(";", $reg);
                foreach ($cc as $c) {
                    if (mb_detect_encoding($c, "UTF-8", true)) {
                        $c = mb_convert_encoding($c, "ISO-8859-1", "UTF-8");
                    }
                    echo "<td>" . $c . "</td>";
开发者ID:edmarmoretti,项目名称:i3geo,代码行数:67,代码来源:testamapfile.php

示例9: dl

            dl('php_mapscript.dll');
        }
    } else {
        dl('php_mapscript.so');
    }
}
require dirname(__FILE__) . "/../../classesphp/funcoes_gerais.php";
$nomes = nomeRandomico();
//
//substitui a string de conex&atilde;o com o banco em cada layer se for necess&aacute;rio
//
$map = ms_newMapObj($map_file);
$temp = str_replace(".map", "xxx.map", $map_file);
$map->save($temp);
$map = ms_newMapObj($temp);
restauraCon($temp, $postgis_mapa);
if ($map->getmetadata("interface") == "googlemaps") {
    $proj4 = pegaProjecaoDefault("proj4");
    $map->setProjection($proj4);
    $map->set("units", MS_METERS);
    $map->preparequery();
    $map->set("scaledenom", $map->scaledenom * 100000);
}
$w = $map->width;
$h = $map->height;
//
//modifica o nome das classes em cada layer para que a legenda do mapa fique correta
//
$temas = $map->getalllayernames();
foreach ($temas as $tema) {
    $layer = $map->getlayerbyname($tema);
开发者ID:edmarmoretti,项目名称:i3geo,代码行数:31,代码来源:a4lpaisagempdf.php

示例10: gravaid

function gravaid()
{
    global $atlasId_, $tmpfname;
    //a variavel tmpfname vem do ms_criamapa.php
    $_SESSION["atlasId"] = $atlasId_;
    $_SESSION["utilizacgi"] = "nao";
    $m = ms_newMapObj($tmpfname);
    $c = $m->numlayers;
    for ($i = 0; $i < $c; ++$i) {
        $l = $m->getlayer($i);
        $l->setmetadata("ATLAS", "nao");
        $l->setmetadata("TIP", "");
    }
    $tmpfname = str_replace(".map", "", $tmpfname) . ".map";
    $m->save($tmpfname);
    include dirname(__FILE__) . "/../ms_configura.php";
    restauraCon($tmpfname, $postgis_mapa);
}
开发者ID:edmarmoretti,项目名称:i3geo,代码行数:18,代码来源:atlas_controle.php

示例11: iniciaMapa


//.........这里部分代码省略.........
    $res["editor"] = "nao";
    //
    //papeis do usuario se estiver logado
    //
    $res["papeis"] = array();
    $logado = "nao";
    $res["i3geoPermiteLogin"] = "sim";
    if (isset($i3geoPermiteLogin) && $i3geoPermiteLogin == false) {
        $_COOKIE = array();
        $res["i3geoPermiteLogin"] = "nao";
    }
    if (!empty($_COOKIE["i3geocodigologin"])) {
        session_write_close();
        session_name("i3GeoLogin");
        session_id($_COOKIE["i3geocodigologin"]);
        session_start();
        //var_dump($_SESSION);exit;
        $logado = "sim";
        if (!empty($_SESSION["usuario"]) && $_SESSION["usuario"] == $_COOKIE["i3geousuariologin"]) {
            $res["papeis"] = $_SESSION["papeis"];
        } else {
            $logado = "nao";
        }
        //verifica se o usuario logado pode ver as opcoes de edicao do sistema de admin dentro do mapa
        foreach ($res["papeis"] as $p) {
            if ($p < 3) {
                $res["editor"] = "sim";
            }
        }
    }
    //
    $res["mapexten"] = $ext;
    $res["mapscale"] = $escalaMapa;
    $res["mapres"] = $m->mapa->resolution;
    $res["pixelsize"] = $celula;
    //TODO depreciar na documentacao e ms_configura
    /*
    if ((isset($expoeMapfile)) && ($expoeMapfile == "nao"))
    {$res["mapfile"] = "";}
    else
    {$res["mapfile"] = $map_file;}
    */
    $res["mapfile"] = "";
    $res["cgi"] = "";
    //$locmapserv;
    $res["extentTotal"] = $ext;
    $res["mapimagem"] = "";
    //$nomer;
    $geoip = "nao";
    if (file_exists($locaplic . "/pacotes/geoip") && file_exists($locaplic . "/pacotes/geoip/GeoLiteCity.dat")) {
        $geoip = "sim";
    }
    $res["geoip"] = $geoip;
    $res["listavisual"] = file_exists($locaplic . "/imagens/visual") ? implode(",", listaDiretorios($locaplic . "/imagens/visual")) : "";
    //TODO depreciar na documentacao
    $res["utilizacgi"] = "nao";
    //$utilizacgi;
    $res["versaoms"] = $versao["principal"];
    $res["versaomscompleta"] = $versao["completa"];
    $res["mensagens"] = $m->pegaMensagens();
    $res["r"] = isset($R_path) ? "sim" : "nao";
    $res["extentref"] = "";
    $res["kmlurl"] = $kmlurl;
    $res["mensageminicia"] = $mensagemInicia;
    $res["interfacePadrao"] = $interfacePadrao;
    $res["embedLegenda"] = $embedLegenda;
    $res["w"] = $w;
    $res["h"] = $h;
    $res["titulo"] = $tituloInstituicao;
    $res["tempo"] = microtime(1) - $tempo;
    $res["embedLegenda"] = $embedLegenda;
    $res["erro"] = '';
    $res["mappath"] = "";
    //$imgo->imagepath;
    $res["mapurl"] = "";
    //$imgo->imageurl;
    $res["navegacaoDir"] = $navegadoresLocais;
    if ($openid == true) {
        $res["autenticadoopenid"] = "sim";
    } else {
        $res["autenticadoopenid"] = "nao";
    }
    $res["emailInstituicao"] = $emailInstituicao;
    $res["cordefundo"] = $cordefundo;
    $res["copyright"] = $copyright;
    $res["logado"] = $logado;
    $res["saikuUrl"] = $saikuUrl;
    $res["statusFerramentas"] = $statusFerramentas;
    $res["googleApiKey"] = $googleApiKey;
    //parametros de inicializacao armazenados com o mapa quando o usuario utiliza a opcao de salvar mapa no nbanco de dados
    $customizacoesinit = $m->mapa->getmetadata("CUSTOMIZACOESINIT");
    $res["editavel"] = $m->mapa->getmetadata("EDITAVEL");
    $m->mapa->setmetadata("CUSTOMIZACOESINIT", "");
    $m->salva();
    restauraCon($map_file, $postgis_mapa);
    copy($map_file, str_replace(".map", "reinc.map", $map_file));
    copy($map_file, str_replace(".map", "seguranca.map", $map_file));
    ob_clean();
    cpjson(array("variaveis" => $res, "temas" => $temas, "customizacoesinit" => $customizacoesinit));
}
开发者ID:edmarmoretti,项目名称:i3geo,代码行数:101,代码来源:mapa_inicia.php


注:本文中的restauraCon函数示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。