Server IP : 195.201.23.43 / Your IP : 18.220.112.188 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 # Display all virtual server templates require './virtual-server-lib.pl'; &can_edit_templates() || &error($text{'newtmpl_ecannot'}); &ui_print_header(undef, $text{'newtmpl_title'}, ""); # Build list of templates @tmpls = &list_templates(); @doms = &list_domains(); foreach $t (@tmpls) { next if ($t->{'deleted'}); # Find domains on the template my @tdoms = grep { $_->{'template'} eq $t->{'id'} } @doms; my @uses; foreach my $f ("parent", "sub", "alias") { if ($t->{"for_".$f}) { push(@uses, $text{'tmpl_for_'.$f}); } } push(@table, [ { 'type' => 'checkbox', 'name' => 'd', 'value' => $t->{'id'} }, ui_link("edit_tmpl.cgi?id=$t->{'id'}", &html_escape($t->{'name'})) . ( $t->{'id'} == &get_init_template(0) || $t->{'id'} == &get_init_template(1) ? &vui_inline_label('newtmpl_def', 1) : ""), join(", ", @uses), &ui_link("search.cgi?field=template&what=$t->{'id'}", scalar(@tdoms)), $t->{'created'} ? &make_date($t->{'created'}, 1) : "<i>$text{'newtmpl_init'}</i>" ]); $deletable++ if (!$t->{'standard'}); } # Show the table of templates print &ui_form_columns_table( "delete_tmpls.cgi", [ $deletable ? ( [ "delete", $text{'newtmpl_delete'} ] ) : ( ), [ 'default', $text{'newtmpl_setdef'} ], [ 'defaultsub', $text{'newtmpl_setdefsub'} ], ], 0, [ [ "edit_tmpl.cgi?new=1&cp=1", $text{'newtmpl_add2'} ], [ "edit_tmpl.cgi?new=1", $text{'newtmpl_add1'} ] ], undef, [ "", $text{'newtmpl_name'}, $text{'newtmpl_useby'}, $text{'newtmpl_tdoms'}, $text{'newtmpl_created'} ], 100, \@table); &ui_print_footer("", $text{'index_return'});Private