1 ######################################################################
2 # SQL-Ledger Accounting
5 # Author: Dieter Simader
6 # Email: dsimader@sql-ledger.org
7 # Web: http://www.sql-ledger.org
9 # Contributors: Christopher Browne
11 # This program is free software; you can redistribute it and/or modify
12 # it under the terms of the GNU General Public License as published by
13 # the Free Software Foundation; either version 2 of the License, or
14 # (at your option) any later version.
16 # This program is distributed in the hope that it will be useful,
17 # but WITHOUT ANY WARRANTY; without even the implied warranty of
18 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
19 # GNU General Public License for more details.
20 # You should have received a copy of the GNU General Public License
21 # along with this program; if not, write to the Free Software
22 # Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
23 #######################################################################
25 # menu for text based browsers (lynx)
28 # DS. 2000-07-04 Created
29 # DS. 2001-08-07 access control
30 # CBB 2002-02-09 Refactored HTML out to subroutines
31 #######################################################################
33 $menufile = "menu.ini";
44 $menu = new Menu "$menufile";
46 @menuorder = $menu->access_control(\%myconfig);
48 $form->{title} = "SQL-Ledger $form->{version}";
52 $offset = int (21 - $#menuorder)/2;
58 print qq|<center><table>|;
60 map { print "<tr><td>".$menu->menuitem(\%myconfig, \%$form, $_).$locale->text($_).qq|</a></td></tr>|; } @menuorder;
69 # display the company logo
70 # $argv = "login=$form->{login}&password=$form->{password}&path=$form->{path}&action=company_logo&noheader=1";
71 # exec "./login.pl", $argv;
78 $menu = new Menu "$menufile", $form->{level};
81 @menuorder = $menu->access_control(\%myconfig, $form->{level});
83 foreach $item (@menuorder) {
85 $item =~ s/^$form->{level}--//;
86 push @neworder, $a unless ($item =~ /--/);
88 @menuorder = @neworder;
90 $level = $form->{level};
93 $form->{title} = $locale->text($level);
97 $offset = int (21 - $#menuorder)/2;
102 print qq|<center><table>|;
104 foreach $item (@menuorder) {
106 $label =~ s/$form->{level}--//g;
109 $menu->{$item}{target} = "";
111 print "<tr><td>".$menu->menuitem(\%myconfig, \%$form, $item, $form->{level}).$locale->text($label)."</a></td></tr>";