Commit e68b5fb272e053448b940f8efbad97a333241345
1 parent
fcb630ab
Exists in
master
and in
7 other branches
--no commit message
Showing
22 changed files
with
415 additions
and
281 deletions
Show diff stats
admin/html/admin.css
admin/html/atlas.html
... | ... | @@ -8,8 +8,9 @@ |
8 | 8 | </head> |
9 | 9 | <body> |
10 | 10 | <div style=width:80%;text-align:center;> |
11 | -<h1>Administração do i3geo - Atlas</h1> | |
11 | +<h1>Administração do i3geo - Atlas <img src="../imagens/04.png" style="cursor:pointer" onclick="$i('ajuda').style.display='block'"/></h1> | |
12 | 12 | <p><a href="../index.html">Voltar</a></p> |
13 | +<div id=ajuda style="display:none"> | |
13 | 14 | <p>Este programa permite editar a lista de Atlas</p> |
14 | 15 | <p>O menu é baseado no banco admin.db.</p> |
15 | 16 | <p>A lista de IPs dos usuários que podem editar os arquivos de configuração do i3geo e |
... | ... | @@ -21,8 +22,9 @@ alterar essas variáveis, vc deve editar diretamente o arquivo i3geo/ms_configura |
21 | 22 | <p>template - arquivo HTMML de configuração do i3geo que será utilizado. Se não especificado, será utilizado o default. |
22 | 23 | <p>extensão - extensão geográfica que será utilizada em cada prancha, no formato xmin ymin xmax ymax. |
23 | 24 | <p>mapfile base - arquivo mapfile que será utilizado como base para montagem do atlas. Utilize o caminho completo no servidor. |
24 | -</div> | |
25 | -<div id=aguarde style="color:red" ><p>Aguarde...</p></div> | |
25 | +</div></div> | |
26 | +<br> | |
27 | +<div id=resultado ><img src="../../imagens/aguarde.gif" /></div> | |
26 | 28 | </body> |
27 | 29 | <script> |
28 | 30 | /* |
... | ... | @@ -30,12 +32,11 @@ Title: Administração do Atlas |
30 | 32 | |
31 | 33 | File: i3geo/admin/atlas.htm |
32 | 34 | */ |
35 | +var temas = function(retorno){$temas = retorno.data;iniciaAdmin()} | |
33 | 36 | var cp = new cpaint(); |
34 | -//cp.set_async(false); | |
37 | +//cp.set_async("false"); | |
35 | 38 | cp.set_response_type("JSON"); |
36 | -temas = function(retorno){$temas = retorno.data;iniciaAdmin()} | |
37 | 39 | var p = "../php/menutemas.php?funcao=pegaTemas"; |
38 | 40 | cp.call(p,"pegaMenus",temas); |
39 | -document.getElementById("aguarde").style.display="none" | |
40 | 41 | </script> |
41 | 42 | </html> |
42 | 43 | \ No newline at end of file | ... | ... |
admin/html/i3geoadmin_arvore.html
... | ... | @@ -8,8 +8,9 @@ |
8 | 8 | </head> |
9 | 9 | <body> |
10 | 10 | <div style=width:80%;text-align:center;> |
11 | -<h1>Administração do i3geo - menu de temas</h1> | |
11 | +<h1>Administração do i3geo - menu de temas <img src="../imagens/04.png" style="cursor:pointer" onclick="$i('ajuda').style.display='block'"/></h1> | |
12 | 12 | <p><a href="../index.html">Voltar</a></p> |
13 | +<div id=ajuda style="display:none"> | |
13 | 14 | <p>Este programa permite editar as árvores de cada menu</p> |
14 | 15 | <p>O menu é baseado no banco admin.db.</p> |
15 | 16 | <p>A lista de IPs dos usuários que podem editar os arquivos de configuração do i3geo e |
... | ... | @@ -18,8 +19,8 @@ alterar essas variáveis, vc deve editar diretamente o arquivo i3geo/ms_configura |
18 | 19 | <p>Utilize as opções abaixo para relacionar os temas a grupos e sub-grupos. Escolha primeiro um menu e depois edite |
19 | 20 | os grupos, adicionando temas ou sub-grupos. A estrutura é hierárquica e permite que temas sejam criados também na raiz de um grupo ou do próprio menu. |
20 | 21 | <p>Os grupos, sub-grupos e temas já devem ter sido criados para que se possa montar a árvore de associações. |
21 | -</div> | |
22 | -<div id=aguarde style="color:red" ><p>Aguarde...</p></div> | |
22 | +</div></div> | |
23 | +<div id=aguarde style="color:red" ><img src="../../imagens/aguarde.gif" /></div> | |
23 | 24 | </body> |
24 | 25 | <script> |
25 | 26 | /* | ... | ... |
admin/html/i3geoadmin_grupos.html
... | ... | @@ -8,15 +8,16 @@ |
8 | 8 | </head> |
9 | 9 | <body> |
10 | 10 | <div style=width:80%;text-align:center;> |
11 | -<h1>Administração do i3geo - menu de temas</h1> | |
11 | +<h1>Administração do i3geo - menu de temas <img src="../imagens/04.png" style="cursor:pointer" onclick="$i('ajuda').style.display='block'"/></h1> | |
12 | 12 | <p><a href="../index.html">Voltar</a></p> |
13 | +<div id=ajuda style="display:none"> | |
13 | 14 | <p>Este programa permite editar a lista de grupos</p> |
14 | 15 | <p>O menu é baseado no banco admin.db.</p> |
15 | 16 | <p>A lista de IPs dos usuários que podem editar os arquivos de configuração do i3geo e |
16 | 17 | dos que podem navegar pelos diretórios do servidor, não são mostradas aqui. Para |
17 | 18 | alterar essas variáveis, vc deve editar diretamente o arquivo i3geo/ms_configura.php.</p> |
18 | -</div> | |
19 | -<div id=aguarde style="color:red" ><p>Aguarde...</p></div> | |
19 | +</div></div> | |
20 | +<div id=aguarde style="color:red" ><img src="../../imagens/aguarde.gif" /></div> | |
20 | 21 | </body> |
21 | 22 | <script> |
22 | 23 | /* | ... | ... |
admin/html/i3geoadmin_menus.html
... | ... | @@ -9,8 +9,9 @@ |
9 | 9 | </head> |
10 | 10 | <body> |
11 | 11 | <div style=width:80%;text-align:center;> |
12 | -<h1>Administração do i3geo - menu de temas</h1> | |
12 | +<h1>Administração do i3geo - menu de temas <img src="../imagens/04.png" style="cursor:pointer" onclick="$i('ajuda').style.display='block'"/></h1> | |
13 | 13 | <p><a href="../index.html">Voltar</a></p> |
14 | +<div id=ajuda style="display:none"> | |
14 | 15 | <p>Este programa permite editar a lista de menus</p> |
15 | 16 | <p>Você pode criar vários menus e depois acrescentar grupos, subgrupos e temas em cada um. |
16 | 17 | A lista de menus que serão utilizados no i3geo é definida no arquivo ms_configura.php. |
... | ... | @@ -18,8 +19,8 @@ A lista de menus que serão utilizados no i3geo é definida no arquivo ms_configur |
18 | 19 | <p>A lista de IPs dos usuários que podem editar os arquivos de configuração do i3geo e |
19 | 20 | dos que podem navegar pelos diretórios do servidor, não são mostradas aqui. Para |
20 | 21 | alterar essas variáveis, vc deve editar diretamente o arquivo i3geo/ms_configura.php.</p> |
21 | -</div> | |
22 | -<div id=aguarde style="color:red" ><p>Aguarde...</p></div> | |
22 | +</div></div> | |
23 | +<div id=aguarde style="color:red" ><img src="../../imagens/aguarde.gif" /></div> | |
23 | 24 | </body> |
24 | 25 | <script> |
25 | 26 | /* | ... | ... |
admin/html/i3geoadmin_perfis.html
... | ... | @@ -9,14 +9,15 @@ |
9 | 9 | </head> |
10 | 10 | <body> |
11 | 11 | <div style=width:80%;text-align:center;> |
12 | -<h1>Administração do i3geo - perfis</h1> | |
12 | +<h1>Administração do i3geo - perfis <img src="../imagens/04.png" style="cursor:pointer" onclick="$i('ajuda').style.display='block'"/></h1> | |
13 | 13 | <p><a href="../index.html">Voltar</a></p> |
14 | +<div id=ajuda style="display:none"> | |
14 | 15 | <p>Este programa permite editar a lista de perfis</p> |
15 | 16 | <p>A lista de IPs dos usuários que podem editar os arquivos de configuração do i3geo e |
16 | 17 | dos que podem navegar pelos diretórios do servidor, não são mostradas aqui. Para |
17 | 18 | alterar essas variáveis, vc deve editar diretamente o arquivo i3geo/ms_configura.php.</p> |
18 | -</div> | |
19 | -<div id=aguarde style="color:red" ><p>Aguarde...</p></div> | |
19 | +</div></div> | |
20 | +<div id=aguarde style="color:red" ><img src="../../imagens/aguarde.gif" /></div> | |
20 | 21 | </body> |
21 | 22 | <script> |
22 | 23 | /* | ... | ... |
admin/html/i3geoadmin_subgrupos.html
... | ... | @@ -9,15 +9,16 @@ |
9 | 9 | </head> |
10 | 10 | <body> |
11 | 11 | <div style=width:80%;text-align:center;> |
12 | -<h1>Administração do i3geo - menu de temas</h1> | |
12 | +<h1>Administração do i3geo - menu de temas <img src="../imagens/04.png" style="cursor:pointer" onclick="$i('ajuda').style.display='block'"/></h1> | |
13 | 13 | <p><a href="../index.html">Voltar</a></p> |
14 | +<div id=ajuda style="display:none"> | |
14 | 15 | <p>Este programa permite editar a lista de sub-grupos</p> |
15 | 16 | <p>O menu é baseado no banco admin.db.</p> |
16 | 17 | <p>A lista de IPs dos usuários que podem editar os arquivos de configuração do i3geo e |
17 | 18 | dos que podem navegar pelos diretórios do servidor, não são mostradas aqui. Para |
18 | 19 | alterar essas variáveis, vc deve editar diretamente o arquivo i3geo/ms_configura.php.</p> |
19 | -</div> | |
20 | -<div id=aguarde style="color:red" ><p>Aguarde...</p></div> | |
20 | +</div></div> | |
21 | +<div id=aguarde style="color:red" ><img src="../../imagens/aguarde.gif" /></div> | |
21 | 22 | </body> |
22 | 23 | <script> |
23 | 24 | /* | ... | ... |
admin/html/i3geoadmin_tags.html
... | ... | @@ -9,14 +9,15 @@ |
9 | 9 | </head> |
10 | 10 | <body> |
11 | 11 | <div style=width:80%;text-align:center;> |
12 | -<h1>Administração do i3geo - menu de temas</h1> | |
12 | +<h1>Administração do i3geo - menu de temas <img src="../imagens/04.png" style="cursor:pointer" onclick="$i('ajuda').style.display='block'"/></h1> | |
13 | 13 | <p><a href="../index.html">Voltar</a></p> |
14 | +<div id=ajuda style="display:none"> | |
14 | 15 | <p>Este programa permite editar a lista de tags (palavras-chave)</p> |
15 | 16 | <p>A lista de IPs dos usuários que podem editar os arquivos de configuração do i3geo e |
16 | 17 | dos que podem navegar pelos diretórios do servidor, não são mostradas aqui. Para |
17 | 18 | alterar essas variáveis, vc deve editar diretamente o arquivo i3geo/ms_configura.php.</p> |
18 | -</div> | |
19 | -<div id=aguarde style="color:red" ><p>Aguarde...</p></div> | |
19 | +</div></div> | |
20 | +<div id=aguarde style="color:red" ><img src="../../imagens/aguarde.gif" /></div> | |
20 | 21 | </body> |
21 | 22 | <script> |
22 | 23 | /* | ... | ... |
admin/html/i3geoadmin_temas.html
... | ... | @@ -9,8 +9,9 @@ |
9 | 9 | </head> |
10 | 10 | <body> |
11 | 11 | <div style=width:80%;text-align:center;> |
12 | -<h1>Administração do i3geo - menu de temas</h1> | |
12 | +<h1>Administração do i3geo - menu de temas <img src="../imagens/04.png" style="cursor:pointer" onclick="$i('ajuda').style.display='block'"/></h1> | |
13 | 13 | <p><a href="../index.html">Voltar</a></p> |
14 | +<div id=ajuda style="display:none"> | |
14 | 15 | <p>Este programa permite editar a lista de temas</p> |
15 | 16 | <p>O menu é baseado no banco admin.db.</p> |
16 | 17 | <p>A lista de IPs dos usuários que podem editar os arquivos de configuração do i3geo e |
... | ... | @@ -18,8 +19,8 @@ dos que podem navegar pelos diretórios do servidor, não são mostradas aqui. Para |
18 | 19 | alterar essas variáveis, vc deve editar diretamente o arquivo i3geo/ms_configura.php.</p> |
19 | 20 | <p>Os temas são relacionados aos mapfiles existentes no diretório i3geo/temas. Cada tema recebe um nome que será mostrado |
20 | 21 | na árvore de temas. Após a criação dos temas, você pode criar a árvore de temas, associando-os a menus, grupos e sub-grupos. |
21 | -</div> | |
22 | -<div id=aguarde style="color:red" ><p>Aguarde...</p></div> | |
22 | +</div></div> | |
23 | +<div id=aguarde style="color:red" ><img src="../../imagens/aguarde.gif" /></div> | |
23 | 24 | </body> |
24 | 25 | <script> |
25 | 26 | /* | ... | ... |
admin/html/identifica.html
... | ... | @@ -8,8 +8,9 @@ |
8 | 8 | </head> |
9 | 9 | <body> |
10 | 10 | <div style=width:80%;text-align:center;> |
11 | -<h1>Administração do i3geo - sistemas de identificação</h1> | |
11 | +<h1>Administração do i3geo - sistemas de identificação <img src="../imagens/04.png" style="cursor:pointer" onclick="$i('ajuda').style.display='block'"/></h1> | |
12 | 12 | <p><a href="../index.html">Voltar</a></p> |
13 | +<div id=ajuda style="display:none"> | |
13 | 14 | <p>Este programa permite editar o cadastro de sistemas utilizados na ferramenta de identificação</p> |
14 | 15 | <p>A lista é baseada no banco admin.db.</p> |
15 | 16 | <p>A lista de IPs dos usuários que podem editar os arquivos de configuração do i3geo e |
... | ... | @@ -18,8 +19,8 @@ alterar essas variáveis, vc deve editar diretamente o arquivo i3geo/ms_configura |
18 | 19 | <p>O item programa define a URL que será chamada quando o usuário clica em um ponto no mapa. |
19 | 20 | A ferramenta de identificação irá acrescentar ao final da URL os parâmetros "x" e "y", correspondentes |
20 | 21 | às coordenadas do ponto clicado no mapa. |
21 | -</div> | |
22 | -<div id=aguarde style="color:red" ><p>Aguarde...</p></div> | |
22 | +</div></div> | |
23 | +<div id=aguarde style="color:red" ><img src="../../imagens/aguarde.gif" /></div> | |
23 | 24 | </body> |
24 | 25 | <script> |
25 | 26 | /* | ... | ... |
admin/html/mapas.html
... | ... | @@ -8,8 +8,9 @@ |
8 | 8 | </head> |
9 | 9 | <body> |
10 | 10 | <div style=width:80%;text-align:center;> |
11 | -<h1>Administração do i3geo - mapas</h1> | |
11 | +<h1>Administração do i3geo - mapas <img src="../imagens/04.png" style="cursor:pointer" onclick="$i('ajuda').style.display='block'"/></h1> | |
12 | 12 | <p><a href="../index.html">Voltar</a></p> |
13 | +<div id=ajuda style="display:none"> | |
13 | 14 | <p>Este programa permite editar a lista de mapas</p> |
14 | 15 | <p>O menu é baseado no banco admin.db.</p> |
15 | 16 | <p>A lista de IPs dos usuários que podem editar os arquivos de configuração do i3geo e |
... | ... | @@ -23,8 +24,8 @@ alterar essas variáveis, vc deve editar diretamente o arquivo i3geo/ms_configura |
23 | 24 | <p>Temas: códigos dos temas que serão mostrados no mapa</p> |
24 | 25 | <p>Ligados: códigos dos temas que estarão ligados no mapa (visíveis). Os códigos devem constar no item Temas</p> |
25 | 26 | <p>Perfil: lista de perfis de usuários que podem ver o mapa. Separe com vírgulas</p> |
26 | -</div> | |
27 | -<div id=aguarde style="color:red" ><p>Aguarde...</p></div> | |
27 | +</div></div> | |
28 | +<div id=aguarde style="color:red" ><img src="../../imagens/aguarde.gif" /></div> | |
28 | 29 | </body> |
29 | 30 | <script> |
30 | 31 | /* |
... | ... | @@ -32,28 +33,30 @@ Title: Administração da lista de mapas |
32 | 33 | |
33 | 34 | File: i3geo/admin/mapas.htm |
34 | 35 | */ |
35 | -var iniciaM = function(retorno) | |
36 | +function iniciaM(retorno) | |
36 | 37 | { |
37 | - pegaParametros() | |
38 | 38 | iniciaAdmin() |
39 | 39 | document.getElementById("aguarde").style.display="none" |
40 | 40 | } |
41 | - | |
42 | -temas = function(retorno){$temas = retorno.data;iniciaAdmin()} | |
43 | -listaPerfis = function(retorno){$perfis = retorno.data} | |
44 | - | |
45 | -function pegaParametros() | |
41 | +temas = function(retorno){$temas = retorno.data;pegaPerfis()} | |
42 | +listaPerfis = function(retorno){$perfis = retorno.data;iniciaM()} | |
43 | +function pegaTemas() | |
46 | 44 | { |
47 | 45 | var cp = new cpaint(); |
48 | - //cp.set_async(false); | |
46 | + //cp.set_async("false"); | |
49 | 47 | cp.set_response_type("JSON"); |
50 | - | |
51 | 48 | var p = "../php/menutemas.php?funcao=pegaTemas"; |
52 | - cp.call(p,"pegaMenus",temas); | |
49 | + cp.call(p,"pegaTemas",temas); | |
50 | +} | |
51 | +function pegaPerfis() | |
52 | +{ | |
53 | + var cp = new cpaint(); | |
54 | + //cp.set_async("false"); | |
55 | + cp.set_response_type("JSON"); | |
53 | 56 | var p = "../php/menutemas.php?funcao=pegaPerfis"; |
54 | - cp.call(p,"pegaMenus",listaPerfis); | |
57 | + cp.call(p,"pegaPerfis",listaPerfis); | |
55 | 58 | } |
56 | -iniciaM() | |
59 | +pegaTemas() | |
57 | 60 | |
58 | 61 | </script> |
59 | 62 | </html> |
60 | 63 | \ No newline at end of file | ... | ... |
admin/html/mapfiles.html
... | ... | @@ -9,16 +9,17 @@ |
9 | 9 | </head> |
10 | 10 | <body> |
11 | 11 | <div style=width:80%;text-align:center;> |
12 | -<h1>Administração do i3geo - mapfiles principais</h1> | |
12 | +<h1>Administração do i3geo - mapfiles principais <img src="../imagens/04.png" style="cursor:pointer" onclick="$i('ajuda').style.display='block'"/></h1> | |
13 | 13 | <p><a href="../index.html">voltar</a></p> |
14 | +<div id=ajuda style="display:none"> | |
14 | 15 | <p>Este programa permite alterar as configurações básicas dos arquivos mapfile existentes em i3geo/aplicmap</p> |
15 | 16 | <p>Esses arquivos são os mapas básicos utilizados pelo i3geo na inicialização.</p> |
16 | 17 | <p>A lista de IPs dos usuários que podem editar os arquivos de configuração do i3geo e |
17 | 18 | dos que podem navegar pelos diretórios do servidor, não são mostradas aqui. Para |
18 | 19 | alterar essas variáveis, vc deve editar diretamente o arquivo i3geo/ms_configura.php.</p> |
19 | -</div> | |
20 | +</div></div> | |
20 | 21 | |
21 | -<div id=aguarde style="color:red" ><p>Aguarde...</p></div> | |
22 | +<div id=aguarde style="color:red" ><img src="../../imagens/aguarde.gif" /></div> | |
22 | 23 | <br> |
23 | 24 | <input onclick="restauraPadrao()" type=button value="Restaura os valores padrão" /><br><br> |
24 | 25 | <input onclick="javascript:window.open('../testainstal.php')" type=button value="Testar a instalação" /><br><br> | ... | ... |
admin/html/ms_configura.html
... | ... | @@ -8,8 +8,9 @@ |
8 | 8 | </head> |
9 | 9 | <body> |
10 | 10 | <div style=width:80%;text-align:center;> |
11 | -<h1>Administração do i3geo - ms_configura.php</h1> | |
11 | +<h1>Administração do i3geo - ms_configura.php <img src="../imagens/04.png" style="cursor:pointer" onclick="$i('ajuda').style.display='block'"/></h1> | |
12 | 12 | <p><a href="../index.html">voltar</a></p> |
13 | +<div id=ajuda style="display:none"> | |
13 | 14 | <p>Este programa permite alterar as variáveis de configuração existentes no programa ms_configura.php</p> |
14 | 15 | <p>O ms_configura.php é utilizado como um "include" nos programas do i3geo, definindo uma série de parâmetros necessários ao seu funcionamento.</p> |
15 | 16 | <p>A lista de IPs dos usuários que podem editar os arquivos de configuração do i3geo e |
... | ... | @@ -17,9 +18,9 @@ dos que podem navegar pelos diretórios do servidor, não são mostradas aqui. Para |
17 | 18 | alterar essas variáveis, vc deve editar diretamente o arquivo i3geo/ms_configura.php.</p> |
18 | 19 | <p>Da mesma forma, a variável $menutemas não pode ser modificada nesse formulário. Por padrão, essa variável é definida como vazia, forçando o i3geo a montar a árvore de camadas utilizando o banco de dados administrativo.</p> |
19 | 20 | <p>Se você quer utilizar um outro mecanismo de montagem do menu de temas, edite manualmente o arquivo ms_configura.php. |
20 | -</div> | |
21 | +</div></div> | |
21 | 22 | |
22 | -<div id=aguarde style="color:red" ><p>Aguarde...</p></div> | |
23 | +<div id=aguarde style="color:red" ><img src="../../imagens/aguarde.gif" /></div> | |
23 | 24 | <br> |
24 | 25 | <input onclick="restauraPadrao()" type=button value="Restaura os valores padrão" /><br><br> |
25 | 26 | <input onclick="javascript:window.open('../testainstal.php')" type=button value="Testar a instalação" /><br><br> | ... | ... |
admin/html/sistemas.html
... | ... | @@ -8,8 +8,9 @@ |
8 | 8 | </head> |
9 | 9 | <body style=background-color:white > |
10 | 10 | <div style=width:80%;text-align:center;> |
11 | -<h1>Administração do i3geo - sistemas especiais</h1> | |
11 | +<h1>Administração do i3geo - sistemas especiais <img src="../imagens/04.png" style="cursor:pointer" onclick="$i('ajuda').style.display='block'"/></h1> | |
12 | 12 | <p><a href="../index.html">Voltar</a></p> |
13 | +<div id=ajuda style="display:none"> | |
13 | 14 | <p>Este programa permite editar a lista de sistemas especiais que adicionam camadas ao mapa</p> |
14 | 15 | <p>O menu é baseado no banco admin.db.</p> |
15 | 16 | <p>A lista de IPs dos usuários que podem editar os arquivos de configuração do i3geo e |
... | ... | @@ -18,8 +19,8 @@ alterar essas variáveis, vc deve editar diretamente o arquivo i3geo/ms_configura |
18 | 19 | <p>A lista de perfis deve ser sepada por ",". Em abrir programa, inclua o endereço no servidro |
19 | 20 | do programa que será aberto em umajanela no i3geo. Cada sistema pode ter uma ou mais funções, que serão mostradas |
20 | 21 | em uma árvore hierárquica no i3geo.</p> |
21 | -</div> | |
22 | -<div id=aguarde style="color:red" ><p>Aguarde...</p></div> | |
22 | +</div></div> | |
23 | +<div id=aguarde style="color:red" ><img src="../../imagens/aguarde.gif" /></div> | |
23 | 24 | </body> |
24 | 25 | <script> |
25 | 26 | /* | ... | ... |
admin/html/temas.html
... | ... | @@ -8,8 +8,9 @@ |
8 | 8 | </head> |
9 | 9 | <body> |
10 | 10 | <div style=width:80%;text-align:center;> |
11 | -<h1>Administração do i3geo - Temas</h1> | |
11 | +<h1>Administração do i3geo - Temas <img src="../imagens/04.png" style="cursor:pointer" onclick="$i('ajuda').style.display='block'"/></h1> | |
12 | 12 | <p><a href="../index.html">Voltar</a></p> |
13 | +<div id=ajuda style="display:none"> | |
13 | 14 | <p>Este programa permite criar ou editar os arquivos mapfile que compõem temas no i3geo.</p> |
14 | 15 | <p>O menu é baseado no banco admin.db.</p> |
15 | 16 | <p>A lista de IPs dos usuários que podem editar os arquivos de configuração do i3geo e |
... | ... | @@ -18,7 +19,7 @@ alterar essas variáveis, vc deve editar diretamente o arquivo i3geo/ms_configura |
18 | 19 | <p>A lista de arquivos editáveis é baseada no banco de dados administrativo. Para que um arquivo apareça na |
19 | 20 | listagem, ele deve ter sido incluído no banco por meio da opção "Editar a lista de temas"</p> |
20 | 21 | |
21 | -</div> | |
22 | +</div></div> | |
22 | 23 | <fieldset> |
23 | 24 | <legend>Arquivo em edição</legend> |
24 | 25 | <p>Escolha o arquivo para editar (a lista de arquivos é baseada no banco de dados administrativo)</p> | ... | ... |
admin/html/webservices.html
... | ... | @@ -8,8 +8,9 @@ |
8 | 8 | </head> |
9 | 9 | <body> |
10 | 10 | <div style=width:80%;text-align:center;> |
11 | -<h1>Administração do i3geo - cadastro de web services</h1> | |
11 | +<h1>Administração do i3geo - cadastro de web services <img src="../imagens/04.png" style="cursor:pointer" onclick="$i('ajuda').style.display='block'"/></h1> | |
12 | 12 | <p><a href="../index.html">Voltar</a></p> |
13 | +<div id=ajuda style="display:none"> | |
13 | 14 | <p>Este programa permite editar o cadastro de web services</p> |
14 | 15 | <p>O menu é baseado no banco admin.db.</p> |
15 | 16 | <p>A lista de IPs dos usuários que podem editar os arquivos de configuração do i3geo e |
... | ... | @@ -20,8 +21,8 @@ alterar essas variáveis, vc deve editar diretamente o arquivo i3geo/ms_configura |
20 | 21 | <p>WMS - web map service, utilizado na ferramenta de conexão com servidor remoto e no cliente de web service</p> |
21 | 22 | <p>GEORSS - RSS com padrão GEO, utilizado na ferramenta de adição de temas baseados em GEORSS</p> |
22 | 23 | <p>DOWNLOAD - endereço que será adicionado na aplicação datadownload.htm. Trata-se de um link para endereço na web com dados para download. |
23 | -</div> | |
24 | -<div id=aguarde style="color:red" ><p>Aguarde...</p></div> | |
24 | +</div></div> | |
25 | +<div id=aguarde style="color:red" ><img src="../../imagens/aguarde.gif" /></div> | |
25 | 26 | </body> |
26 | 27 | <script> |
27 | 28 | /* | ... | ... |
admin/js/admin.js
... | ... | @@ -29,7 +29,7 @@ Free Software Foundation, Inc., no endereço |
29 | 29 | /* |
30 | 30 | Variable: $mensagemAguarde |
31 | 31 | */ |
32 | -$mensagemAguarde = "<span style=color:red ><p>Aguarde...</p></span>" | |
32 | +$mensagemAguarde = "<img src='../../imagens/aguarde.gif' />";//"<span style=color:red ><p>Aguarde...</p></span>" | |
33 | 33 | |
34 | 34 | $i = function(i) |
35 | 35 | {return document.getElementById(i);}; |
... | ... | @@ -167,14 +167,14 @@ Retorna os itens option de um combo baseado em um objeto json |
167 | 167 | function comboObjeto(obj,valor,texto,marcar) |
168 | 168 | { |
169 | 169 | var ins = "<option value='' " |
170 | - if (marcar == ""){ins += "selected"} | |
170 | + //if (marcar == ""){ins += "selected"} | |
171 | 171 | ins += ">---</option>"; |
172 | 172 | for (var k=0;k<obj.length;k++) |
173 | 173 | { |
174 | 174 | var v = eval("obj[k]."+valor) |
175 | 175 | var t = eval("obj[k]."+texto) |
176 | 176 | ins += "<option value='"+v+"' " |
177 | - if (marcar == v || marcar == v.toLowerCase()){ins += "selected"} | |
177 | + if (marcar == v){ins += "selected"} | |
178 | 178 | ins += ">"+t+"</option>"; |
179 | 179 | } |
180 | 180 | return(ins) | ... | ... |
admin/js/atlas.js
... | ... | @@ -41,30 +41,43 @@ function montaParametros() |
41 | 41 | { |
42 | 42 | if(!$i("resultado")) |
43 | 43 | {document.body.innerHTML += "<div id=resultado ></div>"} |
44 | - $i("resultado").innerHTML = $mensagemAguarde | |
45 | - var p = "../php/atlas.php?funcao=pegaAtlas"; | |
46 | - cPaint.call(p,"",listaAtlas); | |
44 | + listaAtlas() | |
47 | 45 | } |
48 | 46 | /* |
49 | 47 | Function: listaAtlas |
50 | 48 | |
51 | 49 | Monta o html com os parametros e os divs que receberão os dados dos formulários. |
52 | 50 | */ |
53 | -function listaAtlas(retorno) | |
51 | +function listaAtlas() | |
54 | 52 | { |
55 | - ins = "<p><input style=font-size:10px onclick='alterarAtlas(\"\",\"resultado\")' type=button value='Adicionar um novo atlas' /></p>" | |
56 | - montaAtlas(retorno,"resultado") | |
53 | + $i("resultado").innerHTML = $mensagemAguarde | |
54 | + var ins = "<fieldset><legend>Atlas</legend>" | |
55 | + var comboAtlas = function(retorno) | |
56 | + { | |
57 | + var d = retorno.data; | |
58 | + var nm = retorno.data.length | |
59 | + ins += "<p><table><tr><td><b>Selecione o atlas:</b></td><td></td></tr>" | |
60 | + ins += "<tr><td><input style=font-size:10px onclick='alterarAtlas(\"\")' type=button value='Adicionar um novo atlas' /></td><td><select onchange='pegaDadosAtlas(this.value)'>" | |
61 | + ins += "<option>---</option>" | |
62 | + for (i=0;i<nm;i++) | |
63 | + { | |
64 | + ins += "<option value='"+d[i].id_atlas+"'>"+d[i].titulo_atlas+"</option>" | |
65 | + } | |
66 | + $i("resultado").innerHTML = ins+"</select></tr></table></p><p><div id='dadosAtlas'></div></fieldset>" | |
67 | + } | |
68 | + var cp = new cpaint(); | |
69 | + cp.set_response_type("JSON"); | |
70 | + var p = "../php/atlas.php?funcao=pegaAtlas"; | |
71 | + cp.call(p,"pegaAtlas",comboAtlas); | |
57 | 72 | } |
58 | -function montaAtlas(retorno,onde) | |
73 | +function pegaDadosAtlas(id_atlas) | |
59 | 74 | { |
60 | - var d = retorno.data; | |
61 | - var nm = retorno.data.length | |
62 | - for (i=0;i<nm;i++) | |
75 | + $i("dadosAtlas").innerHTML = $mensagemAguarde | |
76 | + var retorna = function(retorno) | |
63 | 77 | { |
64 | - if(!$i(d[i].id_atlas)) | |
65 | - {ins += "<div id="+d[i].id_atlas+" >"} | |
66 | - ins += "<fieldset><legend style='background-color:white;'><b>+- "+d[i].titulo_atlas+"</b></legend>" | |
67 | - ins += "<div style=display:none ><table class=lista ><tr><td></td><td></td></tr>"; | |
78 | + //parametros atlas | |
79 | + var d = retorno.data.atlas[0] | |
80 | + var ins = "<table class=lista ><tr><td></td><td></td></tr>"; | |
68 | 81 | var param = { |
69 | 82 | "linhas":[ |
70 | 83 | {titulo:"Nome",prefixoid:"titulo_",id:"id_atlas",valor:"titulo_atlas"}, |
... | ... | @@ -75,135 +88,149 @@ function montaAtlas(retorno,onde) |
75 | 88 | {titulo:"Prancha aberta",prefixoid:"pranchadefault_",id:"id_atlas",valor:"pranchadefault_atlas"}, |
76 | 89 | {titulo:"Largura da janela do texto exlicativo",prefixoid:"w_",id:"id_atlas",valor:"w_atlas"}, |
77 | 90 | {titulo:"Altura",prefixoid:"h_",id:"id_atlas",valor:"h_atlas"}, |
78 | - {titulo:"Mapfile base",prefixoid:"basemapfile_",id:"id_atlas",valor:"basemapfile_atlas"} | |
91 | + {titulo:"Mapfile base",prefixoid:"basemapfile_",id:"id_atlas",valor:"basemapfile_atlas"}, | |
92 | + {titulo:"Ordem de apresentação",prefixoid:"ordematlas_",id:"id_atlas",valor:"ordem_atlas"} | |
79 | 93 | ] |
80 | 94 | } |
81 | - ins += (geraLinhas(d[i],param,2)); | |
95 | + ins += (geraLinhas(d,param,2)); | |
82 | 96 | ins += "<tr>" |
83 | 97 | ins += "<td>Tipo das guias: </td>" |
84 | - ins += "<select onchange='this.style.color=\"blue\"' id='tipoguias_"+d[i].id_atlas+"' >" | |
85 | - ins += combolista(tipos,d[i].tipoguias_atlas) | |
98 | + ins += "<select onchange='this.style.color=\"blue\"' id='tipoguias_"+d.id_atlas+"' >" | |
99 | + ins += combolista(tipos,d.tipoguias_atlas) | |
86 | 100 | ins += "</select>" |
87 | 101 | ins += "</td>" |
88 | 102 | ins += "</tr>" |
89 | 103 | ins += "</table>" |
90 | - ins += "<table><tr><td><div class=excluir title='Excluir' onclick='excluir(\""+d[i].id_atlas+"\")'/></td>" | |
91 | - ins += "<td><div class=aplicar title='Aplicar alterações' onclick='alterarAtlas(\""+d[i].id_atlas+"\",\""+d[i].id_atlas+"\")'/></td>" | |
104 | + ins += "<table><tr><td><div class=excluir title='Excluir' onclick='excluir(\""+d.id_atlas+"\")'/></td>" | |
105 | + ins += "<td><div class=aplicar title='Aplicar alterações' onclick='alterarAtlas(\""+d.id_atlas+"\",\""+d.id_atlas+"\")'/></td>" | |
92 | 106 | ins += "</tr></table>" |
93 | - ins += "<fieldset><legend>+- Pranchas</legend>" | |
94 | - ins += "<div style=display:none ><p><input style=font-size:10px onclick='alterarPranchas(\"\",\""+d[i].id_atlas+"\")' type=button value='Adicionar uma nova prancha' /></p>" | |
95 | - ins += "<div id=pranchas_"+d[i].id_atlas+" ></div>" | |
96 | - ins += "</div></fieldset>" | |
97 | - if(!$i(d[i].id_atlas)) | |
98 | - ins += "</div>" | |
99 | - ins += "</div></fieldset>" | |
107 | + ins += "<br>" | |
108 | + | |
109 | + var d = retorno.data.pranchas; | |
110 | + var nm = d.length | |
111 | + ins += "<fieldset><legend>Pranchas</legend><p><table><tr><td><b>Selecione a prancha:</b></td><td></td></tr>" | |
112 | + ins += "<tr><td><input style=font-size:10px onclick='alterarPranchas(\"\",\""+id_atlas+"\")' type=button value='Adicionar uma nova prancha' /></td><td><select onchange='pegaDadosPrancha(this.value,\""+id_atlas+"\")'>" | |
113 | + ins += "<option>---</option>" | |
114 | + for (i=0;i<nm;i++) | |
115 | + { | |
116 | + ins += "<option value='"+d[i].id_prancha+"'>"+d[i].titulo_prancha+"</option>" | |
117 | + } | |
118 | + ins += "</select></tr></table></p>" | |
119 | + ins += "<div id='dadosPranchas'></div></fieldset>" | |
120 | + $i("dadosAtlas").innerHTML = ins | |
100 | 121 | } |
101 | - $i(onde).innerHTML = ins | |
102 | - listaPranchas(retorno) | |
122 | + var cp = new cpaint(); | |
123 | + cp.set_response_type("JSON"); | |
124 | + var p = "../php/atlas.php?funcao=pegaDadosAtlas&id_atlas="+id_atlas; | |
125 | + cp.call(p,"pegaDadosAtlas",retorna); | |
103 | 126 | } |
104 | -function listaPranchas(retorno) | |
127 | +function pegaDadosPrancha(id_prancha,id_atlas) | |
105 | 128 | { |
106 | - var d = retorno.data; | |
107 | - var nm = retorno.data.length | |
108 | - for (i=0;i<nm;i++) | |
109 | - { | |
129 | + $i("dadosPranchas").innerHTML = $mensagemAguarde | |
130 | + var retorna = function(retorno) | |
131 | + { | |
110 | 132 | var ins = "" |
111 | - var nf = d[i].pranchas.length | |
112 | - for (j=0;j<nf;j++) | |
133 | + if(retorno.data.prancha[0]) | |
113 | 134 | { |
114 | - ins += "<fieldset><legend>+- "+d[i].pranchas[j].titulo_prancha+"</legend>" | |
115 | - ins += "<div style=display:none ><table class=lista ><tr><td></td><td></td></tr>"; | |
135 | + var d = retorno.data.prancha[0] | |
136 | + ins += "<div><table class=lista ><tr><td></td><td></td></tr>"; | |
116 | 137 | var param = { |
117 | - "linhas":[ | |
118 | - {titulo:"Nome",prefixoid:"tituloP_",id:"id_prancha",valor:"titulo_prancha"}, | |
119 | - {titulo:"Descrição",prefixoid:"descP_",id:"id_prancha",valor:"desc_prancha"}, | |
120 | - {titulo:"Ícone",prefixoid:"iconeP_",id:"id_prancha",valor:"icone_prancha"}, | |
121 | - {titulo:"Link",prefixoid:"linkP_",id:"id_prancha",valor:"link_prancha"}, | |
122 | - {titulo:"Largura da janela do texto exlicativo",prefixoid:"wP_",id:"id_prancha",valor:"w_prancha"}, | |
123 | - {titulo:"Altura",prefixoid:"hP_",id:"id_prancha",valor:"h_prancha"}, | |
124 | - {titulo:"Extensão geográfica",prefixoid:"mapextP_",id:"id_prancha",valor:"mapext_prancha"} | |
125 | - ] | |
138 | + "linhas":[ | |
139 | + {titulo:"Nome",prefixoid:"tituloP_",id:"id_prancha",valor:"titulo_prancha"}, | |
140 | + {titulo:"Descrição",prefixoid:"descP_",id:"id_prancha",valor:"desc_prancha"}, | |
141 | + {titulo:"Ícone",prefixoid:"iconeP_",id:"id_prancha",valor:"icone_prancha"}, | |
142 | + {titulo:"Link",prefixoid:"linkP_",id:"id_prancha",valor:"link_prancha"}, | |
143 | + {titulo:"Largura da janela do texto exlicativo",prefixoid:"wP_",id:"id_prancha",valor:"w_prancha"}, | |
144 | + {titulo:"Altura",prefixoid:"hP_",id:"id_prancha",valor:"h_prancha"}, | |
145 | + {titulo:"Extensão geográfica",prefixoid:"mapextP_",id:"id_prancha",valor:"mapext_prancha"}, | |
146 | + {titulo:"Ordem de apresentação",prefixoid:"ordemP_",id:"id_prancha",valor:"ordem_prancha"} | |
147 | + ] | |
126 | 148 | } |
127 | - ins += (geraLinhas(d[i].pranchas[j],param,2)); | |
149 | + ins += (geraLinhas(d,param,2)); | |
128 | 150 | ins += "</table>" |
129 | - ins += "<table><tr><td><div class=excluir title='Excluir' onclick='excluirPranchas(\""+d[i].pranchas[j].id_prancha+"\")'/></td>" | |
130 | - ins += "<td><div class=aplicar title='Aplicar alterações' onclick='alterarPranchas(\""+d[i].pranchas[j].id_prancha+"\",\""+d[i].id_atlas+"\")'/></td>" | |
151 | + ins += "<table><tr><td><div class=excluir title='Excluir' onclick='excluirPranchas(\""+id_atlas+"\",\""+id_prancha+"\")'/></td>" | |
152 | + ins += "<td><div class=aplicar title='Aplicar alterações' onclick='alterarPranchas(\""+id_prancha+"\",\""+id_atlas+"\")'/></td>" | |
131 | 153 | ins += "</tr></table>" |
132 | - | |
133 | - ins += "<fieldset><legend>+- Temas</legend>" | |
134 | - ins += "<div style=display:none ><p><input style=font-size:10px onclick='alterarTemas(\"\",\""+d[i].pranchas[j].id_prancha+"\")' type=button value='Adicionar um novo tema' /></p>" | |
135 | - ins += "<div id=temas_"+d[i].pranchas[j].id_prancha+" ></div>" | |
136 | - ins += "</div></fieldset>" | |
137 | - ins += "</div></fieldset><br>" | |
138 | 154 | } |
139 | - if(document.getElementById("pranchas_"+d[i].id_atlas)) | |
140 | - {document.getElementById("pranchas_"+d[i].id_atlas).innerHTML = ins} | |
155 | + ins += "<br><fieldset><legend>Temas</legend><input style=font-size:10px onclick='alterarTemas(\""+id_prancha+"\",\"\")' type=button value='Adicionar um novo tema' />" | |
156 | + ins += "<input style=font-size:10px onclick='listaTemas(\""+id_prancha+"\",\""+id_atlas+"\")' type=button value='Listar temas' />" | |
157 | + | |
158 | + ins += "<div id='dadosTemas'></div></fieldset>" | |
159 | + $i("dadosPranchas").innerHTML = ins | |
141 | 160 | } |
142 | - listaTemas(retorno) | |
161 | + var cp = new cpaint(); | |
162 | + cp.set_response_type("JSON"); | |
163 | + var p = "../php/atlas.php?funcao=pegaDadosPranchas&id_atlas="+id_atlas+"&id_prancha="+id_prancha; | |
164 | + cp.call(p,"pegaDadosPranchas",retorna); | |
143 | 165 | } |
144 | -function listaTemas(retorno) | |
166 | +function listaTemas(id_prancha,id_atlas) | |
145 | 167 | { |
146 | - var d = retorno.data; | |
147 | - var nm = retorno.data.length | |
148 | - for (i=0;i<nm;i++) | |
149 | - { | |
150 | - var nf = d[i].pranchas.length | |
151 | - for (j=0;j<nf;j++) | |
168 | + $i("dadosTemas").innerHTML = $mensagemAguarde | |
169 | + var comboTemas = comboObjeto($temas,"codigo_tema","nome_tema","") | |
170 | + var retorna = function (retorno) | |
171 | + { | |
172 | + $i("dadosTemas").innerHTML = "" | |
173 | + var param = { | |
174 | + "linhas":[ | |
175 | + {titulo:"Ordem",prefixoid:"ordem_",id:"id_tema",valor:"ordem_tema"} | |
176 | + ] | |
177 | + } | |
178 | + var d = retorno.data; | |
179 | + var nt = retorno.data.length | |
180 | + var ins = "" | |
181 | + for(k=0;k<nt;k++) | |
152 | 182 | { |
153 | - var ins = "" | |
154 | - var nt = d[i].pranchas[j].temas.length | |
155 | - for(k=0;k<nt;k++) | |
156 | - { | |
157 | - ins += "<fieldset><legend>"+d[i].pranchas[j].temas[k].codigo_tema+"</legend>" | |
158 | - ins += "<div style=display:none ><table class=lista ><tr><td></td><td></td></tr>"; | |
159 | - ins += "<tr>" | |
160 | - ins += "<td>Nome: </td>" | |
161 | - ins += "<td><select onchange='this.style.color=\"blue\"' id='codigo_"+d[i].pranchas[j].temas[k].id_tema+"' >" | |
162 | - ins += comboObjeto($temas,"codigo_tema","nome_tema",d[i].pranchas[j].temas[k].codigo_tema) | |
163 | - ins += "</select></td></tr>" | |
164 | - ins += "</tr>" | |
165 | - ins += "<tr>" | |
166 | - ins += "<td>Ligado: </td>" | |
167 | - ins += "<td>" | |
168 | - ins += "<select onchange='this.style.color=\"blue\"' id='ligado_"+d[i].pranchas[j].temas[k].id_tema+"' >" | |
169 | - ins += combosimnao(d[i].pranchas[j].temas[k].ligado_tema) | |
170 | - ins += "</select></td>" | |
171 | - ins += "</tr>" | |
172 | - ins += "</table>" | |
173 | - ins += "<table><tr><td><div class=excluir title='Excluir' onclick='excluirTemas(\""+d[i].pranchas[j].temas[k].id_tema+"\")'/></td>" | |
174 | - ins += "<td><div class=aplicar title='Aplicar alterações' onclick='alterarTemas(\""+d[i].pranchas[j].temas[k].id_tema+"\",\""+d[i].pranchas[j].id_prancha+"\")'/></td>" | |
175 | - ins += "</tr></table>" | |
176 | - ins += "</div></fieldset><br>" | |
177 | - } | |
178 | - if(document.getElementById("temas_"+d[i].pranchas[j].id_prancha)) | |
179 | - {document.getElementById("temas_"+d[i].pranchas[j].id_prancha).innerHTML = ins} | |
183 | + ins += "<div><table class=lista ><tr><td></td><td></td></tr>"; | |
184 | + ins += (geraLinhas(d[k],param,2)); | |
185 | + ins += "<tr>" | |
186 | + ins += "<td>Nome: </td>" | |
187 | + ins += "<td><select onchange='this.style.color=\"blue\"' id='codigo_"+d[k].id_tema+"' >" | |
188 | + ins += comboTemas | |
189 | + ins += "</select></td></tr>" | |
190 | + ins += "</tr>" | |
191 | + ins += "<tr>" | |
192 | + ins += "<td>Ligado: </td>" | |
193 | + ins += "<td>" | |
194 | + ins += "<select onchange='this.style.color=\"blue\"' id='ligado_"+d[k].id_tema+"' >" | |
195 | + ins += combosimnao(d[k].ligado_tema) | |
196 | + ins += "</select></td>" | |
197 | + ins += "</tr>" | |
198 | + ins += "</table>" | |
199 | + ins += "<table><tr><td><div class=excluir title='Excluir' onclick='excluirTemas(\""+d[k].id_tema+"\",\""+id_prancha+",\",\""+id_atlas+"\")'/></td>" | |
200 | + ins += "<td><div class=aplicar title='Aplicar alterações' onclick='alterarTemas(\""+id_prancha+"\",\""+d[k].id_tema+"\")'/></td>" | |
201 | + ins += "</tr></table></div>" | |
180 | 202 | } |
203 | + $i("dadosTemas").innerHTML = ins | |
204 | + for(k=0;k<nt;k++) | |
205 | + $i('codigo_'+d[k].id_tema).value = d[k].codigo_tema | |
181 | 206 | } |
182 | - ativaLegenda() | |
207 | + var cp = new cpaint(); | |
208 | + cp.set_response_type("JSON"); | |
209 | + var p = "../php/atlas.php?funcao=pegaTemas&id_prancha="+id_prancha; | |
210 | + cp.call(p,"pegaTemas",retorna); | |
183 | 211 | } |
184 | 212 | |
185 | -function alterarTemas(id_tema,id_prancha) | |
213 | +function alterarTemas(id_prancha,id_tema) | |
186 | 214 | { |
187 | - //if(confirm("Você realmente quer fazer isso?")) | |
188 | - //{ | |
189 | - var retorna = function(retorno) | |
190 | - { | |
191 | - listaTemas(retorno); | |
192 | - } | |
193 | - if (id_tema != "") | |
194 | - { | |
195 | - var codigo_tema = document.getElementById("codigo_"+id_tema).value | |
196 | - var ligado_tema = document.getElementById("ligado_"+id_tema).value | |
197 | - } | |
198 | - else | |
199 | - { | |
200 | - var id_tema = ""; | |
201 | - var codigo_tema = "" | |
202 | - var ligado_tema = "250" | |
203 | - } | |
204 | - var p = "../php/atlas.php?funcao=alterarTemas&id_prancha="+id_prancha+"&id_tema="+id_tema+"&codigo_tema="+codigo_tema+"&ligado_tema="+ligado_tema | |
205 | - cPaint.call(p,"",retorna); | |
206 | - //} | |
215 | + var retorna = function(retorno) | |
216 | + { | |
217 | + listaTemas(id_prancha); | |
218 | + } | |
219 | + if (id_tema != "") | |
220 | + { | |
221 | + var codigo_tema = document.getElementById("codigo_"+id_tema).value | |
222 | + var ligado_tema = document.getElementById("ligado_"+id_tema).value | |
223 | + var ordem_tema = document.getElementById("ordem_"+id_tema).value | |
224 | + } | |
225 | + else | |
226 | + { | |
227 | + var id_tema = ""; | |
228 | + var codigo_tema = "" | |
229 | + var ligado_tema = "" | |
230 | + var ordem_tema = 0 | |
231 | + } | |
232 | + var p = "../php/atlas.php?funcao=alterarTemas&ordem_tema="+ordem_tema+"&id_tema="+id_tema+"&codigo_tema="+codigo_tema+"&ligado_tema="+ligado_tema+"&id_prancha="+id_prancha | |
233 | + cPaint.call(p,"",retorna); | |
207 | 234 | } |
208 | 235 | function alterarPranchas(id_prancha,id_atlas) |
209 | 236 | { |
... | ... | @@ -211,7 +238,10 @@ function alterarPranchas(id_prancha,id_atlas) |
211 | 238 | //{ |
212 | 239 | var retorna = function(retorno) |
213 | 240 | { |
214 | - listaPranchas(retorno); | |
241 | + if(id_prancha == "") | |
242 | + pegaDadosAtlas(id_atlas) | |
243 | + else | |
244 | + pegaDadosPrancha(id_prancha,id_atlas); | |
215 | 245 | } |
216 | 246 | if (id_prancha != "") |
217 | 247 | { |
... | ... | @@ -222,6 +252,8 @@ function alterarPranchas(id_prancha,id_atlas) |
222 | 252 | var link_prancha = document.getElementById("linkP_"+id_prancha).value |
223 | 253 | var titulo_prancha = document.getElementById("tituloP_"+id_prancha).value |
224 | 254 | var mapext_prancha = document.getElementById("mapextP_"+id_prancha).value |
255 | + var ordem_prancha = document.getElementById("ordemP_"+id_prancha).value | |
256 | + | |
225 | 257 | } |
226 | 258 | else |
227 | 259 | { |
... | ... | @@ -231,10 +263,16 @@ function alterarPranchas(id_prancha,id_atlas) |
231 | 263 | var w_prancha = "250" |
232 | 264 | var icone_prancha = "" |
233 | 265 | var link_prancha = "" |
234 | - var titulo_prancha = ""; | |
266 | + var ordem_prancha = 0 | |
267 | + var titulo_prancha = prompt("Nome da nova prancha",""); | |
268 | + if (titulo_prancha==null || titulo_prancha=="") | |
269 | + { | |
270 | + return; | |
271 | + } | |
272 | + | |
235 | 273 | var mapext_prancha = ""; |
236 | 274 | } |
237 | - var p = "../php/atlas.php?funcao=alterarPranchas&id_atlas="+id_atlas+"&id_prancha="+id_prancha+"&titulo_prancha="+titulo_prancha+"&desc_prancha="+desc_prancha+"&h_prancha="+h_prancha+"&w_prancha="+w_prancha+"&icone_prancha="+icone_prancha+"&link_prancha="+link_prancha | |
275 | + var p = "../php/atlas.php?funcao=alterarPranchas&ordem_prancha="+ordem_prancha+"&id_atlas="+id_atlas+"&id_prancha="+id_prancha+"&titulo_prancha="+titulo_prancha+"&desc_prancha="+desc_prancha+"&h_prancha="+h_prancha+"&w_prancha="+w_prancha+"&icone_prancha="+icone_prancha+"&link_prancha="+link_prancha | |
238 | 276 | cPaint.call(p,"",retorna); |
239 | 277 | //} |
240 | 278 | } |
... | ... | @@ -245,10 +283,10 @@ function alterarAtlas(id_atlas,onde) |
245 | 283 | //{ |
246 | 284 | var retorna = function(retorno) |
247 | 285 | { |
248 | - if(id_atlas == "") | |
249 | - listaAtlas(retorno); | |
286 | + if (id_atlas == "") | |
287 | + {listaAtlas()} | |
250 | 288 | else |
251 | - {ins = "";montaAtlas(retorno,onde)} | |
289 | + pegaDadosAtlas(id_atlas); | |
252 | 290 | } |
253 | 291 | if (id_atlas != "") |
254 | 292 | { |
... | ... | @@ -262,6 +300,7 @@ function alterarAtlas(id_atlas,onde) |
262 | 300 | var template_atlas = document.getElementById("template_"+id_atlas).value |
263 | 301 | var tipoguias_atlas = document.getElementById("tipoguias_"+id_atlas).value |
264 | 302 | var basemapfile_atlas = document.getElementById("basemapfile_"+id_atlas).value |
303 | + var ordem_atlas = document.getElementById("ordematlas_"+id_atlas).value | |
265 | 304 | } |
266 | 305 | else |
267 | 306 | { |
... | ... | @@ -274,10 +313,15 @@ function alterarAtlas(id_atlas,onde) |
274 | 313 | var pranchadefault_atlas = "" |
275 | 314 | var template_atlas = "" |
276 | 315 | var tipoguias_atlas = "expandida" |
277 | - var titulo_atlas = ""; | |
316 | + var ordem_atlas = 0 | |
317 | + var titulo_atlas = prompt("Nome do novo Atlas",""); | |
318 | + if (titulo_atlas==null || titulo_atlas=="") | |
319 | + { | |
320 | + return; | |
321 | + } | |
278 | 322 | var basemapfile_atlas = ""; |
279 | 323 | } |
280 | - var p = "../php/atlas.php?funcao=alterarAtlas&id_atlas="+id_atlas+"&basemapfile_atlas="+basemapfile_atlas+"&titulo_atlas="+titulo_atlas+"&desc_atlas="+desc_atlas+"&h_atlas="+h_atlas+"&w_atlas="+w_atlas+"&icone_atlas="+icone_atlas+"&link_atlas="+link_atlas+"&pranchadefault_atlas="+pranchadefault_atlas+"&template_atlas="+template_atlas+"&tipoguias_atlas="+tipoguias_atlas | |
324 | + var p = "../php/atlas.php?funcao=alterarAtlas&ordem_atlas="+ordem_atlas+"&id_atlas="+id_atlas+"&basemapfile_atlas="+basemapfile_atlas+"&titulo_atlas="+titulo_atlas+"&desc_atlas="+desc_atlas+"&h_atlas="+h_atlas+"&w_atlas="+w_atlas+"&icone_atlas="+icone_atlas+"&link_atlas="+link_atlas+"&pranchadefault_atlas="+pranchadefault_atlas+"&template_atlas="+template_atlas+"&tipoguias_atlas="+tipoguias_atlas | |
281 | 325 | cPaint.call(p,"",retorna); |
282 | 326 | //} |
283 | 327 | } |
... | ... | @@ -301,7 +345,7 @@ function excluir(id) |
301 | 345 | cPaint.call(p,"",retorna); |
302 | 346 | } |
303 | 347 | } |
304 | -function excluirPranchas(id) | |
348 | +function excluirPranchas(id_atlas,id_prancha) | |
305 | 349 | { |
306 | 350 | if(confirm("Você realmente quer fazer isso?")) |
307 | 351 | { |
... | ... | @@ -313,24 +357,22 @@ function excluirPranchas(id) |
313 | 357 | } |
314 | 358 | else |
315 | 359 | { |
316 | - $i("resultado").innerHTML = $mensagemAguarde; | |
317 | - montaParametros() | |
360 | + pegaDadosAtlas(id_atlas) | |
318 | 361 | } |
319 | 362 | } |
320 | - var p = "../php/atlas.php?funcao=excluirPranchas&id="+id; | |
363 | + var p = "../php/atlas.php?funcao=excluirPranchas&id="+id_prancha; | |
321 | 364 | cPaint.call(p,"",retorna); |
322 | 365 | } |
323 | 366 | } |
324 | -function excluirTemas(id) | |
367 | +function excluirTemas(id_tema,id_prancha,id_atlas) | |
325 | 368 | { |
326 | 369 | if(confirm("Você realmente quer fazer isso?")) |
327 | 370 | { |
328 | - $i("resultado").innerHTML = $mensagemAguarde; | |
329 | 371 | var retorna = function() |
330 | 372 | { |
331 | - montaParametros() | |
373 | + listaTemas(id_prancha,id_atlas) | |
332 | 374 | } |
333 | - var p = "../php/atlas.php?funcao=excluirTemas&id="+id; | |
375 | + var p = "../php/atlas.php?funcao=excluirTemas&id="+id_tema; | |
334 | 376 | cPaint.call(p,"",retorna); |
335 | 377 | } |
336 | 378 | } | ... | ... |
admin/js/mapas.js
... | ... | @@ -40,9 +40,7 @@ function montaParametros() |
40 | 40 | { |
41 | 41 | if(!$i("resultado")) |
42 | 42 | {document.body.innerHTML += "<div id=resultado ></div>"} |
43 | - $i("resultado").innerHTML = $mensagemAguarde | |
44 | - var p = "../php/mapas.php?funcao=pegaMapas"; | |
45 | - cPaint.call(p,"",listaMapas); | |
43 | + listaMapas() | |
46 | 44 | } |
47 | 45 | /* |
48 | 46 | Function: listaMapas |
... | ... | @@ -51,21 +49,35 @@ Monta o html com os parametros e os divs que receberão os dados dos formulários. |
51 | 49 | |
52 | 50 | Para cada registro na variável $parameters, é montado um formulário. |
53 | 51 | */ |
54 | -function listaMapas(retorno) | |
52 | +function listaMapas() | |
55 | 53 | { |
56 | - ins = "<p><input style=font-size:10px onclick='alterarMapas(\"\",\"resultado\")' type=button value='Adicionar um novo mapa' /></p>" | |
57 | - montaMapa(retorno,"resultado") | |
54 | + $i("resultado").innerHTML = $mensagemAguarde | |
55 | + var ins = "<fieldset><legend>Mapas</legend>" | |
56 | + var comboMapas = function(retorno) | |
57 | + { | |
58 | + var d = retorno.data; | |
59 | + var nm = retorno.data.length | |
60 | + ins += "<p><table><tr><td><b>Selecione o mapa:</b></td><td></td></tr>" | |
61 | + ins += "<tr><td><input style=font-size:10px onclick='alterarMapa(\"\")' type=button value='Adicionar um novo mapa' /></td><td><select onchange='pegaDadosMapa(this.value)'>" | |
62 | + ins += "<option>---</option>" | |
63 | + for (i=0;i<nm;i++) | |
64 | + { | |
65 | + ins += "<option value='"+d[i].id_mapa+"'>"+d[i].nome_mapa+"</option>" | |
66 | + } | |
67 | + $i("resultado").innerHTML = ins+"</select></tr></table></p><p><div id='dadosMapa'></div></fieldset>" | |
68 | + } | |
69 | + var cp = new cpaint(); | |
70 | + cp.set_response_type("JSON"); | |
71 | + var p = "../php/mapas.php?funcao=pegaMapas"; | |
72 | + cp.call(p,"pegaMapas",comboMapas); | |
58 | 73 | } |
59 | -function montaMapa(retorno,onde) | |
74 | +function pegaDadosMapa(id_mapa) | |
60 | 75 | { |
61 | - var d = retorno.data; | |
62 | - var nm = retorno.data.length | |
63 | - for (i=0;i<nm;i++) | |
76 | + $i("dadosMapa").innerHTML = $mensagemAguarde | |
77 | + var retorna = function(retorno) | |
64 | 78 | { |
65 | - if(!$i(d[i].id_mapa)) | |
66 | - ins += "<div id='"+d[i].id_mapa+"' >" | |
67 | - ins += "<fieldset><legend style='background-color:white;'><b>+- "+d[i].nome_mapa+"</b></legend>" | |
68 | - ins += "<div style=display:none > <table class=lista ><tr><td></td><td></td></tr>"; | |
79 | + var d = retorno.data.mapa[0] | |
80 | + var ins = "<table class=lista ><tr><td></td><td></td></tr>"; | |
69 | 81 | var param = { |
70 | 82 | "linhas":[ |
71 | 83 | {titulo:"Nome",prefixoid:"nome_",id:"id_mapa",valor:"nome_mapa"}, |
... | ... | @@ -73,60 +85,59 @@ function montaMapa(retorno,onde) |
73 | 85 | {titulo:"Extensão",prefixoid:"ext_",id:"id_mapa",valor:"ext_mapa"}, |
74 | 86 | {titulo:"Imagem",prefixoid:"imagem_",id:"id_mapa",valor:"imagem_mapa"}, |
75 | 87 | {titulo:"Outros",prefixoid:"outros_",id:"id_mapa",valor:"outros_mapa"}, |
76 | - {titulo:"Direto",prefixoid:"linkdireto_",id:"id_mapa",valor:"linkdireto_mapa"} | |
88 | + {titulo:"Direto",prefixoid:"linkdireto_",id:"id_mapa",valor:"linkdireto_mapa"}, | |
89 | + {titulo:"Ordem",prefixoid:"ordem_",id:"id_mapa",valor:"ordem_mapa"} | |
77 | 90 | ] |
78 | 91 | } |
79 | - ins += (geraLinhas(d[i],param,3)); | |
92 | + ins += (geraLinhas(d,param,3)); | |
80 | 93 | ins += "<tr>" |
81 | 94 | ins += "<td>Temas: </td>" |
82 | - ins += "<td><input size=30 onchange='this.style.color=\"blue\"' type=text id='temas_"+d[i].id_mapa+"' value='"+d[i].temas_mapa+"' /></td>" | |
83 | - ins += "<td><select onchange='adicionaTema(\""+d[i].id_mapa+"\",this.value)'>" | |
95 | + ins += "<td><input size=30 onchange='this.style.color=\"blue\"' type=text id='temas_"+d.id_mapa+"' value='"+d.temas_mapa+"' /></td>" | |
96 | + ins += "<td><select onchange='adicionaTema(\""+d.id_mapa+"\",this.value)'>" | |
84 | 97 | ins += comboObjeto($temas,"codigo_tema","nome_tema","") |
85 | 98 | ins += "</select>" |
86 | 99 | ins += "</td>" |
87 | - ins += "</tr>" | |
88 | - | |
100 | + ins += "</tr>" | |
89 | 101 | ins += "<tr>" |
90 | 102 | ins += "<td>Perfis: </td>" |
91 | - ins += "<td><input size=30 onchange='this.style.color=\"blue\"' type=text id='perfis_"+d[i].id_mapa+"' value='"+d[i].perfil_mapa+"' /></td>" | |
92 | - var idtemp = "perfis_"+d[i].id_mapa | |
103 | + ins += "<td><input size=30 onchange='this.style.color=\"blue\"' type=text id='perfis_"+d.id_mapa+"' value='"+d.perfil_mapa+"' /></td>" | |
104 | + var idtemp = "perfis_"+d.id_mapa | |
93 | 105 | ins += "<td><select onchange=\"registraPerfil('"+idtemp+"',this.value);this.style.color='blue'\" >" |
94 | 106 | ins += comboObjeto($perfis,"perfil","perfil","") |
95 | 107 | ins += "</select></td></tr>" |
96 | - | |
97 | 108 | ins += "</select>" |
98 | 109 | ins += "</td>" |
99 | 110 | ins += "</tr>" |
100 | - | |
101 | - | |
102 | - | |
103 | 111 | ins += "<tr>" |
104 | 112 | ins += "<td>Ligados: </td>" |
105 | - ins += "<td><input size=30 onchange='this.style.color=\"blue\"' type=text id='ligados_"+d[i].id_mapa+"' value='"+d[i].ligados_mapa+"' /></td>" | |
113 | + ins += "<td><input size=30 onchange='this.style.color=\"blue\"' type=text id='ligados_"+d.id_mapa+"' value='"+d.ligados_mapa+"' /></td>" | |
106 | 114 | ins += "</tr>" |
107 | 115 | ins += "</table>" |
108 | - ins += "<table><tr><td><div class=excluir title='Excluir' onclick='excluir(\""+d[i].id_mapa+"\")'/></td>" | |
109 | - ins += "<td><div class=aplicar title='Aplicar alterações' onclick='alterarMapas(\""+d[i].id_mapa+"\",\""+d[i].id_mapa+"\")'/></td>" | |
116 | + ins += "<table><tr><td><div class=excluir title='Excluir' onclick='excluir(\""+d.id_mapa+"\")'/></td>" | |
117 | + ins += "<td><div class=aplicar title='Aplicar alterações' onclick='alterarMapa(\""+d.id_mapa+"\",\""+d.id_mapa+"\")'/></td>" | |
110 | 118 | ins += "</tr></table>" |
111 | - if(d[i].linkdireto_mapa != "") | |
112 | - {var l = d[i].linkdireto_mapa;} | |
119 | + if(d.linkdireto_mapa != "") | |
120 | + {var l = d.linkdireto_mapa;} | |
113 | 121 | else |
114 | 122 | { |
115 | - var l = "../ms_criamapa.php?temasa="+d[i].temas_mapa+"&layers="+d[i].ligados_mapa | |
116 | - if (d[i].ext_mapa != "") | |
117 | - {l += "&mapext="+d[i].ext_mapa} | |
118 | - if (d[i].outros_mapa != "") | |
119 | - {l += "&"+d[i].outros_mapa} | |
123 | + var l = "../ms_criamapa.php?temasa="+d.temas_mapa+"&layers="+d.ligados_mapa | |
124 | + if (d.ext_mapa != "") | |
125 | + {l += "&mapext="+d.ext_mapa} | |
126 | + if (d.outros_mapa != "") | |
127 | + {l += "&"+d.outros_mapa} | |
120 | 128 | } |
121 | 129 | ins += "<br>Testar: <a href='"+l+"' target=blank >"+l+"</a>" |
122 | - if(d[i].imagem_mapa != "") | |
123 | - ins += "<br><img src='"+d[i].imagem_mapa+"' />" | |
130 | + if(d.imagem_mapa != "") | |
131 | + ins += "<br><img src='"+d.imagem_mapa+"' />" | |
124 | 132 | ins += "</div></fieldset><br>" |
125 | - if(!$i(d[i].id_mapa)) | |
133 | + if(!$i(d.id_mapa)) | |
126 | 134 | ins += "</div>" |
135 | + $i("dadosMapa").innerHTML = ins | |
127 | 136 | } |
128 | - $i(onde).innerHTML = ins | |
129 | - ativaLegenda() | |
137 | + var cp = new cpaint(); | |
138 | + cp.set_response_type("JSON"); | |
139 | + var p = "../php/mapas.php?funcao=pegaDadosMapa&id_mapa="+id_mapa; | |
140 | + cp.call(p,"pegaDadosMapa",retorna); | |
130 | 141 | } |
131 | 142 | function adicionaTema(id,codigo) |
132 | 143 | { |
... | ... | @@ -136,7 +147,7 @@ function adicionaTema(id,codigo) |
136 | 147 | else |
137 | 148 | $i("temas_"+id).value += " "+codigo |
138 | 149 | } |
139 | -function alterarMapas(id_mapa,onde) | |
150 | +function alterarMapa(id_mapa,onde) | |
140 | 151 | { |
141 | 152 | //if(confirm("Você realmente quer fazer isso?")) |
142 | 153 | //{ |
... | ... | @@ -145,7 +156,7 @@ function alterarMapas(id_mapa,onde) |
145 | 156 | if(id_mapa == "") |
146 | 157 | listaMapas(retorno); |
147 | 158 | else |
148 | - {ins = "";montaMapa(retorno,onde)} | |
159 | + {ins = "";pegaDadosMapa(id_mapa)} | |
149 | 160 | } |
150 | 161 | if (id_mapa != "") |
151 | 162 | { |
... | ... | @@ -157,14 +168,20 @@ function alterarMapas(id_mapa,onde) |
157 | 168 | var linkdireto = $i("linkdireto_"+id_mapa).value |
158 | 169 | var temas = $i("temas_"+id_mapa).value |
159 | 170 | var ligados = $i("ligados_"+id_mapa).value |
160 | - var perfil = $i("perfil_"+id_mapa).value | |
171 | + var perfil = $i("perfis_"+id_mapa).value | |
172 | + var ordem_mapa = $i("ordem_"+id_mapa).value | |
161 | 173 | } |
162 | 174 | else |
163 | 175 | { |
164 | 176 | var id_mapa = ""; |
165 | 177 | var perfil = ""; |
178 | + var nome = prompt("Nome do novo Mapa",""); | |
179 | + if (nome==null || nome=="") | |
180 | + { | |
181 | + return; | |
182 | + } | |
166 | 183 | } |
167 | - var p = "../php/mapas.php?funcao=alterarMapas&id_mapa="+id_mapa+"&nome="+nome+"&desc="+desc+"&ext="+ext+"&imagem="+imagem+"&outros="+outros+"&linkdireto="+linkdireto+"&temas="+temas+"&ligados="+ligados+"&perfil="+perfil | |
184 | + var p = "../php/mapas.php?funcao=alterarMapa&ordem_mapa="+ordem_mapa+"&id_mapa="+id_mapa+"&nome="+nome+"&desc="+desc+"&ext="+ext+"&imagem="+imagem+"&outros="+outros+"&linkdireto="+linkdireto+"&temas="+temas+"&ligados="+ligados+"&perfil="+perfil | |
168 | 185 | cPaint.call(p,"",retorna); |
169 | 186 | //} |
170 | 187 | } | ... | ... |
admin/php/atlas.php
... | ... | @@ -40,29 +40,40 @@ switch ($funcao) |
40 | 40 | break; |
41 | 41 | |
42 | 42 | case "pegaAtlas": |
43 | - $sis = dadosAtlas(); | |
44 | - $cp->set_data($sis); | |
43 | + $cp->set_data(pegaDados('SELECT id_atlas,titulo_atlas from i3geoadmin_atlas order by ordem_atlas')); | |
44 | + $cp->return_data(); | |
45 | + break; | |
46 | + | |
47 | + case "pegaDadosAtlas": | |
48 | + $dadosAtlas = pegaDados('SELECT * from i3geoadmin_atlas where id_atlas ='.$id_atlas); | |
49 | + $pranchas = pegaDados("SELECT id_prancha,titulo_prancha from i3geoadmin_atlasp where id_atlas = $id_atlas order by ordem_prancha"); | |
50 | + $cp->set_data(array("atlas"=>$dadosAtlas,"pranchas"=>$pranchas)); | |
51 | + $cp->return_data(); | |
52 | + break; | |
53 | + | |
54 | + case "pegaTemas": | |
55 | + $cp->set_data(pegaDados("SELECT * from i3geoadmin_atlast where id_prancha = '$id_prancha' order by ordem_tema")); | |
45 | 56 | $cp->return_data(); |
46 | 57 | break; |
47 | 58 | |
48 | 59 | case "alterarAtlas": |
49 | - alterarAtlas(); | |
50 | - $sis = dadosAtlas(); | |
51 | - $cp->set_data($sis); | |
60 | + $cp->set_data(alterarAtlas()); | |
61 | + $cp->return_data(); | |
62 | + break; | |
63 | + | |
64 | + case "pegaDadosPranchas": | |
65 | + $dadosPrancha = pegaDados("SELECT * from i3geoadmin_atlasp where id_atlas ='$id_atlas' and id_prancha = '$id_prancha'"); | |
66 | + $cp->set_data(array("prancha"=>$dadosPrancha)); | |
52 | 67 | $cp->return_data(); |
53 | 68 | break; |
54 | 69 | |
55 | 70 | case "alterarPranchas": |
56 | - alterarPranchas(); | |
57 | - $sis = dadosAtlas(); | |
58 | - $cp->set_data($sis); | |
71 | + $cp->set_data(alterarPranchas()); | |
59 | 72 | $cp->return_data(); |
60 | 73 | break; |
61 | 74 | |
62 | 75 | case "alterarTemas": |
63 | - alterarTemas(); | |
64 | - $sis = dadosAtlas(); | |
65 | - $cp->set_data($sis); | |
76 | + $cp->set_data(alterarTemas()); | |
66 | 77 | $cp->return_data(); |
67 | 78 | break; |
68 | 79 | |
... | ... | @@ -123,17 +134,16 @@ function dadosAtlas() |
123 | 134 | } |
124 | 135 | function alterarAtlas() |
125 | 136 | { |
126 | - global $id_atlas,$basemapfile_atlas,$desc_atlas,$h_atlas,$w_atlas,$icone_atlas,$link_atlas,$pranchadefault_atlas,$template_atlas,$tipoguias_atlas,$titulo_atlas; | |
127 | - | |
137 | + global $id_atlas,$basemapfile_atlas,$desc_atlas,$h_atlas,$w_atlas,$icone_atlas,$link_atlas,$pranchadefault_atlas,$template_atlas,$tipoguias_atlas,$titulo_atlas,$ordem_atlas; | |
128 | 138 | try |
129 | 139 | { |
130 | - $desc_atlas = mb_convert_encoding($desc_atlas,"UTF-8","ISO-8859-1"); | |
131 | - $titulo_atlas = mb_convert_encoding($titulo_atlas,"UTF-8","ISO-8859-1"); | |
140 | + //$desc_atlas = mb_convert_encoding($desc_atlas,"UTF-8","ISO-8859-1"); | |
141 | + //$titulo_atlas = mb_convert_encoding($titulo_atlas,"UTF-8","ISO-8859-1"); | |
132 | 142 | include("conexao.php"); |
133 | 143 | if($id_atlas != "") |
134 | - $dbhw->query("UPDATE i3geoadmin_atlas SET basemapfile_atlas='$basemapfile_atlas',desc_atlas='$desc_atlas',h_atlas='$h_atlas',w_atlas='$w_atlas',icone_atlas='$icone_atlas',link_atlas='$link_atlas',pranchadefault_atlas='$pranchadefault_atlas',template_atlas='$template_atlas',tipoguias_atlas='$tipoguias_atlas',titulo_atlas='$titulo_atlas' WHERE id_atlas = $id_atlas"); | |
144 | + $dbhw->query("UPDATE i3geoadmin_atlas SET ordem_atlas='$ordem_atlas',basemapfile_atlas='$basemapfile_atlas',desc_atlas='$desc_atlas',h_atlas='$h_atlas',w_atlas='$w_atlas',icone_atlas='$icone_atlas',link_atlas='$link_atlas',pranchadefault_atlas='$pranchadefault_atlas',template_atlas='$template_atlas',tipoguias_atlas='$tipoguias_atlas',titulo_atlas='$titulo_atlas' WHERE id_atlas = $id_atlas"); | |
135 | 145 | else |
136 | - $dbhw->query("INSERT INTO i3geoadmin_atlas (basemapfile_atlas,desc_atlas,h_atlas,w_atlas,icone_atlas,link_atlas,pranchadefault_atlas,template_atlas,tipoguias_atlas,titulo_atlas) VALUES ('','','$h_atlas','$w_atlas','','','','','$tipoguias_atlas','')"); | |
146 | + $dbhw->query("INSERT INTO i3geoadmin_atlas (ordem_atlas,basemapfile_atlas,desc_atlas,h_atlas,w_atlas,icone_atlas,link_atlas,pranchadefault_atlas,template_atlas,tipoguias_atlas,titulo_atlas) VALUES ('','','',null,null,'','','','','$tipoguias_atlas','$titulo_atlas')"); | |
137 | 147 | $dbhw = null; |
138 | 148 | $dbh = null; |
139 | 149 | return "ok"; |
... | ... | @@ -145,16 +155,16 @@ function alterarAtlas() |
145 | 155 | } |
146 | 156 | function alterarPranchas() |
147 | 157 | { |
148 | - global $mapext_prancha,$id_atlas,$id_prancha,$desc_prancha,$h_prancha,$w_prancha,$icone_prancha,$link_prancha,$titulo_prancha; | |
158 | + global $mapext_prancha,$id_atlas,$id_prancha,$desc_prancha,$h_prancha,$w_prancha,$icone_prancha,$link_prancha,$titulo_prancha,$ordem_prancha; | |
149 | 159 | try |
150 | 160 | { |
151 | 161 | $desc_prancha = mb_convert_encoding($desc_prancha,"UTF-8","ISO-8859-1"); |
152 | 162 | $titulo_prancha = mb_convert_encoding($titulo_prancha,"UTF-8","ISO-8859-1"); |
153 | 163 | include("conexao.php"); |
154 | 164 | if($id_prancha != "") |
155 | - $dbhw->query("UPDATE i3geoadmin_atlasp SET mapext_prancha='$mapext_prancha',desc_prancha='$desc_prancha',h_prancha='$h_prancha',w_prancha='$w_prancha',icone_prancha='$icone_prancha',link_prancha='$link_prancha',titulo_prancha='$titulo_prancha' WHERE id_prancha = $id_prancha and id_atlas='$id_atlas'"); | |
165 | + $dbhw->query("UPDATE i3geoadmin_atlasp SET ordem_prancha='$ordem_prancha', mapext_prancha='$mapext_prancha',desc_prancha='$desc_prancha',h_prancha='$h_prancha',w_prancha='$w_prancha',icone_prancha='$icone_prancha',link_prancha='$link_prancha',titulo_prancha='$titulo_prancha' WHERE id_prancha = $id_prancha and id_atlas='$id_atlas'"); | |
156 | 166 | else |
157 | - $dbhw->query("INSERT INTO i3geoadmin_atlasp (mapext_prancha,desc_prancha,h_prancha,w_prancha,icone_prancha,link_prancha,titulo_prancha,id_atlas) VALUES ('','','$h_prancha','$w_prancha','','','','$id_atlas')"); | |
167 | + $dbhw->query("INSERT INTO i3geoadmin_atlasp (ordem_prancha,mapext_prancha,desc_prancha,h_prancha,w_prancha,icone_prancha,link_prancha,titulo_prancha,id_atlas) VALUES ('','','','$h_prancha','$w_prancha','','','$titulo_prancha','$id_atlas')"); | |
158 | 168 | $dbhw = null; |
159 | 169 | $dbh = null; |
160 | 170 | return "ok"; |
... | ... | @@ -166,14 +176,14 @@ function alterarPranchas() |
166 | 176 | } |
167 | 177 | function alterarTemas() |
168 | 178 | { |
169 | - global $id_tema,$id_prancha,$codigo_tema,$ligado_tema; | |
179 | + global $id_tema,$id_prancha,$codigo_tema,$ligado_tema,$ordem_tema; | |
170 | 180 | try |
171 | 181 | { |
172 | 182 | include("conexao.php"); |
173 | 183 | if($id_tema != "") |
174 | - $dbhw->query("UPDATE i3geoadmin_atlast SET codigo_tema='$codigo_tema',ligado_tema='$ligado_tema' WHERE id_prancha = $id_prancha and id_tema='$id_tema'"); | |
184 | + $dbhw->query("UPDATE i3geoadmin_atlast SET ordem_tema='$ordem_tema',codigo_tema='$codigo_tema',ligado_tema='$ligado_tema' WHERE id_prancha = $id_prancha and id_tema='$id_tema'"); | |
175 | 185 | else |
176 | - $dbhw->query("INSERT INTO i3geoadmin_atlast (codigo_tema,ligado_tema,id_prancha) VALUES ('','','$id_prancha')"); | |
186 | + $dbhw->query("INSERT INTO i3geoadmin_atlast (ordem_tema,codigo_tema,ligado_tema,id_prancha) VALUES ('','','','$id_prancha')"); | |
177 | 187 | $dbhw = null; |
178 | 188 | $dbh = null; |
179 | 189 | return "ok"; |
... | ... | @@ -248,6 +258,7 @@ function importarXmlAtlas() |
248 | 258 | $resultado = $q->fetchAll(); |
249 | 259 | foreach($resultado as $r) |
250 | 260 | {$atlasExistentes[$r["titulo_atlas"]] = 0;} |
261 | + $contaAtlas = 0; | |
251 | 262 | foreach($xml->ATLAS as $atlas) |
252 | 263 | { |
253 | 264 | $titulo = ixml($atlas,"TITULO"); |
... | ... | @@ -262,11 +273,13 @@ function importarXmlAtlas() |
262 | 273 | $pranchadefault = ixml($atlas,"PRANCHADEFAULT"); |
263 | 274 | $tipoguias = ixml($atlas,"TIPOGUIAS"); |
264 | 275 | if(!isset($atlasExistentes[$titulo])) |
265 | - $dbhw->query("INSERT INTO i3geoadmin_atlas (desc_atlas,h_atlas,w_atlas,icone_atlas,link_atlas,pranchadefault_atlas,template_atlas,tipoguias_atlas,titulo_atlas) VALUES ('$desc',$h,$w,'$icone','$link','$pranchadefault','$template','$tipoguias','$titulo')"); | |
276 | + $dbhw->query("INSERT INTO i3geoadmin_atlas (desc_atlas,h_atlas,w_atlas,icone_atlas,link_atlas,pranchadefault_atlas,template_atlas,tipoguias_atlas,titulo_atlas,ordem_atlas) VALUES ('$desc',$h,$w,'$icone','$link','$pranchadefault','$template','$tipoguias','$titulo',$contaAtlas)"); | |
266 | 277 | $atlasExistentes[$titulo] = 0; |
267 | 278 | $id_atlas = $dbhw->query("SELECT id_atlas FROM i3geoadmin_atlas"); |
268 | 279 | $id_atlas = $id_atlas->fetchAll(); |
269 | 280 | $id_atlas = intval($id_atlas[count($id_atlas)-1]['id_atlas']); |
281 | + $contaAtlas++; | |
282 | + $contaPrancha = 0; | |
270 | 283 | foreach ($atlas->PRANCHAS->PRANCHA as $prancha) |
271 | 284 | { |
272 | 285 | $titulo = ixml($prancha,"TITULO"); |
... | ... | @@ -278,15 +291,18 @@ function importarXmlAtlas() |
278 | 291 | if($w == ""){$w = 'null';} |
279 | 292 | if($h == ""){$h = 'null';} |
280 | 293 | $mapext = ixml($prancha,"MAPEXT"); |
281 | - $dbhw->query("INSERT INTO i3geoadmin_atlasp (id_atlas,desc_prancha,h_prancha,w_prancha,icone_prancha,link_prancha,titulo_prancha,mapext_prancha) VALUES ('$id_atlas','$desc',$h,$w,'$icone','$link','$titulo','$mapext')"); | |
294 | + $dbhw->query("INSERT INTO i3geoadmin_atlasp (id_atlas,desc_prancha,h_prancha,w_prancha,icone_prancha,link_prancha,titulo_prancha,mapext_prancha,ordem_prancha) VALUES ('$id_atlas','$desc',$h,$w,'$icone','$link','$titulo','$mapext',$contaPrancha)"); | |
282 | 295 | $id_prancha = $dbhw->query("SELECT id_prancha FROM i3geoadmin_atlasp"); |
283 | 296 | $id_prancha = $id_prancha->fetchAll(); |
284 | 297 | $id_prancha = intval($id_prancha[count($id_prancha)-1]['id_prancha']); |
298 | + $contaPrancha++; | |
299 | + $contaTema = 0; | |
285 | 300 | foreach ($prancha->TEMAS->TEMA as $tema) |
286 | 301 | { |
287 | 302 | $codigo = ixml($tema,"CODIGO"); |
288 | 303 | $ligado = ixml($tema,"LIGADO"); |
289 | - $dbhw->query("INSERT INTO i3geoadmin_atlast (id_prancha,codigo_tema,ligado_tema) VALUES ('$id_prancha','$codigo','$ligado')"); | |
304 | + $dbhw->query("INSERT INTO i3geoadmin_atlast (id_prancha,codigo_tema,ligado_tema,ordem_tema) VALUES ('$id_prancha','$codigo','$ligado',$contaTema)"); | |
305 | + $contaTema++; | |
290 | 306 | } |
291 | 307 | } |
292 | 308 | } | ... | ... |
admin/php/mapas.php
... | ... | @@ -39,16 +39,18 @@ switch ($funcao) |
39 | 39 | break; |
40 | 40 | |
41 | 41 | case "pegaMapas": |
42 | - $cp->set_data(pegaDados('SELECT * from i3geoadmin_mapas order by nome_mapa')); | |
42 | + $cp->set_data(pegaDados('SELECT id_mapa,nome_mapa from i3geoadmin_mapas order by ordem_mapa')); | |
43 | 43 | $cp->return_data(); |
44 | 44 | break; |
45 | - | |
46 | - case "alterarMapas": | |
47 | - alterarMapas(); | |
48 | - if($id_mapa == "") | |
49 | - $cp->set_data(pegaDados('SELECT * from i3geoadmin_mapas')); | |
50 | - else | |
51 | - $cp->set_data(pegaDados('SELECT * from i3geoadmin_mapas WHERE id_mapa = '.$id_mapa)); | |
45 | + | |
46 | + case "pegaDadosMapa": | |
47 | + $dadosMapa = pegaDados('SELECT * from i3geoadmin_mapas where id_mapa ='.$id_mapa); | |
48 | + $cp->set_data(array("mapa"=>$dadosMapa)); | |
49 | + $cp->return_data(); | |
50 | + break; | |
51 | + | |
52 | + case "alterarMapa": | |
53 | + $cp->set_data(alterarMapa()); | |
52 | 54 | $cp->return_data(); |
53 | 55 | break; |
54 | 56 | |
... | ... | @@ -67,18 +69,18 @@ Function: alterarMapas |
67 | 69 | |
68 | 70 | Altera o registro de um mapa |
69 | 71 | */ |
70 | -function alterarMapas() | |
72 | +function alterarMapa() | |
71 | 73 | { |
72 | - global $id_mapa,$desc,$ext,$imagem,$outros,$nome,$linkdireto,$temas,$ligados,$perfil; | |
74 | + global $ordem_mapa,$id_mapa,$desc,$ext,$imagem,$outros,$nome,$linkdireto,$temas,$ligados,$perfil; | |
73 | 75 | try |
74 | 76 | { |
75 | - $nome = mb_convert_encoding($nome,"UTF-8","ISO-8859-1"); | |
76 | - $desc = mb_convert_encoding($desc,"UTF-8","ISO-8859-1"); | |
77 | + //$nome = mb_convert_encoding($nome,"UTF-8","ISO-8859-1"); | |
78 | + //$desc = mb_convert_encoding($desc,"UTF-8","ISO-8859-1"); | |
77 | 79 | require_once("conexao.php"); |
78 | 80 | if($id_mapa != "") |
79 | - $dbhw->query("UPDATE i3geoadmin_mapas SET desc_mapa = '$desc',ext_mapa = '$ext',imagem_mapa = '$imagem',outros_mapa = '$outros',nome_mapa = '$nome', linkdireto_mapa = '$linkdireto',temas_mapa = '$temas',ligados_mapa = '$ligados',perfil_mapa = '$perfil' WHERE id_mapa = $id_mapa"); | |
81 | + $dbhw->query("UPDATE i3geoadmin_mapas SET ordem_mapa='$ordem_mapa',desc_mapa = '$desc',ext_mapa = '$ext',imagem_mapa = '$imagem',outros_mapa = '$outros',nome_mapa = '$nome', linkdireto_mapa = '$linkdireto',temas_mapa = '$temas',ligados_mapa = '$ligados',perfil_mapa = '$perfil' WHERE id_mapa = $id_mapa"); | |
80 | 82 | else |
81 | - $dbhw->query("INSERT INTO i3geoadmin_mapas (perfil_mapa,desc_mapa,ext_mapa,imagem_mapa,linkdireto_mapa,nome_mapa,outros_mapa,temas_mapa,ligados_mapa) VALUES ('','','','','','','','','')"); | |
83 | + $dbhw->query("INSERT INTO i3geoadmin_mapas (ordem_mapa,perfil_mapa,desc_mapa,ext_mapa,imagem_mapa,linkdireto_mapa,outros_mapa,temas_mapa,ligados_mapa,nome_mapa) VALUES ('','','','','','','','','','$nome')"); | |
82 | 84 | $dbhw = null; |
83 | 85 | $dbh = null; |
84 | 86 | return "ok"; | ... | ... |
admin/php/menutemas.php
... | ... | @@ -88,6 +88,11 @@ switch ($funcao) |
88 | 88 | $cp->return_data(); |
89 | 89 | break; |
90 | 90 | |
91 | + case "pegaTemas2": | |
92 | + $cp->set_data(pegaTemas2()); | |
93 | + $cp->return_data(); | |
94 | + break; | |
95 | + | |
91 | 96 | case "alteraTemas": |
92 | 97 | $cp->set_data(alteraTemas()); |
93 | 98 | $cp->return_data(); |
... | ... | @@ -252,6 +257,41 @@ function pegaTemas() |
252 | 257 | return "Error!: " . $e->getMessage(); |
253 | 258 | } |
254 | 259 | } |
260 | +function pegaTemas2() | |
261 | +{ | |
262 | + global $filtro; | |
263 | + try | |
264 | + { | |
265 | + $resultado = array(); | |
266 | + require_once("conexao.php"); | |
267 | + foreach($dbh->query('SELECT codigo_tema,nome_tema from i3geoadmin_temas order by nome_tema') as $row) | |
268 | + { | |
269 | + $continua = true; | |
270 | + if(isset($filtro) && $filtro != "") | |
271 | + { | |
272 | + $continua = false; | |
273 | + if ($row['codigo_tema'] == $filtro) | |
274 | + {$continua = true;} | |
275 | + $testanome = mb_convert_encoding($filtro,"UTF-8","ISO-8859-1"); | |
276 | + if (!stristr($row['nome_tema'],$testanome) === FALSE) | |
277 | + {$continua = true;} | |
278 | + } | |
279 | + if($row['codigo_tema'] == ""){$continua = true;} | |
280 | + if ($continua) | |
281 | + $resultado[] = array( | |
282 | + "nome_tema"=>$row['nome_tema'], | |
283 | + "codigo_tema"=>$row['codigo_tema'] | |
284 | + ); | |
285 | + } | |
286 | + $dbh = null; | |
287 | + $dbh = null; | |
288 | + return $resultado; | |
289 | + } | |
290 | + catch (PDOException $e) | |
291 | + { | |
292 | + return "Error!: " . $e->getMessage(); | |
293 | + } | |
294 | +} | |
255 | 295 | |
256 | 296 | /* |
257 | 297 | Function: pegaSubXGrupos | ... | ... |