#!/usr/local/bin/perl # index.cgi # Webmin index page for Caldera's theme. Contains two frames, with the # categories and modules always at the top and the CGIs at the bottom BEGIN { push(@INC, ".."); }; use WebminCore; &init_config(); $hostname = &get_display_hostname(); $ver = &get_webmin_version(); if ($gconfig{'real_os_type'}) { $ostr = "$gconfig{'real_os_type'} $gconfig{'real_os_version'}"; } else { $ostr = "$gconfig{'os_type'} $gconfig{'os_version'}"; } # Find the category with the most modules foreach $m (&get_available_module_infos(1)) { local $c = $m->{'category'} ? $m->{'category'} : 'other'; $count{$c}++; $maxcat = $count{$c} if ($count{$c} > $maxcat); } $rows = 55 + (int(($maxcat-1) / 3)+1)*25; # Display the frameset $title = $gconfig{'nohostname'} ? $text{'main_title2'} : &text('main_title', $ver, $hostname, $ostr); if ($gconfig{'showlogin'}) { $title = $remote_user." : ".$title; } &PrintHeader(); print "\n"; print "$title\n"; print "\n"; $goto = &get_goto_module(); if ($goto) { print "\n"; print "\n"; } else { print "\n"; print "\n"; } print "\n";