Private
Server IP : 195.201.23.43  /  Your IP : 3.141.40.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/edit_newshells.cgi
#!/usr/bin/perl
# Show a form for entering custom shells

require './virtual-server-lib.pl';
&can_edit_templates() || &error($text{'newshells_ecannot'});
&ui_print_header(undef, $text{'newshells_title'}, "", "newshells");

print $text{'newshells_descr'},"<p>\n";

# Find available shells
@shells = &list_available_shells();
$i = 0;
@fields = ( );
foreach $s (@shells) {
	push(@fields, "shell_$i", "desc_$i", "owner_$i", "mailbox_$i",
		      "reseller_$i", "default_$i", "avail_$i");
	$i++;
	}
print &ui_form_start("save_newshells.cgi", "post");

# Use defaults?
print "<b>$text{'newshells_defs'}</b>\n";
$defs = -r $custom_shells_file ? 0 : 1;
$js1 = &js_disable_inputs(\@fields, [ ], "onClick");
$js0 = &js_disable_inputs([ ], \@fields, "onClick");
print &ui_radio("defs", $defs,
		[ [ 1, $text{'newshells_defs1'}, $js1 ],
		  [ 0, $text{'newshells_defs0'}, $js0 ] ]),"<p>\n";

# Build custom shells table rows
$i = 0;
foreach $s (@shells, { }) {
	push(@table, [
		{ 'type' => 'checkbox', 'name' => "avail_$i",
		  'value' => 1, 'checked' => $s->{'avail'},
		  'disabled' => $defs },
		&ui_textbox("shell_$i", $s->{'shell'}, 25, $defs),
		&ui_textbox("desc_$i", $s->{'desc'}, 40, $defs),
		&ui_checkbox("owner_$i", 1, " ", $s->{'owner'}, undef, $defs),
		&ui_checkbox("mailbox_$i", 1, " ", $s->{'mailbox'},
			     undef, $defs),
		&ui_checkbox("reseller_$i", 1, " ", $s->{'reseller'},
			     undef, $defs),
		&ui_checkbox("default_$i", 1, " ", $s->{'default'},
			     undef, $defs),
		&ui_select("id_$i", $s->{'id'},
			   [ [ 'nologin', $text{'limits_shell_nologin'} ],
			     [ 'ftp', $text{'limits_shell_ftp'} ],
			     [ 'ssh', $text{'limits_shell_ssh'} ] ]),
		]);
	$i++;
	}

# Render the table
print &ui_columns_table(
	[ $text{'newshells_avail'}, $text{'newshells_shell'},
	  $text{'newshells_desc'}, $text{'newshells_owner'},
	  $text{'newshells_mailbox'}, $text{'newshells_reseller'},
	  $text{'newshells_default'}, $text{'newshells_id'}, ],
	100,
	\@table,
	undef,
	1);

print &ui_form_end([ [ undef, $text{'save'} ] ]);

&ui_print_footer("", $text{'index_return'});

Private