1 #=====================================================================
 
   4 # Based on SQL-Ledger Version 2.1.9
 
   5 # Web http://www.lx-office.org
 
   7 ######################################################################
 
   8 # SQL-Ledger Accounting
 
   9 # Copyright (c) 1998-2002
 
  11 #  Author: Dieter Simader
 
  12 #   Email: dsimader@sql-ledger.org
 
  13 #     Web: http://www.sql-ledger.org
 
  15 #  Contributors: Christopher Browne
 
  17 # This program is free software; you can redistribute it and/or modify
 
  18 # it under the terms of the GNU General Public License as published by
 
  19 # the Free Software Foundation; either version 2 of the License, or
 
  20 # (at your option) any later version.
 
  22 # This program is distributed in the hope that it will be useful,
 
  23 # but WITHOUT ANY WARRANTY; without even the implied warranty of
 
  24 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 
  25 # GNU General Public License for more details.
 
  26 # You should have received a copy of the GNU General Public License
 
  27 # along with this program; if not, write to the Free Software
 
  28 # Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
 
  29 #######################################################################
 
  31 # thre frame layout with refractured menu
 
  33 #######################################################################
 
  35 $menufile = "menu.ini";
 
  43   $form->header(qq|<link rel="stylesheet" href="css/menuv3.css?id=| .
 
  44                 int(rand(100000)) . qq|" type="text/css">|);
 
  46   print(qq|<body style="padding:0px; margin:0px;">\n|);
 
  58 <div style="clear: both;"></div>
 
  60 <iframe id="win1" src="login.pl?login=$form->{login}&password=$form->{password}&action=company_logo&path=$form->{path}" width="100%" height="93%" name="main_window" style="position: absolute; border: 0px; z-index: 99; ">
 
  61 <p>Ihr Browser kann leider keine eingebetteten Frames anzeigen.
 
  73   $fensterlink="menuv3.pl?login=$form->{login}&password=$form->{password}&path=$form->{path}&action=display";
 
  74   $fenster = "["."<a href=\"$fensterlink\" target=\"_blank\">neues Fenster</a>]";
 
  78     . " - <a href=\"login.pl?path="
 
  82     . "&action=logout\" target=\"_top\">"
 
  83     . $locale->text('Logout')
 
  85   my ($Sekunden, $Minuten,   $Stunden,   $Monatstag, $Monat,
 
  86       $Jahr,     $Wochentag, $Jahrestag, $Sommerzeit)
 
  88   my $CTIME_String = localtime(time);
 
  91   $Monat     = $Monat < 10     ? $Monat     = "0" . $Monat     : $Monat;
 
  92   $Monatstag = $Monatstag < 10 ? $Monatstag = "0" . $Monatstag : $Monatstag;
 
  94   my @Wochentage = ("Sonntag",    "Montag",  "Dienstag", "Mittwoch",
 
  95                     "Donnerstag", "Freitag", "Samstag");
 
  96   my @Monatsnamen = ("",       "Januar",    "Februar", "März",
 
  97                      "April",  "Mai",       "Juni",    "Juli",
 
  98                      "August", "September", "Oktober", "November",
 
 101       $Wochentage[$Wochentag] . ", der "
 
 106   #$zeit="<div id='Uhr'>".$Stunden.":".$Minuten.":".$Sekunden."</div>";
 
 107   $zeit = "<div id='Uhr'>" . $Stunden . ":" . $Minuten . "</div>";
 
 109 <script type="text/javascript">
 
 111 var h=$Stunden; var m=$Minuten; var s=$Sekunden;
 
 113   s=++s%60;if(s==0){m=++m%60;if(m==0)h=++h%24;}
 
 114   document.getElementById('clock_id').innerHTML = (h<10?'0'+h:h)+":"+(m<10?'0'+m:m)+":"+(s<10?'0'+s:s);
 
 115   var timer=setTimeout("clockon()", 1000);
 
 117 //window.onload=clockon
 
 120 <table border="0" width="100%" background="image/bg_titel.gif" cellpadding="0" cellspacing="0">
 
 122     <td style="color:white; font-family:verdana,arial,sans-serif; font-size: 12px;">   $fenster   [<a href="JavaScript:top.main_window.print()">drucken</a>]</td>
 
 123     <td align="right" style="vertical-align:middle; color:white; font-family:verdana,arial,sans-serif; font-size: 12px;" nowrap>
 
 124       $login $datum <span id='clock_id' style='position:relative'></span> 
 
 132   $locale = Locale->new($language, "menu");
 
 134   $mainlevel = $form->{level};
 
 135   $mainlevel =~ s/$mainlevel--//g;
 
 136   my $menu = new Menu "$menufile";
 
 137   $menu = new Menu "custom_$menufile" if (-f "custom_$menufile");
 
 138   $menu = new Menu "$form->{login}_$menufile"
 
 139     if (-f "$form->{login}_$menufile");
 
 143   return print_menu($menu);
 
 147   my ($menu, $parent, $depth) = @_;
 
 150   die if ($depth * 1 > 5);
 
 154   @menuorder = $menu->access_control(\%myconfig, $parent);
 
 156   $parent .= "--" if ($parent);
 
 158   foreach my $item (@menuorder) {
 
 159     substr($item, 0, length($parent)) = "";
 
 160     next if (($item eq "") || ($item =~ /--/));
 
 162     my $menu_item = $menu->{"${parent}${item}"};
 
 163     my $menu_title = $locale->text($item);
 
 164     my $menu_text = $menu_title;
 
 166     my $target = "main_window";
 
 167     $target = $menu_item->{"target"} if ($menu_item->{"target"});
 
 169     if ($menu_item->{"submenu"} || !defined($menu_item->{"module"}) ||
 
 170         ($menu_item->{"module"} eq "menu.pl")) {
 
 172       my $h = print_menu($menu, "${parent}${item}", $depth * 1 + 1)."\n";
 
 174         $html .= qq|<ul><li><h2>${menu_text}</h2><ul>${h}</ul></li></ul>\n|;
 
 176         $html .= qq|<li><div class="x">${menu_text}</div><ul>${h}</ul></li>\n|;
 
 180       $html .= $menu->menuitem_v3(\%myconfig, $form, "${parent}$item",
 
 181                                   { "title" => $menu_title,
 
 182                                     "target" => $target });
 
 183       $html .= qq|${menu_text}</a></li>\n|;