diff --git a/www/pages/hauptmenu.php b/www/pages/hauptmenu.php index 4d624dc5..234927b0 100644 --- a/www/pages/hauptmenu.php +++ b/www/pages/hauptmenu.php @@ -1,96 +1,89 @@ +app = &$app; + + $this->app->ActionHandlerInit($this); + + $this->app->ActionHandler("list", "HauptmenuList"); + + $this->app->ActionHandlerListen($app); + $this->app->Tpl->Set('UEBERSCHRIFT', "Hauptmenü"); + } + + function HauptmenuList() { + +//this->WFconf[menu][mitarbeiter] + $menu = $this->app->Conf->WFconf['menu'][$this->app->User->GetType()]; + $this->app->Tpl->Add('PAGE', ""); + + $spalten_anzahl = 5; + + $i = 0; + + if (!is_null($menu)) { + + if (count($menu) > 0) { + foreach ($menu as $key => $value) { + $i++; + if ($value[first][2] != "") +// $this->app->Tpl->Set(FIRSTNAV,' href="index.php?module='.$value[first][1].'&action='.$value[first][2].'" + $this->app->Tpl->Set('FIRSTNAV', ' + + >' . $value['first'][0] . ''); + else + $this->app->Tpl->Set('FIRSTNAV', ' href="index.php?module=' . $value['first'][1] . '" + >' . $value['first'][0] . ''); + + $this->app->Tpl->Add('PAGE', ""); + if ($spalten % $spalten_anzahl == 0) { + $this->app->Tpl->Add('PAGE', ""); + } + } + } + } + } + $restliche_td = $spalten % $spalten_anzahl; + + for ($i = 0; $i < $restliche_td; $i++) + $this->app->Tpl->Add('PAGE', ""); + $this->app->Tpl->Add('PAGE', "
"); + $this->app->Tpl->Parse('PAGE', 'firstnav.tpl'); + $spalten++; + if (count($value['sec']) > 0) { + $this->app->Tpl->Add('PAGE', '
    '); + foreach ($value['sec'] as $secnav) { + if ($secnav[2] != "") + $this->app->Tpl->Set('SECNAV', ' href="index.php?module=' . $secnav[1] . '&action=' . $secnav[2] . '" + >' . $secnav[0] . ''); + else + $this->app->Tpl->Set('SECNAV', ' href="index.php?module=' . $secnav[1] . '">' . $secnav[0] . ''); + + $this->app->Tpl->Parse('PAGE', 'secnav.tpl'); + } + $this->app->Tpl->Add('PAGE', "
"); + } + +} + ?> -app=&$app; - - - $this->app->ActionHandlerInit($this); - - $this->app->ActionHandler("list","HauptmenuList"); - - - $this->app->ActionHandlerListen($app); - $this->app->Tpl->Set('UEBERSCHRIFT',"Hauptmenü"); - - } - - - - function HauptmenuList() - { - -//this->WFconf[menu][mitarbeiter] - $menu = $this->app->Conf->WFconf['menu'][$this->app->User->GetType()]; - $this->app->Tpl->Add('PAGE',""); - - $spalten_anzahl = 5; - - $i=0; - if(count($menu)>0){ - foreach($menu as $key=>$value){ - $i++; - if($value[first][2]!="") -// $this->app->Tpl->Set(FIRSTNAV,' href="index.php?module='.$value[first][1].'&action='.$value[first][2].'" - $this->app->Tpl->Set('FIRSTNAV',' - - >'.$value['first'][0].''); - else - $this->app->Tpl->Set('FIRSTNAV',' href="index.php?module='.$value['first'][1].'" - >'.$value['first'][0].''); - - $this->app->Tpl->Add('PAGE',""); - if($spalten % $spalten_anzahl == 0) - { - $this->app->Tpl->Add('PAGE',""); - } - } - } - } - $restliche_td = $spalten % $spalten_anzahl; - - for($i=0;$i<$restliche_td;$i++) - $this->app->Tpl->Add('PAGE',""); - $this->app->Tpl->Add('PAGE',"
"); - $this->app->Tpl->Parse('PAGE','firstnav.tpl'); - $spalten++; - if(count($value['sec'])>0){ - $this->app->Tpl->Add('PAGE','
    '); - foreach($value['sec'] as $secnav){ - if($secnav[2]!="") - $this->app->Tpl->Set('SECNAV',' href="index.php?module='.$secnav[1].'&action='.$secnav[2].'" - >'.$secnav[0].''); - else - $this->app->Tpl->Set('SECNAV',' href="index.php?module='.$secnav[1].'">'.$secnav[0].''); - - $this->app->Tpl->Parse('PAGE','secnav.tpl'); - } - $this->app->Tpl->Add('PAGE',"
"); - - - - } - - - - - -} - -?>