-
Notifications
You must be signed in to change notification settings - Fork 0
/
edit_dump.cgi
executable file
·41 lines (31 loc) · 1.26 KB
/
edit_dump.cgi
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
#!/usr/local/bin/perl
# Show a form for dumping a repository
use strict;
use warnings;
our (%text, %in, %config);
require './virtualmin-svn-lib.pl';
&ReadParse();
&error_setup($text{'dump_err'});
$config{'candump'} || &error($text{'dump_ecannot'});
# Get the domain and repository
my $dom = &virtual_server::get_domain($in{'dom'});
&can_edit_domain($dom) || &error($text{'add_edom'});
my @reps = &list_reps($dom);
my ($rep) = grep { $_->{'rep'} eq $in{'rep'} } @reps;
$rep || &error($text{'delete_erep'});
&ui_print_header(&virtual_server::domain_in($dom), $text{'dump_title'}, "");
print $text{'dump_desc'},"<p>\n";
print &ui_form_start("dump.cgi/$rep->{'rep'}.dump", "post");
print &ui_hidden("dom", $in{'dom'});
print &ui_hidden("rep", $in{'rep'});
print &ui_hidden("show", $in{'show'});
print &ui_table_start($text{'dump_header'}, undef, 2, [ "width=30%" ]);
print &ui_table_row($text{'email_rep'}, "<tt>$in{'rep'}</tt>");
print &ui_table_row($text{'dump_to'},
&ui_radio("to_def", 0,
[ [ 0, $text{'dump_browser'}."<br>" ],
[ 1, &text('dump_file', &ui_textbox("file", undef, 40).
&file_chooser_button("file")) ] ]));
print &ui_table_end();
print &ui_form_end([ [ undef, $text{'dump_ok'} ] ]);
&ui_print_footer("index.cgi?show=$in{'show'}", $text{'index_return'});