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,7 +28,7 @@ Este programa é distribuído na expectativa de que seja útil | ||
28 | porém, SEM NENHUMA GARANTIA; nem mesmo a garantia implícita | 28 | porém, SEM NENHUMA GARANTIA; nem mesmo a garantia implícita |
29 | de COMERCIABILIDADE OU ADEQUAÇÃO A UMA FINALIDADE ESPECÍFICA. | 29 | de COMERCIABILIDADE OU ADEQUAÇÃO A UMA FINALIDADE ESPECÍFICA. |
30 | Consulte a Licença Pública Geral do GNU para mais detalhes. | 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 | GNU junto com este programa; se não, escreva para a | 32 | GNU junto com este programa; se não, escreva para a |
33 | Free Software Foundation, Inc., no endereço | 33 | Free Software Foundation, Inc., no endereço |
34 | 59 Temple Street, Suite 330, Boston, MA 02111-1307 USA. | 34 | 59 Temple Street, Suite 330, Boston, MA 02111-1307 USA. |
@@ -166,7 +166,7 @@ function temaIconMode() | @@ -166,7 +166,7 @@ function temaIconMode() | ||
166 | {currentIconMode = newVal;} | 166 | {currentIconMode = newVal;} |
167 | } | 167 | } |
168 | // | 168 | // |
169 | -//adiciona os menus na �rvore | 169 | +//adiciona os menus na arvore |
170 | // | 170 | // |
171 | function montaNosMenus(dados,redesenha) | 171 | function montaNosMenus(dados,redesenha) |
172 | { | 172 | { |
@@ -194,14 +194,13 @@ function montaNosMenus(dados,redesenha) | @@ -194,14 +194,13 @@ function montaNosMenus(dados,redesenha) | ||
194 | /* | 194 | /* |
195 | Function: montaNosGrupos | 195 | Function: montaNosGrupos |
196 | 196 | ||
197 | -Monta os n�s com os grupos e permite abrir os subgrupos | ||
198 | 197 | ||
199 | <PEGASUBGRUPOS> | 198 | <PEGASUBGRUPOS> |
200 | */ | 199 | */ |
201 | function montaNosGrupos(idmenu,no,dados,redesenha) | 200 | function montaNosGrupos(idmenu,no,dados,redesenha) |
202 | { | 201 | { |
203 | var tempNodeR = null; | 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 | if(!tree.getNodeByProperty("etiquetaTemasRaiz","menu_"+idmenu)) | 204 | if(!tree.getNodeByProperty("etiquetaTemasRaiz","menu_"+idmenu)) |
206 | {montaTemasRaiz(no,dados,true);} | 205 | {montaTemasRaiz(no,dados,true);} |
207 | //pega os grupos do menu | 206 | //pega os grupos do menu |
@@ -291,8 +290,6 @@ function loadTemasData(node, fnLoadComplete) | @@ -291,8 +290,6 @@ function loadTemasData(node, fnLoadComplete) | ||
291 | /* | 290 | /* |
292 | Function: montaNosSubgrupos | 291 | Function: montaNosSubgrupos |
293 | 292 | ||
294 | -Monta os n�s com os temas | ||
295 | - | ||
296 | <PEGATEMAS> | 293 | <PEGATEMAS> |
297 | */ | 294 | */ |
298 | function montaNosSubgrupos(idmenu,no,dados,redesenha) | 295 | function montaNosSubgrupos(idmenu,no,dados,redesenha) |
@@ -336,7 +333,7 @@ function montaTemas(idmenu,no,dados,redesenha) | @@ -336,7 +333,7 @@ function montaTemas(idmenu,no,dados,redesenha) | ||
336 | if(!tree.getNodeByProperty("etiquetaTemas",no.data.id_n2)) | 333 | if(!tree.getNodeByProperty("etiquetaTemas",no.data.id_n2)) |
337 | { | 334 | { |
338 | var d = {tipo:"etiqueta",etiquetaTemas:no.data.id_n2,html:"<i style=color:gray >Temas</i>"}; | 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 | tempNodeR.isLeaf = false; | 337 | tempNodeR.isLeaf = false; |
341 | 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>"; | 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 | var d = {html:conteudo}; | 339 | var d = {html:conteudo}; |
@@ -743,7 +740,7 @@ function registraPerfil(valor,id) | @@ -743,7 +740,7 @@ function registraPerfil(valor,id) | ||
743 | /* | 740 | /* |
744 | Function: gravaDados | 741 | Function: gravaDados |
745 | 742 | ||
746 | -Altera dados de um n� | 743 | +Altera dados de um no |
747 | 744 | ||
748 | <ALTERARGRUPO> | 745 | <ALTERARGRUPO> |
749 | 746 |
admin/js/usuarios.js
@@ -148,14 +148,16 @@ function adicionaNosPapeis(no,dados,redesenha) | @@ -148,14 +148,16 @@ function adicionaNosPapeis(no,dados,redesenha) | ||
148 | } | 148 | } |
149 | for (var i=0, j=dados.length; i<j; i++) | 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 | if(redesenha){tree.draw();} | 162 | if(redesenha){tree.draw();} |
161 | } | 163 | } |
@@ -164,7 +166,7 @@ function adicionaNosUsuarios(dados,redesenha){ | @@ -164,7 +166,7 @@ function adicionaNosUsuarios(dados,redesenha){ | ||
164 | for (var i=0, j=dados.length; i<j; i++){ | 166 | for (var i=0, j=dados.length; i<j; i++){ |
165 | 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\" />"; | 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 | conteudo += " <img style=\"position:relative;cursor:pointer;top:2px\" onclick=\"editar('usuario','"+dados[i].id_usuario+"')\" title=editar src=\"../imagens/06.png\" /><b>"; | 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 | if(dados[i].nome_usuario && dados[i].nome_usuario != "") | 170 | if(dados[i].nome_usuario && dados[i].nome_usuario != "") |
169 | {conteudo += " <span>"+dados[i].nome_usuario+" - "+dados[i].login+" - ativo: "+dados[i].ativo+"</span>";} | 171 | {conteudo += " <span>"+dados[i].nome_usuario+" - "+dados[i].login+" - ativo: "+dados[i].ativo+"</span>";} |
170 | else | 172 | else |
@@ -310,7 +312,7 @@ function emailsenha(id_usuario) | @@ -310,7 +312,7 @@ function emailsenha(id_usuario) | ||
310 | /* | 312 | /* |
311 | Function: gravaDados | 313 | Function: gravaDados |
312 | 314 | ||
313 | -Altera dados de um elemento do Atlas | 315 | +Altera dados de um elemento do cadastro |
314 | 316 | ||
315 | <ALTERARATLAS> | 317 | <ALTERARATLAS> |
316 | 318 |
mashups/openlayers.php
@@ -112,8 +112,7 @@ if(isset($fundo) && $fundo != ""){ | @@ -112,8 +112,7 @@ if(isset($fundo) && $fundo != ""){ | ||
112 | if(isset($temas)){ | 112 | if(isset($temas)){ |
113 | $objOpenLayers = array(); | 113 | $objOpenLayers = array(); |
114 | } | 114 | } |
115 | -if($temas != "") | ||
116 | -{ | 115 | +if($temas != ""){ |
117 | $temas = str_replace(" ",",",$temas); | 116 | $temas = str_replace(" ",",",$temas); |
118 | //$temas = strtolower($temas); | 117 | //$temas = strtolower($temas); |
119 | $temas = explode(",",$temas); | 118 | $temas = explode(",",$temas); |
@@ -152,6 +151,7 @@ if($temas != "") | @@ -152,6 +151,7 @@ if($temas != "") | ||
152 | } | 151 | } |
153 | } | 152 | } |
154 | if($nomeMap != ""){ | 153 | if($nomeMap != ""){ |
154 | + | ||
155 | if(empty($layers)){ | 155 | if(empty($layers)){ |
156 | $layers = array(); | 156 | $layers = array(); |
157 | $maptemp = @ms_newMapObj($nomeMap); | 157 | $maptemp = @ms_newMapObj($nomeMap); |
@@ -164,6 +164,7 @@ if($temas != "") | @@ -164,6 +164,7 @@ if($temas != "") | ||
164 | } | 164 | } |
165 | else{ | 165 | else{ |
166 | $nomeLayer = str_replace(" ",",",$layers); | 166 | $nomeLayer = str_replace(" ",",",$layers); |
167 | + $layers = explode(",",$layers); | ||
167 | $maptemp = @ms_newMapObj($nomeMap); | 168 | $maptemp = @ms_newMapObj($nomeMap); |
168 | //$temp = explode(",",$layers); | 169 | //$temp = explode(",",$layers); |
169 | $layern = $maptemp->getLayerByName($layers[0]); | 170 | $layern = $maptemp->getLayerByName($layers[0]); |
@@ -186,6 +187,7 @@ if($temas != "") | @@ -186,6 +187,7 @@ if($temas != "") | ||
186 | } | 187 | } |
187 | } | 188 | } |
188 | } | 189 | } |
190 | + | ||
189 | function ajuda(){ | 191 | function ajuda(){ |
190 | echo " | 192 | echo " |
191 | <pre><b> | 193 | <pre><b> |
ms_configura.php
@@ -467,7 +467,7 @@ else //se for linux | @@ -467,7 +467,7 @@ else //se for linux | ||
467 | $R_libpath = ""; | 467 | $R_libpath = ""; |
468 | $postgis_mapa = array( | 468 | $postgis_mapa = array( |
469 | "teste"=>"user=postgres password=postgres dbname=postgis host=localhost port=5432 options='-c client_encoding=LATIN1'", | 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 | $utilizacgi = "nao"; | 472 | $utilizacgi = "nao"; |
473 | $expoeMapfile = "sim"; | 473 | $expoeMapfile = "sim"; |
ogc.php
@@ -72,17 +72,16 @@ if(!isset($temas) && isset($tema)) | @@ -72,17 +72,16 @@ if(!isset($temas) && isset($tema)) | ||
72 | //para operar como o Geoserver | 72 | //para operar como o Geoserver |
73 | // | 73 | // |
74 | if(isset($format) && strtolower($format) == "application/openlayers"){ | 74 | if(isset($format) && strtolower($format) == "application/openlayers"){ |
75 | - if(!isset($layers)) | ||
76 | - { | 75 | + //var_dump($_SERVER);exit; |
76 | + if(!isset($layers)){ | ||
77 | $layers = $temas; | 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 | header("Location:".$urln); | 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,7 +2,8 @@ MAP | ||
2 | FONTSET "../symbols/fontes.txt" | 2 | FONTSET "../symbols/fontes.txt" |
3 | SYMBOLSET "../symbols/simbolos.sym" | 3 | SYMBOLSET "../symbols/simbolos.sym" |
4 | LAYER | 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 | CONNECTIONTYPE POSTGIS | 7 | CONNECTIONTYPE POSTGIS |
7 | DATA "the_geom from (select * from i3geo_metaestat.bairros) as foo using unique gid using srid=4326" | 8 | DATA "the_geom from (select * from i3geo_metaestat.bairros) as foo using unique gid using srid=4326" |
8 | METADATA | 9 | METADATA |