mirror of
https://github.com/webmin/webmin.git
synced 2026-04-06 09:10:25 +01:00
Obsolete scripts that no longer need to exist
Some checks failed
webmin.dev: webmin/webmin / build (push) Has been cancelled
Some checks failed
webmin.dev: webmin/webmin / build (push) Has been cancelled
This commit is contained in:
@@ -1,58 +0,0 @@
|
||||
#!/usr/local/bin/perl
|
||||
# edit_ffile.cgi
|
||||
# Allow editing of a filter config file
|
||||
|
||||
require './qmail-lib.pl';
|
||||
&ReadParse();
|
||||
|
||||
&ui_print_header(undef, $text{'ffile_title'}, "");
|
||||
open(FILE, "<$in{'file'}");
|
||||
while(<FILE>) {
|
||||
s/\r|\n//g;
|
||||
if (/^(\S+)\s+(\S+)\s+(\S+)\s+(.*)$/) {
|
||||
push(@filter, [ $1, $2, $3, $4 ]);
|
||||
}
|
||||
elsif (/^(2)\s+(\S+)$/) {
|
||||
$other = $2;
|
||||
}
|
||||
}
|
||||
close(FILE);
|
||||
|
||||
print "<b>",&text('ffile_desc', "<tt>$in{'file'}</tt>"),"</b><p>\n";
|
||||
|
||||
print "<form action=save_ffile.cgi method=post enctype=multipart/form-data>\n";
|
||||
print "<input type=hidden name=file value=\"$in{'file'}\">\n";
|
||||
print "<input type=hidden name=name value=\"$in{'name'}\">\n";
|
||||
|
||||
$i = 0;
|
||||
foreach $f (@filter, [ 1, '', '', '' ]) {
|
||||
$field = "<select name=field_$i>\n";
|
||||
foreach $ft ('', 'from', 'to', 'subject', 'cc', 'body') {
|
||||
$field .= sprintf "<option value='%s' %s>%s</option>\n",
|
||||
$ft, $f->[2] eq $ft ? "selected" : "",
|
||||
$ft ? $text{"ffile_$ft"} : " ";
|
||||
}
|
||||
$field .= "</select>\n";
|
||||
|
||||
$what = "<select name=what_$i>\n";
|
||||
$what .= sprintf "<option value=0 %s>%s</option>\n",
|
||||
$f->[0] == 0 ? "selected" : "", $text{"ffile_what0"};
|
||||
$what .= sprintf "<option value=1 %s>%s</option>\n",
|
||||
$f->[0] == 1 ? "selected" : "", $text{"ffile_what1"};
|
||||
$what .= "</select>\n";
|
||||
|
||||
$match = "<input name=match_$i size=20 value='$f->[3]'>\n";
|
||||
|
||||
$action = "<input name=action_$i size=30 value='$f->[1]'>\n";
|
||||
|
||||
print &text('ffile_line', $field, $what, $match, $action),"<br>\n";
|
||||
$i++;
|
||||
}
|
||||
print &text('ffile_other',
|
||||
"<input name=other size=30 value='$other'>"),"<br>\n";
|
||||
|
||||
print "<input type=submit value=\"$text{'save'}\">\n";
|
||||
print "</form>\n";
|
||||
|
||||
&ui_print_footer("edit_alias.cgi?name=$in{'name'}", $text{'aform_return'});
|
||||
|
||||
@@ -1,53 +0,0 @@
|
||||
#!/usr/local/bin/perl
|
||||
# edit_rfile.cgi
|
||||
# Display the contents of an autoreply file
|
||||
|
||||
require './qmail-lib.pl';
|
||||
&ReadParse();
|
||||
|
||||
&ui_print_header(undef, $text{'rfile_title'}, "");
|
||||
open(FILE, "<$in{'file'}");
|
||||
while(<FILE>) {
|
||||
if (/^Reply-Tracking:\s*(.*)/) {
|
||||
$replies = $1;
|
||||
}
|
||||
elsif (/^Reply-Period:\s*(.*)/) {
|
||||
$period = $1;
|
||||
}
|
||||
else {
|
||||
push(@lines, $_);
|
||||
}
|
||||
}
|
||||
close(FILE);
|
||||
|
||||
print "<b>",&text('rfile_desc', "<tt>$in{'file'}</tt>"),"</b><p>\n";
|
||||
print "$text{'rfile_desc2'}<p>\n";
|
||||
|
||||
print "<form action=save_rfile.cgi method=post enctype=multipart/form-data>\n";
|
||||
print "<input type=hidden name=file value=\"$in{'file'}\">\n";
|
||||
print "<input type=hidden name=name value=\"$in{'name'}\">\n";
|
||||
print "<textarea name=text rows=20 cols=80 $config{'wrap_mode'}>",
|
||||
join("", @lines),"</textarea><p>\n";
|
||||
|
||||
print $text{'rfile_replies'},"\n";
|
||||
printf "<input type=radio name=replies_def value=1 %s> %s\n",
|
||||
$replies eq '' ? "checked" : "", $text{'rfile_none'};
|
||||
printf "<input type=radio name=replies_def value=0 %s> %s\n",
|
||||
$replies eq '' ? "" :"checked", $text{'rfile_file'};
|
||||
printf "<input name=replies size=30 value='%s'> %s<br>\n",
|
||||
$replies, &file_chooser_button("replies");
|
||||
print " " x 3;
|
||||
print $text{'rfile_period'},"\n";
|
||||
printf "<input type=radio name=period_def value=1 %s> %s\n",
|
||||
$period eq '' ? "checked" : "", $text{'rfile_default'};
|
||||
printf "<input type=radio name=period_def value=0 %s>\n",
|
||||
$period eq '' ? "" :"checked";
|
||||
printf "<input name=period size=5 value='%s'> %s<p>\n",
|
||||
$period, $text{'rfile_secs'};
|
||||
|
||||
print "<input type=submit value=\"$text{'save'}\"> ",
|
||||
"<input type=reset value=\"$text{'rfile_undo'}\">\n";
|
||||
print "</form>\n";
|
||||
|
||||
&ui_print_footer("edit_alias.cgi?name=$in{'name'}", $text{'aform_return'});
|
||||
|
||||
@@ -1,27 +0,0 @@
|
||||
#!/usr/local/bin/perl
|
||||
# save_afile.cgi
|
||||
# Save a filter file
|
||||
|
||||
require './qmail-lib.pl';
|
||||
&ReadParseMime();
|
||||
&error_setup($text{'ffile_err'});
|
||||
my %access = &get_module_acl();
|
||||
my $base = &simplify_path($access{'apath'} || $qmail_alias_dir);
|
||||
my $file = &simplify_path($in{'file'});
|
||||
&is_under_directory($base, $file) || &error(&text('ffile_efile', $in{'file'}));
|
||||
$in{'file'} = $file;
|
||||
|
||||
for($i=0; defined($in{"field_$i"}); $i++) {
|
||||
next if (!$in{"field_$i"});
|
||||
$in{"match_$i"} || &error($text{'ffile_ematch'});
|
||||
$in{"action_$i"} || &error($text{'ffile_eaction'});
|
||||
push(@filter, $in{"what_$i"}." ".$in{"action_$i"}." ".
|
||||
$in{"field_$i"}." ".$in{"match_$i"}."\n");
|
||||
}
|
||||
push(@filter, "2 ".$in{'other'}."\n") if ($in{'other'});
|
||||
|
||||
&open_lock_tempfile(FILE, ">$in{'file'}");
|
||||
&print_tempfile(FILE, @filter);
|
||||
&close_tempfile(FILE);
|
||||
&redirect("edit_alias.cgi?name=$in{'name'}");
|
||||
|
||||
@@ -1,29 +0,0 @@
|
||||
#!/usr/local/bin/perl
|
||||
# save_rfile.cgi
|
||||
# Save an autoreply file
|
||||
|
||||
require './qmail-lib.pl';
|
||||
&ReadParseMime();
|
||||
my %access = &get_module_acl();
|
||||
my $base = &simplify_path($access{'apath'} || $qmail_alias_dir);
|
||||
my $file = &simplify_path($in{'file'});
|
||||
&is_under_directory($base, $file) || &error(&text('rfile_efile', $in{'file'}));
|
||||
$in{'file'} = $file;
|
||||
|
||||
$in{'replies_def'} || $in{'replies'} =~ /^\/\S+/ ||
|
||||
&error($text{'rfile_ereplies'});
|
||||
$in{'period_def'} || $in{'period'} =~ /^\d+$/ ||
|
||||
&error($text{'rfile_eperiod'});
|
||||
|
||||
$in{'text'} =~ s/\r//g;
|
||||
&open_lock_tempfile(FILE, ">$in{'file'}");
|
||||
if (!$in{'replies_def'}) {
|
||||
&print_tempfile(FILE, "Reply-Tracking: $in{'replies'}\n");
|
||||
}
|
||||
if (!$in{'period_def'}) {
|
||||
&print_tempfile(FILE, "Reply-Period: $in{'period'}\n");
|
||||
}
|
||||
&print_tempfile(FILE, $in{'text'});
|
||||
&close_tempfile(FILE);
|
||||
&redirect("edit_alias.cgi?name=$in{'name'}");
|
||||
|
||||
Reference in New Issue
Block a user