3 # Display a form for restore a database
5 require './postgresql-lib.pl' ;
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>"));
15 &header ( $text{'restore_title'}, "", "restore_form" ) ;
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" ;
25 print "<tr> <td><b>$text{'restore_path'}</b></td>\n" ;
27 print "<input type=text name=path value='$config{'repository'}/' size=64></td> </tr>\n" ;
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";
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";
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" ;
41 print "</table></td></tr></table></form>\n" ;
45 &footer ( "", $text{'index_return'} ) ;