📄 edit_info.cgi
字号:
#!/usr/local/bin/perl# edit_info.cgi# Display a form for editing the intro message for a listrequire './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("Messages and Description", "");print "<center><font size=+1>For <tt>$in{'name'}</tt></font></center>\n";print "<hr>\n";print "<form action=save_info.cgi method=post>\n";print "<input type=hidden name=name value=$in{'name'}>\n";print "<table border width=100%>\n";print "<tr $tb> <td><b>Messages and description</b></td> </tr>\n";print "<tr $cb> <td><table>\n";print "<tr> <td><b>List description, to be included in the responsed to\n";print "the <tt>lists</tt> command</b></td>\n";$desc = &find_value("description", $conf);print "<td><input name=description size=40 value=\"$desc\"></td> </tr>\n";print "<tr> <td valign=top><b>Informative message, to be returned in\n";print "response to the command <tt>info $in{'name'}</tt></b></td>\n";print "<td><textarea rows=5 cols=80 name=info>\n";open(INFO, $list->{'info'});while(<INFO>) { print if (!/^\[Last updated on:/); }close(INFO);print "</textarea></td> </tr>\n";print "<tr> <td valign=top><b>Introductory message, to be sent when someone\n";print "subscribes to the list</b></td> <td>\n";$intro = -r $list->{'intro'};printf "<input type=radio name=intro_def value=1 %s>\n", $intro ? "" : "checked";print "Same as informative message\n";printf "<input type=radio name=intro_def value=0 %s> As entered below..<br>\n", $intro ? "checked" : "";print "<textarea rows=5 cols=80 name=intro>\n";open(INTRO, $list->{'intro'});while(<INTRO>) { print if (!/^\[Last updated on:/); }close(INTRO);print "</textarea></td> </tr>\n";print "</table></td></tr></table>\n";print "<input type=submit value=Update></form>\n";print "<hr>\n";&footer("edit_list.cgi?name=$in{'name'}", "mailing list");
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -