Private
Server IP : 195.201.23.43  /  Your IP : 3.15.236.40
Web Server : Apache
System : Linux webserver2.vercom.be 5.4.0-192-generic #212-Ubuntu SMP Fri Jul 5 09:47:39 UTC 2024 x86_64
User : kdecoratie ( 1041)
PHP Version : 7.1.33-63+ubuntu20.04.1+deb.sury.org+1
Disable Function : pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wifcontinued,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_get_handler,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,pcntl_async_signals,
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : OFF  |  Sudo : ON  |  Pkexec : ON
Directory :  /usr/share/usermin/spam/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ HOME SHELL ]     

Current File : /usr/share/usermin/spam/save_report.cgi
#!/usr/bin/perl
# save_report.cgi
# Save report generation options

require './spam-lib.pl';
&error_setup($text{'report_err'});
&ReadParse();
&set_config_file_in(\%in);
&can_use_check("report");
&execute_before("report");
&lock_spam_files();
$conf = &get_config();

&save_directives($conf, 'clear_report_template',
		$in{'clear_report'} ? [ "" ] : [ ], 1);
$in{'report'} =~ s/\r//g;
@report = split(/\n/, $in{'report'});
&save_directives($conf, 'report', \@report, 1);

&save_directives($conf, 'clear_terse_report_template',
		$in{'clear_terse'} ? [ "" ] : [ ], 1);
$in{'terse'} =~ s/\r//g;
@terse = split(/\n/, $in{'terse'});
&save_directives($conf, 'terse_report', \@terse, 1);

if (&version_atleast(3.0)) {
	foreach $h ("subject", "from", "to") {
		if (!$in{"rewrite_header_${h}_def"}) {
			push(@rheader, { 'name' => 'rewrite_header',
			    'value' => $h." ".$in{"rewrite_header_${h}"} });
			}
		}
	&save_directives($conf, "rewrite_header", \@rheader);
	}
else {
	&parse_yes_no($conf, "rewrite_subject");
	&parse_opt($conf, "subject_tag", undef);
	#&parse_yes_no($conf, "report_header");
	&parse_yes_no($conf, "use_terse_report");
	&parse_yes_no($conf, "spam_level_stars");
	&parse_opt($conf, "spam_level_char", \&char_check);
	}
&parse_yes_no($conf, "fold_headers");
&parse_yes_no($conf, "detailed_phrase_score")
	if (defined($in{'detailed_phrase_score'}));
&parse_yes_no($conf, "defang_mime") if (defined($in{'defang_mime'}));
&parse_option($conf, "report_safe") if (defined($in{'report_safe'}));

if (&version_atleast(2.6)) {
	for($i=0; defined($addfor = $in{"addfor_$i"}); $i++) {
		next if (!$addfor);
		$addheader = $in{"addheader_$i"};
		$addtext = $in{"addtext_$i"};
		$addheader =~ /^\S+$/ ||
			&error(&text('report_eaddheader', $i+1));
		push(@adds, "$addfor $addheader $addtext");
		}
	if (!$in{"spam_level_char_def"} && &char_check($in{"spam_level_char"})) {
		push(@adds, "all Level _STARS(".$in{ "spam_level_char"} .")_" );
		}
	&save_directives($conf, "add_header", \@adds, 1);
	}

&flush_file_lines();
&unlock_spam_files();
&webmin_log("report");
&execute_after("report");
&redirect($redirect_url);

sub char_check
{
$_[0] =~ /^\S$/ || &error($text{'report_echar'});
}

Private