6 [ 'DirFakeUser', 0, 2, 'virtual anon global', 1.15 ],
7 [ 'DirFakeGroup', 0, 2, 'virtual anon global', 1.15 ],
8 [ 'DirFakeMode', 0, 2, 'virtual anon global', 1.16 ],
9 [ 'LsDefaultOptions', 0, 2, 'virtual anon global', 1.16 ],
10 [ 'ListOptions', 0, 2, 'virtual anon global directory ftpaccess', 1.208 ],
11 [ 'ShowDotFiles', 0, 2, 'virtual anon global', '0.99-1.206' ],
13 return &make_directives($rv, $_[0], "mod_ls");
19 local $w = $_[0]->{'words'}->[0];
20 $rv .= sprintf "<input type=radio name=DirFakeGroup value=off %s> %s\n",
21 lc($w) eq 'off' ? "checked" : "", $text{'no'};
22 $rv .= sprintf "<input type=radio name=DirFakeGroup value='' %s> %s\n",
23 lc($w) ? "" : "checked", $text{'default'};
24 $rv .= sprintf "<input type=radio name=DirFakeGroup value=on %s> %s\n",
25 lc($w) eq 'on' ? "checked" : "", $text{'mod_ls_fakeasgroup'};
27 $rv .= "<table border cellpadding=0 cellspacing=0><tr><td>";
28 local $a = $_[0]->{'words'}->[1];
29 $rv .= sprintf "<input type=radio name=DirFakeGroup_m value=0 %s> %s\n",
30 $a ? "" : "checked", "<tt>ftp</tt>";
31 $rv .= sprintf "<input type=radio name=DirFakeGroup_m value=1 %s> %s\n",
32 $a eq "~" ? "checked" : "", $text{'mod_ls_fakesamegroup'};
33 $rv .= sprintf "<input type=radio name=DirFakeGroup_m value=2 %s>\n",
34 $a eq "~" || !$a ? "" : "checked";
35 $rv .= sprintf "<input name=DirFakeGroup_a size=12 value='%s'>\n",
37 $rv .= "</td></tr></table>\n";
39 return (2, $text{'mod_ls_fakegroup'}, $rv);
43 if (!$in{'DirFakeGroup'}) {
47 local $s = $in{'DirFakeGroup'};
48 if ($in{'DirFakeGroup_m'} == 1) {
51 elsif ($in{'DirFakeGroup_m'} == 2) {
52 $in{'DirFakeGroup_a'} =~ /^\S+$/ ||
53 &error($text{'mod_ls_efakegroup'});
54 $s .= " ".$in{'DirFakeGroup_a'};
63 local $w = $_[0]->{'words'}->[0];
64 $rv .= sprintf "<input type=radio name=DirFakeUser value=off %s> %s\n",
65 lc($w) eq 'off' ? "checked" : "", $text{'no'};
66 $rv .= sprintf "<input type=radio name=DirFakeUser value='' %s> %s\n",
67 lc($w) ? "" : "checked", $text{'default'};
68 $rv .= sprintf "<input type=radio name=DirFakeUser value=on %s> %s\n",
69 lc($w) eq 'on' ? "checked" : "", $text{'mod_ls_fakeasuser'};
71 $rv .= "<table border cellpadding=0 cellspacing=0><tr><td>";
72 local $a = $_[0]->{'words'}->[1];
73 $rv .= sprintf "<input type=radio name=DirFakeUser_m value=0 %s> %s\n",
74 $a ? "" : "checked", "<tt>ftp</tt>";
75 $rv .= sprintf "<input type=radio name=DirFakeUser_m value=1 %s> %s\n",
76 $a eq "~" ? "checked" : "", $text{'mod_ls_fakesameuser'};
77 $rv .= sprintf "<input type=radio name=DirFakeUser_m value=2 %s>\n",
78 $a eq "~" || !$a ? "" : "checked";
79 $rv .= sprintf "<input name=DirFakeUser_a size=12 value='%s'>\n",
81 $rv .= "</td></tr></table>\n";
83 return (2, $text{'mod_ls_fakeuser'}, $rv);
87 if (!$in{'DirFakeUser'}) {
91 local $s = $in{'DirFakeUser'};
92 if ($in{'DirFakeUser_m'} == 1) {
95 elsif ($in{'DirFakeUser_m'} == 2) {
96 $in{'DirFakeUser_a'} =~ /^\S+$/ ||
97 &error($text{'mod_ls_efakeuser'});
98 $s .= " ".$in{'DirFakeUser_a'};
106 return (1, $text{'mod_ls_fakemode'},
107 &opt_input($_[0]->{'value'}, "DirFakeMode", $text{'mod_ls_nofake'}, 5));
111 return &parse_opt("DirFakeMode", '0[0-7]{3}', $text{'mod_ls_efakemode'});
114 sub edit_LsDefaultOptions
116 return (1, $text{'mod_ls_ls'},
117 &opt_input($_[0]->{'value'}, "LsDefaultOptions", $text{'default'}, 20));
119 sub save_LsDefaultOptions
121 return &parse_opt("LsDefaultOptions", '\S', $text{'mod_ls_els'});
124 sub edit_ShowDotFiles
126 return (1, $text{'mod_ls_dotfiles'},
127 &choice_input($_[0]->{'value'}, "ShowDotFiles", "",
128 "$text{'yes'},on", "$text{'no'},off",
129 "$text{'default'},"));
131 sub save_ShowDotFiles
133 return &parse_choice("ShowDotFiles", "");
138 local $rv = &opt_input($_[0]->{'words'}->[0], "ListOptions",
139 $text{'default'}, 20);
140 $rv .= sprintf "<input type=checkbox name=ListOptions_strict value=1 %s> %s\n",
141 lc($_[0]->{'words'}->[1]) eq 'strict' ? "checked" : "",
142 $text{'mod_ls_strict'};
143 return (2, $text{'mod_ls_options'}, $rv);
147 if ($in{"ListOptions_def"}) {
151 local $rv = '"'.$in{"ListOptions"}.'"';
152 $rv .= " strict" if ($in{'ListOptions_strict'});