Private
Server IP : 195.201.23.43  /  Your IP : 3.146.176.29
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/webmin/sarg/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ HOME SHELL ]     

Current File : /usr/share/webmin/sarg/save_report.cgi
#!/usr/bin/perl
# Save report options

require './sarg-lib.pl';
&ReadParse();
$conf = &get_config();
$config_prefix = "report_";
&error_setup($text{'report_err'});

&lock_sarg_files();
&save_select($conf, "report_type");
&save_yesno($conf, "resolve_ip");
&save_yesno($conf, "user_ip");
&save_radio($conf, "records_without_userid");

&save_sortfield($conf, "user_sort_field");
&save_sortfield($conf, "topuser_sort_field");
&save_sortfield($conf, "topsites_sort_order");
&save_radio($conf, "index_sort_order");

&save_opt_textbox($conf, "exclude_users", \&check_file);
&save_opt_textbox($conf, "exclude_hosts", \&check_file);
&save_opt_textbox($conf, "exclude_codes", \&check_file);
&save_opt_textbox($conf, "usertab", \&check_file);

&save_colons($conf, "include_users", ":");
&save_colons($conf, "exclude_string", ":");

&save_yesno($conf, "index");
&save_yesno($conf, "overwrite_report");
&save_yesno($conf, "use_comma");
&save_opt_textbox($conf, "topsites_num", \&check_num);
&save_opt_textbox($conf, "topuser_num", \&check_num);
&save_opt_textbox($conf, "max_elapsed", \&check_num);
&save_yesno($conf, "long_url");
&save_radio($conf, "date_time_by");
&save_radio($conf, "site_user_time_date_type");
&save_radio($conf, "displayed_values");
&save_opt_textbox($conf, "user_invalid_char", \&check_char);

&save_yesno($conf, "privacy");
&save_opt_textbox($conf, "privacy_string", \&check_string);
&save_opt_textbox($conf, "privacy_string_color", \&check_colour);

&save_range($conf, "weekdays");
&save_range($conf, "hours");

&flush_file_lines();
&unlock_sarg_files();
&webmin_log("report");
&redirect("");

sub check_file
{
return -r $_[0] ? undef : $text{'report_efile'};
}

sub check_num
{
return $_[0] =~ /^\d+$/ ? undef : $text{'report_enum'};
}

sub check_char
{
return $_[0] =~ /^\S+$/ ? undef : $text{'report_echar'};
}

sub check_string
{
return $_[0] =~ /^\S+$/ ? undef : $text{'report_estring'};
}

sub check_colour
{
return $_[0] =~ /^\S+$/ ? undef : $text{'style_ecolour'};
}
Private