Server IP : 195.201.23.43 / Your IP : 3.22.187.118 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 : |
do 'virtual-server-lib.pl'; sub cgi_args { my ($cgi) = @_; # Global options, which need no params (if usable) if ($cgi =~ /^edit_new/ || $cgi eq 'check.cgi') { # Global config of some kind return &can_edit_templates() ? '' : 'none'; } elsif ($cgi eq 'history.cgi') { return &can_show_history() ? '' : 'none'; } elsif ($cgi eq 'mass_create_form.cgi') { return (&can_create_master_servers() || &can_create_sub_servers()) && &can_create_batch() ? '' : 'none'; } elsif ($cgi eq 'import_form.cgi') { return &can_import_servers() ? '' : 'none'; } elsif ($cgi eq 'migrate_form.cgi') { return &can_migrate_servers() ? '' : 'none'; } elsif ($cgi eq 'list_sched.cgi') { return &can_backup_sched() && &can_backup_domain() ? '' : 'none'; } elsif ($cgi eq 'backup_form.cgi') { return &can_backup_domain() ? '' : 'none'; } elsif ($cgi eq 'backuplog.cgi') { return &can_backup_log() ? '' : 'none'; } elsif ($cgi eq 'restore_form.cgi') { return &can_restore_domain() ? '' : 'none'; } # Other global settings if ($cgi eq 'edit_tmpl.cgi') { return &can_edit_templates() ? 'id=0' : 'none'; } elsif ($cgi eq 'edit_plan.cgi') { my @plans = &list_editable_plans(); return !&can_edit_plans() ? 'none' : @plans ? 'id='.$plans[0]->{'id'} : 'new=1'; } elsif ($cgi eq 'edit_resel.cgi') { my @resels = &list_resellers(); return !&can_edit_templates() ? 'none' : @resels ? 'name='.&urlize($resels[0]->{'name'}) : 'new=1'; } # Assume a domain is needed, for some editing page return undef if ($cgi =~ /^(save|delete|modify|mass)_/); my @alldoms = grep { &can_edit_domain($_) } &list_domains(); my $d; if ($in{'dom'}) { # From CGI parameter $d = &get_domain($in{'dom'}); } if (!$d) { # First top-level ($d) = grep { !$_->{'parent'} } @alldoms; } if (!$d) { # First of any kind $d = $alldoms[0]; } if ($d) { if ($cgi eq 'edit_user.cgi') { # Create user return 'dom='.$d->{'id'}.'&new=1'; } elsif ($cgi eq 'edit_alias.cgi') { # Create alias return 'dom='.$d->{'id'}.'&new=1'; } else { # Assume some other CGI that takes a domain parameter return 'dom='.$d->{'id'}; } } return undef; }Private