Linux vmi284606.contaboserver.net 4.15.0-213-generic #224-Ubuntu SMP Mon Jun 19 13:30:12 UTC 2023 x86_64
Apache/2.4.57 (Ubuntu)
: 167.86.127.34 | : 216.73.217.31
Cant Read [ /etc/named.conf ]
7.2.24-0ubuntu0.18.04.17
root
Terminal
AUTO ROOT
Adminer
Backdoor Destroyer
Linux Exploit
Lock Shell
Lock File
Create User
CREATE RDP
PHP Mailer
BACKCONNECT
UNLOCK SHELL
HASH IDENTIFIER
README
+ Create Folder
+ Create File
/
usr /
share /
webmin /
acl /
[ HOME SHELL ]
Name
Size
Permission
Action
help
[ DIR ]
drwxr-xr-x
images
[ DIR ]
drwxr-xr-x
lang
[ DIR ]
drwxr-xr-x
CHANGELOG
5.15
KB
-rw-r--r--
acl-lib.pl
62.4
KB
-rwxr-xr-x
acl_security.pl
2.33
KB
-rwxr-xr-x
backup_config.pl
2.64
KB
-rwxr-xr-x
cert_form.cgi
1.48
KB
-rwxr-xr-x
cert_issue.cgi
1.69
KB
-rwxr-xr-x
cert_output.cgi
445
B
-rwxr-xr-x
cgi_args.pl
767
B
-rwxr-xr-x
config
61
B
-rw-r--r--
config-ALL-linux
42
B
-rw-r--r--
config-freebsd
42
B
-rw-r--r--
config-macos
42
B
-rw-r--r--
config-netbsd
42
B
-rw-r--r--
config-openbsd
42
B
-rw-r--r--
config-solaris-10-ALL
46
B
-rw-r--r--
config-syno-linux
51
B
-rw-r--r--
config.info
258
B
-rw-r--r--
config.info.ar
385
B
-rw-r--r--
config.info.bg
397
B
-rw-r--r--
config.info.ca
295
B
-rw-r--r--
config.info.cs
265
B
-rw-r--r--
config.info.da
259
B
-rw-r--r--
config.info.de
273
B
-rw-r--r--
config.info.es
265
B
-rw-r--r--
config.info.eu
298
B
-rw-r--r--
config.info.fa
394
B
-rw-r--r--
config.info.fr
308
B
-rw-r--r--
config.info.hr
0
B
-rw-r--r--
config.info.hu
353
B
-rw-r--r--
config.info.it
279
B
-rw-r--r--
config.info.ja
319
B
-rw-r--r--
config.info.ko
233
B
-rw-r--r--
config.info.ms
248
B
-rw-r--r--
config.info.nl
268
B
-rw-r--r--
config.info.no
260
B
-rw-r--r--
config.info.pl
270
B
-rw-r--r--
config.info.pt_BR
271
B
-rw-r--r--
config.info.ru
439
B
-rw-r--r--
config.info.sk
278
B
-rw-r--r--
config.info.sv
53
B
-rw-r--r--
config.info.tr
309
B
-rw-r--r--
config.info.uk
303
B
-rw-r--r--
config.info.zh
47
B
-rw-r--r--
config.info.zh_TW
146
B
-rw-r--r--
convert.cgi
3.79
KB
-rwxr-xr-x
convert_form.cgi
1.6
KB
-rwxr-xr-x
defaultacl
239
B
-rw-r--r--
delete_group.cgi
1.36
KB
-rwxr-xr-x
delete_groups.cgi
1.45
KB
-rwxr-xr-x
delete_session.cgi
485
B
-rwxr-xr-x
delete_user.cgi
668
B
-rwxr-xr-x
delete_users.cgi
2.93
KB
-rwxr-xr-x
edit_acl.cgi
2.75
KB
-rwxr-xr-x
edit_group.cgi
4.38
KB
-rwxr-xr-x
edit_pass.cgi
1.82
KB
-rwxr-xr-x
edit_rbac.cgi
951
B
-rwxr-xr-x
edit_sql.cgi
3.78
KB
-rwxr-xr-x
edit_sync.cgi
1.22
KB
-rwxr-xr-x
edit_unix.cgi
2.76
KB
-rwxr-xr-x
edit_user.cgi
14.2
KB
-rwxr-xr-x
feedback_files.pl
336
B
-rwxr-xr-x
index.cgi
8.29
KB
-rwxr-xr-x
list_sessions.cgi
2.39
KB
-rwxr-xr-x
log_parser.pl
1.78
KB
-rwxr-xr-x
makedn.cgi
1.75
KB
-rwxr-xr-x
maketables.cgi
1.23
KB
-rwxr-xr-x
md5-lib.pl
7.58
KB
-rwxr-xr-x
module.info
187
B
-rw-r--r--
module.info.af
0
B
-rw-r--r--
module.info.af.auto
139
B
-rw-r--r--
module.info.ar
193
B
-rw-r--r--
module.info.ar.auto
19
B
-rw-r--r--
module.info.be
0
B
-rw-r--r--
module.info.be.auto
271
B
-rw-r--r--
module.info.bg
43
B
-rw-r--r--
module.info.bg.auto
192
B
-rw-r--r--
module.info.ca
129
B
-rw-r--r--
module.info.ca.auto
19
B
-rw-r--r--
module.info.cs
28
B
-rw-r--r--
module.info.cs.auto
116
B
-rw-r--r--
module.info.da
23
B
-rw-r--r--
module.info.da.auto
115
B
-rw-r--r--
module.info.de
146
B
-rw-r--r--
module.info.de.auto
19
B
-rw-r--r--
module.info.el
0
B
-rw-r--r--
module.info.el.auto
253
B
-rw-r--r--
module.info.es
125
B
-rw-r--r--
module.info.es.auto
24
B
-rw-r--r--
module.info.eu
0
B
-rw-r--r--
module.info.eu.auto
159
B
-rw-r--r--
module.info.fa
0
B
-rw-r--r--
module.info.fa.auto
238
B
-rw-r--r--
module.info.fi
0
B
-rw-r--r--
module.info.fi.auto
150
B
-rw-r--r--
module.info.fr
28
B
-rw-r--r--
module.info.fr.auto
154
B
-rw-r--r--
module.info.he
0
B
-rw-r--r--
module.info.he.auto
193
B
-rw-r--r--
module.info.hr
0
B
-rw-r--r--
module.info.hr.auto
147
B
-rw-r--r--
module.info.hu
30
B
-rw-r--r--
module.info.hu.auto
152
B
-rw-r--r--
module.info.it
22
B
-rw-r--r--
module.info.it.auto
123
B
-rw-r--r--
module.info.ja
25
B
-rw-r--r--
module.info.ja.auto
137
B
-rw-r--r--
module.info.ko
25
B
-rw-r--r--
module.info.ko.auto
128
B
-rw-r--r--
module.info.lt
0
B
-rw-r--r--
module.info.lt.auto
182
B
-rw-r--r--
module.info.lv
0
B
-rw-r--r--
module.info.lv.auto
177
B
-rw-r--r--
module.info.ms
120
B
-rw-r--r--
module.info.ms.auto
19
B
-rw-r--r--
module.info.mt
0
B
-rw-r--r--
module.info.mt.auto
166
B
-rw-r--r--
module.info.nl
26
B
-rw-r--r--
module.info.nl.auto
119
B
-rw-r--r--
module.info.no
23
B
-rw-r--r--
module.info.no.auto
113
B
-rw-r--r--
module.info.pl
133
B
-rw-r--r--
module.info.pl.auto
19
B
-rw-r--r--
module.info.pt
31
B
-rw-r--r--
module.info.pt.auto
126
B
-rw-r--r--
module.info.pt_BR
31
B
-rw-r--r--
module.info.pt_BR.auto
132
B
-rw-r--r--
module.info.ro
0
B
-rw-r--r--
module.info.ro.auto
156
B
-rw-r--r--
module.info.ru
40
B
-rw-r--r--
module.info.ru.auto
190
B
-rw-r--r--
module.info.sk
29
B
-rw-r--r--
module.info.sk.auto
129
B
-rw-r--r--
module.info.sl
0
B
-rw-r--r--
module.info.sl.auto
156
B
-rw-r--r--
module.info.sv
26
B
-rw-r--r--
module.info.sv.auto
122
B
-rw-r--r--
module.info.th
0
B
-rw-r--r--
module.info.th.auto
248
B
-rw-r--r--
module.info.tr
32
B
-rw-r--r--
module.info.tr.auto
152
B
-rw-r--r--
module.info.uk
0
B
-rw-r--r--
module.info.uk.auto
246
B
-rw-r--r--
module.info.ur
0
B
-rw-r--r--
module.info.ur.auto
240
B
-rw-r--r--
module.info.vi
0
B
-rw-r--r--
module.info.vi.auto
183
B
-rw-r--r--
module.info.zh
28
B
-rw-r--r--
module.info.zh.auto
106
B
-rw-r--r--
module.info.zh_TW
28
B
-rw-r--r--
module.info.zh_TW.auto
112
B
-rw-r--r--
negativeacl
13
B
-rw-r--r--
openssl.cnf
6.02
KB
-rw-r--r--
postinstall.pl
996
B
-rwxr-xr-x
prefs.info
22
B
-rw-r--r--
save_acl.cgi
2.85
KB
-rwxr-xr-x
save_group.cgi
3.76
KB
-rwxr-xr-x
save_pass.cgi
1.72
KB
-rwxr-xr-x
save_sql.cgi
3.38
KB
-rwxr-xr-x
save_sync.cgi
730
B
-rwxr-xr-x
save_twofactor.cgi
2.25
KB
-rwxr-xr-x
save_unix.cgi
2.2
KB
-rwxr-xr-x
save_user.cgi
11.32
KB
-rwxr-xr-x
schema.cgi
612
B
-rwxr-xr-x
switch.cgi
726
B
-rwxr-xr-x
system_info.pl
2.27
KB
-rw-r--r--
twofactor.pl
709
B
-rwxr-xr-x
twofactor_form.cgi
2.01
KB
-rwxr-xr-x
useradmin_update.pl
3.12
KB
-rwxr-xr-x
webmin.schema
1.34
KB
-rw-r--r--
Delete
Unzip
Zip
${this.title}
Close
Code Editor : edit_user.cgi
#!/usr/bin/perl # edit_user.cgi # Edit a new or existing webmin user use strict; use warnings; no warnings 'redefine'; no warnings 'uninitialized'; require './acl-lib.pl'; our (%in, %text, %config, %gconfig, %access, $config_directory, $base_remote_user, $remote_user); &foreign_require("webmin", "webmin-lib.pl"); &ReadParse(); my ($u, %user, $safe); if ($in{'user'}) { # Editing an existing user &can_edit_user($in{'user'}) || &error($text{'edit_euser'}); &ui_print_header(undef, $text{'edit_title'}, ""); $u = &get_user($in{'user'}); $u || &error($text{'edit_egone'}); %user = %$u; my %gacl = &get_module_acl($in{'user'}, ''); $safe = $gacl{'_safe'}; } else { # Creating a new user $access{'create'} || &error($text{'edit_ecreate'}); if ($in{'clone'}) { # Initial settings come from clone $u = &get_user($in{'clone'}); %user = %$u; delete($user{'name'}); my %gacl = &get_module_acl($in{'clone'}, ''); $safe = $gacl{'_safe'}; } else { # User starts out empty %user = ( ); $safe = $in{'safe'}; } &ui_print_header(undef, $safe ? $text{'edit_title3'} : $text{'edit_title2'}, ""); } my $me = &get_user($base_remote_user); # Give up if readonly if ($user{'readonly'} && !$in{'readwrite'}) { my %minfo = &get_module_info($user{'readonly'}); print &text('edit_readonly', $minfo{'desc'}, "edit_user.cgi?user=$in{'user'}&readwrite=1"),"<p>\n"; &ui_print_footer("", $text{'index_return'}); exit; } print &ui_form_start("save_user.cgi", "post"); if ($in{'user'}) { print &ui_hidden("old", $user{'name'}); print &ui_hidden("oldpass", $user{'pass'}); } if ($in{'clone'}) { print &ui_hidden("clone", $in{'clone'}); } print &ui_hidden("safe", $safe); print &ui_hidden_table_start($text{'edit_rights'}, "width=100%", 2, "rights", 1, [ "width=30%" ]); # Username print &ui_table_row($text{'edit_user'}, $access{'rename'} || !$in{'user'} ? &ui_textbox("name", $user{'name'}, 30, 0, undef, "autocomplete=off") : $user{'name'}); # Source user for clone if ($in{'clone'}) { print &ui_table_row($text{'edit_cloneof'}, "<tt>$in{'clone'}</tt>"); } # Find and show parent group my @glist = &list_groups(); my @mcan = $access{'gassign'} eq '*' ? ( ( map { $_->{'name'} } @glist ), '_none' ) : split(/\s+/, $access{'gassign'}); my %gcan = map { $_, 1 } @mcan; my $memg; if (@glist && %gcan) { my @opts = ( ); if ($gcan{'_none'}) { push(@opts, [ undef, "<$text{'edit_none'}>" ]); } foreach my $g (@glist) { if (&indexof($user{'name'}, @{$g->{'members'}}) >= 0 || $in{'clone'} && &indexof($in{'clone'}, @{$g->{'members'}}) >= 0) { $memg = $g; } next if (!$gcan{$g->{'name'}} && $memg ne $g); push(@opts, [ $g->{'name'} ]); } print &ui_table_row($text{'edit_group'}, &ui_select("group", $memg->{'name'}, \@opts)); } # Show password type menu and current password my $passmode = !$in{'user'} ? 0 : $user{'pass'} eq 'x' ? 3 : $user{'sync'} ? 2 : $user{'pass'} eq 'e' ? 5 : $user{'pass'} eq '*LK*' ? 4 : 1; my %miniserv; &get_miniserv_config(\%miniserv); my @opts = ( [ 0, "$text{'edit_set'} .." ] ); if ($in{'user'}) { push(@opts, [ 1, $text{'edit_dont'} ]); } push(@opts, [ 3, $text{'edit_unix'} ]); if ($user{'sync'}) { push(@opts, [ 2, $text{'edit_same'} ]); } if ($miniserv{'extauth'}) { push(@opts, [ 5, $text{'edit_extauth'} ]); } push(@opts, [ 4, $text{'edit_lock'} ]); my ($lockbox, $tempbox) = ("", ""); if ($passmode == 1) { $lockbox = &ui_checkbox("lock", 1, $text{'edit_templock'}, $user{'pass'} =~ /^\!/ ? 1 : 0); } if ($passmode != 3 && $passmode != 4) { $tempbox = &ui_checkbox("temp", 1, $text{'edit_temppass'}, $user{'temppass'}); } my $expmsg = ""; if ($user{'lastchange'} && $miniserv{'pass_maxdays'}) { my $daysold = int((time() - $user{'lastchange'})/(24*60*60)); if ($miniserv{'pass_lockdays'} && $daysold > $miniserv{'pass_lockdays'}) { $expmsg = "<br>"."<font color=#ff0000>". &text('edit_passlocked', $daysold)."</font>"; } elsif ($daysold > $miniserv{'pass_maxdays'}) { $expmsg = "<br>"."<font color=#ffaa00>". &text('edit_passmax', $daysold)."</font>"; } elsif ($daysold) { $expmsg = "<br>".&text('edit_passold', $daysold); } else { $expmsg = "<br>".$text{'edit_passtoday'}; } } my $js = "onChange='form.pass.disabled = value != 0;'"; print &ui_table_row($text{'edit_pass'}, &ui_select("pass_def", $passmode, \@opts, 1, 0, 0, 0, $js)." ". &ui_password("pass", undef, 25, $passmode != 0, undef, "autocomplete=off"). ($lockbox || $tempbox ? "<br>" : "").$lockbox.$tempbox.$expmsg); # Real name print &ui_table_row($text{'edit_real'}, &ui_textbox("real", $user{'real'}, 60)); # Storage type if ($in{'user'}) { print &ui_table_row($text{'edit_proto'}, $text{'edit_proto_'.($user{'proto'} || '')}); } # Safe or not? my $smsg; if ($in{'user'} && $safe) { $smsg = &ui_radio("unsafe", 0, [ [ 0, $text{'edit_safe1'} ], [ 1, $text{'edit_safe0'} ] ]); } else { $smsg = $safe ? $text{'edit_safe1'} : $text{'edit_safe0'}; } print &ui_table_row($text{'edit_safe'}, $smsg); print &ui_hidden_table_end("rights"); # Start of UI options section my $showui = $access{'chcert'} || $access{'lang'} || $access{'cats'} || $access{'theme'}; if ($showui) { print &ui_hidden_table_start($text{'edit_ui'}, "width=100%", 2, "ui", 0, [ "width=30%" ]); } if ($access{'chcert'}) { # SSL certificate name print &ui_table_row($text{'edit_cert'}, &ui_opt_textbox("cert", $user{'cert'}, 50, $text{'edit_none'})); } if ($access{'lang'}) { # Current language my $ulang = safe_language($user{'lang'}); print &ui_table_row($text{'edit_lang'}, &ui_radio("lang_def", $ulang ? 0 : 1, [ [ 1, $text{'default'} ], [ 0, &ui_select("lang", $ulang, [ map { [ $_->{'lang'}, $_->{'desc'}."" ] } &list_languages() ]) ] ])); } if ($access{'locale'}) { # Current locale eval "use DateTime; use DateTime::Locale; use DateTime::TimeZone;"; if (!$@) { my $locales = &list_locales(); my %localesrev = reverse %{$locales}; my $locale_auto = &parse_accepted_language(); print &ui_table_row($text{'edit_locale'}, &ui_radio("locale_def", $user{'locale'} ? 0 : 1, [ [ 1, $text{'default'} ], [ 0, &ui_select("locale", $user{'locale'} || $gconfig{'locale'} || &get_default_system_locale(), [ map { [ $localesrev{$_}, $_ ] } sort values %{$locales} ]) ] ]), undef, [ "valign=middle","valign=middle" ]); } } if ($access{'cats'}) { # Show categorized modules? print &ui_table_row($text{'edit_notabs'}, &ui_radio("notabs", $user{'notabs'} || 0, [ [ 1, $text{'yes'} ], [ 2, $text{'no'} ], [ 0, $text{'default'} ] ])); } my @all = &webmin::list_visible_themes($user{'theme'}); my @themes = grep { !$_->{'overlay'} } @all; my @overlays = grep { $_->{'overlay'} } @all; if ($access{'theme'}) { # Current theme my @topts = ( ); push(@topts, !$user{'theme'} ? [ '', $text{'edit_themedef'} ] : ()); foreach my $t (@themes) { push(@topts, [ $t->{'dir'}, $t->{'desc'} ]); } print &ui_table_row($text{'edit_theme'}, &ui_radio("theme_def", defined($user{'theme'}) ? 0 : 1, [ [ 1, $text{'edit_themeglobal'} ], [ 0, &ui_select("theme", $user{'theme'}, \@topts) ] ])); } if ($access{'theme'} && @overlays) { # Overlay theme, if any print &ui_table_row($text{'edit_overlay'}, &ui_radio("overlay_def", defined($user{'overlay'}) ? 0 : 1, [ [ 1, $text{'edit_overlayglobal'} ], [ 0, &ui_select("overlay", $user{'overlay'}, [ map { [ $_->{'dir'}, $_->{'desc'} ] } @overlays ] ) ] ])); } if ($showui) { print &ui_hidden_table_end("ui"); } # Start of security options section my $showsecurity = $access{'logouttime'} || $access{'ips'} || $access{'minsize'} || &supports_rbac() && $access{'mode'} == 0 || $access{'times'}; if ($showsecurity) { print &ui_hidden_table_start($text{'edit_security'}, "width=100%", 2, "security", 0, [ "width=30%" ]); } if ($access{'logouttime'}) { # Show logout time print &ui_table_row($text{'edit_logout'}, &ui_opt_textbox("logouttime", $user{'logouttime'}, 5, $text{'default'})." ".$text{'edit_mins'}); } if ($access{'minsize'}) { # Show minimum password length, for just this user print &ui_table_row($text{'edit_minsize'}, &ui_opt_textbox("minsize", $user{'minsize'}, 5, $text{'default'})." ".$text{'edit_chars'}); } if ($access{'nochange'} && $miniserv{'pass_maxdays'}) { # Opt out of forced password change, for this user print &ui_table_row($text{'edit_nochange'}, &ui_radio("nochange", $user{'nochange'}, [ [ 0, $text{'yes'} ], [ 1, $text{'no'} ] ])); } if ($access{'ips'}) { # Allowed IP addresses print &ui_table_row(&hlink("<b>$text{'edit_ips'}</b>", "ips"), &ui_radio("ipmode", $user{'allow'} ? 1 : $user{'deny'} ? 2 : 0, [ [ 0, $text{'edit_all'}."<br>" ], [ 1, $text{'edit_allow'}."<br>" ], [ 2, $text{'edit_deny'}."<br>" ] ]). &ui_textarea("ips", join("\n", split(/\s+/, $user{'allow'} || $user{'deny'} || "")), 4, 30)); } if (&supports_rbac() && $access{'mode'} == 0) { # Deny access to modules not managed by RBAC? print &ui_table_row($text{'edit_rbacdeny'}, &ui_radio("rbacdeny", $user{'rbacdeny'} ? 1 : 0, [ [ 0, $text{'edit_rbacdeny0'} ], [ 1, $text{'edit_rbacdeny1'} ] ])); } if ($access{'times'}) { # Show allowed days of the week my %days = map { $_, 1 } split(/,/, $user{'days'} || ''); my $daysels = ""; for(my $i=0; $i<7; $i++) { $daysels .= &ui_checkbox("days", $i, $text{'day_'.$i}, $days{$i}); } print &ui_table_row($text{'edit_days'}, &ui_radio("days_def", !defined($user{'days'}) || $user{'days'} eq '' ? 1 : 0, [ [ 1, $text{'edit_alldays'} ], [ 0, $text{'edit_seldays'} ] ])."<br>". $daysels); # Show allow hour/minute range my ($hf, $mf) = split(/\./, $user{'hoursfrom'} || ''); my ($ht, $mt) = split(/\./, $user{'hoursto'} || ''); print &ui_table_row($text{'edit_hours'}, &ui_radio("hours_def", !defined($hf) || $hf eq '' ? 1 : 0, [ [ 1, $text{'edit_allhours'} ], [ 0, &text('edit_selhours', &ui_textbox("hours_hfrom", $hf, 2), &ui_textbox("hours_mfrom", $mf, 2), &ui_textbox("hours_hto", $ht, 2), &ui_textbox("hours_mto", $mt, 2)) ] ])); } # Two-factor details if ($user{'twofactor_provider'}) { my ($prov) = grep { $_->[0] eq $user{'twofactor_provider'} } &webmin::list_twofactor_providers(); print &ui_table_row($text{'edit_twofactor'}, &text('edit_twofactorprov', "<i>$prov->[1]</i>", "<tt>$user{'twofactor_id'}</tt>")."<br>\n". &ui_checkbox('cancel', 1, $text{'edit_twofactorcancel'}, 0)); } elsif ($miniserv{'twofactor_provider'}) { print &ui_table_row($text{'edit_twofactor'}, $text{'edit_twofactornone'}." ". &ui_submit($text{'edit_twofactoradd'}, "twofactor")); } print &ui_hidden_table_end("security"); # Work out which modules can be selected @mcan = $access{'mode'} == 1 ? @{$me->{'modules'}} : $access{'mode'} == 2 ? split(/\s+/, $access{'mods'}) : &list_modules(); my (%mcan, %has); map { $mcan{$_}++ } @mcan; map { $has{$_}++ } @{$user{'modules'}}; # Start of modules section my @groups = &list_groups(); print &ui_hidden_table_start(@groups ? $text{'edit_modsg'} : $text{'edit_mods'}, "width=100%", 2, "mods"); # Build list of modules, based on safe mode my @allmods = &list_module_infos(); if ($safe) { @allmods = grep { $has{$_->{'dir'}} || &get_safe_acl($_->{'dir'}) } @allmods; } # Show available modules, under categories my @mlist = grep { $access{'others'} || $has{$_->{'dir'}} || $mcan{$_->{'dir'}} } @allmods; my @links = ( &select_all_link("mod", 0, $text{'edit_selall'}), &select_invert_link("mod", 0, $text{'edit_invert'}) ); my @cats = &unique(map { $_->{'category'} || '' } @mlist); my %catnames; &read_file("$config_directory/webmin.catnames", \%catnames); my $grids = ""; foreach my $c (sort { $b cmp $a } @cats) { my @cmlist = grep { ($_->{'category'} || '') eq $c } @mlist; $grids .= "<b>".($catnames{$c} || $text{'category_'.$c} || '')."</b><br>\n"; my @grid = ( ); my $sw = 0; foreach my $m (@cmlist) { my $md = $m->{'dir'}; my $fromgroup = $memg && &indexof($md, @{$memg->{'modules'}}) >= 0; if ($mcan{$md} && $fromgroup) { # Module comes from group push(@grid, (sprintf "<img src=images/%s.gif> %s\n", $has{$md} ? 'tick' : 'empty', $m->{'desc'}). ($has{$md} ? &ui_hidden("mod", $md) : "")); } elsif ($mcan{$md}) { my $label; if ($access{'acl'} && $in{'user'} && !$safe) { # Show link for editing ACL $label = ui_link("edit_acl.cgi?" . "mod=" . urlize($m->{'dir'}) . "&user=". urlize($in{'user'}), $m->{'desc'}) . "\n"; } else { # No privileges to edit ACL $label = $m->{'desc'}; } push(@grid, &ui_checkbox("mod", $md, $label,$has{$md})); } else { push(@grid, (sprintf "<img src=images/%s.gif> %s\n", $has{$md} ? 'tick' : 'empty', $m->{'desc'})); } } $grids .= &ui_grid_table(\@grid, 2, 100, [ "width=50%", "width=50%" ]); } print &ui_table_row(undef, &ui_links_row(\@links). $grids. &ui_links_row(\@links), 2); print &ui_hidden_table_end("mods"); # Add global ACL section, but only if not set from the group my $groupglobal = $memg && -r "$config_directory/$memg->{'name'}.acl"; if ($access{'acl'} && !$groupglobal && $in{'user'} && !$safe) { print &ui_hidden_table_start($text{'edit_global'}, "width=100%", 2, "global", 0, [ "width=30%" ]); my %uaccess; %uaccess = &get_module_acl($in{'user'}, "", 1); print &ui_hidden("acl_security_form", 1); &foreign_require("", "acl_security.pl"); &foreign_call("", "acl_security_form", \%uaccess); print &ui_hidden_table_end("global"); } # Generate form end buttons my @buts = ( ); push(@buts, [ undef, $in{'user'} ? $text{'save'} : $text{'create'} ]); if ($in{'user'}) { if ($access{'create'}) { push(@buts, [ "but_clone", $text{'edit_clone'} ]); } if (&foreign_available("webminlog")) { push(@buts, [ "but_log", $text{'edit_log'} ]); } if ($access{'switch'} && $main::session_id && $in{'user'} ne $remote_user) { push(@buts, [ "but_switch", $text{'edit_switch'} ]); } if ($access{'delete'}) { push(@buts, [ "but_delete", $text{'delete'} ]); } } print &ui_form_end(\@buts); &ui_print_footer("", $text{'index_return'});
Close