HEX
Server: Apache
System: Linux vps-cdc32557.vps.ovh.ca 5.15.0-156-generic #166-Ubuntu SMP Sat Aug 9 00:02:46 UTC 2025 x86_64
User: hanode (1017)
PHP: 7.4.33
Disabled: 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,pcntl_unshare,
Upload Files
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'};
}