From e7ecdaed22d3c429773b252d5661490f5a80e325 Mon Sep 17 00:00:00 2001 From: Edmar Moretti Date: Fri, 14 Nov 2008 12:25:19 +0000 Subject: [PATCH] Adaptação para uso com múltiplos menus --- mobile/adicionatema.php | 35 +++++++++++++++++++++-------------- mobile/index.php | 3 ++- 2 files changed, 23 insertions(+), 15 deletions(-) diff --git a/mobile/adicionatema.php b/mobile/adicionatema.php index d47c33d..2bed1bf 100644 --- a/mobile/adicionatema.php +++ b/mobile/adicionatema.php @@ -70,6 +70,7 @@ h1 +
pegaListaDeTemas($grupo,$subgrupo,""); + $m = new Menutemas("","",$locsistemas,$locaplic,$menutemas,$urli3geo,$editores); + $r = $m->pegaListaDeTemas($grupo,$subgrupo,$idmenu); echo "

Escolha o tema:

"; foreach($r as $l) { @@ -100,23 +101,28 @@ if($tipo == "adicionatema") } if ($tipo == "adicionar") { - $m = new Menutemas("","",$locsistemas,$locaplic,$menutemas,$urli3geo); - $r = $m->pegaListaDeGrupos("","","sim"); echo "

Escolha o sub-grupo:

"; - for($rid=0;$ridpegaListaDeMenus(); + foreach ($menus as $menu) { - $g = $r[$rid]; - echo $g["nome"]."
"; - $sub = $g["subgrupos"]; - for($sid=0;$sid".$s["nome"]."
"; + $r = $m->pegaListaDeGrupos($menu["idmenu"],"","sim"); + for($rid=0;$rid"; + $sub = $g["subgrupos"]; + for($sid=0;$sid".$s["nome"]."
"; + } + } } } } - - ?>
@@ -127,11 +133,12 @@ function retorno() document.getElementById('f').action = 'mobile.php'; document.getElementById('f').submit(); } -function listatemas(grupo,sub) +function listatemas(grupo,sub,menu) { document.getElementById("tipo").value = "listatemas"; document.getElementById("grupo").value = grupo; document.getElementById("subgrupo").value = sub; + document.getElementById("idmenu").value = menu; document.getElementById('f').submit(); } function adicionatema(tid) diff --git a/mobile/index.php b/mobile/index.php index dbf89c8..ef99b40 100644 --- a/mobile/index.php +++ b/mobile/index.php @@ -69,7 +69,8 @@ include("../ms_configura.php"); echo $tituloInstituicao; if (!isset($temasa)){$temasa = "";} if (!isset($layers)){$layers = $temasa;} -$m = new Menutemas($tmpfname,""); +error_reporting(E_ALL); +$m = new Menutemas("","","",$locaplic,$menutemas,"",$editores); $mapas = $m->pegaListaDeMapas($locmapas); echo "

Escolha um dos mapas:

"; foreach($mapas["mapas"] as $obj) -- libgit2 0.21.2