📄 edit_access.cgi
字号:
#!/usr/local/bin/perl# edit_access.cgi# Edit access control optionsrequire './majordomo-lib.pl';&ReadParse();%access = &get_module_acl();&can_edit_list(\%access, $in{'name'}) || &error("You are not allowed to edit this mailing list");$list = &get_list($in{'name'}, &get_config());$conf = &get_list_config($list->{'config'});&header("Access Control", "");print "<center><font size=+1>For <tt>$in{'name'}</tt></font></center>\n";print "<hr>\n";print "<form action=save_access.cgi>\n";print "<input type=hidden name=name value='$in{'name'}'>\n";print "<table border width=100%>\n";print "<tr $tb> <td><b>Access control for majordomo commands</b></td> </tr>\n";print "<tr $cb> <td><table>\n";print "<tr>\n";print &choice_input("get_access", "Access to <tt>get</tt> command", $conf, "open","Anyone", "list","List members", "closed","Nobody");print &choice_input("index_access", "Access to <tt>index</tt> command", $conf, "open","Anyone", "list","List members", "closed","Nobody");print "</tr>\n";print "<tr>\n";print &choice_input("info_access", "Access to <tt>info</tt> command", $conf, "open","Anyone", "list","List members", "closed","Nobody");print &choice_input("intro_access", "Access to <tt>intro</tt> command", $conf, "open","Anyone", "list","List members", "closed","Nobody");print "</tr>\n";print "<tr>\n";print &choice_input("which_access", "Access to <tt>which</tt> command", $conf, "open","Anyone", "list","List members", "closed","Nobody");print &choice_input("who_access", "Access to <tt>who</tt> command", $conf, "open","Anyone", "list","List members", "closed","Nobody");print "</tr>\n";$adv = &find_value("advertise", $conf);$noadv = &find_value("noadvertise", $conf);print "<tr>\n";print "<td valign=top><b>Include this list in response to <tt>lists</tt> ", "command for..</b></td> <td valign=top>\n";printf "<input type=radio name=adv_mode value=0 %s> Everyone<br>\n", $adv !~ /\S/ && $noadv !~ /\S/ ? "checked" : "";printf "<input type=radio name=adv_mode value=1 %s> %s<br>\n", $adv =~ /\S/ ? "checked" : "", "Addresses matching regexps..";printf "<input type=radio name=adv_mode value=2 %s> %s<br>\n", $noadv =~ /\S/ ? "checked" : "", "Addresses not matching regexps..";print "</td> <td valign=top colspan=2>\n";printf "<textarea rows=4 cols=40 name=adv>%s</textarea></td> </tr>\n", $adv =~ /\S/ ? $adv : $noadv =~ /\S/ ? $noadv : "";$res = &find_value("restrict_post", $conf);$ldir = &perl_var_replace(&find_value("listdir", &get_config()), &get_config());$reslist = $res eq $in{'name'} || $res eq "$ldir/$in{'name'}";print "<tr> <td><b>Who can post to the list?</b></td> <td colspan=3>\n";printf "<input type=radio name=res_mode value=0 %s> Anyone\n", $res ? "" : "checked";printf "<input type=radio name=res_mode value=1 %s> List members\n", $reslist ? "checked" : "";printf "<input type=radio name=res_mode value=2 %s> Addresses in file\n", $res && !$reslist ? "checked" : "";printf "<input name=res size=35 value=\"%s\">%s</td> </tr>\n", $res && !$reslist ? $res : "", &file_chooser_button("res", 0);print "<tr>\n";print &multi_input("taboo_body", "Taboo body regexps", $conf);print "</tr>\n";print "<tr>\n";print &multi_input("taboo_headers", "Taboo header regexps", $conf);print "</tr>\n";print "<tr> <td colspan=4>Note: all taboo and address regexps must begin\n";print "and end with <tt>/</tt> , like <tt>/foobar.com/</tt> or\n";print "<tt>/obscene/</tt>.</td> </tr>\n";print "</table></td></tr></table>\n";print "<input type=submit value=Save></form>\n";print "<hr>\n";&footer("edit_list.cgi?name=$in{'name'}", "mailing list");
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -