2 require 'usermin-lib.pl';
4 # acl_security_form(&options)
5 # Output HTML for editing security options for the usermin module
8 print "<tr> <td valign=top><b>$text{'acl_icons'}</b></td>\n";
9 print "<td colspan=3><select name=icons multiple size=10>\n";
10 foreach $i (&get_icons()) {
11 printf "<option value=%s %s>%s\n",
12 $i, $_[0]->{$i} ? "selected" : "", $text{"${i}_title"};
14 print "</select></td> </tr>\n";
16 print "<tr> <td valign=top><b>$text{'acl_mods'}</b></td> <td colspan=3>\n";
17 printf "<input type=radio name=mods_def value=1 %s> %s\n",
18 $_[0]->{'mods'} eq '*' ? 'checked' : '', $text{'acl_all'};
19 printf "<input type=radio name=mods_def value=0 %s> %s<br>\n",
20 $_[0]->{'mods'} eq '*' ? '' : 'checked', $text{'acl_sel'};
21 local %mods = map { $_, 1 } split(/\s+/, $_[0]->{'mods'});
22 print "<select name=mods multiple size=10>\n";
23 foreach $m (&list_modules()) {
24 printf "<option value=%s %s>%s\n",
25 $m->{'dir'}, $mods{$m->{'dir'}} ? "selected" : "", $m->{'desc'};
27 print "</select></td> </tr>\n";
29 print "<tr> <td><b>$text{'acl_stop'}</b></td>\n";
30 printf "<td><input type=radio name=stop value=1 %s> %s\n",
31 $_[0]->{'stop'} ? "checked" : "", $text{'yes'};
32 printf "<input type=radio name=stop value=0 %s> %s</td>\n",
33 $_[0]->{'stop'} ? "" : "checked", $text{'no'};
35 print "<td><b>$text{'acl_bootup'}</b></td>\n";
36 printf "<td><input type=radio name=bootup value=1 %s> %s\n",
37 $_[0]->{'bootup'} ? "checked" : "", $text{'yes'};
38 printf "<input type=radio name=bootup value=0 %s> %s</td> </tr>\n",
39 $_[0]->{'bootup'} ? "" : "checked", $text{'no'};
42 # acl_security_save(&options)
43 # Parse the form for security options for the usermin module
46 local %icons = map { $_, 1 } split(/\0/, $in{'icons'});
47 foreach $i (&get_icons()) {
48 $_[0]->{$i} = $icons{$i};
50 $_[0]->{'mods'} = $in{'mods_def'} ? "*" : join(" ", split(/\0/, $in{'mods'}));
51 $_[0]->{'stop'} = $in{'stop'};
52 $_[0]->{'bootup'} = $in{'bootup'};
57 return ( "access" ,"bind" ,"ui" ,"umods" ,"os" ,"lang" ,"upgrade" ,"session" ,"assignment" ,"categories" ,"themes", "referers", "anon", "ssl" ,"configs" ,"acl" ,"restrict" ,"users" ,"defacl", "sessions", "blocked", "advanced" );