Server IP : 195.201.23.43 / Your IP : 13.59.203.127 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 : |
#!/usr/bin/perl # Show a list of known remote MySQL servers require './virtual-server-lib.pl'; &can_edit_templates() || &error($text{'newmysqls_ecannot'}); &ui_print_header(undef, $text{'newmysqls_title'}, "", "newmysqls"); # Show a table of current servers @alldoms = &list_domains(); print &ui_form_start("delete_newmysqls.cgi"); print &ui_columns_start( [ "", $text{'newmysqls_host'}, $text{'newmysqls_ver'}, $text{'newmysqls_doms'}, $text{'newmysqls_def'}, $text{'newmysqls_creator'}, $text{'newmysqls_actions'} ]); foreach my $mm (&list_remote_mysql_modules(), &list_remote_postgres_modules()) { if ($mm->{'dbtype'} eq 'mysql') { @doms = grep { $_->{'mysql'} && ($_->{'mysql_module'} || 'mysql') eq $mm->{'minfo'}->{'dir'} } @alldoms; } else { @doms = grep { $_->{'postgres'} && ($_->{'postgres_module'} || 'postgresql') eq $mm->{'minfo'}->{'dir'} } @alldoms; } $doms = !@doms ? $text{'newmysqls_none'} : @doms > 5 ? &text('newmysqls_dcount', scalar(@doms)) : join(", ", map { &show_domain_name($_) } @doms); if ($mm->{'dbtype'} eq 'mysql') { ($ver, $variant, $err) = &get_dom_remote_mysql_version( $mm->{'minfo'}->{'dir'}); } else { ($ver, $variant, $err) = &get_dom_remote_postgres_version( $mm->{'minfo'}->{'dir'}); } $vstr = $err || &text('newmysqls_ver'.$variant, $ver); print &ui_checked_columns_row([ $mm->{'desc'}, $vstr, $doms, $mm->{'config'}->{'virtualmin_default'} ? $text{'yes'} : $text{'no'}, $mm->{'config'}->{'virtualmin_provision'} ? $text{'newmysqls_cm'} : $text{'newmysqls_man'}, &ui_link("/$mm->{'minfo'}->{'dir'}", $text{'newmysqls_open'}), ], \@tds, "d", $mm->{'minfo'}->{'dir'}, 0, $mm->{'config'}->{'virtualmin_provision'} ? 1 : 0); } print &ui_columns_end(); print &ui_form_end([ [ undef, $text{'newmysqls_delete'} ], [ 'default', $text{'newmysqls_makedef'} ] ]); # Show a form to add a new one print &ui_hr(); print &ui_form_start("create_newmysql.cgi", "post"); print &ui_table_start($text{'newmysqls_header'}, undef, 2); # Database type my @types; push(@types, [ 'mysql', $text{'databases_mysql'} ]) if ($config{'mysql'}); push(@types, [ 'postgres', $text{'databases_postgres'} ]) if ($config{'postgres'}); print &ui_table_row($text{'newmysqls_formtype'}, &ui_select("type", $types[0]->[0], \@types)); # Remote server, or local socket print &ui_table_row($text{'newmysqls_formhost'}, &ui_radio_table("mode", 0, [ [ 0, $text{'newmysqls_remote'}, &ui_textbox("host", undef, 40) ], [ 1, $text{'newmysqls_sock'}, &ui_textbox("sock", undef, 40) ], [ 2, $text{'newmysqls_nohost'} ] ])); # TCP port number print &ui_table_row($text{'newmysqls_port'}, &ui_opt_textbox("port", undef, 6, $text{'newmysqls_portdef'})); # SSL mode print &ui_table_row($text{'newmysqls_ssl'}, &ui_yesno_radio("ssl", 0)); # Username and password print &ui_table_row($text{'newmysqls_user'}, &ui_textbox("myuser", undef, 40)); print &ui_table_row($text{'newmysqls_pass'}, &ui_textbox("mypass", undef, 40)); print &ui_table_end(); print &ui_form_end([ [ undef, $text{'create'} ] ]); &ui_print_footer("", $text{'index_return'});Private