3 # Webmin index page for Caldera's theme. Contains two frames, with the
4 # categories and modules always at the top and the CGIs at the bottom
6 BEGIN { push(@INC, ".."); };
9 $hostname = &get_display_hostname();
10 $ver = &get_webmin_version();
11 if ($gconfig{'real_os_type'}) {
12 $ostr = "$gconfig{'real_os_type'} $gconfig{'real_os_version'}";
15 $ostr = "$gconfig{'os_type'} $gconfig{'os_version'}";
18 # Find the category with the most modules
19 foreach $m (&get_available_module_infos(1)) {
20 local $c = $m->{'category'} ? $m->{'category'} : 'other';
22 $maxcat = $count{$c} if ($count{$c} > $maxcat);
24 $rows = 55 + (int(($maxcat-1) / 3)+1)*25;
26 # Display the frameset
27 $title = $gconfig{'nohostname'} ? $text{'main_title2'} :
28 &text('main_title', $ver, $hostname, $ostr);
29 if ($gconfig{'showlogin'}) {
30 $title = $remote_user." : ".$title;
33 print "<!doctype html public \"-//W3C//DTD HTML 3.2 Final//EN\">\n";
34 print "<html><head><title>$title</title></head>\n";
35 print "<frameset rows='$rows,*' border=0>\n";
36 $goto = &get_goto_module();
38 print "<frame scrolling=no noresize src='index_top.cgi?cat=$goto->{'category'}' name=top>\n";
39 print "<frame scrolling=auto noresize src='$goto->{'dir'}/' name=body>\n";
42 print "<frame scrolling=no noresize src='index_top.cgi' name=top>\n";
43 print "<frame scrolling=auto noresize src='index_body.cgi' name=body>\n";
45 print "</frameset></html>\n";