Revision baca3075
Von Sven Schöling vor etwa 15 Jahren hinzugefügt
bin/mozilla/menuXML.pl | ||
---|---|---|
36 | 36 |
# 2007-10-14 - XMLified - Holger Will <holger@treebuilder.de> |
37 | 37 |
####################################################################### |
38 | 38 |
|
39 |
$menufile = "menu.ini"; |
|
39 |
my $menufile = "menu.ini";
|
|
40 | 40 |
use SL::Menu; |
41 | 41 |
|
42 | 42 |
use CGI::Carp qw(fatalsToBrowser); |
43 | 43 |
use Encode; |
44 | 44 |
use URI; |
45 |
|
|
46 |
use strict; |
|
47 |
|
|
48 |
my $locale; |
|
49 |
|
|
45 | 50 |
1; |
46 | 51 |
|
47 | 52 |
# end of main |
48 | 53 |
|
49 | 54 |
sub display { |
55 |
my $form = $main::form; |
|
56 |
my %myconfig = %main::myconfig; |
|
57 |
|
|
50 | 58 |
$locale = Locale->new($myconfig{countrycode}, "menu"); |
51 |
my $charset = $dbcharset || 'ISO-8859-1'; |
|
59 |
my $charset = $main::dbcharset || 'ISO-8859-1';
|
|
52 | 60 |
my $callback = $form->unescape($form->{callback}); |
53 | 61 |
$callback = URI->new($callback)->rel($callback) if $callback; |
54 | 62 |
$callback = "login.pl?action=company_logo" if $callback =~ /^(\.\/)?$/; |
... | ... | |
89 | 97 |
|
90 | 98 |
|
91 | 99 |
sub acc_menu { |
92 |
$mainlevel = $form->{level}; |
|
100 |
my $form = $main::form; |
|
101 |
|
|
102 |
my $mainlevel = $form->{level}; |
|
93 | 103 |
$mainlevel =~ s/$mainlevel--//g; |
94 | 104 |
my $menu = new Menu "$menufile"; |
95 | 105 |
|
... | ... | |
102 | 112 |
my ($menu, $parent, $depth) = @_; |
103 | 113 |
my $html; |
104 | 114 |
|
115 |
my $form = $main::form; |
|
116 |
my %myconfig = %main::myconfig; |
|
117 |
|
|
105 | 118 |
die if ($depth * 1 > 5); |
106 | 119 |
|
107 | 120 |
my @menuorder; |
Auch abrufbar als: Unified diff
menuXML strict