Handle hostnames with upper-case letters
[webmin.git] / postgresql / restore_form.cgi.bak
1 #!/usr/local/bin/perl
2 # restore_form.cgi
3 # Display a form for restore a database
4
5 require './postgresql-lib.pl' ;
6
7 &ReadParse ( ) ;
8
9 &error_setup ( $text{'restore_err'} ) ;
10 $access{'restore'} || &error($text{'restore_ecannot'});
11 &can_edit_db($in{'db'}) || &error($text{'dbase_ecannot'});
12 &has_command($config{'rstr_cmd'}) ||
13         &error(&text('restore_ecmd', "<tt>$config{'rstr_cmd'}</tt>"));
14
15 &header ( $text{'restore_title'}, "", "restore_form" ) ;
16
17 print "<hr>\n" ;
18
19 print "<form action=restore.cgi method=post>\n" ;
20 print "<input type=hidden name=db value=\"$in{'db'}\">\n" ;
21 print "<table border>\n" ;
22 print "<tr $tb> <td><b>$text{'restore_header'}</b></td> </tr>\n" ;
23 print "<tr $cb> <td><table>\n" ;
24
25 print "<tr> <td><b>$text{'restore_path'}</b></td>\n" ;
26 print "<td>\n" ;
27 print "<input type=text name=path value='$config{'repository'}/' size=64></td> </tr>\n" ;
28
29 print "<tr> <td><b>$text{'restore_only'}</b></td>\n";
30 print "<td><input type=radio name=only value=1> $text{'yes'}\n";
31 print "<input type=radio name=only value=0 checked> $text{'no'}</td> </tr>\n";
32
33 print "<tr> <td><b>$text{'restore_clean'}</b></td>\n";
34 print "<td><input type=radio name=clean value=1> $text{'yes'}\n";
35 print "<input type=radio name=clean value=0 checked> $text{'no'}</td> </tr>\n";
36
37 print "<td><input type=radio name=only value=1> $text{'yes'}\n";
38 print "<tr $cb> <td colspan=2 align=right><input type=submit " ,
39       "value='$text{'restore_go'}'></td> </tr>\n" ;
40
41 print "</table></td></tr></table></form>\n" ;
42
43 print "<hr>\n" ;
44
45 &footer ( "", $text{'index_return'} ) ;