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">|);
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.
75 . " - <a href=\"login.pl?path="
79 . "&action=logout\" target=\"_top\">"
80 . $locale->text('Logout')
82 my ($Sekunden, $Minuten, $Stunden, $Monatstag, $Monat,
83 $Jahr, $Wochentag, $Jahrestag, $Sommerzeit)
85 my $CTIME_String = localtime(time);
88 $Monat = $Monat < 10 ? $Monat = "0" . $Monat : $Monat;
89 $Monatstag = $Monatstag < 10 ? $Monatstag = "0" . $Monatstag : $Monatstag;
91 my @Wochentage = ("Sonntag", "Montag", "Dienstag", "Mittwoch",
92 "Donnerstag", "Freitag", "Samstag");
93 my @Monatsnamen = ("", "Januar", "Februar", "März",
94 "April", "Mai", "Juni", "Juli",
95 "August", "September", "Oktober", "November",
98 $Wochentage[$Wochentag] . ", der "
103 #$zeit="<div id='Uhr'>".$Stunden.":".$Minuten.":".$Sekunden."</div>";
104 $zeit = "<div id='Uhr'>" . $Stunden . ":" . $Minuten . "</div>";
106 <script type="text/javascript">
108 var clockid=new Array()
109 var clockidoutside=new Array()
111 var thistime= new Date()
112 var hours= | . $Stunden . qq|;
113 var minutes= | . $Minuten . qq|;
114 var seconds= | . $Sekunden . qq|;
115 if (eval(hours) <10) {hours="0"+hours}
116 if (eval(minutes) < 10) {minutes="0"+minutes}
117 if (seconds < 10) {seconds="0"+seconds}
118 //var thistime = hours+":"+minutes+":"+seconds
119 var thistime = hours+":"+minutes
121 function writeclock() {
123 if (document.all \|\| document.getElementById \|\| document.layers) {
124 clockid[i_clock]="clock"+i_clock
125 document.write("<font family=arial size=2><span id='"+clockid[i_clock]+"' style='position:relative'>"+thistime+"</span></font>")
131 hours=thistime.getHours()
132 minutes=thistime.getMinutes()
133 seconds=thistime.getSeconds()
134 if (eval(hours) <10) {hours="0"+hours}
135 if (eval(minutes) < 10) {minutes="0"+minutes}
136 if (seconds < 10) {seconds="0"+seconds}
137 //thistime = hours+":"+minutes+":"+seconds
138 thistime = hours+":"+minutes
141 for (i=0;i<=clockid.length-1;i++) {
142 var thisclock=eval(clockid[i])
143 thisclock.innerHTML=thistime
147 if (document.getElementById) {
148 for (i=0;i<=clockid.length-1;i++) {
149 document.getElementById(clockid[i]).innerHTML=thistime
152 var timer=setTimeout("clockon()",60000)
154 //window.onload=clockon
157 <table border="0" width="100%" background="image/bg_titel.gif" cellpadding="0" cellspacing="0">
159 <td style="color:white; font-family:verdana,arial,sans-serif; font-size: 12px;"> [<a href="JavaScript:top.main_window.print()">drucken</a>]</td>
160 <td align="right" style="vertical-align:middle; color:white; font-family:verdana,arial,sans-serif; font-size: 12px;" nowrap>|
161 . $login . $datum . qq| <script>writeclock()</script>
169 $locale = Locale->new($language, "menu");
171 $mainlevel = $form->{level};
172 $mainlevel =~ s/$mainlevel--//g;
173 my $menu = new Menu "$menufile";
174 $menu = new Menu "custom_$menufile" if (-f "custom_$menufile");
175 $menu = new Menu "$form->{login}_$menufile"
176 if (-f "$form->{login}_$menufile");
180 return print_menu($menu);
189 for ($i = 0; $i < length($s); $i++) {
190 my $c = substr($s, $i, 1);
191 if ($skip && ($c eq ";")) {
195 } elsif ($c eq "&") {
207 my ($menu, $parent, $depth) = @_;
210 die if ($depth * 1 > 5);
214 @menuorder = $menu->access_control(\%myconfig, $parent);
216 $parent .= "--" if ($parent);
218 foreach my $item (@menuorder) {
219 substr($item, 0, length($parent)) = "";
220 next if (($item eq "") || ($item =~ /--/));
222 my $menu_item = $menu->{"${parent}${item}"};
223 my $menu_title = $locale->text($item);
224 my $menu_text = $menu_title;
226 $menu_text =~ s/ /<br>/ if ($parent && (my_length($menu_text) >= 17));
228 my $target = "main_window";
229 $target = $menu_item->{"target"} if ($menu_item->{"target"});
231 if ($menu_item->{"submenu"} || !defined($menu_item->{"module"}) ||
232 ($menu_item->{"module"} eq "menu.pl")) {
234 my $h = print_menu($menu, "${parent}${item}", $depth * 1 + 1);
236 $html .= qq|<ul><li><h2>${menu_text}</h2><ul>${h}</ul></li></ul>|;
238 $html .= qq|<li><div class="x">${menu_text}</div><ul>${h}</ul></li>|;
242 $html .= $menu->menuitem_v3(\%myconfig, $form, "${parent}$item",
243 { "title" => $menu_title,
244 "target" => $target });
245 $html .= qq|${menu_text}</a></li>|;