X-Git-Url: http://wagnertech.de/git?a=blobdiff_plain;f=bin%2Fmozilla%2Fmenuv3.pl;h=02a465e7def9a3f065cd97e7713cd2b6a098f6bd;hb=429203bfb57dd673aa807d749ab43c8e3332f8c8;hp=aedb881a26b9918c429a9bcedc4f4ee85cb6004d;hpb=ce185136fd22e5a83981e92d04932e48f8dfaf53;p=kivitendo-erp.git diff --git a/bin/mozilla/menuv3.pl b/bin/mozilla/menuv3.pl index aedb881a2..02a465e7d 100644 --- a/bin/mozilla/menuv3.pl +++ b/bin/mozilla/menuv3.pl @@ -34,58 +34,30 @@ $menufile = "menu.ini"; use SL::Menu; +use URI; 1; # end of main sub display { - $form->header(qq||); + $form->header(qq||); - print(qq|\n|); + $form->{date} = clock_line(); + $form->{menu} = acc_menu(); + my $callback = $form->unescape($form->{callback}); + $callback = URI->new($callback)->rel($callback) if $callback; + $callback = "login.pl?action=company_logo" if $callback =~ /^(\.\/)?$/; + $form->{callback} = $callback; - clock_line(); - - print qq| - - - -
- - - - - -|; + print $form->parse_html_template("menu/menuv3"); } sub clock_line { - - $fensterlink="menuv3.pl?login=$form->{login}&password=$form->{password}&path=$form->{path}&action=display"; - $fenster = "["."neues Fenster]"; - - $login = "[Nutzer " - . $form->{login} - . " - {"path"} - . "&password=" - . $form->{"password"} - . "&action=logout\" target=\"_top\">" - . $locale->text('Logout') - . "] "; my ($Sekunden, $Minuten, $Stunden, $Monatstag, $Monat, $Jahr, $Wochentag, $Jahrestag, $Sommerzeit) = localtime(time); - my $CTIME_String = localtime(time); $Monat += 1; $Jahrestag += 1; $Monat = $Monat < 10 ? $Monat = "0" . $Monat : $Monat; @@ -97,46 +69,19 @@ sub clock_line { "April", "Mai", "Juni", "Juli", "August", "September", "Oktober", "November", "Dezember"); - $datum = + return $Wochentage[$Wochentag] . ", der " . $Monatstag . "." . $Monat . "." . $Jahr . " - "; - - #$zeit="
".$Stunden.":".$Minuten.":".$Sekunden."
"; - $zeit = "
" . $Stunden . ":" . $Minuten . "
"; - print qq| - - - - - - -
  $fenster   [drucken] - $login $datum   -
-|; } sub acc_menu { - $locale = Locale->new($language, "menu"); + $locale = Locale->new($myconfig{countrycode}, "menu"); $mainlevel = $form->{level}; - $mainlevel =~ s/$mainlevel--//g; + $mainlevel =~ s/\Q$mainlevel\E--//g; my $menu = new Menu "$menufile"; - $menu = new Menu "custom_$menufile" if (-f "custom_$menufile"); - $menu = new Menu "$form->{login}_$menufile" - if (-f "$form->{login}_$menufile"); $| = 1;