do 'webalizer-lib.pl'; # acl_security_form(&options) # Output HTML for editing security options for the webalizer module sub acl_security_form { print " $text{'acl_view'}\n"; printf " %s\n", $_[0]->{'view'} ? "checked" : "", $text{'yes'}; printf " %s\n", $_[0]->{'view'} ? "" : "checked", $text{'no'}; print "$text{'acl_global'}\n"; printf " %s\n", $_[0]->{'global'} ? "checked" : "", $text{'yes'}; printf " %s \n", $_[0]->{'global'} ? "" : "checked", $text{'no'}; print " $text{'acl_add'}\n"; printf " %s\n", $_[0]->{'add'} ? "checked" : "", $text{'yes'}; printf " %s \n", $_[0]->{'add'} ? "" : "checked", $text{'no'}; print " $text{'acl_user'}\n"; printf " %s\n", $_[0]->{'user'} eq "" ? "checked" : "", $text{'acl_this'}; printf " %s\n", $_[0]->{'user'} eq "*" ? "checked" : "", $text{'acl_any'}; printf "\n", $_[0]->{'user'} eq "*" || $_[0]->{'user'} eq "" ? "" : "checked"; printf " %s \n", $_[0]->{'user'} eq "*" ? "" : $_[0]->{'user'}, &user_chooser_button("user"); print " $text{'acl_dir'}\n"; print " \n"; } # acl_security_save(&options) # Parse the form for security options for the shell module sub acl_security_save { $_[0]->{'view'} = $in{'view'}; $_[0]->{'global'} = $in{'global'}; $_[0]->{'add'} = $in{'add'}; $_[0]->{'dir'} = $in{'dir'}; $_[0]->{'user'} = $in{'user_def'} == 2 ? "*" : $in{'user_def'} == 1 ? "" : $in{'user'}; }