3 # Display GRUB menu titles
5 require './grub-lib.pl';
6 &ui_print_header(undef, $text{'index_title'}, "", undef, 1, 1, 0,
7 &help_search_link("grub", "man", "doc"));
9 # Check that GRUB is installed
10 if (!-r $config{'menu_file'}) {
11 print "<p>",&text('index_efile', "<tt>$config{'menu_file'}</tt>",
12 "$gconfig{'webprefix'}/config.cgi?$module_name"),"<p>\n";
13 &ui_print_footer("/", $text{'index'});
16 if (!&has_command($config{'grub_path'})) {
17 print "<p>",&text('index_epath', "<tt>$config{'grub_path'}</tt>",
18 "$gconfig{'webprefix'}/config.cgi?$module_name"),"<p>\n";
19 &ui_print_footer("/", $text{'index'});
23 # List the boot options
24 @crlinks = ( "<a href='edit_title.cgi?new=1'>$text{'index_add'}</a>" );
25 $conf = &get_menu_config();
26 $def = &find_value("default", $conf);
27 @t = &find("title", $conf);
30 push(@icons, $t->{'chainloader'} ? "images/chain.gif"
31 : "images/kernel.gif");
32 local $tt = &html_escape($t->{'value'});
33 push(@titles, $def == $i ? "<b>$tt</b>" : $tt);
34 push(@links, "edit_title.cgi?idx=$t->{'index'}");
35 push(@befores, $i == 0 ? "<< | " :
36 "<a href='up.cgi?idx=$i'>".
37 "<<</a> | ");
38 push(@afters, $i == @t-1 ? " | >>" :
39 " | <a href='down.cgi?idx=$i'>".
44 print &ui_links_row(\@crlinks);
45 &icons_table(\@links, \@titles, \@icons, 4, undef, undef, undef,
49 print "<b>$text{'index_none'}</b><p>\n";
51 print &ui_links_row(\@crlinks);
54 print &ui_buttons_start();
56 # Global options button
57 print &ui_buttons_row("edit_global.cgi", $text{'index_global'},
58 $text{'index_globalmsg'});
61 %flang = &load_language('fdisk');
62 $text{'select_part'} = $flang{'select_part'};
63 $text{'select_device'} = $flang{'select_device'};
64 $text{'select_fd'} = $flang{'select_fd'};
65 $r = $config{'install'};
66 $dev = &bios_to_linux($r);
67 &foreign_require("mount", "mount-lib.pl");
68 $dev = &mount::device_name($dev);
69 print &ui_buttons_row("install.cgi", $text{'index_install'},
70 &text('index_installmsg', $dev),
71 &ui_hidden("dev", $dev));
73 print &ui_buttons_end();
75 &ui_print_footer("/", $text{'index'});