Commit d5c38d5bf61d265da7d3ee94ac25701069562a53
1 parent
3f1b5b0c
Exists in
master
and in
7 other branches
Correção nas funcoes de inicialização do mapa quando são utilizados parâmetros d…
…efinidos na própria interface do mapa. Correção na função de salvar o mapfile no editor de temas
Showing
10 changed files
with
438 additions
and
102 deletions
Show diff stats
admin/admin.db
No preview for this file type
admin/php/editormapfile.php
| @@ -46,7 +46,9 @@ $id = $_GET["id"]; | @@ -46,7 +46,9 @@ $id = $_GET["id"]; | ||
| 46 | testaSafeNumerico([$id]); | 46 | testaSafeNumerico([$id]); |
| 47 | 47 | ||
| 48 | $codigoMap = $_GET["codigoMap"]; | 48 | $codigoMap = $_GET["codigoMap"]; |
| 49 | +$codigomap = $_GET["codigomap"]; | ||
| 49 | $codigoLayer = $_GET["codigoLayer"]; | 50 | $codigoLayer = $_GET["codigoLayer"]; |
| 51 | +$nomelayer = $_GET["nomelayer"]; | ||
| 50 | $movimento = $_GET["movimento"]; | 52 | $movimento = $_GET["movimento"]; |
| 51 | 53 | ||
| 52 | $funcoesEdicao = array( | 54 | $funcoesEdicao = array( |
| @@ -0,0 +1,268 @@ | @@ -0,0 +1,268 @@ | ||
| 1 | +/* | ||
| 2 | +para o campo escala e coordenadas | ||
| 3 | +*/ | ||
| 4 | +.fundoRodape .digitar { | ||
| 5 | + background-color: #222222 !IMPORTANT; | ||
| 6 | + opacity: 0.9 !IMPORTANT; | ||
| 7 | + box-shadow: none !IMPORTANT; | ||
| 8 | +} | ||
| 9 | + | ||
| 10 | +.fundoRodape .digitar:hover { | ||
| 11 | + background-color: #222222 !IMPORTANT; | ||
| 12 | + opacity: 0.9 !IMPORTANT; | ||
| 13 | +} | ||
| 14 | + | ||
| 15 | +.fundoRodape .digitarOver { | ||
| 16 | + background-color: #222222 !IMPORTANT; | ||
| 17 | + opacity: 0.9 !IMPORTANT; | ||
| 18 | +} | ||
| 19 | +/* | ||
| 20 | +Barra de botoes de edicao vetorial do openlayers | ||
| 21 | +*/ | ||
| 22 | + | ||
| 23 | +/* | ||
| 24 | +no caso do OL3 | ||
| 25 | +*/ | ||
| 26 | +.ol-overlaycontainer-stopevent .olControlEditingToolbar1 { | ||
| 27 | + left: auto; | ||
| 28 | + position: absolute; | ||
| 29 | + right: 0; | ||
| 30 | + top: 10px; | ||
| 31 | +} | ||
| 32 | + | ||
| 33 | +.olControlEditingToolbar1 div { | ||
| 34 | + background-image: url(../mashups/openlayers.png); | ||
| 35 | + background-repeat: no-repeat; | ||
| 36 | + float: right; | ||
| 37 | + right: 50px; | ||
| 38 | + height: 29px; | ||
| 39 | + margin: 2px; | ||
| 40 | + width: 29px; | ||
| 41 | + cursor: pointer; | ||
| 42 | + top: 10px; | ||
| 43 | +} | ||
| 44 | +/* | ||
| 45 | +Estilo geral do rodape da pagina que contem a barra de escala, coordenadas, etc | ||
| 46 | +*/ | ||
| 47 | +.fundoRodape { | ||
| 48 | + border: 0 solid #DFDFDF; | ||
| 49 | + border-collapse: collapse; | ||
| 50 | + font-family: Verdana,Arial,Helvetica,sans-serif; | ||
| 51 | + font-size: 12px; | ||
| 52 | + margin: 0; | ||
| 53 | + padding: 0; | ||
| 54 | + position: relative; | ||
| 55 | + text-align: center; | ||
| 56 | + background: black; | ||
| 57 | +} | ||
| 58 | +.fundoRodape .ticfind { | ||
| 59 | + background-image: url("../imagens/botao-tiny-zoomparacoordenadas.png"); | ||
| 60 | +} | ||
| 61 | +.fundoRodape .ticfind:hover { | ||
| 62 | + background-image: url("../imagens/botao-tiny-zoomparacoordenadas-hover.png"); | ||
| 63 | +} | ||
| 64 | +/* | ||
| 65 | +Configuracoes especificas dos elementos que ficam no rodape | ||
| 66 | +*/ | ||
| 67 | +#seletorIdiomas { | ||
| 68 | + float: right; | ||
| 69 | +} | ||
| 70 | +#escala { | ||
| 71 | + float: left; | ||
| 72 | +} | ||
| 73 | +#escala td { | ||
| 74 | + background: black; | ||
| 75 | + float: left; | ||
| 76 | +} | ||
| 77 | +#escala span { | ||
| 78 | + border: 0px solid white; | ||
| 79 | +} | ||
| 80 | +#escala input { | ||
| 81 | + background: black; | ||
| 82 | + color: white; | ||
| 83 | + font-family: Verdana,Arial,Helvetica,sans-serif; | ||
| 84 | + font-size: 10px; | ||
| 85 | + margin: 0; | ||
| 86 | + border: 0px solid white; | ||
| 87 | + box-shadow: none; | ||
| 88 | + text-align: right; | ||
| 89 | +} | ||
| 90 | +#i3GEOcompartilhar { | ||
| 91 | + border: 0px solid white; | ||
| 92 | + z-index: 20000; | ||
| 93 | +} | ||
| 94 | +#i3GEOcompartilhar td { | ||
| 95 | + background: black; | ||
| 96 | +} | ||
| 97 | +.i3GeoMascaraCoord { | ||
| 98 | + width: 100%; | ||
| 99 | +} | ||
| 100 | +.i3GeoMascaraCoord td { | ||
| 101 | + background: black; | ||
| 102 | + color: white; | ||
| 103 | +} | ||
| 104 | +.i3GeoMascaraCoord input { | ||
| 105 | + background: black; | ||
| 106 | + color: white; | ||
| 107 | + font-family: Verdana,Arial,Helvetica,sans-serif; | ||
| 108 | + font-size: 10px; | ||
| 109 | + margin: 0; | ||
| 110 | + border: 0px solid white; | ||
| 111 | + box-shadow: none; | ||
| 112 | +} | ||
| 113 | +.i3GeoMascaraCoord span { | ||
| 114 | + border: 0px solid white; | ||
| 115 | +} | ||
| 116 | +.contemCaixaTipoCoord { | ||
| 117 | + overflow: hidden; | ||
| 118 | + width: 40px; | ||
| 119 | + background-color: black; | ||
| 120 | +} | ||
| 121 | +.i3GeoMascaraCoord select { | ||
| 122 | + border: 0px solid #B4B4B4; | ||
| 123 | + font-size: 10px; | ||
| 124 | + height: 17px; | ||
| 125 | + left: 1px; | ||
| 126 | + position: relative; | ||
| 127 | + top: 7px; | ||
| 128 | + width: 130%; | ||
| 129 | + background-color: #222222 !important; | ||
| 130 | + box-shadow: none !important; | ||
| 131 | + opacity: 0.9 !important; | ||
| 132 | + color: white; | ||
| 133 | +} | ||
| 134 | +.i3GeoMascaraCoord tr { | ||
| 135 | + border: 0px solid white; | ||
| 136 | +} | ||
| 137 | +#localizarxy { | ||
| 138 | + z-index : 50; | ||
| 139 | +} | ||
| 140 | +/* | ||
| 141 | +Imagens de fundo da barra de botoes | ||
| 142 | +Ao definir background, o default e redefinido | ||
| 143 | +*/ | ||
| 144 | +#euDock_euImage_2 { | ||
| 145 | + background: black; | ||
| 146 | + opacity: 1; | ||
| 147 | + max-height: 28px; | ||
| 148 | +} | ||
| 149 | +#euDock_euImage_3 { | ||
| 150 | + background: black; | ||
| 151 | + opacity: 1; | ||
| 152 | + max-height: 28px; | ||
| 153 | +} | ||
| 154 | +#euDock_euImage_4 { | ||
| 155 | + background: black; | ||
| 156 | + opacity: 1; | ||
| 157 | + max-height: 28px; | ||
| 158 | +} | ||
| 159 | +#euDock_euImage_2 { | ||
| 160 | + max-height: 28px; | ||
| 161 | + border: 1px solid black; | ||
| 162 | + border-radius: 35px 0 0 5px; | ||
| 163 | + opacity: 1; | ||
| 164 | + background: black; | ||
| 165 | + filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='black', endColorstr='black',GradientType=0 ); | ||
| 166 | +} | ||
| 167 | + | ||
| 168 | +#euDock_euImage_3 { | ||
| 169 | + max-height: 28px; | ||
| 170 | + border: 1px solid black; | ||
| 171 | + opacity: 1; | ||
| 172 | + background: black; | ||
| 173 | + filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='black', endColorstr='black',GradientType=0 ); | ||
| 174 | +} | ||
| 175 | + | ||
| 176 | +#euDock_euImage_4 { | ||
| 177 | + max-height: 28px; | ||
| 178 | + border: 1px solid black; | ||
| 179 | + border-radius: 0px 35 5 0px; | ||
| 180 | + opacity: 1; | ||
| 181 | + background: black; | ||
| 182 | + filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='black', endColorstr='black',GradientType=0 ); | ||
| 183 | +} | ||
| 184 | +#euDock_0 { | ||
| 185 | + margin-top: 5px; | ||
| 186 | +} | ||
| 187 | + | ||
| 188 | +/* | ||
| 189 | +Menu superior de opcoes | ||
| 190 | +*/ | ||
| 191 | +/* cor da barra */ | ||
| 192 | +#menus .bd{ | ||
| 193 | + background: black; | ||
| 194 | +} | ||
| 195 | +/* item de menu quando o mouse passa */ | ||
| 196 | +.yui-skin-sam .yuimenubaritem-selected { | ||
| 197 | + background: #707070; | ||
| 198 | + color: white; | ||
| 199 | +} | ||
| 200 | +/* nomes dos itens do menu */ | ||
| 201 | +.yui-skin-sam .yuimenubaritemlabel { | ||
| 202 | + color:white; | ||
| 203 | + margin: 8px 0; | ||
| 204 | + background: black; | ||
| 205 | + height:14px; | ||
| 206 | +} | ||
| 207 | +/* nomes dos itens do menu quando o mouse passa*/ | ||
| 208 | +.yui-skin-sam .yuimenubaritemlabel-selected{ | ||
| 209 | + background: #707070; | ||
| 210 | + color: white; | ||
| 211 | +} | ||
| 212 | +/* itens dos submenus */ | ||
| 213 | +.yui-skin-sam .yuimenuitemlabel{ | ||
| 214 | + color: white; | ||
| 215 | + padding: 2px 22px; | ||
| 216 | +} | ||
| 217 | +.yui-skin-sam .yuimenuitemlabel a{ | ||
| 218 | + color: white; | ||
| 219 | +} | ||
| 220 | +/* itens dos submenus quando o mouse passa*/ | ||
| 221 | +.yui-skin-sam .yuimenuitem-selected { | ||
| 222 | + background: #707070; | ||
| 223 | +} | ||
| 224 | +/* itens de menu com link e que foram visitados */ | ||
| 225 | +.yui-skin-sam .yuimenubaritemlabel:visited { | ||
| 226 | + color: white; | ||
| 227 | +} | ||
| 228 | +.yui-skin-sam .yuimenuitemlabel:visited { | ||
| 229 | + color: white; | ||
| 230 | +} | ||
| 231 | +#menuajudaMenu{ | ||
| 232 | + color: white; | ||
| 233 | +} | ||
| 234 | +.comboTemasCabecalho .yuimenuitemlabel{ | ||
| 235 | + color: black; | ||
| 236 | +} | ||
| 237 | +.comboTemasCabecalho .yuimenuitemlabel:visited{ | ||
| 238 | + color: black; | ||
| 239 | +} | ||
| 240 | +/*janelas flutuantes*/ | ||
| 241 | +/*arvore de camadas*/ | ||
| 242 | +.i3GEOarvCam .ygtvcell .ygtvlp, .i3GEOarvCam .ygtvlp { | ||
| 243 | + background: url("../css/treeview-sprite.gif") no-repeat scroll 0 -8897px transparent; | ||
| 244 | +} | ||
| 245 | +.i3GEOarvCam .ygtvcell .ygtvlph, .i3GEOarvCam .ygtvlph { | ||
| 246 | + background: url("../css/treeview-sprite.gif") no-repeat scroll 0 -8917px transparent; | ||
| 247 | +} | ||
| 248 | +.i3GEOarvCam .ygtvcell .ygtvlm, .i3GEOarvCam .ygtvlm { | ||
| 249 | + background: url("../css/treeview-sprite.gif") no-repeat scroll 0 -8937px transparent; | ||
| 250 | +} | ||
| 251 | +.i3GEOarvCam .ygtvcell .ygtvlmh, .i3GEOarvCam .ygtvlmh { | ||
| 252 | + background: url("../css/treeview-sprite.gif") no-repeat scroll 0 -8957px transparent; | ||
| 253 | +} | ||
| 254 | + | ||
| 255 | +.i3GEOarvCam .ygtvcell .ygtvtp, .i3GEOarvCam .ygtvtp { | ||
| 256 | + background: url("../css/treeview-sprite.gif") no-repeat scroll 0 -8897px transparent; | ||
| 257 | + height: 22px; | ||
| 258 | +} | ||
| 259 | +.i3GEOarvCam .ygtvcell .ygtvtph, .i3GEOarvCam .ygtvtph { | ||
| 260 | + background: url("../css/treeview-sprite.gif") no-repeat scroll 0 -8917px transparent; | ||
| 261 | + height: 22px; | ||
| 262 | +} | ||
| 263 | +.i3GEOarvCam .ygtvcell .ygtvtm, .i3GEOarvCam .ygtvtm { | ||
| 264 | + background: url("../css/treeview-sprite.gif") no-repeat scroll 0 -8937px transparent; | ||
| 265 | +} | ||
| 266 | +.i3GEOarvCam .ygtvcell .ygtvtmh, .i3GEOarvCam .ygtvtmh { | ||
| 267 | + background: url("../css/treeview-sprite.gif") no-repeat scroll 0 -8957px transparent; | ||
| 268 | +} |
ferramentas/carregamapa/upload.php
| 1 | <?php | 1 | <?php |
| 2 | -exit; | ||
| 3 | -require_once(dirname(__FILE__)."/../../classesphp/pega_variaveis.php"); | ||
| 4 | -require_once(dirname(__FILE__)."/../../classesphp/funcoes_gerais.php"); | ||
| 5 | -include_once (dirname(__FILE__)."/../../classesphp/carrega_ext.php"); | ||
| 6 | -session_name("i3GeoPHP"); | ||
| 7 | -if (isset($g_sid)){ | ||
| 8 | - session_id($g_sid); | ||
| 9 | -} | ||
| 10 | -session_start(); | ||
| 11 | -$map_file = $_SESSION["map_file"]; | ||
| 12 | -$postgis_mapa = $_SESSION["postgis_mapa"]; | ||
| 13 | -require_once (dirname(__FILE__)."/../../ms_configura.php"); | ||
| 14 | -include("../blacklist.php"); | 2 | +include(dirname(__FILE__)."/../safe.php"); |
| 15 | verificaBlFerramentas(basename(dirname(__FILE__)),$i3geoBlFerramentas,false); | 3 | verificaBlFerramentas(basename(dirname(__FILE__)),$i3geoBlFerramentas,false); |
| 4 | +// | ||
| 5 | +//o usuario deve ter entrado pelo i3Geo | ||
| 6 | +// | ||
| 7 | +if(empty($fingerprint)){ | ||
| 8 | + echo "<p class='paragrafo' >Erro ao enviar o arquivo."; | ||
| 9 | + return; | ||
| 10 | +} | ||
| 11 | +include(dirname(__FILE__)."/../../classesphp/carrega_ext.php"); | ||
| 16 | 12 | ||
| 17 | if(isset($logExec) && $logExec["upload"] == true){ | 13 | if(isset($logExec) && $logExec["upload"] == true){ |
| 18 | i3GeoLog("prog: carregamapa filename:" . $_FILES['i3GEOcarregamapafilemap']['name'],$dir_tmp); | 14 | i3GeoLog("prog: carregamapa filename:" . $_FILES['i3GEOcarregamapafilemap']['name'],$dir_tmp); |
| @@ -27,8 +23,7 @@ if(isset($logExec) && $logExec["upload"] == true){ | @@ -27,8 +23,7 @@ if(isset($logExec) && $logExec["upload"] == true){ | ||
| 27 | <body bgcolor="white" style="background-color:white"> | 23 | <body bgcolor="white" style="background-color:white"> |
| 28 | <p> | 24 | <p> |
| 29 | <?php | 25 | <?php |
| 30 | -if (isset($_FILES['i3GEOcarregamapafilemap']['name']) && strlen(basename($_FILES['i3GEOcarregamapafilemap']['name'])) < 200) | ||
| 31 | -{ | 26 | +if (isset($_FILES['i3GEOcarregamapafilemap']['name']) && strlen(basename($_FILES['i3GEOcarregamapafilemap']['name'])) < 200){ |
| 32 | echo "<p class='paragrafo' >Carregando o arquivo...</p>"; | 27 | echo "<p class='paragrafo' >Carregando o arquivo...</p>"; |
| 33 | $dirmap = $dir_tmp; | 28 | $dirmap = $dir_tmp; |
| 34 | $Arquivo = $_FILES['i3GEOcarregamapafilemap']['name']; | 29 | $Arquivo = $_FILES['i3GEOcarregamapafilemap']['name']; |
| @@ -47,8 +42,6 @@ if (isset($_FILES['i3GEOcarregamapafilemap']['name']) && strlen(basename($_FILES | @@ -47,8 +42,6 @@ if (isset($_FILES['i3GEOcarregamapafilemap']['name']) && strlen(basename($_FILES | ||
| 47 | if($checkphp == true){ | 42 | if($checkphp == true){ |
| 48 | exit; | 43 | exit; |
| 49 | } | 44 | } |
| 50 | - $nome = basename($Arquivo); | ||
| 51 | - $arqtemp = $dirmap."/".$Arquivo; | ||
| 52 | $status = move_uploaded_file($_FILES['i3GEOcarregamapafilemap']['tmp_name'],$dirmap."/".$Arquivo); | 45 | $status = move_uploaded_file($_FILES['i3GEOcarregamapafilemap']['tmp_name'],$dirmap."/".$Arquivo); |
| 53 | if($status != 1){ | 46 | if($status != 1){ |
| 54 | echo "<p class='paragrafo' >Ocorreu um erro no envio do arquivo"; | 47 | echo "<p class='paragrafo' >Ocorreu um erro no envio do arquivo"; |
| @@ -57,54 +50,98 @@ if (isset($_FILES['i3GEOcarregamapafilemap']['name']) && strlen(basename($_FILES | @@ -57,54 +50,98 @@ if (isset($_FILES['i3GEOcarregamapafilemap']['name']) && strlen(basename($_FILES | ||
| 57 | } | 50 | } |
| 58 | if($status == 1){ | 51 | if($status == 1){ |
| 59 | echo "<p class='paragrafo' >Arquivo enviado. Verificando o mapa...</p>"; | 52 | echo "<p class='paragrafo' >Arquivo enviado. Verificando o mapa...</p>"; |
| 60 | - | ||
| 61 | - $mapt = ms_newMapObj($dirmap."/".$Arquivo); | ||
| 62 | $map = ms_newMapObj($map_file); | 53 | $map = ms_newMapObj($map_file); |
| 54 | + // | ||
| 55 | + //muda o arquivo de simbolo | ||
| 56 | + // | ||
| 57 | + $s = file_get_contents($dirmap."/".$Arquivo); | ||
| 58 | + $s = "MAP\n SYMBOLSET ".$map->symbolsetfilename."\nFONTSET ".$map->fontsetfilename."\n" . $s; | ||
| 59 | + | ||
| 60 | + $handle = fopen($dirmap."/".$Arquivo, "w"); | ||
| 61 | + fwrite($handle,$s); | ||
| 62 | + fclose($handle); | ||
| 63 | 63 | ||
| 64 | + $mapt = ms_newMapObj($dirmap."/".$Arquivo); | ||
| 65 | + unlink($dirmap."/".$Arquivo); | ||
| 66 | + // | ||
| 64 | //apaga os layers do mapa atual | 67 | //apaga os layers do mapa atual |
| 68 | + // | ||
| 65 | $numlayers = $map->numlayers; | 69 | $numlayers = $map->numlayers; |
| 66 | for ($i=0;$i < $numlayers;$i++) { | 70 | for ($i=0;$i < $numlayers;$i++) { |
| 67 | $layer = $map->getlayer($i); | 71 | $layer = $map->getlayer($i); |
| 68 | $layer->set("status",MS_DELETE); | 72 | $layer->set("status",MS_DELETE); |
| 69 | } | 73 | } |
| 70 | $map->save($map_file); | 74 | $map->save($map_file); |
| 71 | - $img = $map->draw(); | 75 | + // |
| 76 | + //copia os layers do mapfile temporario para o mapfile em uso | ||
| 77 | + // | ||
| 72 | $numlayers = $mapt->numlayers; | 78 | $numlayers = $mapt->numlayers; |
| 73 | for ($i=0;$i < $numlayers;$i++){ | 79 | for ($i=0;$i < $numlayers;$i++){ |
| 74 | - $layer = $mapt->getlayer($i); | ||
| 75 | - ms_newLayerObj($map, $layer); | ||
| 76 | - $layertemp = $map->getlayerbyname($layer->name); | ||
| 77 | - $st = $layertemp->status; | ||
| 78 | - $layertemp->set("status",MS_DEFAULT); | ||
| 79 | - $testa = $layertemp->draw($img); | ||
| 80 | - $layertemp->set("status",$st); | ||
| 81 | - $layertemp->setmetadata("permitekmz","nao"); | ||
| 82 | - $layertemp->setmetadata("permitedownload","nao"); | ||
| 83 | - $layertemp->setmetadata("download","nao"); | ||
| 84 | - $layertemp->setmetadata("permitekml","nao"); | ||
| 85 | - $layertemp->setmetadata("permiteogc","nao"); | ||
| 86 | - $layertemp->setmetadata("animagif",""); | ||
| 87 | - $layertemp->setmetadata("tme",""); | ||
| 88 | - $layertemp->setmetadata("storymap",""); | ||
| 89 | - $layertemp->setmetadata("editorsql","nao"); | ||
| 90 | - $layertemp->setmetadata("EDITAVEL","nao"); | ||
| 91 | - $layertemp->setmetadata("PLUGINI3GEO",""); | ||
| 92 | - $layertemp->setmetadata("arquivodownload",""); | ||
| 93 | - if ($testa == 1){ | ||
| 94 | - echo "<p class='paragrafo' >Problemas em ".($layer->name).". Removido.</p><br>"; | ||
| 95 | - $layertemp->set("status",MS_DELETE); | 80 | + $layert = $mapt->getlayer($i); |
| 81 | + // | ||
| 82 | + //verifica se existe o tema em i3geo/temas | ||
| 83 | + // | ||
| 84 | + $arqoriginal = ""; | ||
| 85 | + if(file_exists($locaplic."/temas/".$layert->name.".map")){ | ||
| 86 | + $nomeoriginal = $layert->name; | ||
| 87 | + $arqoriginal = $locaplic."/temas/".$layert->name.".map"; | ||
| 88 | + } elseif (file_exists($locaplic."/temas/".$layert->getmetadata("nomeoriginal").".map")){ | ||
| 89 | + $nomeoriginal = $layert->getmetadata("nomeoriginal"); | ||
| 90 | + $arqoriginal = $locaplic."/temas/".$layert->getmetadata("nomeoriginal").".map"; | ||
| 91 | + } | ||
| 92 | + if($arqoriginal != ""){ | ||
| 93 | + // | ||
| 94 | + //o tema existe | ||
| 95 | + // | ||
| 96 | + $mapo = ms_newMapObj($arqoriginal); | ||
| 97 | + $layero = $mapo->getlayerbyname($nomeoriginal); | ||
| 98 | + $layero->setmetadata("cache","nao"); | ||
| 99 | + // | ||
| 100 | + //remove as classes do layer original | ||
| 101 | + // | ||
| 102 | + $nclasses = $layero->numclasses; | ||
| 103 | + if ($nclasses > 0){ | ||
| 104 | + for ($j=0; $j < $nclasses; ++$j){ | ||
| 105 | + $classe = $layero->getClass($j); | ||
| 106 | + $classe->set("status",MS_DELETE); | ||
| 107 | + } | ||
| 108 | + } | ||
| 109 | + // | ||
| 110 | + //copia as classes do layer do upload para o original | ||
| 111 | + // | ||
| 112 | + $nclasses = $layert->numclasses; | ||
| 113 | + if ($nclasses > 0){ | ||
| 114 | + for ($j=0; $j < $nclasses; ++$j){ | ||
| 115 | + $classe = $layert->getClass($j); | ||
| 116 | + //adiciona a classe no original | ||
| 117 | + ms_newClassObj($layero, $classe); | ||
| 118 | + } | ||
| 119 | + } | ||
| 120 | + // | ||
| 121 | + //ajusta parametros que o usuario pode ter modificado | ||
| 122 | + // | ||
| 123 | + if($layert->status == 2){ | ||
| 124 | + $layero->set("status",MS_DEFAULT); | ||
| 125 | + } | ||
| 126 | + else{ | ||
| 127 | + $layero->set("status",MS_OFF); | ||
| 128 | + } | ||
| 129 | + | ||
| 130 | + $layero->set("opacity",$layert->opacity); | ||
| 131 | + $layero->setmetadata("TEMA",$layert->getmetadata("TEMA")); | ||
| 132 | + // | ||
| 133 | + //adiciona o layer ao mapa atual | ||
| 134 | + // | ||
| 135 | + ms_newLayerObj($map,$layero); | ||
| 136 | + } elseif($layert->connectiontype == MS_INLINE || $layert->connectiontype == MS_WMS || $layert->connectiontype == MS_GRATICULE){ | ||
| 137 | + ms_newLayerObj($map,$layert); | ||
| 96 | } | 138 | } |
| 97 | } | 139 | } |
| 98 | - $map->setmetadata("CUSTOMIZACOESINIT",""); | ||
| 99 | $map->save($map_file); | 140 | $map->save($map_file); |
| 100 | - restauraCon($map_file,$postgis_mapa); | ||
| 101 | - unlink($dirmap."/".$Arquivo); | ||
| 102 | - $e = $mapt->extent; | ||
| 103 | - $extatual = $e->minx." ".$e->miny." ".$e->maxx." ".$e->maxy; | 141 | + validaAcessoTemas($map_file); |
| 104 | echo "<p class='paragrafo' >Ok. redesenhando."; | 142 | echo "<p class='paragrafo' >Ok. redesenhando."; |
| 105 | echo "<script>window.parent.i3GEO.atualiza();</script>"; | 143 | echo "<script>window.parent.i3GEO.atualiza();</script>"; |
| 106 | - echo "<script>window.parent.i3GEO.navega.zoomExt(window.parent.i3GEO.configura.locaplic,window.parent.i3GEO.configura.sid,'nenhum','".$extatual."');</script>"; | ||
| 107 | - | 144 | + //echo "<script>window.parent.i3GEO.navega.zoomExt(window.parent.i3GEO.configura.locaplic,window.parent.i3GEO.configura.sid,'nenhum','".$extatual."');</script>"; |
| 108 | } | 145 | } |
| 109 | else{ | 146 | else{ |
| 110 | echo "<p class='paragrafo' >Erro ao enviar o arquivo."; | 147 | echo "<p class='paragrafo' >Erro ao enviar o arquivo."; |
ferramentas/safe.php
| 1 | <?php | 1 | <?php |
| 2 | include_once (dirname(__FILE__)."/../classesphp/sani_request.php"); | 2 | include_once (dirname(__FILE__)."/../classesphp/sani_request.php"); |
| 3 | $_GET = array_merge($_GET,$_POST); | 3 | $_GET = array_merge($_GET,$_POST); |
| 4 | +// | ||
| 5 | +//$fingerprint e usado para verificar se o usuario veio do i3geo | ||
| 6 | +// | ||
| 4 | if(!empty($_GET["g_sid"])){ | 7 | if(!empty($_GET["g_sid"])){ |
| 5 | $g_sid = $_GET["g_sid"]; | 8 | $g_sid = $_GET["g_sid"]; |
| 6 | session_name("i3GeoPHP"); | 9 | session_name("i3GeoPHP"); |
| @@ -24,6 +27,7 @@ if(!empty($_GET["g_sid"])){ | @@ -24,6 +27,7 @@ if(!empty($_GET["g_sid"])){ | ||
| 24 | } | 27 | } |
| 25 | else{ | 28 | else{ |
| 26 | $g_sid = ""; | 29 | $g_sid = ""; |
| 30 | + $fingerprint = ""; | ||
| 27 | } | 31 | } |
| 28 | //variaveis mais utilizadas | 32 | //variaveis mais utilizadas |
| 29 | $tema = $_GET["tema"]; | 33 | $tema = $_GET["tema"]; |
| @@ -32,7 +36,7 @@ $funcao = $_GET["funcao"]; | @@ -32,7 +36,7 @@ $funcao = $_GET["funcao"]; | ||
| 32 | 36 | ||
| 33 | include_once(dirname(__FILE__)."/../classesphp/funcoes_gerais.php"); | 37 | include_once(dirname(__FILE__)."/../classesphp/funcoes_gerais.php"); |
| 34 | 38 | ||
| 35 | -if(isset($fingerprint) && !empty($g_sid)) { | 39 | +if(!empty($fingerprint) && !empty($g_sid)) { |
| 36 | $f = explode(",",$fingerprint); | 40 | $f = explode(",",$fingerprint); |
| 37 | if($f[0] != md5('I3GEOSEC' . $_SERVER['HTTP_USER_AGENT'] . session_id())){ | 41 | if($f[0] != md5('I3GEOSEC' . $_SERVER['HTTP_USER_AGENT'] . session_id())){ |
| 38 | cpjson(". Tentativa de acesso nao permitida. Inicie um novo mapa."); | 42 | cpjson(". Tentativa de acesso nao permitida. Inicie um novo mapa."); |
ferramentas/salvamapa/forcedownload.php
| @@ -2,6 +2,13 @@ | @@ -2,6 +2,13 @@ | ||
| 2 | include(dirname(__FILE__)."/../safe.php"); | 2 | include(dirname(__FILE__)."/../safe.php"); |
| 3 | verificaBlFerramentas(basename(dirname(__FILE__)),$i3geoBlFerramentas,false); | 3 | verificaBlFerramentas(basename(dirname(__FILE__)),$i3geoBlFerramentas,false); |
| 4 | // | 4 | // |
| 5 | +//o usuario deve ter entrado pelo i3Geo | ||
| 6 | +// | ||
| 7 | +if(empty($fingerprint)){ | ||
| 8 | + echo "<p class='paragrafo' >Erro ao enviar o arquivo."; | ||
| 9 | + return; | ||
| 10 | +} | ||
| 11 | +// | ||
| 5 | //faz uma copia temporaria do mapfile | 12 | //faz uma copia temporaria do mapfile |
| 6 | // | 13 | // |
| 7 | $arquivo = dirname($map_file)."/mapfile_".nomeRandomico(6).".map"; | 14 | $arquivo = dirname($map_file)."/mapfile_".nomeRandomico(6).".map"; |
| @@ -22,18 +29,18 @@ for ($i=0;$i < $c;++$i){ | @@ -22,18 +29,18 @@ for ($i=0;$i < $c;++$i){ | ||
| 22 | if($ct != MS_INLINE && $ct != MS_WMS && $ct != MS_GRATICULE){ | 29 | if($ct != MS_INLINE && $ct != MS_WMS && $ct != MS_GRATICULE){ |
| 23 | $l->set("connection",""); | 30 | $l->set("connection",""); |
| 24 | $l->set("data",""); | 31 | $l->set("data",""); |
| 25 | - } | ||
| 26 | - // | ||
| 27 | - //remove os metadata | ||
| 28 | - // | ||
| 29 | - $hashTable = $l->metadata; | ||
| 30 | - $key = null; | ||
| 31 | - while ($key = $hashTable->nextkey($key)){ | ||
| 32 | - if(!in_array(strtolower($key),array("tema","nomeoriginal"))){ | ||
| 33 | - //echo "Key: ".$key." value: ".$hashTable->get($key)."<br/>"; | ||
| 34 | - $l->setmetadata($key,""); | ||
| 35 | - if($ct != MS_WMS){ | ||
| 36 | - $remover[] = strtoupper($key); | 32 | + // |
| 33 | + //remove os metadata | ||
| 34 | + // | ||
| 35 | + $hashTable = $l->metadata; | ||
| 36 | + $key = null; | ||
| 37 | + while ($key = $hashTable->nextkey($key)){ | ||
| 38 | + if(!in_array(strtolower($key),array("tema","nomeoriginal"))){ | ||
| 39 | + //echo "Key: ".$key." value: ".$hashTable->get($key)."<br/>"; | ||
| 40 | + $l->setmetadata($key,""); | ||
| 41 | + if($ct != MS_WMS){ | ||
| 42 | + $remover[] = strtoupper($key); | ||
| 43 | + } | ||
| 37 | } | 44 | } |
| 38 | } | 45 | } |
| 39 | } | 46 | } |
| @@ -54,15 +61,15 @@ function removeCabecalho($arq,$remover){ | @@ -54,15 +61,15 @@ function removeCabecalho($arq,$remover){ | ||
| 54 | $handle = fopen($arq, "r"); | 61 | $handle = fopen($arq, "r"); |
| 55 | if ($handle){ | 62 | if ($handle){ |
| 56 | $cabeca = array(); | 63 | $cabeca = array(); |
| 57 | - $cabeca[] = "MAP\n"; | 64 | + //$cabeca[] = "MAP\n"; |
| 58 | $grava = false; | 65 | $grava = false; |
| 59 | while (!feof($handle)){ | 66 | while (!feof($handle)){ |
| 60 | $linha = fgets($handle); | 67 | $linha = fgets($handle); |
| 61 | if(strpos(strtoupper($linha),"SYMBOLSET") !== false){ | 68 | if(strpos(strtoupper($linha),"SYMBOLSET") !== false){ |
| 62 | - $cabeca[] = '"..'.explode($pasta,$linha)[1]; | 69 | + //$cabeca[] = '"..'.explode($pasta,$linha)[1]; |
| 63 | } | 70 | } |
| 64 | if(strpos(strtoupper($linha),"FONTSET") !== false){ | 71 | if(strpos(strtoupper($linha),"FONTSET") !== false){ |
| 65 | - $cabeca[] = '"..'.explode($pasta,$linha)[1]; | 72 | + //$cabeca[] = '"..'.explode($pasta,$linha)[1]; |
| 66 | } | 73 | } |
| 67 | if(strtoupper(trim($linha)) == "LAYER"){ | 74 | if(strtoupper(trim($linha)) == "LAYER"){ |
| 68 | $grava = true; | 75 | $grava = true; |
interface/black_editor.php
| @@ -18,9 +18,9 @@ | @@ -18,9 +18,9 @@ | ||
| 18 | top: 10px; | 18 | top: 10px; |
| 19 | } | 19 | } |
| 20 | </style> | 20 | </style> |
| 21 | - <script src="../classesjs/i3geo6.js"></script> | 21 | + <script src="../classesjs/i3geonaocompacto.js"></script> |
| 22 | <script src="../pacotes/openlayers/OpenLayers2131.js.php"></script> | 22 | <script src="../pacotes/openlayers/OpenLayers2131.js.php"></script> |
| 23 | - <link rel="stylesheet" type="text/css" href="../css/black.css"> | 23 | + <link rel="stylesheet" type="text/css" href="../css/black6.css"> |
| 24 | </head> | 24 | </head> |
| 25 | <body id="i3geo" style='margin-left: 7px; background: white;'> | 25 | <body id="i3geo" style='margin-left: 7px; background: white;'> |
| 26 | <!-- inclui o nome do usuario logado --> | 26 | <!-- inclui o nome do usuario logado --> |
| @@ -48,11 +48,19 @@ | @@ -48,11 +48,19 @@ | ||
| 48 | <table style="width: 100%; height: 28px"> | 48 | <table style="width: 100%; height: 28px"> |
| 49 | <tr> | 49 | <tr> |
| 50 | <td class=fundoRodape style="width: 25%"> | 50 | <td class=fundoRodape style="width: 25%"> |
| 51 | + <!-- aqui será incluída a escala numérica --> | ||
| 52 | + <div id=escala style="margin: auto; text-align: right; left: 15px;"></div> | ||
| 51 | </td> | 53 | </td> |
| 52 | <td class=fundoRodape style="width: 5%"></td> | 54 | <td class=fundoRodape style="width: 5%"></td> |
| 53 | <td class=fundoRodape style="width: 40%"> | 55 | <td class=fundoRodape style="width: 40%"> |
| 56 | + <!-- aqui será incluído o gadget que mostra a coordenada geográfica da posição do mouse --> | ||
| 57 | + <div id=localizarxy style="margin: auto; text-align: left; font-size: 10px; display: inline-table"></div> | ||
| 54 | </td> | 58 | </td> |
| 55 | <td class=fundoRodape style="width: 20%"> | 59 | <td class=fundoRodape style="width: 20%"> |
| 60 | + <!-- botão de compartilhamento em redes sociais--> | ||
| 61 | + <!--<div id=i3GEOcompartilhar style="width: 170px; margin: auto; text-align: left; padding-top: 1px"></div> --> | ||
| 62 | + <!-- aqui será incluído o contador de tempo quando o temporizador de redesenho do mapa estiver ativo --> | ||
| 63 | + <div id=tempoRedesenho style="z-index: 100; position: absolute; top: 0px; color: green; background-color: black; width: 50px; display: none"></div> | ||
| 56 | </td> | 64 | </td> |
| 57 | <!-- aqui serão incluídas as bandeiras que permitem a troca de idioma --> | 65 | <!-- aqui serão incluídas as bandeiras que permitem a troca de idioma --> |
| 58 | <td class=fundoRodape style="width: 10%;"> | 66 | <td class=fundoRodape style="width: 10%;"> |
ms_configura.php
| @@ -219,7 +219,7 @@ buscarapida,conectarservicos,convertemapakml,cortina,editorsql,filtroarvore,geol | @@ -219,7 +219,7 @@ buscarapida,conectarservicos,convertemapakml,cortina,editorsql,filtroarvore,geol | ||
| 219 | inseretxt,mostraexten,outputformat,perfil,tipoimagem | 219 | inseretxt,mostraexten,outputformat,perfil,tipoimagem |
| 220 | 220 | ||
| 221 | */ | 221 | */ |
| 222 | -$i3geoBlFerramentas = array("carregamapa","saiku"); | 222 | +$i3geoBlFerramentas = array("saiku"); |
| 223 | /* | 223 | /* |
| 224 | Variable: $ogrOutput | 224 | Variable: $ogrOutput |
| 225 | 225 |
ms_criamapa.php
| @@ -221,10 +221,41 @@ filtros - filtros podem ser adicionados incluindo o parametro da seguinte forma: | @@ -221,10 +221,41 @@ filtros - filtros podem ser adicionados incluindo o parametro da seguinte forma: | ||
| 221 | } | 221 | } |
| 222 | //$_COOKIE = array(); | 222 | //$_COOKIE = array(); |
| 223 | // | 223 | // |
| 224 | -//quando $funcao existe, é pq o ms_criamapa.php está sendo utilizado como um include em classesphp/mapa_controle.php | 224 | +//quando $funcao existe, é pq o ms_criamapa.php está |
| 225 | +//sendo utilizado como um include em classesphp/mapa_controle.php | ||
| 225 | // | 226 | // |
| 226 | - | 227 | +$parurl = array_merge($_GET,$_POST); |
| 227 | ms_ResetErrorList(); | 228 | ms_ResetErrorList(); |
| 229 | +$base = $parurl["base"]; | ||
| 230 | +$temasa = $parurl["temasa"]; | ||
| 231 | +$layers = $parurl["layers"]; | ||
| 232 | +$desligar = $parurl["desligar"]; | ||
| 233 | +$mapext = $parurl["mapext"]; | ||
| 234 | +$executa = "";//$parurl["executa"]; | ||
| 235 | +$perfil = $parurl["perfil"]; | ||
| 236 | +$caminho = $parurl["caminho"]; | ||
| 237 | +$pontos = $parurl["pontos"]; | ||
| 238 | +$nometemapontos = $parurl["nometemapontos"]; | ||
| 239 | +$linhas = $parurl["linhas"]; | ||
| 240 | +$nometemalinhas = $parurl["nometemalinhas"]; | ||
| 241 | +$poligonos = $parurl["poligonos"]; | ||
| 242 | +$nometemapoligonos = $parurl["nometemapoligonos"]; | ||
| 243 | +$simbolo = $parurl["simbolo"]; | ||
| 244 | +$corsimbolo = $parurl["corsimbolo"]; | ||
| 245 | +$tamanhosimbolo = $parurl["tamanhosimbolo"]; | ||
| 246 | +$wkt = $parurl["wkt"]; | ||
| 247 | +$nometemawkt = $parurl["nometemawkt"]; | ||
| 248 | +$idioma = $parurl["idioma"]; | ||
| 249 | +$kmlurl = $parurl["kmlurl"]; | ||
| 250 | +$url_wms = $parurl["url_wms"]; | ||
| 251 | +$layer_wms = $parurl["layer_wms"]; | ||
| 252 | +$style_wms = $parurl["style_wms"]; | ||
| 253 | +$nome_wms = $parurl["nome_wms"]; | ||
| 254 | +$srs_wms = $parurl["srs_wms"]; | ||
| 255 | +$image_wms = $parurl["image_wms"]; | ||
| 256 | +$versao_wms = $parurl["versao_wms"]; | ||
| 257 | +$gvsigview = $parurl["gvsigview"]; | ||
| 258 | +$restauramapa = $parurl["restauramapa"]; | ||
| 228 | if(!isset($funcao)){ | 259 | if(!isset($funcao)){ |
| 229 | ob_end_clean(); | 260 | ob_end_clean(); |
| 230 | /* | 261 | /* |
| @@ -240,38 +271,8 @@ if(!isset($funcao)){ | @@ -240,38 +271,8 @@ if(!isset($funcao)){ | ||
| 240 | Inclui os programas php com funções utilizadas pelo ms_criamapa.php | 271 | Inclui os programas php com funções utilizadas pelo ms_criamapa.php |
| 241 | */ | 272 | */ |
| 242 | include_once (dirname(__FILE__)."/classesphp/sani_request.php"); | 273 | include_once (dirname(__FILE__)."/classesphp/sani_request.php"); |
| 243 | - $parurl = array_merge($_GET,$_POST); | ||
| 244 | - $base = $parurl["base"]; | ||
| 245 | - $temasa = $parurl["temasa"]; | ||
| 246 | - $layers = $parurl["layers"]; | ||
| 247 | - $desligar = $parurl["desligar"]; | ||
| 248 | - $mapext = $parurl["mapext"]; | ||
| 249 | - $executa = "";//$parurl["executa"]; | 274 | + |
| 250 | $interface = $parurl["interface"]; | 275 | $interface = $parurl["interface"]; |
| 251 | - $perfil = $parurl["perfil"]; | ||
| 252 | - $caminho = $parurl["caminho"]; | ||
| 253 | - $pontos = $parurl["pontos"]; | ||
| 254 | - $nometemapontos = $parurl["nometemapontos"]; | ||
| 255 | - $linhas = $parurl["linhas"]; | ||
| 256 | - $nometemalinhas = $parurl["nometemalinhas"]; | ||
| 257 | - $poligonos = $parurl["poligonos"]; | ||
| 258 | - $nometemapoligonos = $parurl["nometemapoligonos"]; | ||
| 259 | - $simbolo = $parurl["simbolo"]; | ||
| 260 | - $corsimbolo = $parurl["corsimbolo"]; | ||
| 261 | - $tamanhosimbolo = $parurl["tamanhosimbolo"]; | ||
| 262 | - $wkt = $parurl["wkt"]; | ||
| 263 | - $nometemawkt = $parurl["nometemawkt"]; | ||
| 264 | - $idioma = $parurl["idioma"]; | ||
| 265 | - $kmlurl = $parurl["kmlurl"]; | ||
| 266 | - $url_wms = $parurl["url_wms"]; | ||
| 267 | - $layer_wms = $parurl["layer_wms"]; | ||
| 268 | - $style_wms = $parurl["style_wms"]; | ||
| 269 | - $nome_wms = $parurl["nome_wms"]; | ||
| 270 | - $srs_wms = $parurl["srs_wms"]; | ||
| 271 | - $image_wms = $parurl["image_wms"]; | ||
| 272 | - $versao_wms = $parurl["versao_wms"]; | ||
| 273 | - $gvsigview = $parurl["gvsigview"]; | ||
| 274 | - $restauramapa = $parurl["restauramapa"]; | ||
| 275 | } | 276 | } |
| 276 | 277 | ||
| 277 | include_once (dirname(__FILE__)."/classesphp/funcoes_gerais.php"); | 278 | include_once (dirname(__FILE__)."/classesphp/funcoes_gerais.php"); |
| @@ -9,13 +9,22 @@ MAP | @@ -9,13 +9,22 @@ MAP | ||
| 9 | "TIP" "CD_LEGENDA" | 9 | "TIP" "CD_LEGENDA" |
| 10 | "CACHE" "sim" | 10 | "CACHE" "sim" |
| 11 | "CLASSE" "SIM" | 11 | "CLASSE" "SIM" |
| 12 | + "olopacity" "" | ||
| 12 | "permitekmz" "sim" | 13 | "permitekmz" "sim" |
| 14 | + "gmopacity" "" | ||
| 15 | + "gmstatus" "" | ||
| 13 | "ITENSDESC" "Bioma Teste de acentuação" | 16 | "ITENSDESC" "Bioma Teste de acentuação" |
| 14 | "ESCALA" "1000000" | 17 | "ESCALA" "1000000" |
| 15 | "TILES" "SIM" | 18 | "TILES" "SIM" |
| 16 | "METAESTAT_CODIGO_TIPO_REGIAO" "" | 19 | "METAESTAT_CODIGO_TIPO_REGIAO" "" |
| 20 | + "arquivotemaoriginal" "" | ||
| 17 | "extensao" "-76 -39 -29 9" | 21 | "extensao" "-76 -39 -29 9" |
| 22 | + "nomeoriginal" "" | ||
| 23 | + "olstatus" "" | ||
| 18 | "permitedownload" "sim" | 24 | "permitedownload" "sim" |
| 25 | + "FILTROORIGINAL" "" | ||
| 26 | + "DATAORIGINAL" "" | ||
| 27 | + "PLUGINI3GEO" "" | ||
| 19 | "metaestat" "" | 28 | "metaestat" "" |
| 20 | "download" "sim" | 29 | "download" "sim" |
| 21 | "itembuscarapida" "CD_LEGENDA" | 30 | "itembuscarapida" "CD_LEGENDA" |
| @@ -38,7 +47,7 @@ MAP | @@ -38,7 +47,7 @@ MAP | ||
| 38 | NAME "CAATINGA" | 47 | NAME "CAATINGA" |
| 39 | EXPRESSION ('[CD_LEGENDA]'eq'CAATINGA') | 48 | EXPRESSION ('[CD_LEGENDA]'eq'CAATINGA') |
| 40 | STYLE | 49 | STYLE |
| 41 | - COLOR 4 180 226 | 50 | + COLOR 247 166 4 |
| 42 | OUTLINECOLOR 255 255 255 | 51 | OUTLINECOLOR 255 255 255 |
| 43 | END # STYLE | 52 | END # STYLE |
| 44 | TITLE "" | 53 | TITLE "" |