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: //proc/self/root/usr/share/webmin/firewalld/config_info.pl
require './firewalld-lib.pl';

# show_timeout_data(value, config-option-name)
# Returns a radio button and a select box for timeout values
sub show_timeout_data
{
my ($value, $name) = @_;
$name = &format_option_name($name);
my $radio = &ui_radio(
	"${name}_def", !$value ? 1 : 0,
	[ [ 1, $text{'config_timeout_none'} ],
	  [ 0, ' ' ] ] );
my @list = &get_timeouts();
my @opts = map { [ $_, $text{"config_timeout_$_"} ] } @list;
my $select = &ui_select($name, !$value ? $list[3] : $value, \@opts);
return $radio . ' ' . $select;
}

# parse_timeout_data(old-value, config-option-name)
# Parses the timeout value from the form input
sub parse_timeout_data
{
my ($oldval, $name) = @_;
$name = &format_option_name($name);
my $val = $in{$name} // ''; 
return 0 if ($in{"${name}_def"});
my %valid = map { $_ => 1 } &get_timeouts();
&error(&text('config_timeout_err', $val)) unless($valid{$val});
return $val;
}

# get_timeouts
# Returns a list of valid timeout values for the select box
sub get_timeouts
{
return qw(1m 5m 15m 30m 1h 3h 6h 12h 1d 3d 7d 30d);
}

# format_option_name(name)
# Formats the option name for use in HTML element names
sub format_option_name
{
my ($name) = @_;
$name =~ s/\s+/_/g;
$name =~ s/[^\x00-\x7F]/_/g;
$name = lc($name);
return $name;
}