- my ($menu, $level) = @_;
- # build tiered menus
- my @menuorder = $menu->access_control(\%myconfig, $level);
- while (@menuorder) {
- $item = shift @menuorder;
- $label = $item;
- $ml = $item;
- $label =~ s/$level--//g;
- $ml=~ s/--.*//;
- if ($ml eq $mainlevel) { $zeige=1; } else { $zeige=0; };
- my $spacer = " " x (($item =~ s/--/--/g) * 1);
- $label =~ s/.*--//g;
- $label_icon = $label.".gif";
- $mlab = $label;
- $label = $locale->text($label);
- $label =~ s/ / /g;
- $menu->{$item}{target} = "main_window" unless $menu->{$item}{target};
- if ($menu->{$item}{submenu}) {
- $menu->{$item}{$item} = !$form->{$item};
- if ($form->{level} && $item =~ /^$form->{level}/) {
- # expand menu
- if ($zeige) { print qq|<tr><td valign=bottom><b>$spacer<img src="image/unterpunkt.png">$label</b></td></tr>\n|;}
- # remove same level items
- map { shift @menuorder } grep /^$item/, @menuorder;
- §ion_menu($menu, $item);
- } else {
- if ($zeige) { print qq|<tr><td>|.$menu->menuitem(\%myconfig, \%$form, $item, $level).qq|$label ...</a></td></tr>\n|;}
- # remove same level items
- map { shift @menuorder } grep /^$item/, @menuorder;
- }
- } else {
- if ($menu->{$item}{module}) {
- if ($form->{$item} && $form->{level} eq $item) {
- $menu->{$item}{$item} = !$form->{$item};
- if ($zeige) { print qq|<tr><td valign=bottom>$spacer<img src="image/unterpunkt.png">|.$menu->menuitem(\%myconfig, \%$form, $item, $level).qq|$label</a></td></tr>\n|;}
- # remove same level items
- map { shift @menuorder } grep /^$item/, @menuorder;
- §ion_menu($menu, $item);
- } else {
- if ($zeige) {
- print qq|<tr><td class="hover" height="13" >$spacer<img src="image/unterpunkt.png" style="vertical-align:text-top">|.$menu->menuitem(\%myconfig, \%$form, $item, $level).qq|$label</a></td></tr>\n|;
- }
- }
- } else {
- my $ml_ = $form->escape($ml);
- print qq|<tr><td class="bg" height="22" align="left" valign="middle" ><img src="image/$item.png" style="vertical-align:middle"> <a href="menu.pl?path=bin/mozilla&action=acc_menu&level=$ml_&login=$form->{login}&password=$form->{password}" class="nohover">$label</a> </td></tr>\n|;
- §ion_menu($menu, $item);
- #print qq|<br>\n|;
- }
- }
- }
+ my ($menu, $level) = @_;
+
+ # build tiered menus
+ my @menuorder = $menu->access_control(\%myconfig, $level);
+ while (@menuorder) {
+ $item = shift @menuorder;
+ $label = $item;
+ $ml = $item;
+ $label =~ s/$level--//g;
+ $ml =~ s/--.*//;
+ if ($ml eq $mainlevel) { $zeige = 1; }
+ else { $zeige = 0; }
+ my $spacer = " " x (($item =~ s/--/--/g) * 1);
+ $label =~ s/.*--//g;
+ $label_icon = $label . ".gif";
+ $mlab = $label;
+ $label = $locale->text($label);
+ $label =~ s/ / /g;
+ $menu->{$item}{target} = "main_window" unless $menu->{$item}{target};
+
+ if ($menu->{$item}{submenu}) {
+ $menu->{$item}{$item} = !$form->{$item};
+ if ($form->{level} && $item =~ /^$form->{level}/) {
+
+ # expand menu
+ if ($zeige) {
+ print
+ qq|<tr><td valign=bottom><b>$spacer<img src="image/unterpunkt.png">$label</b></td></tr>\n|;
+ }
+
+ # remove same level items
+ map { shift @menuorder } grep /^$item/, @menuorder;
+ §ion_menu($menu, $item);
+ } else {
+ if ($zeige) {
+ print qq|<tr><td>|
+ . $menu->menuitem(\%myconfig, \%$form, $item, $level)
+ . qq|$label ...</a></td></tr>\n|;
+ }
+
+ # remove same level items
+ map { shift @menuorder } grep /^$item/, @menuorder;
+ }
+ } else {
+ if ($menu->{$item}{module}) {
+ if ($form->{$item} && $form->{level} eq $item) {
+ $menu->{$item}{$item} = !$form->{$item};
+ if ($zeige) {
+ print
+ qq|<tr><td valign=bottom>$spacer<img src="image/unterpunkt.png">|
+ . $menu->menuitem(\%myconfig, \%$form, $item, $level)
+ . qq|$label</a></td></tr>\n|;
+ }
+
+ # remove same level items
+ map { shift @menuorder } grep /^$item/, @menuorder;
+ §ion_menu($menu, $item);
+ } else {
+ if ($zeige) {
+ print
+ qq|<tr><td class="hover" height="13" >$spacer<img src="image/unterpunkt.png" style="vertical-align:text-top">|
+ . $menu->menuitem(\%myconfig, \%$form, $item, $level)
+ . qq|$label</a></td></tr>\n|;
+ }
+ }
+ } else {
+ my $ml_ = $form->escape($ml);
+ print
+ qq|<tr><td class="bg" height="22" align="left" valign="middle" ><img src="image/$item.png" style="vertical-align:middle"> <a href="menu.pl?path=bin/mozilla&action=acc_menu&level=$ml_&login=$form->{login}&password=$form->{password}" class="nohover">$label</a> </td></tr>\n|;
+ §ion_menu($menu, $item);
+
+ #print qq|<br>\n|;
+ }
+ }
+ }