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 $desc = "<tt>$in{'db'}</tt>";
16 &ui_print_header($desc, $text{'restore_title'}, "", "restore_form" ) ;
18 print &ui_form_start("restore.cgi", "form-data");
19 print &ui_hidden("db", $in{'db'}),"\n";
20 print &ui_table_start($text{'restore_header'}, undef, 2);
22 print &ui_table_row($text{'restore_src'},
24 [ [ 0, &text('restore_src0',
25 &ui_textbox("path", $config{'repository'}, 50).
26 &file_chooser_button("path")).
28 [ 1, &text('restore_src1',
29 &ui_upload("data")) ] ]));
31 print &ui_table_row($text{'restore_only'},
32 &ui_yesno_radio("only", 0));
34 print &ui_table_row($text{'restore_clean'},
35 &ui_yesno_radio("clean", 0));
37 print &ui_table_row($text{'restore_tables'},
38 &ui_opt_textbox("tables", undef, 60,
39 $text{'restore_tables1'}."<br>",
40 $text{'restore_tables0'}));
42 print &ui_table_end();
43 print &ui_form_end([ [ "go", $text{'restore_go'} ] ]);
45 &ui_print_footer("edit_dbase.cgi?db=$in{'db'}", $text{'dbase_return'},
46 "", $text{'index_return'});