Private
Server IP : 195.201.23.43  /  Your IP : 18.222.97.243
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/virtual-server/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ HOME SHELL ]     

Current File : /usr/share/webmin/virtual-server/list_balancers.cgi
#!/usr/bin/perl
# Display proxies in some domain

require './virtual-server-lib.pl';
&ReadParse();
$d = &get_domain($in{'dom'});
&can_edit_domain($d) && &can_edit_forward() ||
	&error($text{'balancers_ecannot'});
$has = &has_proxy_balancer($d);
$has || &error($text{'balancers_esupport'});
&ui_print_header(&domain_in($d), $text{'balancers_title'}, "", "balancers");

# Find scripts and plugins in this domain that use the proxy path
&get_balancer_usage($d, \%used, \%pused);

# Build table data
@balancers = &list_proxy_balancers($d);
foreach $b (@balancers) {
	$umsg = "";
	if ($sinfo = $used{$b->{'path'}}) {
		# Used by a script
		$script = &get_script($sinfo->{'name'});
		$umsg = &ui_link("edit_script.cgi?dom=$in{'dom'}&".
				 "script=$sinfo->{'id'}",
				 &text('balancers_script', $script->{'desc'},
					$sinfo->{'version'}));
		}
	elsif ($pinfo = $pused{$b->{'path'}}) {
		# Used by a plugin
		%pinfo = &get_module_info($pinfo->{'plugin'});
		$umsg = $pinfo->{'link'} ?
				&ui_link($pinfo->{'link'}, $pinfo->{'desc'}) :
				$pinfo->{'desc'};
		}
	push(@table, [
		{ 'type' => 'checkbox', 'name' => 'd',
		  'value' => $b->{'path'} },
		"<a href='edit_balancer.cgi?dom=$in{'dom'}&".
		  "path=$b->{'path'}'>$b->{'path'}</a>",
		$has == 2 ? ( $b->{'balancer'} ) : ( ),
		$b->{'none'} ? "<i>$text{'balancers_none2'}</i>"
			     : join("<br>", @{$b->{'urls'}}),
		$umsg,
		]);
	}

# Generate the table
print &ui_form_columns_table(
	"delete_balancers.cgi",
	[ [ undef, $text{'balancers_delete'} ] ],
	1,
	[ [ "edit_balancer.cgi?new=1&dom=$in{'dom'}",
	    $text{'balancers_add'} ] ],
	[ [ "dom", $in{'dom'} ] ],
	[ "", $text{'balancers_path'},
          $has == 2 ? ( $text{'balancers_name'} ) : ( ),
          $text{'balancers_urls'},
          $text{'balancers_used2'} ],
	100,
	\@table,
	undef,
	0,
	undef,
	$text{'balancers_none'},
	);

&ui_print_footer(&domain_footer_link($d),
		 "", $text{'index_return'});
Private