\n";
# Display permission options (chmod, delete, etc..)
@permtypes = ( 'chmod', 'delete', 'overwrite', 'rename', 'umask' );
foreach $t (@permtypes) {
push(@perms, &find($t, $conf));
}
@perms = ( ( sort { $a->{'line'} <=> $b->{'line'} } @perms ), { } );
print " | $text{'perm_perms'} | \n";
print "\n";
print " | $text{'perm_type'} | \n",
"$text{'perm_can'} | \n",
"$text{'perm_users'} | \n",
"$text{'perm_classes'} | \n";
$i = 0;
foreach $p (@perms) {
$v = $p->{'values'};
print "\n";
print " | \n";
printf " %s\n",
lc($v->[0]) eq 'yes' ? 'checked' : '', $text{'yes'};
printf " %s | \n",
lc($v->[0]) eq 'yes' ? '' : 'checked', $text{'no'};
local (%users, $notall);
map { $users{$_}++; $notall++ if (/class=/) } split(/,/, $v->[1]);
print "\n";
foreach $u ('anonymous', 'guest', 'real') {
printf " %s\n",
$i, $u, $users{$u} ? 'checked' : '', $text{"perm_$u"};
}
print " | \n";
if (!$notall) {
map { $users{"class=".$_->[0]}++ } @class;
}
print "\n";
foreach $c (@class) {
printf " %s\n",
$i, $c->[0], $users{"class=$c->[0]"} ? 'checked' : '',
$c->[0];
}
print " | \n";
$i++;
}
print " $text{'perm_note'} | \n";
print "
| \n";
# Display path-filter options
@filter = ( &find_value('path-filter', $conf), [ ] );
print " | $text{'perm_filter'} | \n";
print " | $text{'perm_char'} | \n",
"$text{'perm_regexp'} | \n",
"$text{'perm_types'} | \n",
"$text{'perm_mesg'} | \n";
$i = 0;
foreach $f (@filter) {
print "\n";
print " | \n";
printf " | \n",
join(" ", @$f[3..@$f-1]);
print "\n";
foreach $u ('anonymous', 'guest', 'real') {
printf " %s\n",
$i, $u, $f->[0] =~ /$u/ ? 'checked' : '',
$text{"perm_$u"};
}
print " | \n";
print " | \n";
$i++;
}
print " | \n";
print " |