Commit b9c2a59797e3334e955e9da6756be35f45611ffa
1 parent
2cc87034
Exists in
master
and in
7 other branches
Inclusão de formulário para definição dos parâmetros de conexão com serviços OGC…
… externos (WMS e WFS).
Showing
11 changed files
with
700 additions
and
227 deletions
Show diff stats
admin1/catalogo/mapfile/conexao/local/exec.php
| ... | ... | @@ -57,56 +57,4 @@ switch ($funcao) { |
| 57 | 57 | header ( "HTTP/1.1 500 erro funcao nao existe" ); |
| 58 | 58 | break; |
| 59 | 59 | } |
| 60 | -/* | |
| 61 | - linha do tempo | |
| 62 | - | |
| 63 | - $dados["ltempoformatodata"] = $layer->getmetadata("ltempoformatodata"); | |
| 64 | - $dados["ltempoiteminicio"] = $layer->getmetadata("ltempoiteminicio"); | |
| 65 | - $dados["ltempoitemfim"] = $layer->getmetadata("ltempoitemfim"); | |
| 66 | - $dados["ltempoitemtitulo"] = $layer->getmetadata("ltempoitemtitulo"); | |
| 67 | - $dados["ltempoitemdescricao"] = $layer->getmetadata("ltempoitemdescricao"); | |
| 68 | - $dados["ltempoconvencode"] = $layer->getmetadata("ltempoconvencode"); | |
| 69 | - $dados["ltempoitemtip"] = $layer->getmetadata("ltempoitemtip"); | |
| 70 | - $dados["ltempoitemimagem"] = $layer->getmetadata("ltempoitemimagem"); | |
| 71 | - $dados["ltempoitemicone"] = $layer->getmetadata("ltempoitemicone"); | |
| 72 | - $dados["ltempoitemlink"] = $layer->getmetadata("ltempoitemlink"); | |
| 73 | - | |
| 74 | - conexao com wms | |
| 75 | - | |
| 76 | - $dados["wms_srs"] = $layer->getmetadata("wms_srs"); | |
| 77 | - $dados["wms_name"] = $layer->getmetadata("wms_name"); | |
| 78 | - $dados["wms_server_version"] = $layer->getmetadata("wms_server_version"); | |
| 79 | - $dados["wms_format"] = $layer->getmetadata("wms_format"); | |
| 80 | - $dados["wms_auth_username"] = $layer->getmetadata("wms_auth_username"); | |
| 81 | - $dados["wms_auth_password"] = $layer->getmetadata("wms_auth_password"); | |
| 82 | - $dados["wms_auth_type"] = $layer->getmetadata("wms_auth_type"); | |
| 83 | - $dados["wms_connectiontimeout"] = $layer->getmetadata("wms_connectiontimeout"); | |
| 84 | - $dados["wms_latlonboundingbox"] = $layer->getmetadata("wms_latlonboundingbox"); | |
| 85 | - $dados["wms_proxy_auth_type"] = $layer->getmetadata("wms_proxy_auth_type"); | |
| 86 | - | |
| 87 | - $dados["wms_proxy_host"] = $layer->getmetadata("wms_proxy_host"); | |
| 88 | - $dados["wms_proxy_port"] = $layer->getmetadata("wms_proxy_port"); | |
| 89 | - $dados["wms_proxy_type"] = $layer->getmetadata("wms_proxy_type"); | |
| 90 | - $dados["wms_proxy_username"] = $layer->getmetadata("wms_proxy_username"); | |
| 91 | - $dados["wms_proxy_password"] = $layer->getmetadata("wms_proxy_password"); | |
| 92 | - $dados["wms_sld_body"] = $layer->getmetadata("wms_sld_body"); | |
| 93 | - $dados["wms_sld_url"] = $layer->getmetadata("wms_sld_url"); | |
| 94 | - $dados["wms_style"] = $layer->getmetadata("wms_style"); | |
| 95 | - $dados["wms_bgcolor"] = $layer->getmetadata("wms_bgcolor"); | |
| 96 | - $dados["wms_transparent"] = $layer->getmetadata("wms_transparent"); | |
| 97 | - $dados["wms_time"] = $layer->getmetadata("wms_time"); | |
| 98 | - $dados["wms_tile"] = $layer->getmetadata("wms_tile"); | |
| 99 | - | |
| 100 | - outros | |
| 101 | - | |
| 102 | - $dados["classesitem"] = $layer->getmetadata("classesitem"); | |
| 103 | - $dados["classesnome"] = $layer->getmetadata("classesnome"); | |
| 104 | - $dados["classescor"] = $layer->getmetadata("classescor"); | |
| 105 | - $dados["classessimbolo"] = $layer->getmetadata("classessimbolo"); | |
| 106 | - $dados["classestamanho"] = $layer->getmetadata("classestamanho"); | |
| 107 | - $dados["palletefile"] = $layer->getmetadata("palletefile"); | |
| 108 | - $dados["palletestep"] = $layer->getmetadata("palletestep"); | |
| 109 | - $dados["description_template"] = $layer->getmetadata("description_template"); | |
| 110 | - $dados["editorsql"] = $layer->getmetadata("editorsql"); | |
| 111 | - */ | |
| 112 | 60 | ?> | ... | ... |
| ... | ... | @@ -0,0 +1,86 @@ |
| 1 | +<?php | |
| 2 | +/****************************************************************/ | |
| 3 | +include (dirname ( __FILE__ ) . "/../../../../../ms_configura.php"); | |
| 4 | +// | |
| 5 | +//checa login | |
| 6 | +//valida _GET e _POST, juntando em _GET | |
| 7 | +//pega algumas variaveis de uso mais comum | |
| 8 | +//session_start | |
| 9 | +// | |
| 10 | +include ("../../../../php/checaLogin.php"); | |
| 11 | +\admin\php\login\checaLogin(); | |
| 12 | +//funcoes de administracao | |
| 13 | +include ($_SESSION["locaplic"]."/admin1/php/funcoesAdmin.php"); | |
| 14 | +// | |
| 15 | +//carrega outras funcoes e extensoes do PHP | |
| 16 | +// | |
| 17 | +include ($_SESSION["locaplic"]."/classesphp/carrega_ext.php"); | |
| 18 | +// | |
| 19 | +//carrega as funcoes locais | |
| 20 | +//depende de funcoesAdmin.php | |
| 21 | +// | |
| 22 | +include ("funcoes.php"); | |
| 23 | +// | |
| 24 | +//conexao com o banco de administracao | |
| 25 | +//cria as variaveis $dbh e $dbhw alem de conexaoadmin | |
| 26 | +// | |
| 27 | +include ($_SESSION["locaplic"]."/admin1/php/conexao.php"); | |
| 28 | +/***************************************************************/ | |
| 29 | +if (\admin\php\funcoesAdmin\verificaOperacaoSessao ( "admin/html/editormapfile" ) === false) { | |
| 30 | + header ( "HTTP/1.1 403 Vc nao pode realizar essa operacao" ); | |
| 31 | + exit (); | |
| 32 | +} | |
| 33 | + | |
| 34 | +$codigo = $_POST ["codigo"]; | |
| 35 | +$codigo = str_replace ( " ", "", \admin\php\funcoesAdmin\removeAcentos ( $codigo ) ); | |
| 36 | +$codigo = str_replace ( ".", "", $codigo ); | |
| 37 | +$codigo = strip_tags ( $codigo ); | |
| 38 | +$codigo = htmlspecialchars ( $codigo, ENT_QUOTES ); | |
| 39 | + | |
| 40 | +$id_tema = ( int ) $_POST ["id_tema"]; | |
| 41 | + | |
| 42 | +$funcao = strtoupper ( $funcao ); | |
| 43 | +switch ($funcao) { | |
| 44 | + case "ALTERAR" : | |
| 45 | + $dados = \admin\catalogo\mapfile\conexao\ogc\alterar ($_SESSION["locaplic"],$codigo,$_POST["connection"],$_POST["connectiontype"],$_POST["ows_srs"],$_POST["ows_name"],$_POST["ows_server_version"],$_POST["ows_format"],$_POST["ows_auth_username"],$_POST["ows_auth_password"],$_POST["ows_auth_type"],$_POST["ows_connectiontimeout"],$_POST["ows_latlonboundingbox"],$_POST["ows_proxy_auth_type"],$_POST["ows_proxy_host"],$_POST["ows_proxy_port"],$_POST["ows_proxy_type"],$_POST["ows_proxy_username"],$_POST["ows_proxy_password"],$_POST["ows_sld_body"],$_POST["ows_sld_url"],$_POST["ows_style"],$_POST["ows_bgcolor"],$_POST["ows_transparent"],$_POST["ows_time"],$_POST["ows_tile"],$dbhw); | |
| 46 | + if ($dados === false) { | |
| 47 | + header ( "HTTP/1.1 500 erro ao definir as propriedades" ); | |
| 48 | + } | |
| 49 | + break; | |
| 50 | + case "LISTA" : | |
| 51 | + $dados = \admin\catalogo\mapfile\conexao\ogc\listar ($_SESSION["locaplic"],$codigo); | |
| 52 | + \admin\php\funcoesAdmin\retornaJSON ( array ( | |
| 53 | + "dados" => $dados | |
| 54 | + ) ); | |
| 55 | + break; | |
| 56 | + default: | |
| 57 | + header ( "HTTP/1.1 500 erro funcao nao existe" ); | |
| 58 | + break; | |
| 59 | +} | |
| 60 | +/* | |
| 61 | + linha do tempo | |
| 62 | + | |
| 63 | + $dados["ltempoformatodata"] = $layer->getmetadata("ltempoformatodata"); | |
| 64 | + $dados["ltempoiteminicio"] = $layer->getmetadata("ltempoiteminicio"); | |
| 65 | + $dados["ltempoitemfim"] = $layer->getmetadata("ltempoitemfim"); | |
| 66 | + $dados["ltempoitemtitulo"] = $layer->getmetadata("ltempoitemtitulo"); | |
| 67 | + $dados["ltempoitemdescricao"] = $layer->getmetadata("ltempoitemdescricao"); | |
| 68 | + $dados["ltempoconvencode"] = $layer->getmetadata("ltempoconvencode"); | |
| 69 | + $dados["ltempoitemtip"] = $layer->getmetadata("ltempoitemtip"); | |
| 70 | + $dados["ltempoitemimagem"] = $layer->getmetadata("ltempoitemimagem"); | |
| 71 | + $dados["ltempoitemicone"] = $layer->getmetadata("ltempoitemicone"); | |
| 72 | + $dados["ltempoitemlink"] = $layer->getmetadata("ltempoitemlink"); | |
| 73 | + | |
| 74 | + outros | |
| 75 | + | |
| 76 | + $dados["classesitem"] = $layer->getmetadata("classesitem"); | |
| 77 | + $dados["classesnome"] = $layer->getmetadata("classesnome"); | |
| 78 | + $dados["classescor"] = $layer->getmetadata("classescor"); | |
| 79 | + $dados["classessimbolo"] = $layer->getmetadata("classessimbolo"); | |
| 80 | + $dados["classestamanho"] = $layer->getmetadata("classestamanho"); | |
| 81 | + $dados["palletefile"] = $layer->getmetadata("palletefile"); | |
| 82 | + $dados["palletestep"] = $layer->getmetadata("palletestep"); | |
| 83 | + $dados["description_template"] = $layer->getmetadata("description_template"); | |
| 84 | + $dados["editorsql"] = $layer->getmetadata("editorsql"); | |
| 85 | + */ | |
| 86 | +?> | ... | ... |
| ... | ... | @@ -0,0 +1,68 @@ |
| 1 | +<?php | |
| 2 | + | |
| 3 | +namespace admin\catalogo\mapfile\conexao\ogc; | |
| 4 | + | |
| 5 | +function listar($locaplic, $codigo) { | |
| 6 | + // pega o nome registrado no mapfile | |
| 7 | + if (! file_exists ( $locaplic . "/temas/" . $codigo . ".map" )) { | |
| 8 | + header ( "HTTP/1.1 500 erro mapfile nao existe" ); | |
| 9 | + exit (); | |
| 10 | + } | |
| 11 | + $mapa = ms_newMapObj ( $locaplic . "/temas/" . $codigo . ".map" ); | |
| 12 | + $layer = $mapa->getlayerbyname ( $codigo ); | |
| 13 | + if ($layer == "") { | |
| 14 | + header ( "HTTP/1.1 500 erro nao existe LAYER com o nome $codigo" ); | |
| 15 | + exit (); | |
| 16 | + } | |
| 17 | + $dados = array (); | |
| 18 | + $dados ["connection"] = $layer->connection; | |
| 19 | + $dados ["connectiontype"] = $layer->connectiontype; | |
| 20 | + $metas = array("_srs","_name","_server_version","_format","_auth_username","_auth_password","_auth_type","_connectiontimeout","_latlonboundingbox","_proxy_auth_type","_proxy_host","_proxy_port","_proxy_type","_proxy_username","_proxy_password","_sld_body","_sld_url","_style","_bgcolor","_transparent","_time","_tile"); | |
| 21 | + foreach ($metas as $m){ | |
| 22 | + $pre = ""; | |
| 23 | + if($layer->getmetadata("wms".$m) != ""){ | |
| 24 | + $pre = "wms"; | |
| 25 | + } | |
| 26 | + if($layer->getmetadata("wfs".$m) != ""){ | |
| 27 | + $pre = "wfs"; | |
| 28 | + } | |
| 29 | + if($layer->getmetadata("ows".$m) != ""){ | |
| 30 | + $pre = "ows"; | |
| 31 | + } | |
| 32 | + $dados["ows".$m] = $layer->getmetadata($pre.$m); | |
| 33 | + } | |
| 34 | + return $dados; | |
| 35 | +} | |
| 36 | +function alterar($locaplic,$codigo,$connection,$connectiontype,$ows_srs,$ows_name,$ows_server_version,$ows_format,$ows_auth_username,$ows_auth_password,$ows_auth_type,$ows_connectiontimeout,$ows_latlonboundingbox,$ows_proxy_auth_type,$ows_proxy_host,$ows_proxy_port,$ows_proxy_type,$ows_proxy_username,$ows_proxy_password,$ows_sld_body,$ows_sld_url,$ows_style,$ows_bgcolor,$ows_transparent,$ows_time,$ows_tile,$dbhw) { | |
| 37 | + $esquemaadmin = $_SESSION["esquemaadmin"]; | |
| 38 | + $arq = $locaplic . "/temas/" . $codigo . ".map"; | |
| 39 | + if ($codigo == "" || ! file_exists ( $arq )) { | |
| 40 | + header ( "HTTP/1.1 400 arquivo nao existe" ); | |
| 41 | + exit (); | |
| 42 | + } | |
| 43 | + $mapa = ms_newMapObj ( $arq ); | |
| 44 | + $layer = @$mapa->getlayerbyname ( $codigo ); | |
| 45 | + if ($layer == "") { | |
| 46 | + return false; | |
| 47 | + } | |
| 48 | + $layer->setmetadata("METAESTAT_CODIGO_TIPO_REGIAO",""); | |
| 49 | + $layer->setmetadata("METAESTAT_ID_MEDIDA_VARIAVEL",""); | |
| 50 | + $layer->setmetadata("metaestat",""); | |
| 51 | + $layer->set("connection",$connection); | |
| 52 | + $layer->setconnectiontype($connectiontype); | |
| 53 | + $layer->set("type",$type); | |
| 54 | + $metas = array("_srs","_name","_server_version","_format","_auth_username","_auth_password","_auth_type","_connectiontimeout","_latlonboundingbox","_proxy_auth_type","_proxy_host","_proxy_port","_proxy_type","_proxy_username","_proxy_password","_sld_body","_sld_url","_style","_bgcolor","_transparent","_time","_tile"); | |
| 55 | + foreach ($metas as $m){ | |
| 56 | + $layer->setmetadata("wms".$m,"ows".$m); | |
| 57 | + $layer->setmetadata("wfs".$m,"ows".$m); | |
| 58 | + $layer->setmetadata("ows".$m,"ows".$m); | |
| 59 | + } | |
| 60 | + try { | |
| 61 | + $mapa->save ( $arq ); | |
| 62 | + \admin\php\funcoesAdmin\removeCabecalhoMapfile ( $arq ); | |
| 63 | + return true; | |
| 64 | + } catch ( Exception $e ) { | |
| 65 | + return false; | |
| 66 | + } | |
| 67 | +} | |
| 68 | +?> | |
| 0 | 69 | \ No newline at end of file | ... | ... |
| ... | ... | @@ -0,0 +1,90 @@ |
| 1 | +/* | |
| 2 | +Licenca: | |
| 3 | + | |
| 4 | +GPL2 | |
| 5 | + | |
| 6 | +i3Geo Interface Integrada de Ferramentas de Geoprocessamento para Internet | |
| 7 | + | |
| 8 | +Direitos Autorais Reservados (c) 2006 Ministério do Meio Ambiente Brasil | |
| 9 | +Desenvolvedor: Edmar Moretti edmar.moretti@gmail.com | |
| 10 | + | |
| 11 | +Este programa é software livre; você pode redistribuí-lo | |
| 12 | +e/ou modificá-lo sob os termos da Licença Pública Geral | |
| 13 | +GNU conforme publicada pela Free Software Foundation; | |
| 14 | + | |
| 15 | +Este programa é distribuído na expectativa de que seja útil, | |
| 16 | +porém, SEM NENHUMA GARANTIA; nem mesmo a garantia implícita | |
| 17 | +de COMERCIABILIDADE OU ADEQUAÇÃO A UMA FINALIDADE ESPECÍFICA. | |
| 18 | +Consulte a Licença Pública Geral do GNU para mais detalhes. | |
| 19 | +Você deve ter recebido uma cópia da Licença Pública Geral do | |
| 20 | +GNU junto com este programa; se não, escreva para a | |
| 21 | +Free Software Foundation, Inc., no endereço | |
| 22 | +59 Temple Stredisponibilidadeet, Suite 330, Boston, MA 02111-1307 USA. | |
| 23 | + | |
| 24 | + */ | |
| 25 | +i3GEOadmin.mapfile = {}; | |
| 26 | +i3GEOadmin.ogc = { | |
| 27 | + inicia: function(codigo, id_tema){ | |
| 28 | + i3GEOadmin.core.modalAguarde(true); | |
| 29 | + $.post( | |
| 30 | + "exec.php?funcao=lista", | |
| 31 | + "codigo="+codigo | |
| 32 | + ) | |
| 33 | + .done( | |
| 34 | + function(data, status){ | |
| 35 | + i3GEOadmin.core.modalAguarde(false); | |
| 36 | + var json = jQuery.parseJSON(data); | |
| 37 | + | |
| 38 | + $("#corpo").html( | |
| 39 | + Mustache.to_html( | |
| 40 | + $("#templateFormConexaoOgc").html(), | |
| 41 | + $.extend( | |
| 42 | + {}, | |
| 43 | + i3GEOadmin.ogc.dicionario, | |
| 44 | + json.dados, | |
| 45 | + { | |
| 46 | + "codigo": codigo, | |
| 47 | + "id_tema": id_tema, | |
| 48 | + "onSalvar": "i3GEOadmin.ogc.salvar", | |
| 49 | + "connectiontype": function(){ | |
| 50 | + var hash = {}; | |
| 51 | + hash[json.dados.connectiontype + "-sel"] = "selected"; | |
| 52 | + return Mustache.to_html( | |
| 53 | + $("#templateTiposConexaoOgc").html(), | |
| 54 | + hash | |
| 55 | + ); | |
| 56 | + } | |
| 57 | + } | |
| 58 | + ) | |
| 59 | + ) | |
| 60 | + ); | |
| 61 | + $.material.init(); | |
| 62 | + } | |
| 63 | + ) | |
| 64 | + .fail( | |
| 65 | + function(data){ | |
| 66 | + i3GEOadmin.core.modalAguarde(false); | |
| 67 | + i3GEOadmin.core.mostraErro(data.status + " " +data.statusText); | |
| 68 | + } | |
| 69 | + ); | |
| 70 | + }, | |
| 71 | + salvar: function(codigo,id_tema){ | |
| 72 | + var parametros = $("#form-edicao-ogc").serialize(); | |
| 73 | + i3GEOadmin.core.modalAguarde(true); | |
| 74 | + $.post( | |
| 75 | + "exec.php?funcao=alterar", | |
| 76 | + "codigo=" + codigo + "&id_tema="+ id_tema+"&"+parametros | |
| 77 | + ) | |
| 78 | + .done( | |
| 79 | + function(data, status){ | |
| 80 | + i3GEOadmin.ogc.inicia(codigo,id_tema); | |
| 81 | + } | |
| 82 | + ) | |
| 83 | + .fail( | |
| 84 | + function(data){ | |
| 85 | + i3GEOadmin.core.modalAguarde(false); | |
| 86 | + i3GEOadmin.core.mostraErro(data.status + " " +data.statusText); | |
| 87 | + } | |
| 88 | + ); | |
| 89 | + } | |
| 90 | +}; | |
| 0 | 91 | \ No newline at end of file | ... | ... |
| ... | ... | @@ -0,0 +1,93 @@ |
| 1 | +<?php | |
| 2 | +//TODO incluir opcao para listar as conexoes wms registradas | |
| 3 | +define ( "ONDEI3GEO", "../../../../.." ); | |
| 4 | +include ("exec.php"); | |
| 5 | + | |
| 6 | +include "../../../../head.php"; | |
| 7 | +$codigo = filter_var ( $_GET ["codigo"], FILTER_SANITIZE_STRING ); | |
| 8 | +$id_tema = (int) $_GET ["id_tema"]; | |
| 9 | +?> | |
| 10 | +<div class="container-fluid migalha"> | |
| 11 | + <div class="row"> | |
| 12 | + <div class="btn-group btn-breadcrumb"> | |
| 13 | + <a class="btn btn-default" href="../../../../../init/index.php"> | |
| 14 | + <span>i3Geo</span> | |
| 15 | + </a> | |
| 16 | + <a class="btn btn-default" href="../../../../index.php"> | |
| 17 | + <span>Admin</span> | |
| 18 | + </a> | |
| 19 | + <a class="btn btn-default" style="pointer-events: none"> | |
| 20 | + <span>Catálogo</span> | |
| 21 | + </a> | |
| 22 | + <a class="btn btn-default" href="../../index.php"> | |
| 23 | + <span>Mapfiles</span> | |
| 24 | + </a> | |
| 25 | + <a class="btn btn-default" href="../../opcoes/index.php?codigo=<?php echo $codigo; ?>&id_tema=<?php echo $id_tema; ?>"> | |
| 26 | + <span>Opções</span> | |
| 27 | + </a> | |
| 28 | + <a class="btn btn-default" style="pointer-events: none"> | |
| 29 | + <span><?php echo $codigo; ?></span> | |
| 30 | + </a> | |
| 31 | + <a class="btn btn-default" style="pointer-events: none"> | |
| 32 | + <span>Conexão local</span> | |
| 33 | + </a> | |
| 34 | + </div> | |
| 35 | + </div> | |
| 36 | +</div> | |
| 37 | +<div class="container"> | |
| 38 | + <div class="row center-block"> | |
| 39 | + <div class="col-md-12" id="titulo"> | |
| 40 | + <div class="well hidden" > | |
| 41 | + <h2><small>{{{ogc}}}</small></h2> | |
| 42 | + <blockquote>{{{conexaoLayerOgc}}}. {{{conexaoLayerOgcUrl}}} <a href="http://mapserver.org/ogc/wms_client.html">http://mapserver.org/ogc/wms_client.html</a></blockquote> | |
| 43 | + <div class="clearfix"></div> | |
| 44 | + </div> | |
| 45 | + <div class="well hidden"> | |
| 46 | + <div id="corpo"> | |
| 47 | + </div> | |
| 48 | + </div> | |
| 49 | + </div> | |
| 50 | + </div> | |
| 51 | +</div> | |
| 52 | +<?php | |
| 53 | +include("templates/templateFormConexaoOgc.php"); | |
| 54 | +include("../../templates/templateTiposConexaoOgc.php"); | |
| 55 | +?> | |
| 56 | +<script type="text/javascript" src="index.js"></script> | |
| 57 | +<script type="text/javascript" src="../../../../dicionario/editormapfile.js"></script> | |
| 58 | +<script> | |
| 59 | + $(document).ready(function(){ | |
| 60 | + //vem de admin1/index.js | |
| 61 | + iniciaMenuPrincipal(); | |
| 62 | + $('ul.dropdown-menu [data-toggle=dropdown]').on('click', function(event) { | |
| 63 | + event.preventDefault(); | |
| 64 | + event.stopPropagation(); | |
| 65 | + $(this).parent().siblings().removeClass('open'); | |
| 66 | + $(this).parent().toggleClass('open'); | |
| 67 | + }); | |
| 68 | + //traducao | |
| 69 | + | |
| 70 | + //complementa dicionario | |
| 71 | + i3GEOadmin.ogc.dicionario = $.extend( | |
| 72 | + {}, | |
| 73 | + i3GEOadmin.mapfile.dicionario, | |
| 74 | + i3GEOadmin.core.dicionario | |
| 75 | + ); | |
| 76 | + | |
| 77 | + i3GEOadmin.core.dicionario = null; | |
| 78 | + g_traducao = null; | |
| 79 | + i3GEOadmin.ogc.dicionario = i3GEO.idioma.objetoIdioma(i3GEOadmin.ogc.dicionario); | |
| 80 | + var t = $("#titulo"); | |
| 81 | + t.html( | |
| 82 | + Mustache.to_html( | |
| 83 | + t.html(), | |
| 84 | + i3GEOadmin.ogc.dicionario | |
| 85 | + ) | |
| 86 | + ); | |
| 87 | + i3GEOadmin.core.loginOn(); | |
| 88 | + $(".hidden").removeClass('hidden'); | |
| 89 | + i3GEOadmin.ogc.inicia("<?php echo $codigo; ?>","<?php echo $id_tema; ?>"); | |
| 90 | + }); | |
| 91 | +</script> | |
| 92 | +</body> | |
| 93 | +</html> | ... | ... |
admin1/catalogo/mapfile/conexao/ogc/templates/templateFormConexaoOgc.php
0 → 100755
| ... | ... | @@ -0,0 +1,305 @@ |
| 1 | +<script> | |
| 2 | +function formConexaoOgcSelCon(valor){ | |
| 3 | + $("[name='connection']").val(valor); | |
| 4 | +} | |
| 5 | +</script> | |
| 6 | +<script id="templateFormConexaoOgc" type="x-tmpl-mustache"> | |
| 7 | +<form id="form-edicao-conexaoogc" style="" action="#" onsubmit="{{onSalvar}}('{{codigo}}','{{id_tema}}');return false;" class="form-horizontal" role="form" | |
| 8 | + method="post" > | |
| 9 | + <div class="col-md-12"> | |
| 10 | + <div class="form-group form-group-lg"> | |
| 11 | + <div class="col-md-6"> | |
| 12 | + <label class="control-label" for="connectiontype"> | |
| 13 | + {{{connectiontypeTitulo}}} | |
| 14 | + </label> | |
| 15 | + <p class="small" >{{{Connectiontype}}}</p> | |
| 16 | + </div> | |
| 17 | + <div class="col-md-6"> | |
| 18 | + <select title="{{{connectiontypeTitulo}}}" name="connectiontype" class="form-control"> | |
| 19 | + {{{connectiontype}}} | |
| 20 | + </select> | |
| 21 | + </div> | |
| 22 | + </div> | |
| 23 | + </div> | |
| 24 | + <div class="col-md-12"> | |
| 25 | + <div class="form-group form-group-lg"> | |
| 26 | + <div class="col-md-6"> | |
| 27 | + <label class="control-label" for="type"> | |
| 28 | + {{{connectionTitulo}}} | |
| 29 | + </label> | |
| 30 | + </div> | |
| 31 | + <div class="col-md-6"> | |
| 32 | + <input title="{{{connectionTitulo}}}" type="text" value="{{{connection}}}" class="form-control" name="connection" id="connection"> | |
| 33 | + </div> | |
| 34 | + </div> | |
| 35 | + </div> | |
| 36 | + <div class="col-md-12"> | |
| 37 | + <div class="form-group form-group-lg"> | |
| 38 | + <div class="col-md-6"> | |
| 39 | + <label class="control-label" for="type"> | |
| 40 | + ows_srs | |
| 41 | + </label> | |
| 42 | + </div> | |
| 43 | + <div class="col-md-6"> | |
| 44 | + <input title="{{{ows_srs}}}" type="text" value="{{{ows_srs}}}" class="form-control" name="ows_srs" id="ows_srs"> | |
| 45 | + </div> | |
| 46 | + </div> | |
| 47 | + </div> | |
| 48 | + <div class="col-md-12"> | |
| 49 | + <div class="form-group form-group-lg"> | |
| 50 | + <div class="col-md-6"> | |
| 51 | + <label class="control-label" for="type"> | |
| 52 | + ows_name | |
| 53 | + </label> | |
| 54 | + </div> | |
| 55 | + <div class="col-md-6"> | |
| 56 | + <input title="{{{ows_name}}}" type="text" value="{{{ows_name}}}" class="form-control" name="ows_name" id="ows_name"> | |
| 57 | + </div> | |
| 58 | + </div> | |
| 59 | + </div> | |
| 60 | + <div class="col-md-12"> | |
| 61 | + <div class="form-group form-group-lg"> | |
| 62 | + <div class="col-md-6"> | |
| 63 | + <label class="control-label" for="type"> | |
| 64 | + ows_server_version | |
| 65 | + </label> | |
| 66 | + </div> | |
| 67 | + <div class="col-md-6"> | |
| 68 | + <input title="{{{ows_server_version}}}" type="text" value="{{{ows_server_version}}}" class="form-control" name="ows_server_version" id="ows_server_version"> | |
| 69 | + </div> | |
| 70 | + </div> | |
| 71 | + </div> | |
| 72 | + <div class="col-md-12"> | |
| 73 | + <div class="form-group form-group-lg"> | |
| 74 | + <div class="col-md-6"> | |
| 75 | + <label class="control-label" for="type"> | |
| 76 | + ows_format | |
| 77 | + </label> | |
| 78 | + </div> | |
| 79 | + <div class="col-md-6"> | |
| 80 | + <input title="{{{ows_format}}}" type="text" value="{{{ows_format}}}" class="form-control" name="ows_format" id="ows_format"> | |
| 81 | + </div> | |
| 82 | + </div> | |
| 83 | + </div> | |
| 84 | + <div class="col-md-12"> | |
| 85 | + <div class="form-group form-group-lg"> | |
| 86 | + <div class="col-md-6"> | |
| 87 | + <label class="control-label" for="type"> | |
| 88 | + ows_auth_username | |
| 89 | + </label> | |
| 90 | + </div> | |
| 91 | + <div class="col-md-6"> | |
| 92 | + <input title="{{{ows_auth_username}}}" type="text" value="{{{ows_auth_username}}}" class="form-control" name="ows_auth_username" id="ows_auth_username"> | |
| 93 | + </div> | |
| 94 | + </div> | |
| 95 | + </div> | |
| 96 | + <div class="col-md-12"> | |
| 97 | + <div class="form-group form-group-lg"> | |
| 98 | + <div class="col-md-6"> | |
| 99 | + <label class="control-label" for="type"> | |
| 100 | + ows_auth_password | |
| 101 | + </label> | |
| 102 | + </div> | |
| 103 | + <div class="col-md-6"> | |
| 104 | + <input title="{{{ows_auth_password}}}" type="text" value="{{{ows_auth_password}}}" class="form-control" name="ows_auth_password" id="ows_auth_password"> | |
| 105 | + </div> | |
| 106 | + </div> | |
| 107 | + </div> | |
| 108 | + <div class="col-md-12"> | |
| 109 | + <div class="form-group form-group-lg"> | |
| 110 | + <div class="col-md-6"> | |
| 111 | + <label class="control-label" for="type"> | |
| 112 | + ows_auth_type | |
| 113 | + </label> | |
| 114 | + </div> | |
| 115 | + <div class="col-md-6"> | |
| 116 | + <input title="{{{ows_auth_type}}}" type="text" value="{{{ows_auth_type}}}" class="form-control" name="ows_auth_type" id="ows_auth_type"> | |
| 117 | + </div> | |
| 118 | + </div> | |
| 119 | + </div> | |
| 120 | + <div class="col-md-12"> | |
| 121 | + <div class="form-group form-group-lg"> | |
| 122 | + <div class="col-md-6"> | |
| 123 | + <label class="control-label" for="type"> | |
| 124 | + ows_connectiontimeout | |
| 125 | + </label> | |
| 126 | + </div> | |
| 127 | + <div class="col-md-6"> | |
| 128 | + <input title="{{{ows_connectiontimeout}}}" type="text" value="{{{ows_connectiontimeout}}}" class="form-control" name="ows_connectiontimeout" id="ows_connectiontimeout"> | |
| 129 | + </div> | |
| 130 | + </div> | |
| 131 | + </div> | |
| 132 | + <div class="col-md-12"> | |
| 133 | + <div class="form-group form-group-lg"> | |
| 134 | + <div class="col-md-6"> | |
| 135 | + <label class="control-label" for="type"> | |
| 136 | + ows_latlonboundingbox | |
| 137 | + </label> | |
| 138 | + </div> | |
| 139 | + <div class="col-md-6"> | |
| 140 | + <input title="{{{ows_latlonboundingbox}}}" type="text" value="{{{ows_latlonboundingbox}}}" class="form-control" name="ows_latlonboundingbox" id="ows_latlonboundingbox"> | |
| 141 | + </div> | |
| 142 | + </div> | |
| 143 | + </div> | |
| 144 | + <div class="col-md-12"> | |
| 145 | + <div class="form-group form-group-lg"> | |
| 146 | + <div class="col-md-6"> | |
| 147 | + <label class="control-label" for="type"> | |
| 148 | + ows_proxy_auth_type | |
| 149 | + </label> | |
| 150 | + </div> | |
| 151 | + <div class="col-md-6"> | |
| 152 | + <input title="{{{ows_proxy_auth_type}}}" type="text" value="{{{ows_proxy_auth_type}}}" class="form-control" name="ows_proxy_auth_type" id="ows_proxy_auth_type"> | |
| 153 | + </div> | |
| 154 | + </div> | |
| 155 | + </div> | |
| 156 | + <div class="col-md-12"> | |
| 157 | + <div class="form-group form-group-lg"> | |
| 158 | + <div class="col-md-6"> | |
| 159 | + <label class="control-label" for="type"> | |
| 160 | + ows_proxy_host | |
| 161 | + </label> | |
| 162 | + </div> | |
| 163 | + <div class="col-md-6"> | |
| 164 | + <input title="{{{ows_proxy_host}}}" type="text" value="{{{ows_proxy_host}}}" class="form-control" name="ows_proxy_host" id="ows_proxy_host"> | |
| 165 | + </div> | |
| 166 | + </div> | |
| 167 | + </div> | |
| 168 | + <div class="col-md-12"> | |
| 169 | + <div class="form-group form-group-lg"> | |
| 170 | + <div class="col-md-6"> | |
| 171 | + <label class="control-label" for="type"> | |
| 172 | + ows_proxy_port | |
| 173 | + </label> | |
| 174 | + </div> | |
| 175 | + <div class="col-md-6"> | |
| 176 | + <input title="{{{ows_proxy_port}}}" type="text" value="{{{ows_proxy_port}}}" class="form-control" name="ows_proxy_port" id="ows_proxy_port"> | |
| 177 | + </div> | |
| 178 | + </div> | |
| 179 | + </div> | |
| 180 | + <div class="col-md-12"> | |
| 181 | + <div class="form-group form-group-lg"> | |
| 182 | + <div class="col-md-6"> | |
| 183 | + <label class="control-label" for="type"> | |
| 184 | + ows_proxy_type | |
| 185 | + </label> | |
| 186 | + </div> | |
| 187 | + <div class="col-md-6"> | |
| 188 | + <input title="{{{ows_proxy_type}}}" type="text" value="{{{ows_proxy_type}}}" class="form-control" name="ows_proxy_type" id="ows_proxy_type"> | |
| 189 | + </div> | |
| 190 | + </div> | |
| 191 | + </div> | |
| 192 | + <div class="col-md-12"> | |
| 193 | + <div class="form-group form-group-lg"> | |
| 194 | + <div class="col-md-6"> | |
| 195 | + <label class="control-label" for="type"> | |
| 196 | + ows_proxy_username | |
| 197 | + </label> | |
| 198 | + </div> | |
| 199 | + <div class="col-md-6"> | |
| 200 | + <input title="{{{ows_proxy_username}}}" type="text" value="{{{ows_proxy_username}}}" class="form-control" name="ows_proxy_username" id="ows_proxy_username"> | |
| 201 | + </div> | |
| 202 | + </div> | |
| 203 | + </div> | |
| 204 | + <div class="col-md-12"> | |
| 205 | + <div class="form-group form-group-lg"> | |
| 206 | + <div class="col-md-6"> | |
| 207 | + <label class="control-label" for="type"> | |
| 208 | + ows_proxy_password | |
| 209 | + </label> | |
| 210 | + </div> | |
| 211 | + <div class="col-md-6"> | |
| 212 | + <input title="{{{ows_proxy_password}}}" type="text" value="{{{ows_proxy_password}}}" class="form-control" name="ows_proxy_password" id="ows_proxy_password"> | |
| 213 | + </div> | |
| 214 | + </div> | |
| 215 | + </div> | |
| 216 | + <div class="col-md-12"> | |
| 217 | + <div class="form-group form-group-lg"> | |
| 218 | + <div class="col-md-6"> | |
| 219 | + <label class="control-label" for="type"> | |
| 220 | + ows_sld_body | |
| 221 | + </label> | |
| 222 | + </div> | |
| 223 | + <div class="col-md-6"> | |
| 224 | + <input title="{{{ows_sld_body}}}" type="text" value="{{{ows_sld_body}}}" class="form-control" name="ows_sld_body" id="ows_sld_body"> | |
| 225 | + </div> | |
| 226 | + </div> | |
| 227 | + </div> | |
| 228 | + <div class="col-md-12"> | |
| 229 | + <div class="form-group form-group-lg"> | |
| 230 | + <div class="col-md-6"> | |
| 231 | + <label class="control-label" for="type"> | |
| 232 | + ows_sld_url | |
| 233 | + </label> | |
| 234 | + </div> | |
| 235 | + <div class="col-md-6"> | |
| 236 | + <input title="{{{ows_sld_url}}}" type="text" value="{{{ows_sld_url}}}" class="form-control" name="ows_sld_url" id="ows_sld_url"> | |
| 237 | + </div> | |
| 238 | + </div> | |
| 239 | + </div> | |
| 240 | + <div class="col-md-12"> | |
| 241 | + <div class="form-group form-group-lg"> | |
| 242 | + <div class="col-md-6"> | |
| 243 | + <label class="control-label" for="type"> | |
| 244 | + ows_style | |
| 245 | + </label> | |
| 246 | + </div> | |
| 247 | + <div class="col-md-6"> | |
| 248 | + <input title="{{{ows_style}}}" type="text" value="{{{ows_style}}}" class="form-control" name="ows_style" id="ows_style"> | |
| 249 | + </div> | |
| 250 | + </div> | |
| 251 | + </div> | |
| 252 | + <div class="col-md-12"> | |
| 253 | + <div class="form-group form-group-lg"> | |
| 254 | + <div class="col-md-6"> | |
| 255 | + <label class="control-label" for="type"> | |
| 256 | + ows_bgcolor | |
| 257 | + </label> | |
| 258 | + </div> | |
| 259 | + <div class="col-md-6"> | |
| 260 | + <input title="{{{ows_bgcolor}}}" type="text" value="{{{ows_bgcolor}}}" class="form-control" name="ows_bgcolor" id="ows_bgcolor"> | |
| 261 | + </div> | |
| 262 | + </div> | |
| 263 | + </div> | |
| 264 | + <div class="col-md-12"> | |
| 265 | + <div class="form-group form-group-lg"> | |
| 266 | + <div class="col-md-6"> | |
| 267 | + <label class="control-label" for="type"> | |
| 268 | + ows_transparent | |
| 269 | + </label> | |
| 270 | + </div> | |
| 271 | + <div class="col-md-6"> | |
| 272 | + <input title="{{{ows_transparent}}}" type="text" value="{{{ows_transparent}}}" class="form-control" name="ows_transparent" id="ows_transparent"> | |
| 273 | + </div> | |
| 274 | + </div> | |
| 275 | + </div> | |
| 276 | + <div class="col-md-12"> | |
| 277 | + <div class="form-group form-group-lg"> | |
| 278 | + <div class="col-md-6"> | |
| 279 | + <label class="control-label" for="type"> | |
| 280 | + ows_time | |
| 281 | + </label> | |
| 282 | + </div> | |
| 283 | + <div class="col-md-6"> | |
| 284 | + <input title="{{{ows_time}}}" type="text" value="{{{ows_time}}}" class="form-control" name="ows_time" id="ows_time"> | |
| 285 | + </div> | |
| 286 | + </div> | |
| 287 | + </div> | |
| 288 | + <div class="col-md-12"> | |
| 289 | + <div class="form-group form-group-lg"> | |
| 290 | + <div class="col-md-6"> | |
| 291 | + <label class="control-label" for="type"> | |
| 292 | + ows_tile | |
| 293 | + </label> | |
| 294 | + </div> | |
| 295 | + <div class="col-md-6"> | |
| 296 | + <input title="{{{ows_tile}}}" type="text" value="{{{ows_tile}}}" class="form-control" name="ows_tile" id="ows_tile"> | |
| 297 | + </div> | |
| 298 | + </div> | |
| 299 | + </div> | |
| 300 | + <div class="pull-right"> | |
| 301 | + <button type="submit" class="btn btn-primary" role="button" style="color:#008579;">{{salvar}}</button> | |
| 302 | + </div> | |
| 303 | + <div class="clearfix"></div> | |
| 304 | +</form> | |
| 305 | +</script> | |
| 0 | 306 | \ No newline at end of file | ... | ... |
| ... | ... | @@ -0,0 +1,24 @@ |
| 1 | +<?php | |
| 2 | +/****************************************************************/ | |
| 3 | +include (dirname ( __FILE__ ) . "/../../../../ms_configura.php"); | |
| 4 | +// | |
| 5 | +//checa login | |
| 6 | +//valida _GET e _POST, juntando em _GET | |
| 7 | +//pega algumas variaveis de uso mais comum | |
| 8 | +//session_start | |
| 9 | +// | |
| 10 | +include ("../../../php/checaLogin.php"); | |
| 11 | +\admin\php\login\checaLogin(); | |
| 12 | +//funcoes de administracao | |
| 13 | +include ($_SESSION["locaplic"]."/admin1/php/funcoesAdmin.php"); | |
| 14 | +// | |
| 15 | +//conexao com o banco de administracao | |
| 16 | +//cria as variaveis $dbh e $dbhw alem de conexaoadmin | |
| 17 | +// | |
| 18 | +include ($_SESSION["locaplic"]."/admin1/php/conexao.php"); | |
| 19 | +/***************************************************************/ | |
| 20 | +if (\admin\php\funcoesAdmin\verificaOperacaoSessao ( "admin/html/editormapfile" ) === false) { | |
| 21 | + header ( "HTTP/1.1 403 Vc nao pode realizar essa operacao" ); | |
| 22 | + exit (); | |
| 23 | +} | |
| 24 | +?> | |
| 0 | 25 | \ No newline at end of file | ... | ... |
admin1/catalogo/mapfile/opcoes/templates/templateMaisOpcoes.php
| ... | ... | @@ -16,6 +16,20 @@ |
| 16 | 16 | <div class="list-group-item"> |
| 17 | 17 | <div class="row-content" > |
| 18 | 18 | <h4 class="list-group-item-heading"> |
| 19 | + <a title="{{{conexaoOgc}}}" href="../conexao/ogc/index.php?codigo={{codigo}}&id_tema={{id_tema}}" class="pull-right btn btn-danger btn-fab btn-fab-mini" role="button"> | |
| 20 | + <i class="material-icons md-18">more_horiz</i> | |
| 21 | + </a> | |
| 22 | + {{{conexaoOgc}}} | |
| 23 | + <span id="helpBlock" class="help-block"> | |
| 24 | + {{{conexaoLayerOgc}}} | |
| 25 | + </span> | |
| 26 | + </h4> | |
| 27 | + </div> | |
| 28 | + <div class="list-group-separator"></div> | |
| 29 | +</div> | |
| 30 | +<div class="list-group-item"> | |
| 31 | + <div class="row-content" > | |
| 32 | + <h4 class="list-group-item-heading"> | |
| 19 | 33 | <a title="{{{testaLayer}}}" onclick="i3GEOadmin.opcoesmapfile.testa('{{codigo}}')" href="javascript:void(0)" class="pull-right btn btn-danger btn-fab btn-fab-mini" role="button"> |
| 20 | 34 | <i class="material-icons md-18">send</i> |
| 21 | 35 | </a> | ... | ... |
admin1/catalogo/mapfile/templates/templateTiposConexaoOgc.php
0 → 100755
admin1/dicionario/editormapfile.js
| ... | ... | @@ -1634,5 +1634,20 @@ i3GEOadmin.mapfile.dicionario = { |
| 1634 | 1634 | pt : "Número máximo de elementos que podem ser mostrados em cada janela de apresentação (imagem renderizada).", |
| 1635 | 1635 | en : "", |
| 1636 | 1636 | es : "" |
| 1637 | - }] | |
| 1637 | + }], | |
| 1638 | + 'conexaoOgc' : [ { | |
| 1639 | + pt : "Conexão com serviços OGC (webservices)", | |
| 1640 | + en : "", | |
| 1641 | + es : "" | |
| 1642 | + } ], | |
| 1643 | + 'conexaoLayerOgc' : [ { | |
| 1644 | + pt : "Parâmetros que permitem a conexão com dados externos por meio dos padrões OGC", | |
| 1645 | + en : "", | |
| 1646 | + es : "" | |
| 1647 | + } ], | |
| 1648 | + 'conexaoLayerOgcUrl' : [ { | |
| 1649 | + pt : "Sobre os parâmetros utilizados, veja detalhes em ", | |
| 1650 | + en : "", | |
| 1651 | + es : "" | |
| 1652 | + } ] | |
| 1638 | 1653 | }; | ... | ... |
admin1/php/funcoesAdmin.php
| ... | ... | @@ -379,180 +379,6 @@ function i3GeoAdminInsertLog($pdo,$sql,$data=array()){ |
| 379 | 379 | } |
| 380 | 380 | } |
| 381 | 381 | /* |
| 382 | - Function: \admin\php\funcoesAdmin\verificaFilhos | |
| 383 | - | |
| 384 | -Verifica se o pai tem filhos nos componentes hier�rquicos do banco de administra��o | |
| 385 | - | |
| 386 | -Por exemplo, pode-se verificar se um grupo possu� subgrupos, indicando-se como tabela i3geoadmin_grupos e o id do grupo | |
| 387 | - | |
| 388 | -Variaveis globais: | |
| 389 | - | |
| 390 | -tabela {string} - tabela do banco de dados | |
| 391 | - | |
| 392 | -id {string} - valor a ser procurado | |
| 393 | - | |
| 394 | -Retorno: | |
| 395 | - | |
| 396 | -{booleano} | |
| 397 | -*/ | |
| 398 | -function verificaFilhos() | |
| 399 | -{ | |
| 400 | - global $tabela,$id; | |
| 401 | - $esquemaadmin = $_SESSION["esquemaadmin"]; | |
| 402 | - try | |
| 403 | - { | |
| 404 | - $res = false; | |
| 405 | - if($tabela == "i3geoestat_mapa_grupo") | |
| 406 | - { | |
| 407 | - $grupo = \admin\php\funcoesAdmin\pegaDados("select * from ".$esquemaadmin."i3geoestat_mapa_tema where id_mapa_grupo=$id"); | |
| 408 | - if(count($grupo) > 0) | |
| 409 | - $res = true; | |
| 410 | - } | |
| 411 | - if($tabela == "i3geoestat_mapa") | |
| 412 | - { | |
| 413 | - $grupo = \admin\php\funcoesAdmin\pegaDados("select * from ".$esquemaadmin."i3geoestat_mapa_grupo where id_mapa=$id"); | |
| 414 | - if(count($grupo) > 0) | |
| 415 | - $res = true; | |
| 416 | - } | |
| 417 | - if($tabela == "i3geoestat_classificacao") | |
| 418 | - { | |
| 419 | - $r = \admin\php\funcoesAdmin\pegaDados("select * from ".$esquemaadmin."i3geoestat_classes where id_classificacao=$id"); | |
| 420 | - if(count($r) > 0) | |
| 421 | - $res = true; | |
| 422 | - } | |
| 423 | - if($tabela == "i3geoestat_conexao") | |
| 424 | - { | |
| 425 | - $r = \admin\php\funcoesAdmin\pegaDados("select * from ".$esquemaadmin."i3geoestat_medida_variavel where codigo_estat_conexao=$id"); | |
| 426 | - if(count($r) > 0) | |
| 427 | - $res = true; | |
| 428 | - } | |
| 429 | - if($tabela == "i3geoestat_tipo_periodo") | |
| 430 | - { | |
| 431 | - $r = \admin\php\funcoesAdmin\pegaDados("select * from ".$esquemaadmin."i3geoestat_medida_variavel where codigo_tipo_periodo=$id"); | |
| 432 | - if(count($r) > 0) | |
| 433 | - $res = true; | |
| 434 | - } | |
| 435 | - if($tabela == "i3geoestat_unidade_medida") | |
| 436 | - { | |
| 437 | - $r = \admin\php\funcoesAdmin\pegaDados("select * from ".$esquemaadmin."i3geoestat_medida_variavel where codigo_unidade_medida=$id"); | |
| 438 | - if(count($r) > 0) | |
| 439 | - $res = true; | |
| 440 | - } | |
| 441 | - if($tabela == "i3geoestat_fonteinfo") | |
| 442 | - { | |
| 443 | - $r = \admin\php\funcoesAdmin\pegaDados("select * from ".$esquemaadmin."i3geoestat_fonteinfo_medida where id_fonteinfo=$id"); | |
| 444 | - if(count($r) > 0) | |
| 445 | - $res = true; | |
| 446 | - } | |
| 447 | - if($tabela == "i3geoestat_variavel") | |
| 448 | - { | |
| 449 | - $r = \admin\php\funcoesAdmin\pegaDados("select * from ".$esquemaadmin."i3geoestat_medida_variavel where codigo_variavel=$id"); | |
| 450 | - if(count($r) > 0) | |
| 451 | - $res = true; | |
| 452 | - } | |
| 453 | - if($tabela == "i3geoestat_medida_variavel") | |
| 454 | - { | |
| 455 | - $link = \admin\php\funcoesAdmin\pegaDados("select * from ".$esquemaadmin."i3geoestat_medida_variavel_link where id_medida_variavel=$id"); | |
| 456 | - $parametro = \admin\php\funcoesAdmin\pegaDados("select * from ".$esquemaadmin."i3geoestat_parametro_medida where id_medida_variavel=$id"); | |
| 457 | - $fonte = \admin\php\funcoesAdmin\pegaDados("select * from ".$esquemaadmin."i3geoestat_fonteinfo_medida where id_medida_variavel=$id"); | |
| 458 | - if(count($link) > 0 || count($parametro) > 0 || count($fonte) > 0) | |
| 459 | - $res = true; | |
| 460 | - } | |
| 461 | - if($tabela == "i3geoadmin_n2") | |
| 462 | - { | |
| 463 | - $r = \admin\php\funcoesAdmin\pegaDados("select * from ".$esquemaadmin."i3geoadmin_n3 where id_n2=$id"); | |
| 464 | - if(count($r) > 0) | |
| 465 | - $res = true; | |
| 466 | - } | |
| 467 | - if($tabela == "i3geousr_grupos") | |
| 468 | - { | |
| 469 | - $r = \admin\php\funcoesAdmin\pegaDados("select * from ".$esquemaadmin."i3geousr_gruposusuario where id_grupo=$id"); | |
| 470 | - if(count($r) > 0) | |
| 471 | - $res = true; | |
| 472 | - } | |
| 473 | - if($tabela == "i3geousr_usuarios") | |
| 474 | - { | |
| 475 | - $r = \admin\php\funcoesAdmin\pegaDados("select * from ".$esquemaadmin."i3geousr_papelusuario where id_usuario=$id"); | |
| 476 | - if(count($r) > 0) | |
| 477 | - $res = true; | |
| 478 | - } | |
| 479 | - if($tabela == "i3geoadmin_n1") | |
| 480 | - { | |
| 481 | - $r = \admin\php\funcoesAdmin\pegaDados("select * from ".$esquemaadmin."i3geoadmin_n2 where id_n1=$id"); | |
| 482 | - if(count($r) > 0) | |
| 483 | - $res = true; | |
| 484 | - } | |
| 485 | - if($tabela == "i3geoadmin_menus") | |
| 486 | - { | |
| 487 | - $r = \admin\php\funcoesAdmin\pegaDados("select * from ".$esquemaadmin."i3geoadmin_n1 where id_menu=$id"); | |
| 488 | - if(count($r) > 0) | |
| 489 | - $res = true; | |
| 490 | - } | |
| 491 | - if($tabela == "i3geoadmin_grupos") | |
| 492 | - { | |
| 493 | - $r = \admin\php\funcoesAdmin\pegaDados("select n1.id_grupo from ".$esquemaadmin."i3geoadmin_n1 as n1, ".$esquemaadmin."i3geoadmin_n2 as n2 where n1.id_n1 = n2.id_n1 and n1.id_grupo = '$id'"); | |
| 494 | - if(count($r) > 0) | |
| 495 | - $res = true; | |
| 496 | - } | |
| 497 | - if($tabela == "i3geoadmin_subgrupos") | |
| 498 | - { | |
| 499 | - $r = \admin\php\funcoesAdmin\pegaDados("select n2.id_subgrupo from ".$esquemaadmin."i3geoadmin_n3 as n3, ".$esquemaadmin."i3geoadmin_n2 as n2 where n2.id_n2 = n3.id_n3 and n2.id_subgrupo = '$id'"); | |
| 500 | - if(count($r) > 0) | |
| 501 | - $res = true; | |
| 502 | - } | |
| 503 | - if($tabela == "i3geoadmin_temas") | |
| 504 | - { | |
| 505 | - $r = \admin\php\funcoesAdmin\pegaDados("select id_tema from ".$esquemaadmin."i3geoadmin_n3 where id_tema = '$id'"); | |
| 506 | - if(count($r) > 0) | |
| 507 | - $res = true; | |
| 508 | - } | |
| 509 | - if($tabela == "i3geoadmin_sistemas") | |
| 510 | - { | |
| 511 | - $r = \admin\php\funcoesAdmin\pegaDados("SELECT id_sistema from ".$esquemaadmin."i3geoadmin_sistemasf where id_sistema ='$id'"); | |
| 512 | - if(count($r) > 0) | |
| 513 | - $res = true; | |
| 514 | - } | |
| 515 | - if($tabela == "i3geoadmin_atlas") | |
| 516 | - { | |
| 517 | - $r = \admin\php\funcoesAdmin\pegaDados("SELECT id_atlas from ".$esquemaadmin."i3geoadmin_atlasp where id_atlas ='$id'"); | |
| 518 | - if(count($r) > 0) | |
| 519 | - $res = true; | |
| 520 | - } | |
| 521 | - if($tabela == "i3geoadmin_atlasp") | |
| 522 | - { | |
| 523 | - $r = \admin\php\funcoesAdmin\pegaDados("SELECT id_prancha from ".$esquemaadmin."i3geoadmin_atlast where id_prancha ='$id'"); | |
| 524 | - if(count($r) > 0) | |
| 525 | - $res = true; | |
| 526 | - } | |
| 527 | - if($tabela == "i3geoadmin_n2") | |
| 528 | - { | |
| 529 | - $r = \admin\php\funcoesAdmin\pegaDados("SELECT id_n3 from ".$esquemaadmin."i3geoadmin_n3 where id_n2 ='$id'"); | |
| 530 | - if(count($r) > 0) | |
| 531 | - $res = true; | |
| 532 | - } | |
| 533 | - if($tabela == "i3geoadmin_n1") | |
| 534 | - { | |
| 535 | - $r = \admin\php\funcoesAdmin\pegaDados("SELECT id_n2 from ".$esquemaadmin."i3geoadmin_n2 where id_n1 ='$id'"); | |
| 536 | - if(count($r) > 0) | |
| 537 | - $res = true; | |
| 538 | - $r = \admin\php\funcoesAdmin\pegaDados("SELECT id_raiz from ".$esquemaadmin."i3geoadmin_raiz where nivel='1' and id_nivel ='$id'"); | |
| 539 | - if(count($r) > 0) | |
| 540 | - $res = true; | |
| 541 | - } | |
| 542 | - if($tabela == "mapfiles") | |
| 543 | - { | |
| 544 | - $r = \admin\php\funcoesAdmin\pegaDados("SELECT id_tema from ".$esquemaadmin."i3geoadmin_n3 where id_tema ='$id'"); | |
| 545 | - if(count($r) > 0) | |
| 546 | - $res = true; | |
| 547 | - } | |
| 548 | - return $res; | |
| 549 | - } | |
| 550 | - catch (PDOException $e) | |
| 551 | - { | |
| 552 | - return "Error!: "; | |
| 553 | - } | |
| 554 | -} | |
| 555 | -/* | |
| 556 | 382 | Function: \admin\php\funcoesAdmin\resolveAcentos |
| 557 | 383 | |
| 558 | 384 | Converte uma string para uma codifica��o de caracteres determinada | ... | ... |