#!/usr/local/bin/perl #theme_prebody - called just before the main body of every page, so it can print any HTML it likes. #theme_postbody - called just after the main body of every page. #theme_header - called instead of the normal header function, with the same parameters. You could use this to re-write the header function in your own style with help and index links wherever you want them. #theme_footer - called instead of the footer function with the same parameters. #theme_error - called instead of the error function, with the same parameters. %letter_sizes = ( '100.gif', [ 10, 16 ], '101.gif', [ 11, 16 ], '102.gif', [ 6, 16 ], '103.gif', [ 10, 16 ], '104.gif', [ 9, 16 ], '105.gif', [ 4, 16 ], '106.gif', [ 5, 16 ], '107.gif', [ 9, 16 ], '108.gif', [ 4, 16 ], '109.gif', [ 14, 16 ], '110.gif', [ 9, 16 ], '111.gif', [ 11, 16 ], '112.gif', [ 10, 16 ], '113.gif', [ 10, 16 ], '114.gif', [ 6, 16 ], '115.gif', [ 8, 16 ], '116.gif', [ 6, 16 ], '117.gif', [ 9, 16 ], '118.gif', [ 10, 16 ], '119.gif', [ 13, 16 ], '120.gif', [ 10, 16 ], '121.gif', [ 10, 16 ], '122.gif', [ 8, 16 ], '123.gif', [ 7, 16 ], '124.gif', [ 4, 16 ], '125.gif', [ 7, 16 ], '126.gif', [ 9, 16 ], '177.iso-8859-2.gif', [ 10, 16 ], '179.iso-8859-2.gif', [ 7, 16 ], '182.iso-8859-2.gif', [ 9, 16 ], '188.iso-8859-2.gif', [ 9, 16 ], '191.iso-8859-2.gif', [ 9, 16 ], '192.gif', [ 12, 16 ], '193.gif', [ 12, 16 ], '194.gif', [ 11, 16 ], '195.gif', [ 12, 16 ], '196.gif', [ 12, 16 ], '197.gif', [ 12, 16 ], '198.gif', [ 13, 16 ], '199.gif', [ 12, 16 ], '200.gif', [ 7, 16 ], '201.gif', [ 8, 16 ], '202.gif', [ 8, 16 ], '203.gif', [ 7, 16 ], '204.gif', [ 6, 16 ], '205.gif', [ 5, 16 ], '206.gif', [ 7, 16 ], '207.gif', [ 7, 16 ], '208.gif', [ 11, 16 ], '208.iso-8859-9.gif', [ 13, 16 ], '209.gif', [ 10, 16 ], '210.gif', [ 13, 16 ], '211.gif', [ 13, 16 ], '211.iso-8859-2.gif', [ 13, 16 ], '212.gif', [ 12, 16 ], '213.gif', [ 13, 16 ], '214.gif', [ 13, 16 ], '214.iso-8859-9.gif', [ 13, 16 ], '215.gif', [ 9, 16 ], '216.gif', [ 13, 16 ], '217.gif', [ 9, 16 ], '218.gif', [ 9, 16 ], '219.gif', [ 9, 16 ], '220.gif', [ 9, 16 ], '220.iso-8859-9.gif', [ 9, 16 ], '221.gif', [ 11, 16 ], '221.iso-8859-9.gif', [ 5, 16 ], '222.gif', [ 9, 16 ], '222.iso-8859-9.gif', [ 11, 16 ], '223.gif', [ 9, 16 ], '224.gif', [ 10, 16 ], '225.gif', [ 10, 16 ], '226.gif', [ 11, 16 ], '227.gif', [ 10, 16 ], '228.gif', [ 10, 16 ], '229.gif', [ 11, 16 ], '230.gif', [ 16, 16 ], '230.iso-8859-2.gif', [ 9, 16 ], '231.gif', [ 10, 16 ], '231.iso-8859-9.gif', [ 10, 16 ], '231.iso.8859-9.gif', [ 10, 16 ], '232.gif', [ 11, 16 ], '233.gif', [ 11, 16 ], '234.gif', [ 11, 16 ], '234.iso-8859-2.gif', [ 9, 16 ], '235.gif', [ 11, 16 ], '236.gif', [ 6, 16 ], '237.gif', [ 6, 16 ], '238.gif', [ 6, 16 ], '239.gif', [ 7, 16 ], '240.gif', [ 10, 16 ], '240.iso-8859-9.gif', [ 10, 16 ], '241.gif', [ 9, 16 ], '241.iso-8859-2.gif', [ 9, 16 ], '242.gif', [ 11, 16 ], '243.gif', [ 11, 16 ], '243.iso-8859-2.gif', [ 11, 16 ], '244.gif', [ 11, 16 ], '245.gif', [ 11, 16 ], '246.gif', [ 11, 16 ], '246.iso-8859-9.gif', [ 11, 16 ], '247.gif', [ 9, 16 ], '248.gif', [ 10, 16 ], '249.gif', [ 9, 16 ], '250.gif', [ 9, 16 ], '251.gif', [ 9, 16 ], '252.gif', [ 9, 16 ], '252.iso-8859-9.gif', [ 9, 16 ], '253.gif', [ 10, 16 ], '253.iso-8859-9.gif', [ 5, 16 ], '254.gif', [ 10, 16 ], '255.gif', [ 9, 16 ], '32.gif', [ 6, 16 ], '33.gif', [ 4, 16 ], '34.gif', [ 7, 16 ], '35.gif', [ 9, 16 ], '36.gif', [ 8, 16 ], '37.gif', [ 13, 16 ], '38.gif', [ 11, 16 ], '39.gif', [ 3, 16 ], '40.gif', [ 6, 16 ], '41.gif', [ 6, 16 ], '42.gif', [ 7, 16 ], '43.gif', [ 9, 16 ], '44.gif', [ 4, 16 ], '45.gif', [ 6, 16 ], '46.gif', [ 4, 16 ], '47.gif', [ 7, 16 ], '48.gif', [ 9, 16 ], '49.gif', [ 6, 16 ], '50.gif', [ 9, 16 ], '51.gif', [ 9, 16 ], '52.gif', [ 10, 16 ], '53.gif', [ 9, 16 ], '54.gif', [ 10, 16 ], '55.gif', [ 8, 16 ], '56.gif', [ 9, 16 ], '57.gif', [ 10, 16 ], '58.gif', [ 5, 16 ], '59.gif', [ 4, 16 ], '60.gif', [ 9, 16 ], '61.gif', [ 10, 16 ], '62.gif', [ 10, 16 ], '63.gif', [ 9, 16 ], '64.gif', [ 12, 16 ], '65.gif', [ 12, 16 ], '66.gif', [ 9, 16 ], '67.gif', [ 12, 16 ], '68.gif', [ 10, 16 ], '69.gif', [ 7, 16 ], '70.gif', [ 7, 16 ], '71.gif', [ 13, 16 ], '72.gif', [ 9, 16 ], '73.gif', [ 5, 16 ], '74.gif', [ 8, 16 ], '75.gif', [ 9, 16 ], '76.gif', [ 8, 16 ], '77.gif', [ 12, 16 ], '78.gif', [ 10, 16 ], '79.gif', [ 12, 16 ], '80.gif', [ 9, 16 ], '81.gif', [ 13, 16 ], '82.gif', [ 9, 16 ], '83.gif', [ 9, 16 ], '84.gif', [ 8, 16 ], '85.gif', [ 9, 16 ], '86.gif', [ 11, 16 ], '87.gif', [ 14, 16 ], '88.gif', [ 11, 16 ], '89.gif', [ 11, 16 ], '90.gif', [ 9, 16 ], '91.gif', [ 5, 16 ], '93.gif', [ 6, 16 ], '94.gif', [ 9, 16 ], '95.gif', [ 9, 16 ], '96.gif', [ 6, 16 ], '97.gif', [ 11, 16 ], '98.gif', [ 10, 16 ], '99.gif', [ 10, 16 ] ); sub theme_header { local @available = ("webmin", "system", "servers", "cluster", "hardware", "", "net", "kororaweb"); local $ll; local %access = &get_module_acl(); local %gaccess = &get_module_acl(undef, ""); print "\n"; print "\n"; local $os_type = $gconfig{'real_os_type'} ? $gconfig{'real_os_type'} : $gconfig{'os_type'}; local $os_version = $gconfig{'real_os_version'} ? $gconfig{'real_os_version'} : $gconfig{'os_version'}; print "
\n"; if ($charset) { print "\n"; } print "\n"; if (@_ > 0) { if ($gconfig{'sysinfo'} == 1) { printf "~; &chop_font; print " |
~; &chop_font; print " |
~; &chop_font; print " |
~; &chop_font; print " |
~; &chop_font; print " |
~; &chop_font; print " |
~; &chop_font; print " |
~; &chop_font; print " |
|
|
|
|
\n";
print "
\n"; } print "
\n"; if (!$_[$i]) { local $postbody = $tconfig{'postbody'}; if ($postbody) { local $hostname = &get_system_hostname(); local $version = &get_webmin_version(); local $os_type = $gconfig{'real_os_type'} ? $gconfig{'real_os_type'} : $gconfig{'os_type'}; local $os_version = $gconfig{'real_os_version'} ? $gconfig{'real_os_version'} : $gconfig{'os_version'}; $postbody =~ s/%HOSTNAME%/$hostname/g; $postbody =~ s/%VERSION%/$version/g; $postbody =~ s/%USER%/$remote_user/g; $postbody =~ s/%OS%/$os_type $os_version/g; print "$postbody\n"; } if ($tconfig{'postbodyinclude'}) { open(INC, $module_name ? "../$gconfig{'theme'}/$tconfig{'postbodyinclude'}" : "$gconfig{'theme'}/$tconfig{'postbodyinclude'}"); while(
| ~;
}
sub create_menu {
my $tmpid;
if ($c eq "") { $tmpid = "other"; }
else { $tmpid = $c; }
my $tmpimg;
if ($c eq "") { $tmpimg = "other"; }
if ($inlist eq "true" && $c ne "") { $tmpimg = "$c"; }
if ($inlist ne "true" && $c ne "") { $tmpimg = "unknown"; }
if ($in{'cat'} eq $c) {
print qq~
|