Handle hostnames with upper-case letters
[webmin.git] / fsdump / restore_form.cgi
1 #!/usr/local/bin/perl
2 # restore_form.cgi
3 # Display a form with restore options
4
5 require './fsdump-lib.pl';
6 &ReadParse();
7 $access{'restore'} || &error($text{'restore_ecannot'});
8
9 &ui_print_header(undef, $text{'restore_title'}, "", "restore");
10
11 $m = &missing_restore_command($in{'fs'}) if ($in{'fs'} ne 'tar');
12 if ($m) {
13         print "<p>",&text('restore_ecommand', "<tt>$m</tt>", uc($in{'fs'})),
14               "<p>\n";
15         &ui_print_footer("/", $text{'index'});
16         exit;
17         }
18 if ($in{'id'}) {
19         # Restoring a specific dump
20         $dump = &get_dump($in{'id'});
21         }
22
23 print "<b>$text{'restore_desc'}</b><p>\n";
24
25 @tds = ( "width=30%" );
26 print &ui_form_start("restore.cgi", "post");
27 print &ui_hidden("fs", $in{'fs'}),"\n";
28 print &ui_table_start($in{'fs'} eq 'tar' ? $text{'restore_theader'} :
29                         &text('restore_header', uc($in{'fs'})),
30                       "width=100%", 4);
31
32 &restore_form($in{'fs'}, $dump, \@tds);
33
34 if ($access{'extra'}) {
35         print &ui_table_row(&hlink($text{'restore_extra'}, "rextra"),
36                             &ui_textbox("extra", undef, 60), 3, \@tds);
37         }
38
39 print &ui_table_end();
40 print &ui_form_end([ [ "ok", $text{'restore_ok'} ] ]);
41
42 &ui_print_footer("", $text{'index_return'});
43