Commit 740987163d6a4caeb62bf1c8f18373a57aa580c9
1 parent
a2081b35
Exists in
master
and in
7 other branches
Verificação de erros
Showing
7 changed files
with
30 additions
and
29 deletions
Show diff stats
admin/admin.db
No preview for this file type
admin/js/arvore.js
... | ... | @@ -28,7 +28,7 @@ Este programa é distribuído na expectativa de que seja útil |
28 | 28 | porém, SEM NENHUMA GARANTIA; nem mesmo a garantia implícita |
29 | 29 | de COMERCIABILIDADE OU ADEQUAÇÃO A UMA FINALIDADE ESPECÍFICA. |
30 | 30 | Consulte a Licença Pública Geral do GNU para mais detalhes. |
31 | -Você deve ter recebido uma cópia da Licença Pública Geral do | |
31 | +Você deve ter recebido uma copia da Licença Pública Geral do | |
32 | 32 | GNU junto com este programa; se não, escreva para a |
33 | 33 | Free Software Foundation, Inc., no endereço |
34 | 34 | 59 Temple Street, Suite 330, Boston, MA 02111-1307 USA. |
... | ... | @@ -166,7 +166,7 @@ function temaIconMode() |
166 | 166 | {currentIconMode = newVal;} |
167 | 167 | } |
168 | 168 | // |
169 | -//adiciona os menus na �rvore | |
169 | +//adiciona os menus na arvore | |
170 | 170 | // |
171 | 171 | function montaNosMenus(dados,redesenha) |
172 | 172 | { |
... | ... | @@ -194,14 +194,13 @@ function montaNosMenus(dados,redesenha) |
194 | 194 | /* |
195 | 195 | Function: montaNosGrupos |
196 | 196 | |
197 | -Monta os n�s com os grupos e permite abrir os subgrupos | |
198 | 197 | |
199 | 198 | <PEGASUBGRUPOS> |
200 | 199 | */ |
201 | 200 | function montaNosGrupos(idmenu,no,dados,redesenha) |
202 | 201 | { |
203 | 202 | var tempNodeR = null; |
204 | - //pega os temas que ficam na raiz da �rvore | |
203 | + //pega os temas que ficam na raiz da arvore | |
205 | 204 | if(!tree.getNodeByProperty("etiquetaTemasRaiz","menu_"+idmenu)) |
206 | 205 | {montaTemasRaiz(no,dados,true);} |
207 | 206 | //pega os grupos do menu |
... | ... | @@ -291,8 +290,6 @@ function loadTemasData(node, fnLoadComplete) |
291 | 290 | /* |
292 | 291 | Function: montaNosSubgrupos |
293 | 292 | |
294 | -Monta os n�s com os temas | |
295 | - | |
296 | 293 | <PEGATEMAS> |
297 | 294 | */ |
298 | 295 | function montaNosSubgrupos(idmenu,no,dados,redesenha) |
... | ... | @@ -336,7 +333,7 @@ function montaTemas(idmenu,no,dados,redesenha) |
336 | 333 | if(!tree.getNodeByProperty("etiquetaTemas",no.data.id_n2)) |
337 | 334 | { |
338 | 335 | var d = {tipo:"etiqueta",etiquetaTemas:no.data.id_n2,html:"<i style=color:gray >Temas</i>"}; |
339 | - tempNodeR = new YAHOO.widget.HTMLNode(d, no, false,true); | |
336 | + tempNodeR = new YAHOO.widget.HTMLNode(d, no, true,true); | |
340 | 337 | tempNodeR.isLeaf = false; |
341 | 338 | var conteudo = "<span onclick=\"novoTema('"+idmenu+"','"+no.data.id_n2+"')\" style=\"cursor:pointer;\"><img style=\"position:relative;top:2px\" src=\"../imagens/05.png\" /><i style=color:gray > Adicionar um novo</i></span>"; |
342 | 339 | var d = {html:conteudo}; |
... | ... | @@ -743,7 +740,7 @@ function registraPerfil(valor,id) |
743 | 740 | /* |
744 | 741 | Function: gravaDados |
745 | 742 | |
746 | -Altera dados de um n� | |
743 | +Altera dados de um no | |
747 | 744 | |
748 | 745 | <ALTERARGRUPO> |
749 | 746 | ... | ... |
admin/js/usuarios.js
... | ... | @@ -148,14 +148,16 @@ function adicionaNosPapeis(no,dados,redesenha) |
148 | 148 | } |
149 | 149 | for (var i=0, j=dados.length; i<j; i++) |
150 | 150 | { |
151 | - var conteudo = " <img style=\"position:relative;cursor:pointer;top:0px\" onclick=\"excluir('papel','"+dados[i].id_usuario+"','"+dados[i].id_papel+"')\" title=excluir width='10px' heigth='10px' src=\"../imagens/01.png\" />"; | |
152 | - if(dados[i].nome != "") | |
153 | - {conteudo += " <span><b>"+dados[i].nome+"</b> - "+dados[i].descricao+"</span>";} | |
154 | - else | |
155 | - {conteudo += " <span style=color:red >Edite para definir o papel!!!</span>";} | |
156 | - var d = {html:conteudo,id_nopapel:dados[i].id_usuario+"_"+dados[i].id_papel,tipo:"papel"}; | |
157 | - var tempNode = new YAHOO.widget.HTMLNode(d, no, false,true); | |
158 | - tempNode.isLeaf = true; | |
151 | + if(!tree.getNodeByProperty("id_nopapel",dados[i].id_usuario+"_"+dados[i].id_papel)){ | |
152 | + var conteudo = " <img style=\"position:relative;cursor:pointer;top:0px\" onclick=\"excluir('papel','"+dados[i].id_usuario+"','"+dados[i].id_papel+"')\" title=excluir width='10px' heigth='10px' src=\"../imagens/01.png\" />"; | |
153 | + if(dados[i].nome != "") | |
154 | + {conteudo += " <span><b>"+dados[i].nome+"</b> - "+dados[i].descricao+"</span>";} | |
155 | + else | |
156 | + {conteudo += " <span style=color:red >Edite para definir o papel!!!</span>";} | |
157 | + var d = {html:conteudo,id_nopapel:dados[i].id_usuario+"_"+dados[i].id_papel,tipo:"papel"}; | |
158 | + var tempNode = new YAHOO.widget.HTMLNode(d, no, false,true); | |
159 | + tempNode.isLeaf = true; | |
160 | + } | |
159 | 161 | } |
160 | 162 | if(redesenha){tree.draw();} |
161 | 163 | } |
... | ... | @@ -164,7 +166,7 @@ function adicionaNosUsuarios(dados,redesenha){ |
164 | 166 | for (var i=0, j=dados.length; i<j; i++){ |
165 | 167 | var conteudo = " <img style=\"position:relative;cursor:pointer;top:0px\" onclick=\"excluir('usuario','"+dados[i].id_usuario+"')\" title=excluir width='10px' heigth='10px' src=\"../imagens/01.png\" />"; |
166 | 168 | conteudo += " <img style=\"position:relative;cursor:pointer;top:2px\" onclick=\"editar('usuario','"+dados[i].id_usuario+"')\" title=editar src=\"../imagens/06.png\" /><b>"; |
167 | - conteudo += " <img style=\"position:relative;cursor:pointer;top:2px;width:25px;\" onclick=\"emailsenha('"+dados[i].id_usuario+"')\" title='enviar senha' src=\"../imagens/07.png\" /><b>"; | |
169 | + conteudo += " <img style=\"position:relative;cursor:pointer;top:0px;width:25px;\" onclick=\"emailsenha('"+dados[i].id_usuario+"')\" title='enviar senha' src=\"../imagens/07.png\" /><b>"; | |
168 | 170 | if(dados[i].nome_usuario && dados[i].nome_usuario != "") |
169 | 171 | {conteudo += " <span>"+dados[i].nome_usuario+" - "+dados[i].login+" - ativo: "+dados[i].ativo+"</span>";} |
170 | 172 | else |
... | ... | @@ -310,7 +312,7 @@ function emailsenha(id_usuario) |
310 | 312 | /* |
311 | 313 | Function: gravaDados |
312 | 314 | |
313 | -Altera dados de um elemento do Atlas | |
315 | +Altera dados de um elemento do cadastro | |
314 | 316 | |
315 | 317 | <ALTERARATLAS> |
316 | 318 | ... | ... |
mashups/openlayers.php
... | ... | @@ -112,8 +112,7 @@ if(isset($fundo) && $fundo != ""){ |
112 | 112 | if(isset($temas)){ |
113 | 113 | $objOpenLayers = array(); |
114 | 114 | } |
115 | -if($temas != "") | |
116 | -{ | |
115 | +if($temas != ""){ | |
117 | 116 | $temas = str_replace(" ",",",$temas); |
118 | 117 | //$temas = strtolower($temas); |
119 | 118 | $temas = explode(",",$temas); |
... | ... | @@ -152,6 +151,7 @@ if($temas != "") |
152 | 151 | } |
153 | 152 | } |
154 | 153 | if($nomeMap != ""){ |
154 | + | |
155 | 155 | if(empty($layers)){ |
156 | 156 | $layers = array(); |
157 | 157 | $maptemp = @ms_newMapObj($nomeMap); |
... | ... | @@ -164,6 +164,7 @@ if($temas != "") |
164 | 164 | } |
165 | 165 | else{ |
166 | 166 | $nomeLayer = str_replace(" ",",",$layers); |
167 | + $layers = explode(",",$layers); | |
167 | 168 | $maptemp = @ms_newMapObj($nomeMap); |
168 | 169 | //$temp = explode(",",$layers); |
169 | 170 | $layern = $maptemp->getLayerByName($layers[0]); |
... | ... | @@ -186,6 +187,7 @@ if($temas != "") |
186 | 187 | } |
187 | 188 | } |
188 | 189 | } |
190 | + | |
189 | 191 | function ajuda(){ |
190 | 192 | echo " |
191 | 193 | <pre><b> | ... | ... |
ms_configura.php
... | ... | @@ -467,7 +467,7 @@ else //se for linux |
467 | 467 | $R_libpath = ""; |
468 | 468 | $postgis_mapa = array( |
469 | 469 | "teste"=>"user=postgres password=postgres dbname=postgis host=localhost port=5432 options='-c client_encoding=LATIN1'", |
470 | - "postgres"=>"user=postgres password=postgres dbname=postgis host=localhost port=5432", | |
470 | + "postgres"=>"user=postgres password=postgres dbname=postgres host=localhost port=5432", | |
471 | 471 | ); |
472 | 472 | $utilizacgi = "nao"; |
473 | 473 | $expoeMapfile = "sim"; | ... | ... |
ogc.php
... | ... | @@ -72,17 +72,16 @@ if(!isset($temas) && isset($tema)) |
72 | 72 | //para operar como o Geoserver |
73 | 73 | // |
74 | 74 | if(isset($format) && strtolower($format) == "application/openlayers"){ |
75 | - if(!isset($layers)) | |
76 | - { | |
75 | + //var_dump($_SERVER);exit; | |
76 | + if(!isset($layers)){ | |
77 | 77 | $layers = $temas; |
78 | 78 | } |
79 | - $urln = __DIR__."/mashups/openlayers.php?temas=".$layers."&layers=".$layers."&mapext=".$bbox."&botoes=pan,zoombox,zoomtot,identifica"; | |
80 | - if(!headers_sent()) | |
81 | - { | |
79 | + $urln = dirname($_SERVER["PHP_SELF"])."/mashups/openlayers.php?temas=".$layers."&layers=".$layers."&mapext=".$bbox."&botoes=pan,zoombox,zoomtot,identifica"; | |
80 | + if(!headers_sent()){ | |
82 | 81 | header("Location:".$urln); |
83 | 82 | } |
84 | - else | |
85 | - {echo "<meta http-equiv='refresh' content='0;url=$urln'>"; | |
83 | + else{ | |
84 | + echo "<meta http-equiv='refresh' content='0;url=$urln'>"; | |
86 | 85 | } |
87 | 86 | } |
88 | 87 | // | ... | ... |
temas/_lbairros.map
... | ... | @@ -2,7 +2,8 @@ MAP |
2 | 2 | FONTSET "../symbols/fontes.txt" |
3 | 3 | SYMBOLSET "../symbols/simbolos.sym" |
4 | 4 | LAYER |
5 | - CONNECTION "user=postgres password=postgres dbname=geosaude host=localhost port=5432" | |
5 | + CONNECTION "user=postgres password=postgres dbname=geosaude host=localhost port=5432" | |
6 | + #CONNECTION "postgres" | |
6 | 7 | CONNECTIONTYPE POSTGIS |
7 | 8 | DATA "the_geom from (select * from i3geo_metaestat.bairros) as foo using unique gid using srid=4326" |
8 | 9 | METADATA | ... | ... |