Commit 591e98be5c2422051fe8930d84dab4e738bc6c34
1 parent
ea85fb97
Exists in
master
and in
7 other branches
Padronização das migalhas das páginas principais do i3Geo
Showing
62 changed files
with
661 additions
and
665 deletions
Show diff stats
admin1/head.php
... | ... | @@ -350,6 +350,11 @@ a.collapsed .readLess { |
350 | 350 | .navbar { |
351 | 351 | font-size: 1.8rem; |
352 | 352 | } |
353 | +#navbar { | |
354 | + min-height: 60px; | |
355 | + max-height: 60px; | |
356 | + height: 60px; | |
357 | +} | |
353 | 358 | /* === For phones =================================== */ |
354 | 359 | @media ( max-width : 767px) { |
355 | 360 | .btn-breadcrumb>*:nth-last-child(-n+2) { | ... | ... |
init/head.php
... | ... | @@ -249,6 +249,11 @@ h2 small { |
249 | 249 | .navbar { |
250 | 250 | font-size: 1.8rem; |
251 | 251 | } |
252 | +#navbar { | |
253 | + min-height: 60px; | |
254 | + max-height: 60px; | |
255 | + height: 60px; | |
256 | +} | |
252 | 257 | /* === For phones =================================== */ |
253 | 258 | @media (max-width: 767px) { |
254 | 259 | .btn-breadcrumb > *:nth-last-child(-n+2) { | ... | ... |
mapas/index.php
1 | 1 | <?php |
2 | -define ( "ONDEI3GEO", ".." ); | |
3 | -include (dirname ( __FILE__ ) . "/../ms_configura.php"); | |
4 | -if (! empty ( $_GET ["customDir"] )) { | |
5 | - $customDir = strip_tags ( $_GET ["customDir"] ); | |
6 | -} else if (empty ( $customDir )) { | |
7 | - $customDir = "interface"; | |
2 | +define("ONDEI3GEO", ".."); | |
3 | +include (dirname(__FILE__) . "/../ms_configura.php"); | |
4 | +if (! empty($_GET["customDir"])) { | |
5 | + $customDir = strip_tags($_GET["customDir"]); | |
6 | +} else if (empty($customDir)) { | |
7 | + $customDir = "interface"; | |
8 | 8 | } |
9 | -//error_reporting ( 0 ); | |
9 | +// error_reporting ( 0 ); | |
10 | 10 | include "../init/head.php"; |
11 | 11 | ?> |
12 | 12 | <style> |
... | ... | @@ -72,72 +72,77 @@ include "../init/head.php"; |
72 | 72 | } |
73 | 73 | </style> |
74 | 74 | |
75 | -<body style="padding-top: 55px; position: relative;" > | |
76 | - <nav class="navbar navbar-default navbar-fixed-top"> | |
77 | - <div class="container-fluid"> | |
78 | - <div class="navbar-header"> | |
79 | - <a class="navbar-brand" href="../init/index.php?home="><?php echo $mensagemInicia;?> <i | |
80 | - class="fa fa-home fa-1x"></i></a> | |
81 | - </div> | |
82 | - <ul class="nav navbar-nav sr-only"> | |
83 | - <li><a title="RSS" href="../admin/rssmapas.php"><i class="material-icons ">rss_feed</i></a></li> | |
84 | - <li><a title="JSON" href="../admin/rssmapas.php?output=json"><i class="material-icons ">code</i></a></li> | |
85 | - </ul> | |
86 | - </div> | |
87 | - </nav> | |
88 | - <!--para as mensagens de alerta--> | |
89 | - <div class="navbar-fixed-top alert alert-success text-center" style="padding: 0px;"></div> | |
90 | - <div class="container-fluid"> | |
91 | - <div class="row"> | |
92 | - <ol class="breadcrumb"> | |
93 | - <li><a href="../init/index.php?home=">i3Geo</a></li> | |
94 | - <li class="active">Mapas de usuários</li> | |
95 | - </ol> | |
96 | - </div> | |
97 | - </div> | |
75 | +<body style="padding-top: 60px; position: relative;"> | |
76 | + <nav class="navbar navbar-default navbar-fixed-top"> | |
77 | + <div class="container-fluid"> | |
78 | + <div class="navbar-header"> | |
79 | + <a class="navbar-brand" href="../init/index.php?home="><?php echo $mensagemInicia;?> <i class="fa fa-home fa-1x"></i> | |
80 | + </a> | |
81 | + </div> | |
82 | + <ul class="nav navbar-nav sr-only"> | |
83 | + <li><a title="RSS" href="../rss/rssmapas.php"> | |
84 | + <i class="material-icons ">rss_feed</i> | |
85 | + </a></li> | |
86 | + <li><a title="JSON" href="../rss/rssmapas.php?output=json"> | |
87 | + <i class="material-icons ">code</i> | |
88 | + </a></li> | |
89 | + </ul> | |
90 | + </div> | |
91 | + </nav> | |
92 | + <div class="container-fluid migalha"> | |
93 | + <div class="row"> | |
94 | + <div class="btn-group btn-breadcrumb"> | |
95 | + <a class="btn btn-default" href="../init/index.php?home=">i3Geo</a> | |
96 | + <a class="btn btn-default" style="pointer-events: none">Mapas de usuários</a> | |
97 | + </div> | |
98 | + </div> | |
99 | + </div> | |
100 | + <!--para as mensagens de alerta--> | |
101 | + <div class="navbar-fixed-top alert alert-success text-center" style="padding: 0px;"></div> | |
98 | 102 | |
99 | - <div class="container"> | |
100 | - <div class="row center-block"> | |
101 | - <div class="col-md-12"> | |
102 | - <div class="well hidden escondido" > | |
103 | - <blockquote id="titulo"></blockquote> | |
104 | - </div> | |
105 | - </div> | |
106 | - </div> | |
107 | - <div class="row center-block"> | |
108 | - <div class="col-md-12"> | |
109 | - <div class="well" id="corpo"> | |
110 | - <i class="fa fa-spinner fa-pulse fa-3x fa-fw"></i> <span class="sr-only">Loading...</span> | |
111 | - </div> | |
112 | - </div> | |
113 | - </div> | |
114 | - </div> | |
115 | - <div id="modal" class="modal fade" tabindex="-1" role="dialog"> | |
116 | - <div class="modal-dialog"> | |
117 | - <div class="modal-content"> | |
118 | - <div class="modal-header"> | |
119 | - <button type="button" class="close" data-dismiss="modal" aria-label="Close"> | |
120 | - <span aria-hidden="true">×</span> | |
121 | - </button> | |
122 | - </div> | |
123 | - <div class="modal-body"></div> | |
124 | - </div> | |
125 | - </div> | |
126 | - </div> | |
103 | + <div class="container"> | |
104 | + <div class="row center-block"> | |
105 | + <div class="col-md-12"> | |
106 | + <div class="well hidden escondido"> | |
107 | + <blockquote id="titulo"></blockquote> | |
108 | + </div> | |
109 | + </div> | |
110 | + </div> | |
111 | + <div class="row center-block"> | |
112 | + <div class="col-md-12"> | |
113 | + <div class="well" id="corpo"> | |
114 | + <i class="fa fa-spinner fa-pulse fa-3x fa-fw"></i> | |
115 | + <span class="sr-only">Loading...</span> | |
116 | + </div> | |
117 | + </div> | |
118 | + </div> | |
119 | + </div> | |
120 | + <div id="modal" class="modal fade" tabindex="-1" role="dialog"> | |
121 | + <div class="modal-dialog"> | |
122 | + <div class="modal-content"> | |
123 | + <div class="modal-header"> | |
124 | + <button type="button" class="close" data-dismiss="modal" aria-label="Close"> | |
125 | + <span aria-hidden="true">×</span> | |
126 | + </button> | |
127 | + </div> | |
128 | + <div class="modal-body"></div> | |
129 | + </div> | |
130 | + </div> | |
131 | + </div> | |
127 | 132 | <?php |
128 | - include("templates/templatelinks.php"); | |
129 | - include("templates/templatelista.php"); | |
130 | - ?> | |
133 | +include ("templates/templatelinks.php"); | |
134 | +include ("templates/templatelista.php"); | |
135 | +?> | |
131 | 136 | <script src='../pacotes/cpaint/cpaint2_compacto.inc.js'></script> |
132 | - <script src='../js/compactados/dicionario_compacto.js'></script> | |
133 | - <script src='../js/compactados/util_compacto.js'></script> | |
134 | - <script src='../js/compactados/idioma_compacto.js'></script> | |
135 | - <script src='../js/compactados/login_compacto.js'></script> | |
136 | - <script src='../js/compactados/php_compacto.js'></script> | |
137 | - <script src='../js/compactados/mustache.js'></script> | |
138 | - <script src='dicionario.js'></script> | |
139 | - <script src='index.js'></script> | |
140 | - <script> | |
137 | + <script src='../js/compactados/dicionario_compacto.js'></script> | |
138 | + <script src='../js/compactados/util_compacto.js'></script> | |
139 | + <script src='../js/compactados/idioma_compacto.js'></script> | |
140 | + <script src='../js/compactados/login_compacto.js'></script> | |
141 | + <script src='../js/compactados/php_compacto.js'></script> | |
142 | + <script src='../js/compactados/mustache.js'></script> | |
143 | + <script src='dicionario.js'></script> | |
144 | + <script src='index.js'></script> | |
145 | + <script> | |
141 | 146 | $(document).ready(function(){ |
142 | 147 | i3GEO.configura = {"locaplic" : window.location.href.split("/mapas")[0],"sid": ""}; |
143 | 148 | //traducoes de alguns elementos individualmente | ... | ... |
ogc/index.php
1 | 1 | <?php |
2 | -define ( "ONDEI3GEO", ".." ); | |
3 | -include (dirname ( __FILE__ ) . "/../ms_configura.php"); | |
4 | -include_once (dirname(__FILE__)."/../classesphp/sani_request.php"); | |
5 | -//error_reporting ( 0 ); | |
2 | +define("ONDEI3GEO", ".."); | |
3 | +include (dirname(__FILE__) . "/../ms_configura.php"); | |
4 | +include_once (dirname(__FILE__) . "/../classesphp/sani_request.php"); | |
5 | +// error_reporting ( 0 ); | |
6 | 6 | // pega a extensao geografica |
7 | 7 | if ($ogcwsmap == "") { |
8 | - $ogcwsmap = $locaplic . "/aplicmap/ogcws.map"; | |
8 | + $ogcwsmap = $locaplic . "/aplicmap/ogcws.map"; | |
9 | 9 | } |
10 | -$map = ms_newMapObj ( $ogcwsmap ); | |
10 | +$map = ms_newMapObj($ogcwsmap); | |
11 | 11 | $mapext = $map->extent->minx . "," . $map->extent->miny . "," . $map->extent->maxx . "," . $map->extent->maxy; |
12 | -include (ONDEI3GEO."/init/head.php"); | |
13 | -if(!isset($_GET["temaOgc"])){ | |
12 | +include (ONDEI3GEO . "/init/head.php"); | |
13 | +if (! isset($_GET["temaOgc"])) { | |
14 | 14 | $_GET["temaOgc"] = ""; |
15 | 15 | } |
16 | -if(!isset($_GET["temaDownload"])){ | |
16 | +if (! isset($_GET["temaDownload"])) { | |
17 | 17 | $_GET["temaDownload"] = ""; |
18 | 18 | } |
19 | 19 | ?> |
20 | 20 | <link rel='stylesheet' type='text/css' href='index.css'> |
21 | -<body style="padding-top: 55px;" id="topo"> | |
22 | - <nav class="navbar navbar-default navbar-fixed-top"> | |
23 | - <div class="container-fluid"> | |
24 | - <div class="navbar-header"> | |
25 | - <button type="button" class="navbar-toggle collapsed" data-toggle="collapse" | |
26 | - data-target="#navbar" aria-expanded="false" aria-controls="navbar"> | |
27 | - <span class="sr-only"></span> <span class="icon-bar"></span> <span class="icon-bar"></span> <span | |
28 | - class="icon-bar"></span> | |
29 | - </button> | |
30 | - <a class="navbar-brand" href="../init/index.php?home="><?php echo $mensagemInicia;?> <i | |
31 | - class="fa fa-home fa-1x"></i></a> | |
32 | - </div> | |
33 | - <!-- template para permitir a traducao --> | |
34 | - <div id="navbar" class="collapse navbar-collapse"> | |
35 | - <div id="menuTpl" class="escondido hidden"> | |
36 | - <ul class="nav navbar-nav"> | |
37 | - <li><a href="../kml.php?tipoxml=kml" target="_blank">Kml Google Earth</a></li> | |
38 | - <li><a href="javascript:void(0)" onclick="ogc.menus.listaCompleta()" | |
39 | - aria-controls="#listaCompleta">{{{lista}}}</a> | |
40 | - </li> | |
41 | - </ul> | |
42 | - </div> | |
43 | - </div> | |
44 | - </div> | |
45 | - </nav> | |
46 | - <div class="container-fluid"> | |
47 | - <div class="row"> | |
48 | - <ol class="breadcrumb"> | |
49 | - <li><a href="../init/index.php?home=">i3Geo</a></li> | |
50 | - <li class="active">OGC</li> | |
51 | - </ol> | |
52 | - </div> | |
53 | - </div> | |
54 | - | |
55 | - <div class="container"> | |
56 | - <div class="row center-block"> | |
57 | - <div class="col-md-12"> | |
58 | - <div class="well hidden escondido" > | |
59 | - <blockquote id="titulo"></blockquote> | |
60 | - </div> | |
61 | - </div> | |
62 | - </div> | |
63 | - <div class="row center-block"> | |
64 | - <div class="col-md-12"> | |
65 | - <div class="well" id="corpo"> | |
66 | - <i class="fa fa-spinner fa-pulse fa-3x fa-fw"></i> <span class="sr-only">Loading...</span> | |
67 | - </div> | |
68 | - </div> | |
69 | - </div> | |
70 | - </div> | |
21 | +<body style="padding-top: 60px;" id="topo"> | |
22 | + <nav class="navbar navbar-default navbar-fixed-top"> | |
23 | + <div class="container-fluid"> | |
24 | + <div class="navbar-header"> | |
25 | + <button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#navbar" aria-expanded="false" aria-controls="navbar"> | |
26 | + <span class="sr-only"></span> | |
27 | + <span class="icon-bar"></span> | |
28 | + <span class="icon-bar"></span> | |
29 | + <span class="icon-bar"></span> | |
30 | + </button> | |
31 | + <a class="navbar-brand" href="../init/index.php?home="><?php echo $mensagemInicia;?> <i class="fa fa-home fa-1x"></i> | |
32 | + </a> | |
33 | + </div> | |
34 | + <!-- template para permitir a traducao --> | |
35 | + <div id="navbar" class="collapse navbar-collapse"> | |
36 | + <div id="menuTpl" class="escondido hidden"> | |
37 | + <ul class="nav navbar-nav"> | |
38 | + <li><a href="../kml.php?tipoxml=kml" target="_blank">Kml Google Earth</a></li> | |
39 | + <li><a href="javascript:void(0)" onclick="ogc.menus.listaCompleta()" aria-controls="#listaCompleta">{{{lista}}}</a></li> | |
40 | + </ul> | |
41 | + </div> | |
42 | + </div> | |
43 | + </div> | |
44 | + </nav> | |
45 | + <div class="container-fluid migalha"> | |
46 | + <div class="row"> | |
47 | + <div class="btn-group btn-breadcrumb"> | |
48 | + <a class="btn btn-default" href="../init/index.php?home=">i3Geo</a> | |
49 | + <a class="btn btn-default" style="pointer-events: none">OGC</a> | |
50 | + </div> | |
51 | + </div> | |
52 | + </div> | |
53 | + <div class="container"> | |
54 | + <div class="row center-block"> | |
55 | + <div class="col-md-12"> | |
56 | + <div class="well hidden escondido"> | |
57 | + <blockquote id="titulo"></blockquote> | |
58 | + </div> | |
59 | + </div> | |
60 | + </div> | |
61 | + <div class="row center-block"> | |
62 | + <div class="col-md-12"> | |
63 | + <div class="well" id="corpo"> | |
64 | + <i class="fa fa-spinner fa-pulse fa-3x fa-fw"></i> | |
65 | + <span class="sr-only">Loading...</span> | |
66 | + </div> | |
67 | + </div> | |
68 | + </div> | |
69 | + </div> | |
71 | 70 | |
72 | 71 | <?php include(ONDEI3GEO."/ogc/templates/modal.php");?> |
73 | 72 | <?php include(ONDEI3GEO."/ogc/templates/templatelista.php");?> |
... | ... | @@ -76,9 +75,9 @@ if(!isset($_GET["temaDownload"])){ |
76 | 75 | <?php include(ONDEI3GEO."/ogc/templates/templatelinksdownload.php");?> |
77 | 76 | |
78 | 77 | <script src='headjs.php'></script> |
79 | -<script src='index.js'></script> | |
80 | -<script src='dicionario.js'></script> | |
81 | -<script> | |
78 | + <script src='index.js'></script> | |
79 | + <script src='dicionario.js'></script> | |
80 | + <script> | |
82 | 81 | $(document).ready(function(){ |
83 | 82 | i3GEO.configura = {"locaplic" : "..","sid": ""}; |
84 | 83 | ... | ... |
pacotes/yui290/build/container/container_compacto.js
100644 → 100755
pacotes/yui290/build/container/container_core_compacto.js
100644 → 100755
pacotes/yui290/build/utilities/utilities_compacto.js
100644 → 100755
permlinks/index.php
... | ... | @@ -61,7 +61,7 @@ include "../init/head.php"; |
61 | 61 | </ul> |
62 | 62 | </script> |
63 | 63 | |
64 | -<body style="padding-top: 55px; position: relative;"> | |
64 | +<body style="padding-top: 65px; position: relative;"> | |
65 | 65 | <nav class="navbar navbar-default navbar-fixed-top"> |
66 | 66 | <div class="container-fluid"> |
67 | 67 | <div class="navbar-header"> |
... | ... | @@ -86,14 +86,14 @@ include "../init/head.php"; |
86 | 86 | </nav> |
87 | 87 | <!--para as mensagens de alerta--> |
88 | 88 | <div class="navbar-fixed-top alert alert-success text-center" style="padding: 0px;"></div> |
89 | - <div class="container-fluid"> | |
90 | - <div class="row"> | |
91 | - <ol class="breadcrumb"> | |
92 | - <li><a href="../init/index.php?home=">i3Geo</a></li> | |
93 | - <li class="active">Perm links</li> | |
94 | - </ol> | |
95 | - </div> | |
96 | - </div> | |
89 | + <div class="container-fluid migalha"> | |
90 | + <div class="row"> | |
91 | + <div class="btn-group btn-breadcrumb"> | |
92 | + <a class="btn btn-default" href="../init/index.php?home=">i3Geo</a> | |
93 | + <a class="btn btn-default" style="pointer-events: none">Perm links</a> | |
94 | + </div> | |
95 | + </div> | |
96 | + </div> | |
97 | 97 | <div class="container"> |
98 | 98 | <div class="jumbotron"> |
99 | 99 | <h1>Construtor de links</h1> | ... | ... |
testainstal/index.php
... | ... | @@ -13,69 +13,74 @@ |
13 | 13 | /** |
14 | 14 | * Cria as pastas temporarias que o i3Geo precisa, caso nao existam |
15 | 15 | */ |
16 | -define ( "ONDEI3GEO", ".." ); | |
17 | -include "../init/head.php"; | |
16 | +define("ONDEI3GEO", ".."); | |
17 | +include ("../ms_configura.php"); | |
18 | +include ($locaplic . "/classesphp/carrega_ext.php"); | |
19 | +include ($locaplic . "/classesphp/funcoes_gerais.php"); | |
20 | +include ("../admin1/php/funcoesAdmin.php"); | |
21 | +include ("../init/head.php"); | |
22 | + | |
18 | 23 | ?> |
19 | -<body style="padding-top: 55px;" id="topo"> | |
20 | - <nav class="navbar navbar-default navbar-fixed-top" style="margin-bottom: 0px;max-height:55px;height:55px;"> | |
21 | - <div class="container-fluid"> | |
22 | - <div class="navbar-header"> | |
23 | - <a class="navbar-brand" href="../init/index.php">i3Geo <i class="fa fa-home fa-1x"></i></a> | |
24 | - </div> | |
25 | - <div id="navbar" class="collapse navbar-collapse"> | |
26 | - <ul class="nav navbar-nav"> | |
27 | - <li class="fa"><a href="#"><span id="bandeiras"></span></a></li> | |
28 | - </ul> | |
29 | - </div> | |
30 | - </div> | |
31 | - </nav> | |
32 | - <div class="container-fluid migalha" > | |
33 | - <div class="row"> | |
34 | - <div class="btn-group btn-breadcrumb"> | |
35 | - <a class="btn btn-default" href="../init/index.php?home=">i3Geo</a> | |
36 | - <a class="btn btn-default" style="pointer-events: none">Teste de instalação</a> | |
37 | - </div> | |
38 | - </div> | |
39 | - </div> | |
40 | - <nav class="navbar-fixed-bottom"> | |
41 | - <div class="container-fluid" id="mensagemLogin"> | |
42 | - </div> | |
43 | - </nav> | |
44 | - <div class="container-fluid"> | |
24 | +<body style="padding-top: 60px;" id="topo"> | |
25 | + <nav class="navbar navbar-default navbar-fixed-top"> | |
26 | + <div class="container-fluid"> | |
27 | + <div class="navbar-header"> | |
28 | + <a class="navbar-brand" href="../init/index.php?home="> | |
29 | + <?php echo $mensagemInicia;?> <i class="material-icons">home</i> | |
30 | + </a> | |
31 | + </div> | |
32 | + </div> | |
33 | + </nav> | |
34 | + <div class="container-fluid migalha"> | |
35 | + <div class="row"> | |
36 | + <div class="btn-group btn-breadcrumb"> | |
37 | + <a class="btn btn-default" href="../init/index.php?home=">i3Geo</a> | |
38 | + <a class="btn btn-default" style="pointer-events: none">Teste de instalação</a> | |
39 | + </div> | |
40 | + </div> | |
41 | + </div> | |
42 | + <nav class="navbar-fixed-bottom"> | |
43 | + <div class="container-fluid" id="mensagemLogin"></div> | |
44 | + </nav> | |
45 | + <div class="container-fluid"> | |
45 | 46 | <?php |
46 | - //TODO Incluir opcoes para carregar as listas default do i3Geo como sistemas de identificacao e WMS | |
47 | - include("../ms_configura.php"); | |
48 | - include ($locaplic."/classesphp/carrega_ext.php"); | |
49 | - include ($locaplic."/classesphp/funcoes_gerais.php"); | |
50 | - include ("../admin1/php/funcoesAdmin.php"); | |
51 | - //verifica se o login pode ser realizado | |
52 | - if(isset($i3geoPermiteLogin) && $i3geoPermiteLogin == false){ | |
53 | - header ( "HTTP/1.1 403 Login desativado" ); | |
54 | - exit (); | |
55 | - } | |
56 | - //$i3geoPermiteLoginIp vem de ms_configura.php | |
57 | - if(isset($i3geoPermiteLoginIp)){ | |
58 | - checaLoginIp($i3geoPermiteLoginIp); | |
59 | - } | |
60 | - ?> | |
61 | - <script src='../js/compactados/dicionario_compacto.js'></script> | |
62 | - <script src='../js/compactados/util_compacto.js'></script> | |
63 | - <script src='../js/compactados/idioma_compacto.js'></script> | |
64 | - <script src='../init/dicionario.js'></script> | |
65 | - <script> | |
47 | +// TODO Incluir opcoes para carregar as listas default do i3Geo como sistemas de identificacao e WMS | |
48 | +// verifica se o login pode ser realizado | |
49 | +if (isset($i3geoPermiteLogin) && $i3geoPermiteLogin == false) { | |
50 | + header("HTTP/1.1 403 Login desativado"); | |
51 | + exit(); | |
52 | +} | |
53 | +// $i3geoPermiteLoginIp vem de ms_configura.php | |
54 | +if (isset($i3geoPermiteLoginIp)) { | |
55 | + checaLoginIp($i3geoPermiteLoginIp); | |
56 | +} | |
57 | +?> | |
58 | + <script src='../js/compactados/mustache.js'></script> | |
59 | + <script src='../js/compactados/dicionario_compacto.js'></script> | |
60 | + <script src='../js/compactados/util_compacto.js'></script> | |
61 | + <script src='../js/compactados/idioma_compacto.js'></script> | |
62 | + <script src='../init/dicionario.js'></script> | |
63 | + <script> | |
64 | + //menu | |
65 | + var html = Mustache.to_html( | |
66 | + $("#menuTpl").html(), | |
67 | + i3GEO.idioma.objetoIdioma(g_traducao_init) | |
68 | + ); | |
69 | + $("#menuTpl").html(html); | |
70 | + $('.hidden').removeClass('hidden'); | |
66 | 71 | <?php |
67 | - if ($i3geomaster [0] ["usuario"] == "admin" && $i3geomaster [0] ["senha"] == "admin") { | |
68 | - echo "var men = '<div class=\'alert alert-danger\' style=\'margin-bottom:0px;\' >' + $" . "trad(19,g_traducao_init) + '</div>';"; | |
69 | - } else { | |
70 | - echo "var men = '';"; | |
71 | - } | |
72 | - ?> | |
72 | +if ($i3geomaster[0]["usuario"] == "admin" && $i3geomaster[0]["senha"] == "admin") { | |
73 | + echo "var men = '<div class=\'alert alert-danger\' style=\'margin-bottom:0px;\' >' + $" . "trad(19,g_traducao_init) + '</div>';"; | |
74 | +} else { | |
75 | + echo "var men = '';"; | |
76 | +} | |
77 | +?> | |
73 | 78 | $("#mensagemLogin").html(men); |
74 | 79 | </script> |
75 | 80 | <?php |
76 | - if(empty($_POST["senha"]) || empty($_POST["usuario"])){ | |
77 | - $d = dirname(dirname(__FILE__)); | |
78 | -echo <<<HTML | |
81 | +if (empty($_POST["senha"]) || empty($_POST["usuario"])) { | |
82 | + $d = dirname(dirname(__FILE__)); | |
83 | + echo <<<HTML | |
79 | 84 | <div class="alert alert-danger" role="alert"> |
80 | 85 | Essa conexão pode não ser segura e os dados de usuário/senha podem ser descobertos |
81 | 86 | </div> |
... | ... | @@ -115,28 +120,31 @@ echo <<<HTML |
115 | 120 | $.material.init(); |
116 | 121 | </script> |
117 | 122 | HTML; |
118 | - //} | |
119 | - exit; | |
120 | - } | |
121 | - else{ | |
122 | - $continua = \admin\php\funcoesAdmin\verificaMaster($_POST["usuario"],$_POST["senha"],$i3geomaster); | |
123 | - if($continua == false){ | |
124 | -echo <<<HTML | |
123 | + // } | |
124 | + exit(); | |
125 | +} else { | |
126 | + $continua = \admin\php\funcoesAdmin\verificaMaster($_POST["usuario"], $_POST["senha"], $i3geomaster); | |
127 | + if ($continua == false) { | |
128 | + echo <<<HTML | |
125 | 129 | <div class="alert alert-danger" role="alert"> |
126 | 130 | Usuário não registrado em i3geo/ms_configura.php na variável i3geomaster |
127 | 131 | </div> |
128 | 132 | HTML; |
129 | - exit; | |
130 | - } | |
131 | - } | |
132 | - error_reporting(E_ALL); | |
133 | - $ip = "UNKNOWN"; | |
134 | - if (getenv("HTTP_CLIENT_IP")) $ip = getenv("HTTP_CLIENT_IP"); | |
135 | - else if(getenv("HTTP_X_FORWARDED_FOR")) $ip = getenv("HTTP_X_FORWARDED_FOR"); | |
136 | - else if(getenv("REMOTE_ADDR")) $ip = getenv("REMOTE_ADDR"); | |
137 | - else $ip = "UNKNOWN"; | |
138 | - $os = PHP_OS; | |
139 | - $phpversion = phpversion(); | |
133 | + exit(); | |
134 | + } | |
135 | +} | |
136 | +error_reporting(E_ALL); | |
137 | +$ip = "UNKNOWN"; | |
138 | +if (getenv("HTTP_CLIENT_IP")) | |
139 | + $ip = getenv("HTTP_CLIENT_IP"); | |
140 | +else if (getenv("HTTP_X_FORWARDED_FOR")) | |
141 | + $ip = getenv("HTTP_X_FORWARDED_FOR"); | |
142 | +else if (getenv("REMOTE_ADDR")) | |
143 | + $ip = getenv("REMOTE_ADDR"); | |
144 | +else | |
145 | + $ip = "UNKNOWN"; | |
146 | +$os = PHP_OS; | |
147 | +$phpversion = phpversion(); | |
140 | 148 | echo <<<HTML |
141 | 149 | <div class="page-header"> |
142 | 150 | <h1>TESTE DE INSTALAÇÃO DO i3Geo</h1> |
... | ... | @@ -158,32 +166,32 @@ echo <<<HTML |
158 | 166 | </div> |
159 | 167 | HTML; |
160 | 168 | |
161 | - $versao = versao(); | |
162 | - $versao = $versao["principal"]; | |
163 | - $exts = get_loaded_extensions(); | |
164 | - if(!function_exists("ms_GetVersion")){ | |
165 | - echo '<div class="alert alert-danger" role="alert">Verifique se PHP-Mapscript está instalado</div>'; | |
166 | - } | |
167 | - echo "<h3>MapServer:</h3><pre>"; | |
168 | - echo ms_GetVersion(); | |
169 | - echo "</pre>"; | |
170 | - echo "<h3>Array que armazena os parâmetros da versão:</h3><pre>"; | |
171 | - var_dump (versao()); | |
172 | - echo "</pre>"; | |
173 | - echo "<h3>Configuração da projeção default: (<a href='http://moodle.gvsig-training.com/mod/book/view.php?id=5090&chapterid=114'>saiba mais</a>)</h3>"; | |
174 | - if(!isset($i3GeoProjDefault)){ | |
175 | - echo '<div class="alert alert-warning" role="alert">A variável de configuração i3GeoProjDefault não existe no ms_configura.php. Será utilizada a projeção 4326</div>'; | |
176 | - } | |
177 | - echo "<pre>"; | |
178 | - var_dump (pegaProjecaoDefault()); | |
179 | - echo "</pre>"; | |
180 | - if(!function_exists("ms_GetVersion")){ | |
181 | - echo '<div class="alert alert-warning" role="alert">PARECE QUE O MAPSERVER NAO ESTA INSTALADO!!!</div>'; | |
182 | - } | |
183 | - if (get_cfg_var("safe_mode") == 1){ | |
184 | - echo '<div class="alert alert-warning" role="alert">Problema: safe_mode no php.ini deveria estar como Off. O i3Geo não irá funcionar!!!</div>'; | |
185 | - } | |
186 | -//TODO ao fechar versao verificar esses acentos | |
169 | +$versao = versao(); | |
170 | +$versao = $versao["principal"]; | |
171 | +$exts = get_loaded_extensions(); | |
172 | +if (! function_exists("ms_GetVersion")) { | |
173 | + echo '<div class="alert alert-danger" role="alert">Verifique se PHP-Mapscript está instalado</div>'; | |
174 | +} | |
175 | +echo "<h3>MapServer:</h3><pre>"; | |
176 | +echo ms_GetVersion(); | |
177 | +echo "</pre>"; | |
178 | +echo "<h3>Array que armazena os parâmetros da versão:</h3><pre>"; | |
179 | +var_dump(versao()); | |
180 | +echo "</pre>"; | |
181 | +echo "<h3>Configuração da projeção default: (<a href='http://moodle.gvsig-training.com/mod/book/view.php?id=5090&chapterid=114'>saiba mais</a>)</h3>"; | |
182 | +if (! isset($i3GeoProjDefault)) { | |
183 | + echo '<div class="alert alert-warning" role="alert">A variável de configuração i3GeoProjDefault não existe no ms_configura.php. Será utilizada a projeção 4326</div>'; | |
184 | +} | |
185 | +echo "<pre>"; | |
186 | +var_dump(pegaProjecaoDefault()); | |
187 | +echo "</pre>"; | |
188 | +if (! function_exists("ms_GetVersion")) { | |
189 | + echo '<div class="alert alert-warning" role="alert">PARECE QUE O MAPSERVER NAO ESTA INSTALADO!!!</div>'; | |
190 | +} | |
191 | +if (get_cfg_var("safe_mode") == 1) { | |
192 | + echo '<div class="alert alert-warning" role="alert">Problema: safe_mode no php.ini deveria estar como Off. O i3Geo não irá funcionar!!!</div>'; | |
193 | +} | |
194 | +// TODO ao fechar versao verificar esses acentos | |
187 | 195 | echo <<<HTML |
188 | 196 | <h3>Acentuação</h3> |
189 | 197 | <pre> |
... | ... | @@ -194,102 +202,97 @@ Caso contr&aacute;rio, verifique os par&acirc;metros de configura&ccedil;&atilde |
194 | 202 | (default_charset='' no php.ini geralmente funciona) |
195 | 203 | </pre> |
196 | 204 | HTML; |
197 | - //executa as opcoes linux definidas no formulario | |
198 | - echo "<h3>Aplicando as operações opcionais</h3><pre>"; | |
199 | - if(!empty($_POST["criaPastaMstmp"]) && $_POST["criaPastaMstmp"] == "on"){ | |
200 | - echo "Criando a pasta $dir_tmp"; | |
201 | - if(!file_exists($dir_tmp)){ | |
202 | - @mkdir ($dir_tmp,0744); | |
203 | - chmod($dir_tmp,0744); | |
204 | - } | |
205 | - if(!file_exists($dir_tmp)){ | |
206 | - echo "<span style=color:red >Arquivo $dir_tmp não pode ser criado"; | |
207 | - } | |
208 | - else{ | |
209 | - echo "...OK"; | |
210 | - } | |
211 | - } | |
212 | - else{ | |
213 | - echo "Criação de pastas não solicitada\n"; | |
214 | - } | |
215 | - if(!empty($_POST["criaPastaMstmp"]) && $_POST["criaLink"] == "on"){ | |
216 | - $d = dirname(dirname(__FILE__))."/../ms_tmp"; | |
217 | - echo "Criando o link simbólico $d\n"; | |
218 | - if(!file_exists($d)){ | |
219 | - @symlink($dir_tmp,$d); | |
220 | - chmod($d,0744); | |
221 | - } | |
222 | - if(!file_exists($d)){ | |
223 | - echo "<span style=color:red >Link $d não pode ser criado\n"; | |
224 | - } | |
225 | - else{ | |
226 | - echo "...OK\n"; | |
227 | - } | |
228 | - } | |
229 | - else{ | |
230 | - echo "Criação de link simbólico não solicitada\n"; | |
231 | - } | |
232 | - if(!empty($_POST["criaPastaMstmp"]) && $_POST["permPastaI3geo"] == "on"){ | |
233 | - echo "Alterando permissões i3geo i3geo/temas i3geo/admin i3geo/admin/admin.db\n"; | |
234 | - if(file_exists($locaplic)){ | |
235 | - chmod($locaplic,0744); | |
236 | - chmod($locaplic."/temas",0744); | |
237 | - chmod($locaplic."/admin",0744); | |
238 | - chmod($locaplic."/admin/admin.db",0744); | |
239 | - echo "...OK\n"; | |
240 | - } | |
241 | - } | |
242 | - else{ | |
243 | - echo "Alterações de permissão não solicitada\n"; | |
244 | - } | |
245 | - echo "</pre>"; | |
246 | - echo "<h3>Extensões PHP</h3><pre>"; | |
247 | - if (!extension_loaded("curl")){ | |
248 | - echo "<div class='alert alert-danger' role='alert'>Problema: não está instalado a curl que pode afetar algumas funcionalidades do i3Geo</div>"; | |
249 | - } | |
250 | - if (!extension_loaded("json")){ | |
251 | - echo "<div class='alert alert-danger' role='alert'>Problema: não está instalado a json</div>"; | |
252 | - } | |
253 | - if (!extension_loaded("libxml")){ | |
254 | - echo "<div class='alert alert-danger' role='alert'>Problema: não está instalado a libxml</div>"; | |
255 | - } | |
256 | - if (!extension_loaded( "PDO")){ | |
257 | - echo "<div class='alert alert-danger' role='alert'>Problema: não está instalado a PDO</div>"; | |
258 | - } | |
259 | - if (!extension_loaded( "pdo_sqlite")){ | |
260 | - echo "<div class='alert alert-danger' role='alert'>>Problema: não está instalado a pdo_sqlite</div>"; | |
261 | - } | |
262 | - if (!extension_loaded( "SQLite") && !extension_loaded( "sqlite3")){ | |
263 | - echo "<div class='alert alert-danger' role='alert'>Problema: não está instalado a SQLite</div>"; | |
264 | - } | |
265 | - if (!extension_loaded( "SimpleXML")){ | |
266 | - echo "<div class='alert alert-danger' role='alert'>Problema: não está instalado a SimpleXML</div>"; | |
267 | - } | |
268 | - if (!extension_loaded( "dom")){ | |
269 | - echo "<div class='alert alert-danger' role='alert'>Problema: não está instalado a dom</div>"; | |
270 | - } | |
271 | - if (!extension_loaded( "xml")){ | |
272 | - echo "<div class='alert alert-danger' role='alert'>Problema: não está instalado a xml</div>"; | |
273 | - } | |
274 | - if (!extension_loaded( "zlib")){ | |
275 | - echo "<div class='alert alert-danger' role='alert'>Problema: não está instalado a zlib </div>"; | |
276 | - } | |
277 | - if (!extension_loaded( "mbstring")){ | |
278 | - echo "<div class='alert alert-danger' role='alert'>Obs: não está instalado a mbstring</div>"; | |
279 | - } | |
280 | - if (!extension_loaded( "yaml")){ | |
281 | - echo "<div class='alert alert-warning' role='alert'>Obs: não está instalado a YAML.\nA ferramenta de melhor traçado raster precisa dessa extensão.</div>"; | |
282 | - } | |
205 | +// executa as opcoes linux definidas no formulario | |
206 | +echo "<h3>Aplicando as operações opcionais</h3><pre>"; | |
207 | +if (! empty($_POST["criaPastaMstmp"]) && $_POST["criaPastaMstmp"] == "on") { | |
208 | + echo "Criando a pasta $dir_tmp"; | |
209 | + if (! file_exists($dir_tmp)) { | |
210 | + @mkdir($dir_tmp, 0744); | |
211 | + chmod($dir_tmp, 0744); | |
212 | + } | |
213 | + if (! file_exists($dir_tmp)) { | |
214 | + echo "<span style=color:red >Arquivo $dir_tmp não pode ser criado"; | |
215 | + } else { | |
216 | + echo "...OK"; | |
217 | + } | |
218 | +} else { | |
219 | + echo "Criação de pastas não solicitada\n"; | |
220 | +} | |
221 | +if (! empty($_POST["criaPastaMstmp"]) && $_POST["criaLink"] == "on") { | |
222 | + $d = dirname(dirname(__FILE__)) . "/../ms_tmp"; | |
223 | + echo "Criando o link simbólico $d\n"; | |
224 | + if (! file_exists($d)) { | |
225 | + @symlink($dir_tmp, $d); | |
226 | + chmod($d, 0744); | |
227 | + } | |
228 | + if (! file_exists($d)) { | |
229 | + echo "<span style=color:red >Link $d não pode ser criado\n"; | |
230 | + } else { | |
231 | + echo "...OK\n"; | |
232 | + } | |
233 | +} else { | |
234 | + echo "Criação de link simbólico não solicitada\n"; | |
235 | +} | |
236 | +if (! empty($_POST["criaPastaMstmp"]) && $_POST["permPastaI3geo"] == "on") { | |
237 | + echo "Alterando permissões i3geo i3geo/temas i3geo/admin i3geo/admin/admin.db\n"; | |
238 | + if (file_exists($locaplic)) { | |
239 | + chmod($locaplic, 0744); | |
240 | + chmod($locaplic . "/temas", 0744); | |
241 | + chmod($locaplic . "/admin", 0744); | |
242 | + chmod($locaplic . "/admin/admin.db", 0744); | |
243 | + echo "...OK\n"; | |
244 | + } | |
245 | +} else { | |
246 | + echo "Alterações de permissão não solicitada\n"; | |
247 | +} | |
248 | +echo "</pre>"; | |
249 | +echo "<h3>Extensões PHP</h3><pre>"; | |
250 | +if (! extension_loaded("curl")) { | |
251 | + echo "<div class='alert alert-danger' role='alert'>Problema: não está instalado a curl que pode afetar algumas funcionalidades do i3Geo</div>"; | |
252 | +} | |
253 | +if (! extension_loaded("json")) { | |
254 | + echo "<div class='alert alert-danger' role='alert'>Problema: não está instalado a json</div>"; | |
255 | +} | |
256 | +if (! extension_loaded("libxml")) { | |
257 | + echo "<div class='alert alert-danger' role='alert'>Problema: não está instalado a libxml</div>"; | |
258 | +} | |
259 | +if (! extension_loaded("PDO")) { | |
260 | + echo "<div class='alert alert-danger' role='alert'>Problema: não está instalado a PDO</div>"; | |
261 | +} | |
262 | +if (! extension_loaded("pdo_sqlite")) { | |
263 | + echo "<div class='alert alert-danger' role='alert'>>Problema: não está instalado a pdo_sqlite</div>"; | |
264 | +} | |
265 | +if (! extension_loaded("SQLite") && ! extension_loaded("sqlite3")) { | |
266 | + echo "<div class='alert alert-danger' role='alert'>Problema: não está instalado a SQLite</div>"; | |
267 | +} | |
268 | +if (! extension_loaded("SimpleXML")) { | |
269 | + echo "<div class='alert alert-danger' role='alert'>Problema: não está instalado a SimpleXML</div>"; | |
270 | +} | |
271 | +if (! extension_loaded("dom")) { | |
272 | + echo "<div class='alert alert-danger' role='alert'>Problema: não está instalado a dom</div>"; | |
273 | +} | |
274 | +if (! extension_loaded("xml")) { | |
275 | + echo "<div class='alert alert-danger' role='alert'>Problema: não está instalado a xml</div>"; | |
276 | +} | |
277 | +if (! extension_loaded("zlib")) { | |
278 | + echo "<div class='alert alert-danger' role='alert'>Problema: não está instalado a zlib </div>"; | |
279 | +} | |
280 | +if (! extension_loaded("mbstring")) { | |
281 | + echo "<div class='alert alert-danger' role='alert'>Obs: não está instalado a mbstring</div>"; | |
282 | +} | |
283 | +if (! extension_loaded("yaml")) { | |
284 | + echo "<div class='alert alert-warning' role='alert'>Obs: não está instalado a YAML.\nA ferramenta de melhor traçado raster precisa dessa extensão.</div>"; | |
285 | +} | |
283 | 286 | |
284 | - var_dump( $exts ); | |
285 | - echo "</pre>"; | |
286 | - echo "<h3>ms_configura.php</h3>"; | |
287 | - if(!file_exists("../ms_configura.php")){ | |
288 | - echo "<div class='alert alert-danger' role='alert'>O arquivo ms_configura.php não foi encontrado. Teste abortado.</div>"; | |
289 | - } | |
290 | - include ("../ms_configura.php"); | |
291 | - $loceste = getcwd(); | |
292 | - $spath = session_save_path(); | |
287 | +var_dump($exts); | |
288 | +echo "</pre>"; | |
289 | +echo "<h3>ms_configura.php</h3>"; | |
290 | +if (! file_exists("../ms_configura.php")) { | |
291 | + echo "<div class='alert alert-danger' role='alert'>O arquivo ms_configura.php não foi encontrado. Teste abortado.</div>"; | |
292 | +} | |
293 | +include ("../ms_configura.php"); | |
294 | +$loceste = getcwd(); | |
295 | +$spath = session_save_path(); | |
293 | 296 | echo <<<HTML |
294 | 297 | <div class="alert alert-success" role="alert"> |
295 | 298 | <li>Mensagem de inicialização <span class="label label-default">$mensagemInicia</span></li> |
... | ... | @@ -298,246 +301,227 @@ echo <<<HTML |
298 | 301 | <li>Localização deste PHP <span class="label label-default">$loceste</span></li> |
299 | 302 | </div> |
300 | 303 | HTML; |
301 | - echo "<h3>Banco de administração</h3>"; | |
302 | - if($conexaoadmin == "" && file_exists($locaplic."/admin/admin.db")){ | |
303 | - echo "<div class='alert alert-info' role='alert'>As permissões do banco de dados $locaplic/admin/admin.db são (se o arquivo estiver bloqueado, o sistema de administração não irá funcionar):<br>"; | |
304 | - echo '<span class="label label-default">'; | |
305 | - echo permissoesarquivo($locaplic."/admin/admin.db"); | |
306 | - echo "</span></div>"; | |
307 | - } | |
308 | - include_once("../classesphp/conexao.php"); | |
309 | - echo "<h4>Verificando banco de dados de administração</h4>"; | |
310 | - echo "<pre>"; | |
311 | - //TODO Verificar ao fechar versao - verificar tabelas | |
312 | - $tabelas = array( | |
313 | - "i3geoadmin_sistemasf"=>"abrir_funcao,h_funcao,id_funcao,id_sistema,nome_funcao,perfil_funcao,w_funcao", | |
314 | - "i3geoadmin_tags"=>"id_tag,nome", | |
315 | - "i3geoadmin_perfis"=>"id_perfil,perfil", | |
316 | - "i3geoadmin_atlasp"=>"ordem_prancha,desc_prancha,h_prancha,icone_prancha,id_atlas,id_prancha,link_prancha,mapext_prancha,titulo_prancha,w_prancha", | |
317 | - "i3geoadmin_atlast"=>"ordem_tema,codigo_tema,id_prancha,id_tema,ligado_tema", | |
318 | - "i3geoadmin_mapas"=>"publicado_mapa,ordem_mapa,perfil_mapa,ligados_mapa,temas_mapa,desc_mapa,ext_mapa,id_mapa,imagem_mapa,linkdireto_mapa,nome_mapa,outros_mapa,mapfile", | |
319 | - "i3geoadmin_atlas"=>"publicado_atlas,ordem_atlas,basemapfile_atlas,desc_atlas,h_atlas,icone_atlas,id_atlas,link_atlas,pranchadefault_atlas,template_atlas,tipoguias_atlas,titulo_atlas,w_atlas", | |
320 | - "i3geoadmin_sistemas"=>"publicado_sistema,id_sistema,nome_sistema,perfil_sistema", | |
321 | - "i3geoadmin_identifica"=>"publicado_i,abrir_i,id_i,nome_i,target_i", | |
322 | - "i3geoadmin_raiz"=>"ordem,id_tema,id_menu,id_nivel,id_raiz,nivel,perfil", | |
323 | - "i3geoadmin_n1"=>"publicado,ordem,id_menu,id_grupo,id_n1,n1_perfil", | |
324 | - "i3geoadmin_n2"=>"publicado,ordem,id_n1,id_n2,id_subgrupo,n2_perfil", | |
325 | - "i3geoadmin_n3"=>"publicado,ordem,id_n2,id_n3,id_tema,n3_perfil", | |
326 | - "i3geoadmin_ws"=>"nacessosok,nacessos,autor_ws,desc_ws,id_ws,link_ws,nome_ws,tipo_ws", | |
327 | - "i3geoadmin_grupos"=>"it,es,en,desc_grupo,id_grupo,nome_grupo", | |
328 | - "i3geoadmin_subgrupos"=>"it,es,en,desc_subgrupo,id_subgrupo,nome_subgrupo", | |
329 | - "i3geoadmin_temas"=>"it,es,en,kmz_tema,id_tema,kml_tema,ogc_tema,download_tema,tags_tema,tipoa_tema,link_tema,desc_tema,nome_tema,codigo_tema", | |
330 | - "i3geoadmin_menus"=>"it,es,en,publicado_menu,perfil_menu,aberto,desc_menu,id_menu,nome_menu", | |
331 | - "i3geoadmin_comentarios"=>"comentario,data,openidnome,openidimagem,openidservico,openidusuario,openidurl,id_tema", | |
332 | - "i3geoadmin_acessostema"=>"codigo_tema,nacessos,dia,mes,ano", | |
333 | - "i3geoadmin_log"=>"id_log,sql,serializedata,usuario,ip,timestamp,outros", | |
334 | - "i3geousr_usuarios"=>"id_usuario,ativo,data_cadastro,email,login,nome_usuario,senha", | |
335 | - "i3geousr_papeis"=> "id_papel,nome,descricao", | |
336 | - "i3geousr_papelusuario"=> "id_usuario,id_papel", | |
337 | - "i3geousr_operacoes" => "id_operacao,codigo,descricao", | |
338 | - "i3geousr_operacoespapeis" => "id_operacao,id_papel", | |
339 | - "i3geousr_grupos" => "id_grupo,nome,descricao", | |
340 | - "i3geousr_grupotema" => "id_grupo,id_tema", | |
341 | - "i3geousr_grupousuario" => "id_usuario,id_grupo", | |
342 | - "i3geoestat_conexao" => "codigo_estat_conexao,bancodedados,host,porta,usuario,senha", | |
343 | - "i3geoestat_tipo_regiao" => "codigo_tipo_regiao,nome_tipo_regiao,descricao_tipo_regiao,codigo_estat_conexao,esquemadb,tabela,colunageo,data,identificador,colunanomeregiao,srid,colunacentroide,colunasvisiveis,apelidos", | |
344 | - "i3geoestat_agregaregiao" => "id_agregaregiao,codigo_tipo_regiao,codigo_tipo_regiao_pai,colunaligacao_regiaopai", | |
345 | - "i3geoestat_tipo_periodo" => "codigo_tipo_periodo,nome,descricao", | |
346 | - "i3geoestat_unidade_medida" => "codigo_unidade_medida,nome,sigla,permitesoma,permitemedia", | |
347 | - "i3geoestat_variavel" => "codigo_variavel,nome,descricao", | |
348 | - "i3geoestat_medida_variavel" => "id_medida_variavel,codigo_unidade_medida,codigo_tipo_periodo,codigo_variavel,codigo_tipo_regiao,codigo_estat_conexao,esquemadb,tabela,colunavalor,colunaidgeo,filtro,nomemedida,colunaidunico", | |
349 | - "i3geoestat_classificacao" => "id_classificacao,nome,id_medida_variavel,observacao", | |
350 | - "i3geoestat_classes" => "id_classe,expressao,titulo,vermelho,verde,azul,id_classificacao,tamanho,simbolo,overmelho,overde,oazul,otamanho", | |
351 | - "i3geoestat_fonteinfo" => "id_fonteinfo,titulo,link", | |
352 | - "i3geoestat_fonteinfo_medida" => "id_medida_variavel,id_fonteinfo", | |
353 | - "i3geoestat_medida_variavel_link" => "link,id_medida_variavel,nome,id_link", | |
354 | - "i3geoestat_parametro_medida" => "id_parametro_medida,coluna,nome,descricao,id_pai,id_medida_variavel,tipo" | |
355 | - ); | |
356 | - include_once("../classesphp/conexao.php"); | |
357 | - if(!empty($esquemaadmin)){ | |
358 | - $esquemaadmin = str_replace(".","",$esquemaadmin)."."; | |
359 | - } | |
304 | +echo "<h3>Banco de administração</h3>"; | |
305 | +if ($conexaoadmin == "" && file_exists($locaplic . "/admin/admin.db")) { | |
306 | + echo "<div class='alert alert-info' role='alert'>As permissões do banco de dados $locaplic/admin/admin.db são (se o arquivo estiver bloqueado, o sistema de administração não irá funcionar):<br>"; | |
307 | + echo '<span class="label label-default">'; | |
308 | + echo permissoesarquivo($locaplic . "/admin/admin.db"); | |
309 | + echo "</span></div>"; | |
310 | +} | |
311 | +include_once ("../classesphp/conexao.php"); | |
312 | +echo "<h4>Verificando banco de dados de administração</h4>"; | |
313 | +echo "<pre>"; | |
314 | +// TODO Verificar ao fechar versao - verificar tabelas | |
315 | +$tabelas = array( | |
316 | + "i3geoadmin_sistemasf" => "abrir_funcao,h_funcao,id_funcao,id_sistema,nome_funcao,perfil_funcao,w_funcao", | |
317 | + "i3geoadmin_tags" => "id_tag,nome", | |
318 | + "i3geoadmin_perfis" => "id_perfil,perfil", | |
319 | + "i3geoadmin_atlasp" => "ordem_prancha,desc_prancha,h_prancha,icone_prancha,id_atlas,id_prancha,link_prancha,mapext_prancha,titulo_prancha,w_prancha", | |
320 | + "i3geoadmin_atlast" => "ordem_tema,codigo_tema,id_prancha,id_tema,ligado_tema", | |
321 | + "i3geoadmin_mapas" => "publicado_mapa,ordem_mapa,perfil_mapa,ligados_mapa,temas_mapa,desc_mapa,ext_mapa,id_mapa,imagem_mapa,linkdireto_mapa,nome_mapa,outros_mapa,mapfile", | |
322 | + "i3geoadmin_atlas" => "publicado_atlas,ordem_atlas,basemapfile_atlas,desc_atlas,h_atlas,icone_atlas,id_atlas,link_atlas,pranchadefault_atlas,template_atlas,tipoguias_atlas,titulo_atlas,w_atlas", | |
323 | + "i3geoadmin_sistemas" => "publicado_sistema,id_sistema,nome_sistema,perfil_sistema", | |
324 | + "i3geoadmin_identifica" => "publicado_i,abrir_i,id_i,nome_i,target_i", | |
325 | + "i3geoadmin_raiz" => "ordem,id_tema,id_menu,id_nivel,id_raiz,nivel,perfil", | |
326 | + "i3geoadmin_n1" => "publicado,ordem,id_menu,id_grupo,id_n1,n1_perfil", | |
327 | + "i3geoadmin_n2" => "publicado,ordem,id_n1,id_n2,id_subgrupo,n2_perfil", | |
328 | + "i3geoadmin_n3" => "publicado,ordem,id_n2,id_n3,id_tema,n3_perfil", | |
329 | + "i3geoadmin_ws" => "nacessosok,nacessos,autor_ws,desc_ws,id_ws,link_ws,nome_ws,tipo_ws", | |
330 | + "i3geoadmin_grupos" => "it,es,en,desc_grupo,id_grupo,nome_grupo", | |
331 | + "i3geoadmin_subgrupos" => "it,es,en,desc_subgrupo,id_subgrupo,nome_subgrupo", | |
332 | + "i3geoadmin_temas" => "it,es,en,kmz_tema,id_tema,kml_tema,ogc_tema,download_tema,tags_tema,tipoa_tema,link_tema,desc_tema,nome_tema,codigo_tema", | |
333 | + "i3geoadmin_menus" => "it,es,en,publicado_menu,perfil_menu,aberto,desc_menu,id_menu,nome_menu", | |
334 | + "i3geoadmin_comentarios" => "comentario,data,openidnome,openidimagem,openidservico,openidusuario,openidurl,id_tema", | |
335 | + "i3geoadmin_acessostema" => "codigo_tema,nacessos,dia,mes,ano", | |
336 | + "i3geoadmin_log" => "id_log,sql,serializedata,usuario,ip,timestamp,outros", | |
337 | + "i3geousr_usuarios" => "id_usuario,ativo,data_cadastro,email,login,nome_usuario,senha", | |
338 | + "i3geousr_papeis" => "id_papel,nome,descricao", | |
339 | + "i3geousr_papelusuario" => "id_usuario,id_papel", | |
340 | + "i3geousr_operacoes" => "id_operacao,codigo,descricao", | |
341 | + "i3geousr_operacoespapeis" => "id_operacao,id_papel", | |
342 | + "i3geousr_grupos" => "id_grupo,nome,descricao", | |
343 | + "i3geousr_grupotema" => "id_grupo,id_tema", | |
344 | + "i3geousr_grupousuario" => "id_usuario,id_grupo", | |
345 | + "i3geoestat_conexao" => "codigo_estat_conexao,bancodedados,host,porta,usuario,senha", | |
346 | + "i3geoestat_tipo_regiao" => "codigo_tipo_regiao,nome_tipo_regiao,descricao_tipo_regiao,codigo_estat_conexao,esquemadb,tabela,colunageo,data,identificador,colunanomeregiao,srid,colunacentroide,colunasvisiveis,apelidos", | |
347 | + "i3geoestat_agregaregiao" => "id_agregaregiao,codigo_tipo_regiao,codigo_tipo_regiao_pai,colunaligacao_regiaopai", | |
348 | + "i3geoestat_tipo_periodo" => "codigo_tipo_periodo,nome,descricao", | |
349 | + "i3geoestat_unidade_medida" => "codigo_unidade_medida,nome,sigla,permitesoma,permitemedia", | |
350 | + "i3geoestat_variavel" => "codigo_variavel,nome,descricao", | |
351 | + "i3geoestat_medida_variavel" => "id_medida_variavel,codigo_unidade_medida,codigo_tipo_periodo,codigo_variavel,codigo_tipo_regiao,codigo_estat_conexao,esquemadb,tabela,colunavalor,colunaidgeo,filtro,nomemedida,colunaidunico", | |
352 | + "i3geoestat_classificacao" => "id_classificacao,nome,id_medida_variavel,observacao", | |
353 | + "i3geoestat_classes" => "id_classe,expressao,titulo,vermelho,verde,azul,id_classificacao,tamanho,simbolo,overmelho,overde,oazul,otamanho", | |
354 | + "i3geoestat_fonteinfo" => "id_fonteinfo,titulo,link", | |
355 | + "i3geoestat_fonteinfo_medida" => "id_medida_variavel,id_fonteinfo", | |
356 | + "i3geoestat_medida_variavel_link" => "link,id_medida_variavel,nome,id_link", | |
357 | + "i3geoestat_parametro_medida" => "id_parametro_medida,coluna,nome,descricao,id_pai,id_medida_variavel,tipo" | |
358 | +); | |
359 | +include_once ("../classesphp/conexao.php"); | |
360 | +if (! empty($esquemaadmin)) { | |
361 | + $esquemaadmin = str_replace(".", "", $esquemaadmin) . "."; | |
362 | +} | |
360 | 363 | |
361 | - foreach(array_keys($tabelas) as $tabela) | |
362 | - { | |
363 | - echo " Tabela: <b>".$tabela."</b>"; | |
364 | - $sql = "select * from ".$esquemaadmin.$tabela; | |
365 | - $q = $dbh->query($sql,PDO::FETCH_ASSOC); | |
366 | - if($q !== false) | |
367 | - { | |
368 | - $resultado = $q->fetchAll(); | |
369 | - if(count($resultado) > 0) | |
370 | - { | |
371 | - echo " <span class='label label-success'>ok</span>\n"; | |
372 | - foreach(explode(",",$tabelas[$tabela]) as $coluna) | |
373 | - { | |
374 | - echo " coluna: ".$coluna; | |
375 | - if(in_array($coluna,array_keys($resultado[0]))){ | |
376 | - echo " <span class='label label-success'>ok</span>\n"; | |
377 | - } | |
378 | - else{ | |
379 | - echo " <span class='label label-info'>não encontrada. Consulte o i3geo/guia_de_migracao.txt</span>\n"; | |
380 | - } | |
381 | - } | |
382 | - } | |
383 | - else{ | |
384 | - echo " <span class='label label-info'>não existem registros cadastrados</span>\n"; | |
385 | - } | |
386 | - } | |
387 | - else{ | |
388 | - echo " <span class='label label-danger'>não encontrada. Consulte o i3geo/guia_de_migracao.txt</span>\n"; | |
389 | - } | |
390 | - } | |
391 | - echo "</pre>"; | |
392 | - echo "<h3>CGI</h3>"; | |
393 | - $proto = "http" . ((isset($_SERVER['HTTPS']) && $_SERVER['HTTPS'] == "on") ? "s" : "") . "://"; | |
394 | - $server = isset($_SERVER['HTTP_HOST']) ? $_SERVER['HTTP_HOST'] : $_SERVER['SERVER_NAME']; | |
395 | - $enderecocgi = $proto.$server.$locmapserv; | |
396 | - echo "<div class='alert alert-info' role='alert'>Você pode testar o CGI clicando <a href='".$enderecocgi."' target='_blank'>aqui</a>, se o programa responder corretamente, deverá aparecer na tela algo como 'No query information to decode. QUERY_STRING is set, but empty.'</div>" ; | |
397 | - echo "<div class='alert alert-info' role='alert'>Em ambientes com SO Windows, algumas opções de geração de serviços OGC apenas funcionam se a variável ms_configura.php 'ogrOutput' estiver definida como 0 (false). <br>Valor da variável ogrOutput: $ogrOutput </div>" ; | |
364 | +foreach (array_keys($tabelas) as $tabela) { | |
365 | + echo " Tabela: <b>" . $tabela . "</b>"; | |
366 | + $sql = "select * from " . $esquemaadmin . $tabela; | |
367 | + $q = $dbh->query($sql, PDO::FETCH_ASSOC); | |
368 | + if ($q !== false) { | |
369 | + $resultado = $q->fetchAll(); | |
370 | + if (count($resultado) > 0) { | |
371 | + echo " <span class='label label-success'>ok</span>\n"; | |
372 | + foreach (explode(",", $tabelas[$tabela]) as $coluna) { | |
373 | + echo " coluna: " . $coluna; | |
374 | + if (in_array($coluna, array_keys($resultado[0]))) { | |
375 | + echo " <span class='label label-success'>ok</span>\n"; | |
376 | + } else { | |
377 | + echo " <span class='label label-info'>não encontrada. Consulte o i3geo/guia_de_migracao.txt</span>\n"; | |
378 | + } | |
379 | + } | |
380 | + } else { | |
381 | + echo " <span class='label label-info'>não existem registros cadastrados</span>\n"; | |
382 | + } | |
383 | + } else { | |
384 | + echo " <span class='label label-danger'>não encontrada. Consulte o i3geo/guia_de_migracao.txt</span>\n"; | |
385 | + } | |
386 | +} | |
387 | +echo "</pre>"; | |
388 | +echo "<h3>CGI</h3>"; | |
389 | +$proto = "http" . ((isset($_SERVER['HTTPS']) && $_SERVER['HTTPS'] == "on") ? "s" : "") . "://"; | |
390 | +$server = isset($_SERVER['HTTP_HOST']) ? $_SERVER['HTTP_HOST'] : $_SERVER['SERVER_NAME']; | |
391 | +$enderecocgi = $proto . $server . $locmapserv; | |
392 | +echo "<div class='alert alert-info' role='alert'>Você pode testar o CGI clicando <a href='" . $enderecocgi . "' target='_blank'>aqui</a>, se o programa responder corretamente, deverá aparecer na tela algo como 'No query information to decode. QUERY_STRING is set, but empty.'</div>"; | |
393 | +echo "<div class='alert alert-info' role='alert'>Em ambientes com SO Windows, algumas opções de geração de serviços OGC apenas funcionam se a variável ms_configura.php 'ogrOutput' estiver definida como 0 (false). <br>Valor da variável ogrOutput: $ogrOutput </div>"; | |
398 | 394 | |
399 | - echo "<h3>Testes de escrita</h3><pre>"; | |
400 | - if (file_exists("../temas/teste.txt")){ | |
401 | - echo "<div class='alert alert-info' role='alert'><h4>Removendo arquivo de testes temas/teste.txt</h4>"; | |
402 | - unlink("../temas/teste.txt"); | |
403 | - } | |
404 | - if (file_exists("../temas/teste.txt")){ | |
405 | - echo "<div class='alert alert-danger' role='alert'>Não foi possivel escrever na pasta temas. O sistema de administracao pode nao funcionar corretamente</div>"; | |
406 | - } | |
407 | - else{ | |
408 | - echo "<h4>Testando criar arquivo temas/teste.txt</h4>"; | |
409 | - $f = @fopen("../temas/teste.txt",w); | |
410 | - @fclose($f); | |
411 | - if (!file_exists("../temas/teste.txt")){ | |
412 | - echo "<div class='alert alert-danger' role='alert'>Não foi possivel escrever na pasta temas. O sistema de administracao pode nao funcionar corretamente</div>"; | |
413 | - } | |
414 | - else{ | |
415 | - unlink("../temas/teste.txt"); | |
416 | - echo "<span class='label label-success'>ok</span>"; | |
417 | - } | |
418 | - } | |
419 | - echo "<h4>Escrevendo nos diretórios temporários</h4>"; | |
420 | - if (file_exists($dir_tmp."/teste.txt")){ | |
421 | - unlink($dir_tmp."/teste.txt"); | |
422 | - } | |
423 | - if (file_exists($dir_tmp."/teste.txt")){ | |
424 | - saindo("<div class='alert alert-danger' role='alert'>Não foi possível testar o diretório temporário $dir_tmp</div>"); | |
425 | - } | |
426 | - else{ | |
427 | - echo "<span class='label label-success'>ok</span>"; | |
428 | - } | |
429 | - $f = @fopen($dir_tmp."/teste.txt",w); | |
430 | - @fclose($f); | |
431 | - if (file_exists($dir_tmp."/teste.txt")) { | |
432 | - echo "<h4>Escrevendo nos diretórios temporários do Mapserver</h4>"; | |
433 | - echo "<span class='label label-success'>ok</span>"; | |
434 | - } | |
435 | - else { | |
436 | - saindo("<div class='alert alert-danger' role='alert'>Não foi possível gravar no diretório temporário $dir_tmp"); | |
437 | - } | |
438 | - $f = @fopen(session_save_path()."/teste.txt",w); | |
439 | - @fclose($f); | |
440 | - if (file_exists(session_save_path()."/teste.txt")) { | |
441 | - echo "<h4>Escrevendo nos diretórios temporários SESSION PHP</h4>"; | |
442 | - echo "<span class='label label-success'>ok</span>"; | |
443 | - } | |
444 | - else { | |
445 | - saindo("<div class='alert alert-danger' role='alert'>Não foi possível gravar no diretório temporário da SESSION</div>"); | |
446 | - } | |
447 | - echo "</pre>"; | |
448 | - echo "<h3>Carregando o map_file base</h3>"; | |
449 | - $versao = versao(); | |
450 | - $versao = $versao["principal"]; | |
451 | - if(isset($base) && $base != ""){ | |
452 | - if(file_exists($base)){ | |
453 | - $f = $base; | |
454 | - } | |
455 | - else{ | |
456 | - $f = $locaplic."/aplicmap/".$base.".map"; | |
457 | - } | |
458 | - if(!file_exists($base)){ | |
459 | - echo "<div class='alert alert-danger' role='alert'>ARQUIVO $base NÂO FOI ENCONTRADO. CORRIJA ISSO EM ms_configura.php</div>"; | |
460 | - exit; | |
461 | - } | |
462 | - } | |
463 | - else{ | |
464 | - $f = ""; | |
465 | - if (strtoupper(substr(PHP_OS, 0, 3) == 'WIN')){ | |
466 | - $f = $locaplic."/aplicmap/geral1windowsv".$versao.".map"; | |
467 | - } | |
468 | - else{ | |
469 | - if($f == "" && file_exists('/var/www/i3geo/aplicmap/geral1debianv'.$versao.'.map')){ | |
470 | - $f = "/var/www/i3geo/aplicmap/geral1debianv".$versao.".map"; | |
471 | - } | |
472 | - if($f == "" && file_exists('/var/www/html/i3geo/aplicmap/geral1fedorav'.$versao.'.map')){ | |
473 | - $f = "/var/www/html/i3geo/aplicmap/geral1fedorav".$versao.".map"; | |
474 | - } | |
475 | - if($f == "" && file_exists('/opt/www/html/i3geo/aplicmap/geral1fedorav'.$versao.'.map')){ | |
476 | - $f = "/opt/www/html/i3geo/aplicmap/geral1v".$versao.".map"; | |
477 | - } | |
478 | - if($f == ""){ | |
479 | - $f = $locaplic."/aplicmap/geral1v".$versao.".map"; | |
480 | - } | |
481 | - } | |
482 | - } | |
483 | - echo "<div class='alert alert-success' role='alert'><h4>O arquivo mapfile de inicilização é: <strong>$f</strong></h4></div>"; | |
484 | - echo "<pre>"; | |
485 | - echo "<h4>Criando o objeto com ms_newMapObj..."; | |
486 | - echo "<h4>Desenhando o mapa (se o mapa não aparecer \nverifique os caminhos no ms_configura.php e no $f)</h4>"; | |
395 | +echo "<h3>Testes de escrita</h3><pre>"; | |
396 | +if (file_exists("../temas/teste.txt")) { | |
397 | + echo "<div class='alert alert-info' role='alert'><h4>Removendo arquivo de testes temas/teste.txt</h4>"; | |
398 | + unlink("../temas/teste.txt"); | |
399 | +} | |
400 | +if (file_exists("../temas/teste.txt")) { | |
401 | + echo "<div class='alert alert-danger' role='alert'>Não foi possivel escrever na pasta temas. O sistema de administracao pode nao funcionar corretamente</div>"; | |
402 | +} else { | |
403 | + echo "<h4>Testando criar arquivo temas/teste.txt</h4>"; | |
404 | + $f = @fopen("../temas/teste.txt", w); | |
405 | + @fclose($f); | |
406 | + if (! file_exists("../temas/teste.txt")) { | |
407 | + echo "<div class='alert alert-danger' role='alert'>Não foi possivel escrever na pasta temas. O sistema de administracao pode nao funcionar corretamente</div>"; | |
408 | + } else { | |
409 | + unlink("../temas/teste.txt"); | |
410 | + echo "<span class='label label-success'>ok</span>"; | |
411 | + } | |
412 | +} | |
413 | +echo "<h4>Escrevendo nos diretórios temporários</h4>"; | |
414 | +if (file_exists($dir_tmp . "/teste.txt")) { | |
415 | + unlink($dir_tmp . "/teste.txt"); | |
416 | +} | |
417 | +if (file_exists($dir_tmp . "/teste.txt")) { | |
418 | + saindo("<div class='alert alert-danger' role='alert'>Não foi possível testar o diretório temporário $dir_tmp</div>"); | |
419 | +} else { | |
420 | + echo "<span class='label label-success'>ok</span>"; | |
421 | +} | |
422 | +$f = @fopen($dir_tmp . "/teste.txt", w); | |
423 | +@fclose($f); | |
424 | +if (file_exists($dir_tmp . "/teste.txt")) { | |
425 | + echo "<h4>Escrevendo nos diretórios temporários do Mapserver</h4>"; | |
426 | + echo "<span class='label label-success'>ok</span>"; | |
427 | +} else { | |
428 | + saindo("<div class='alert alert-danger' role='alert'>Não foi possível gravar no diretório temporário $dir_tmp"); | |
429 | +} | |
430 | +$f = @fopen(session_save_path() . "/teste.txt", w); | |
431 | +@fclose($f); | |
432 | +if (file_exists(session_save_path() . "/teste.txt")) { | |
433 | + echo "<h4>Escrevendo nos diretórios temporários SESSION PHP</h4>"; | |
434 | + echo "<span class='label label-success'>ok</span>"; | |
435 | +} else { | |
436 | + saindo("<div class='alert alert-danger' role='alert'>Não foi possível gravar no diretório temporário da SESSION</div>"); | |
437 | +} | |
438 | +echo "</pre>"; | |
439 | +echo "<h3>Carregando o map_file base</h3>"; | |
440 | +$versao = versao(); | |
441 | +$versao = $versao["principal"]; | |
442 | +if (isset($base) && $base != "") { | |
443 | + if (file_exists($base)) { | |
444 | + $f = $base; | |
445 | + } else { | |
446 | + $f = $locaplic . "/aplicmap/" . $base . ".map"; | |
447 | + } | |
448 | + if (! file_exists($base)) { | |
449 | + echo "<div class='alert alert-danger' role='alert'>ARQUIVO $base NÂO FOI ENCONTRADO. CORRIJA ISSO EM ms_configura.php</div>"; | |
450 | + exit(); | |
451 | + } | |
452 | +} else { | |
453 | + $f = ""; | |
454 | + if (strtoupper(substr(PHP_OS, 0, 3) == 'WIN')) { | |
455 | + $f = $locaplic . "/aplicmap/geral1windowsv" . $versao . ".map"; | |
456 | + } else { | |
457 | + if ($f == "" && file_exists('/var/www/i3geo/aplicmap/geral1debianv' . $versao . '.map')) { | |
458 | + $f = "/var/www/i3geo/aplicmap/geral1debianv" . $versao . ".map"; | |
459 | + } | |
460 | + if ($f == "" && file_exists('/var/www/html/i3geo/aplicmap/geral1fedorav' . $versao . '.map')) { | |
461 | + $f = "/var/www/html/i3geo/aplicmap/geral1fedorav" . $versao . ".map"; | |
462 | + } | |
463 | + if ($f == "" && file_exists('/opt/www/html/i3geo/aplicmap/geral1fedorav' . $versao . '.map')) { | |
464 | + $f = "/opt/www/html/i3geo/aplicmap/geral1v" . $versao . ".map"; | |
465 | + } | |
466 | + if ($f == "") { | |
467 | + $f = $locaplic . "/aplicmap/geral1v" . $versao . ".map"; | |
468 | + } | |
469 | + } | |
470 | +} | |
471 | +echo "<div class='alert alert-success' role='alert'><h4>O arquivo mapfile de inicilização é: <strong>$f</strong></h4></div>"; | |
472 | +echo "<pre>"; | |
473 | +echo "<h4>Criando o objeto com ms_newMapObj..."; | |
474 | +echo "<h4>Desenhando o mapa (se o mapa não aparecer \nverifique os caminhos no ms_configura.php e no $f)</h4>"; | |
487 | 475 | |
488 | - $mapa = ms_newMapObj($f); | |
489 | - //para evitar erros que possam ser originados da conexao com o banco | |
490 | - for($i=0;$i<($mapa->numlayers);$i++){ | |
491 | - $layern = $mapa->getLayer($i); | |
492 | - if ($layern->connectiontype == MS_POSTGIS ) { | |
493 | - $layern->set("status",MS_OFF); | |
494 | - } | |
495 | - } | |
496 | - $l = $mapa->getLayerByname("mundo"); | |
497 | - if($l != ""){ | |
498 | - $l->set("status",MS_DEFAULT); | |
499 | - } | |
500 | - $imgo = @$mapa->draw(); | |
501 | - $nome = ($imgo->imagepath)."teste.png"; | |
502 | - echo "<h5>Nome da imagem gerada: $nome </h5>"; | |
476 | +$mapa = ms_newMapObj($f); | |
477 | +// para evitar erros que possam ser originados da conexao com o banco | |
478 | +for ($i = 0; $i < ($mapa->numlayers); $i ++) { | |
479 | + $layern = $mapa->getLayer($i); | |
480 | + if ($layern->connectiontype == MS_POSTGIS) { | |
481 | + $layern->set("status", MS_OFF); | |
482 | + } | |
483 | +} | |
484 | +$l = $mapa->getLayerByname("mundo"); | |
485 | +if ($l != "") { | |
486 | + $l->set("status", MS_DEFAULT); | |
487 | +} | |
488 | +$imgo = @$mapa->draw(); | |
489 | +$nome = ($imgo->imagepath) . "teste.png"; | |
490 | +echo "<h5>Nome da imagem gerada: $nome </h5>"; | |
503 | 491 | |
504 | - if (!$imgo){ | |
505 | - echo "<div class='alert alert-danger' role='alert'><h5>Problemas ao gerar o mapa</h5>"; | |
506 | - $error = ""; | |
507 | - $error = ms_GetErrorObj(); | |
508 | - while($error && $error->code != MS_NOERR){ | |
509 | - echo "<h5>Error in %s: %s</h5>", $error->routine, $error->message; | |
510 | - $error = $error->next(); | |
511 | - } | |
512 | - echo "</div>"; | |
513 | - } | |
514 | - if($imgo->imagepath == ""){ | |
515 | - echo "<div class='alert alert-danger' role='alert'>Erro IMAGEPATH vazio</div>"; | |
516 | - } | |
517 | - $imgo->saveImage($nome); | |
518 | - $nome = ($imgo->imageurl).basename($nome); | |
519 | - echo "<img src=$nome />"; | |
520 | - echo " \n"; | |
521 | - $error = ""; | |
522 | - ms_ResetErrorList(); | |
523 | - echo "<h4>Carregando o map_file geral1... e acrescentando os limites estaduais (aplicmap/estadosl...) </h4>"; | |
524 | - if(isset($estadosl)) | |
525 | - { | |
526 | - $maptemp = ms_newMapObj($locaplic."/aplicmap/".$estadosl.".map"); | |
527 | - } | |
528 | - else{ | |
529 | - if (strtoupper(substr(PHP_OS, 0, 3) == 'WIN')) | |
530 | - { | |
531 | - $maptemp = ms_newMapObj($locaplic."/aplicmap/estadoslwindows.map"); | |
532 | - } | |
533 | - else | |
534 | - {$maptemp = ms_newMapObj($locaplic."/aplicmap/estadosl.map"); | |
535 | - } | |
536 | - } | |
537 | - while($error && $error->code != MS_NOERR){ | |
538 | - printf("<div class='alert alert-danger' role='alert'>Error in %s: %s<br></div>", $error->routine, $error->message); | |
539 | - $error = $error->next(); | |
540 | - } | |
492 | +if (! $imgo) { | |
493 | + echo "<div class='alert alert-danger' role='alert'><h5>Problemas ao gerar o mapa</h5>"; | |
494 | + $error = ""; | |
495 | + $error = ms_GetErrorObj(); | |
496 | + while ($error && $error->code != MS_NOERR) { | |
497 | + echo "<h5>Error in %s: %s</h5>", $error->routine, $error->message; | |
498 | + $error = $error->next(); | |
499 | + } | |
500 | + echo "</div>"; | |
501 | +} | |
502 | +if ($imgo->imagepath == "") { | |
503 | + echo "<div class='alert alert-danger' role='alert'>Erro IMAGEPATH vazio</div>"; | |
504 | +} | |
505 | +$imgo->saveImage($nome); | |
506 | +$nome = ($imgo->imageurl) . basename($nome); | |
507 | +echo "<img src=$nome />"; | |
508 | +echo " \n"; | |
509 | +$error = ""; | |
510 | +ms_ResetErrorList(); | |
511 | +echo "<h4>Carregando o map_file geral1... e acrescentando os limites estaduais (aplicmap/estadosl...) </h4>"; | |
512 | +if (isset($estadosl)) { | |
513 | + $maptemp = ms_newMapObj($locaplic . "/aplicmap/" . $estadosl . ".map"); | |
514 | +} else { | |
515 | + if (strtoupper(substr(PHP_OS, 0, 3) == 'WIN')) { | |
516 | + $maptemp = ms_newMapObj($locaplic . "/aplicmap/estadoslwindows.map"); | |
517 | + } else { | |
518 | + $maptemp = ms_newMapObj($locaplic . "/aplicmap/estadosl.map"); | |
519 | + } | |
520 | +} | |
521 | +while ($error && $error->code != MS_NOERR) { | |
522 | + printf("<div class='alert alert-danger' role='alert'>Error in %s: %s<br></div>", $error->routine, $error->message); | |
523 | + $error = $error->next(); | |
524 | +} | |
541 | 525 | echo <<<HTML |
542 | 526 | <h4>Se o mapa não aparecer verifique os caminhos no ms_configura.php e no estadosl.map ou estadoslwindows.map\n |
543 | 527 | Um problema bastante comum é o não reconhecimento do diretório ms_tmp pelo Apache. \n |
... | ... | @@ -549,100 +533,97 @@ no mesmo local onde est&aacute; instalado o i3geo, apontando para o local f&iacu |
549 | 533 | O nome do link simbolico deve ser o mesmo que estiver definido em aplicmap/geral1.map ou geral1debian.map na linha IMAGEURL. \n |
550 | 534 | Esse nome por default é definido como ms_tmp. No wiki do portal do software público vc poderá encontrar mais detalhes sobre isso.</h4> |
551 | 535 | HTML; |
552 | - for($i=0;$i<($maptemp->numlayers);$i++){ | |
553 | - $layern = $maptemp->getLayer($i); | |
554 | - if ($layern->name == "estadosl"){ | |
555 | - $layern->set("data",$locaplic."/aplicmap/dados/estados.shp"); | |
556 | - } | |
557 | - ms_newLayerObj($mapa, $layern); | |
558 | - } | |
559 | - $imgo = @$mapa->draw(); | |
560 | - | |
561 | - if (!$imgo){ | |
562 | - echo "Problemas ao gerar o mapa<br>"; | |
563 | - $error = ""; | |
564 | - $error = ms_GetErrorObj(); | |
565 | - while($error && $error->code != MS_NOERR){ | |
566 | - echo "<div class='alert alert-danger' role='alert'>Error in %s: %s</div>", $error->routine, $error->message; | |
567 | - $error = $error->next(); | |
568 | - } | |
569 | - } | |
570 | - if($imgo->imagepath == ""){ | |
571 | - echo "<div class='alert alert-danger' role='alert'>Erro IMAGEPATH vazio</div>"; | |
572 | - } | |
536 | +for ($i = 0; $i < ($maptemp->numlayers); $i ++) { | |
537 | + $layern = $maptemp->getLayer($i); | |
538 | + if ($layern->name == "estadosl") { | |
539 | + $layern->set("data", $locaplic . "/aplicmap/dados/estados.shp"); | |
540 | + } | |
541 | + ms_newLayerObj($mapa, $layern); | |
542 | +} | |
543 | +$imgo = @$mapa->draw(); | |
573 | 544 | |
574 | - $nome = ($imgo->imagepath)."teste1.png"; | |
575 | - echo "<h5>Nome da imagem gerada: $nome </h5>"; | |
576 | - $imgo->saveImage($nome); | |
577 | - $nome = ($imgo->imageurl).basename($nome); | |
578 | - echo "<img src=$nome /></pre></body></html>"; | |
545 | +if (! $imgo) { | |
546 | + echo "Problemas ao gerar o mapa<br>"; | |
547 | + $error = ""; | |
548 | + $error = ms_GetErrorObj(); | |
549 | + while ($error && $error->code != MS_NOERR) { | |
550 | + echo "<div class='alert alert-danger' role='alert'>Error in %s: %s</div>", $error->routine, $error->message; | |
551 | + $error = $error->next(); | |
552 | + } | |
553 | +} | |
554 | +if ($imgo->imagepath == "") { | |
555 | + echo "<div class='alert alert-danger' role='alert'>Erro IMAGEPATH vazio</div>"; | |
556 | +} | |
579 | 557 | |
580 | - function saindo($men){ | |
581 | - echo "<div class='alert alert-danger' role='alert'>Erro. Saindo...".$men."</div>"; | |
582 | - } | |
583 | - /* | |
584 | - Retorna as permissões de um arquivo | |
558 | +$nome = ($imgo->imagepath) . "teste1.png"; | |
559 | +echo "<h5>Nome da imagem gerada: $nome </h5>"; | |
560 | +$imgo->saveImage($nome); | |
561 | +$nome = ($imgo->imageurl) . basename($nome); | |
562 | +echo "<img src=$nome /></pre></body></html>"; | |
585 | 563 | |
586 | - Parametros: | |
564 | +function saindo($men) | |
565 | +{ | |
566 | + echo "<div class='alert alert-danger' role='alert'>Erro. Saindo..." . $men . "</div>"; | |
567 | +} | |
587 | 568 | |
588 | - $arquivo | |
589 | - */ | |
590 | - function permissoesarquivo($arquivo){ | |
591 | - $perms = fileperms($arquivo); | |
569 | +/* | |
570 | + * Retorna as permissões de um arquivo | |
571 | + * | |
572 | + * Parametros: | |
573 | + * | |
574 | + * $arquivo | |
575 | + */ | |
576 | +function permissoesarquivo($arquivo) | |
577 | +{ | |
578 | + $perms = fileperms($arquivo); | |
592 | 579 | |
593 | - if (($perms & 0xC000) == 0xC000) { | |
594 | - // Socket | |
595 | - $info = 's'; | |
596 | - } elseif (($perms & 0xA000) == 0xA000) { | |
597 | - // Symbolic Link | |
598 | - $info = 'l'; | |
599 | - } elseif (($perms & 0x8000) == 0x8000) { | |
600 | - // Regular | |
601 | - $info = '-'; | |
602 | - } elseif (($perms & 0x6000) == 0x6000) { | |
603 | - // Block special | |
604 | - $info = 'b'; | |
605 | - } elseif (($perms & 0x4000) == 0x4000) { | |
606 | - // Directory | |
607 | - $info = 'd'; | |
608 | - } elseif (($perms & 0x2000) == 0x2000) { | |
609 | - // Character special | |
610 | - $info = 'c'; | |
611 | - } elseif (($perms & 0x1000) == 0x1000) { | |
612 | - // FIFO pipe | |
613 | - $info = 'p'; | |
614 | - } else { | |
615 | - // Unknown | |
616 | - $info = 'u'; | |
617 | - } | |
580 | + if (($perms & 0xC000) == 0xC000) { | |
581 | + // Socket | |
582 | + $info = 's'; | |
583 | + } elseif (($perms & 0xA000) == 0xA000) { | |
584 | + // Symbolic Link | |
585 | + $info = 'l'; | |
586 | + } elseif (($perms & 0x8000) == 0x8000) { | |
587 | + // Regular | |
588 | + $info = '-'; | |
589 | + } elseif (($perms & 0x6000) == 0x6000) { | |
590 | + // Block special | |
591 | + $info = 'b'; | |
592 | + } elseif (($perms & 0x4000) == 0x4000) { | |
593 | + // Directory | |
594 | + $info = 'd'; | |
595 | + } elseif (($perms & 0x2000) == 0x2000) { | |
596 | + // Character special | |
597 | + $info = 'c'; | |
598 | + } elseif (($perms & 0x1000) == 0x1000) { | |
599 | + // FIFO pipe | |
600 | + $info = 'p'; | |
601 | + } else { | |
602 | + // Unknown | |
603 | + $info = 'u'; | |
604 | + } | |
618 | 605 | |
619 | - // Owner | |
620 | - $info .= (($perms & 0x0100) ? 'r' : '-'); | |
621 | - $info .= (($perms & 0x0080) ? 'w' : '-'); | |
622 | - $info .= (($perms & 0x0040) ? | |
623 | - (($perms & 0x0800) ? 's' : 'x' ) : | |
624 | - (($perms & 0x0800) ? 'S' : '-')); | |
606 | + // Owner | |
607 | + $info .= (($perms & 0x0100) ? 'r' : '-'); | |
608 | + $info .= (($perms & 0x0080) ? 'w' : '-'); | |
609 | + $info .= (($perms & 0x0040) ? (($perms & 0x0800) ? 's' : 'x') : (($perms & 0x0800) ? 'S' : '-')); | |
625 | 610 | |
626 | - // Group | |
627 | - $info .= (($perms & 0x0020) ? 'r' : '-'); | |
628 | - $info .= (($perms & 0x0010) ? 'w' : '-'); | |
629 | - $info .= (($perms & 0x0008) ? | |
630 | - (($perms & 0x0400) ? 's' : 'x' ) : | |
631 | - (($perms & 0x0400) ? 'S' : '-')); | |
611 | + // Group | |
612 | + $info .= (($perms & 0x0020) ? 'r' : '-'); | |
613 | + $info .= (($perms & 0x0010) ? 'w' : '-'); | |
614 | + $info .= (($perms & 0x0008) ? (($perms & 0x0400) ? 's' : 'x') : (($perms & 0x0400) ? 'S' : '-')); | |
632 | 615 | |
633 | - // World | |
634 | - $info .= (($perms & 0x0004) ? 'r' : '-'); | |
635 | - $info .= (($perms & 0x0002) ? 'w' : '-'); | |
636 | - $info .= (($perms & 0x0001) ? | |
637 | - (($perms & 0x0200) ? 't' : 'x' ) : | |
638 | - (($perms & 0x0200) ? 'T' : '-')); | |
616 | + // World | |
617 | + $info .= (($perms & 0x0004) ? 'r' : '-'); | |
618 | + $info .= (($perms & 0x0002) ? 'w' : '-'); | |
619 | + $info .= (($perms & 0x0001) ? (($perms & 0x0200) ? 't' : 'x') : (($perms & 0x0200) ? 'T' : '-')); | |
639 | 620 | |
640 | - return $info; | |
641 | - } | |
621 | + return $info; | |
622 | +} | |
642 | 623 | |
643 | - ?> | |
624 | +?> | |
644 | 625 | </div> |
645 | -<script> | |
626 | + <script> | |
646 | 627 | $.material.init(); |
647 | 628 | </script> |
648 | 629 | </body> | ... | ... |
utilitarios/index.php
... | ... | @@ -17,7 +17,7 @@ include "../init/head.php"; |
17 | 17 | margin: auto; |
18 | 18 | } |
19 | 19 | </style> |
20 | -<body style="padding-top: 55px;"> | |
20 | +<body style="padding-top: 60px;"> | |
21 | 21 | <nav class="navbar navbar-default navbar-fixed-top"> |
22 | 22 | <div class="container-fluid"> |
23 | 23 | <div class="navbar-header"> |
... | ... | @@ -26,14 +26,15 @@ include "../init/head.php"; |
26 | 26 | </div> |
27 | 27 | </div> |
28 | 28 | </nav> |
29 | - <div class="container-fluid"> | |
30 | - <div class="row"> | |
31 | - <ol class="breadcrumb"> | |
32 | - <li><a href="../init/index.php?home=">i3Geo</a></li> | |
33 | - <li class="active">Utilitários</li> | |
34 | - </ol> | |
35 | - </div> | |
36 | - </div> | |
29 | + <div class="container-fluid migalha"> | |
30 | + <div class="row"> | |
31 | + <div class="btn-group btn-breadcrumb"> | |
32 | + <a class="btn btn-default" href="../init/index.php?home=">i3Geo</a> | |
33 | + <a class="btn btn-default" style="pointer-events: none">Utilitários</a> | |
34 | + </div> | |
35 | + </div> | |
36 | + </div> | |
37 | + | |
37 | 38 | <div class="container"> |
38 | 39 | <div class="row center-block"> |
39 | 40 | <div class="col-sm-12 hidden"> | ... | ... |