⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 save_members.cgi

📁 Unix下基于Web的管理工具
💻 CGI
字号:
#!/usr/local/bin/perl# save_members.cgi# Store the members of some 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");$access{'edit'} ||	&error("You are not allowed to edit the members of this list");$list = &get_list($in{'name'}, &get_config());$conf = &get_list_config($list->{'config'});$pass = &find_value("admin_passwd", $conf);if ($in{'update'}) {	# save the new list of members	$in{'members'} =~ s/\r//g;	open(MEMS, ">$list->{'members'}");	print MEMS $in{'members'};	close(MEMS);	}elsif ($in{'add'}) {	# call majordomo to subscribe an address	open(WRAPPER, "|$config{'program_dir'}/wrapper majordomo");	print WRAPPER "From: root\n\n";	print WRAPPER "approve $pass subscribe $in{'name'} $in{'addr_a'}\n\n";	close(WRAPPER);	}elsif ($in{'remove'}) {	# call majordomo to unsubscribe an address	open(WRAPPER, "|$config{'program_dir'}/wrapper majordomo");	print WRAPPER "From: root\n\n";	print WRAPPER "approve $pass unsubscribe $in{'name'} $in{'addr_r'}\n\n";	close(WRAPPER);	}&redirect("edit_list.cgi?name=$in{'name'}");

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -