#!/usr/local/bin/perl # edit_subs.cgi # Edit subscription options require './majordomo-lib.pl'; &ReadParse(); %access = &get_module_acl(); &can_edit_list(\%access, $in{'name'}) || &error($text{'edit_ecannot'}); $list = &get_list($in{'name'}, &get_config()); $conf = &get_list_config($list->{'config'}); $desc = &text('edit_for', "".&html_escape($in{'name'}).""); &ui_print_header($desc, $text{'subs_title'}, ""); print "
\n"; print "\n"; print "\n"; print "\n"; print "
$text{'subs_header'}
\n"; $pol = &find_value("subscribe_policy", $conf); if ($pol =~ /(\S+)\+confirm/) { $pol = $1; $confirm = 1; } print "\n"; $upol = &find_value("unsubscribe_policy", $conf); print "\n"; print "\n", $confirm ? "" : "checked", $text{'no'}; print &choice_input("welcome", $text{'subs_welcome'}, $conf, "yes", $text{'yes'}, "no", $text{'no'}); print "\n"; print "\n"; print &choice_input("strip", $text{'subs_strip'}, $conf, "yes", $text{'yes'}, "no", $text{'no'}); print &choice_input("announcements", $text{'subs_announcements'}, $conf, "yes", $text{'yes'}, "no", $text{'no'}); print "\n"; print "\n"; print &choice_input("administrivia", $text{'subs_administrivia'}, $conf, "yes", $text{'yes'}, "no", $text{'no'}); print &opt_input("admin_passwd", $text{'subs_passwd'}, $conf, $text{'default'}, 10); print "\n"; print "\n"; print "\n"; print &choice_input("moderate", $text{'subs_moderate'}, $conf, "yes", $text{'yes'}, "no", $text{'no'}); print &opt_input("moderator", $text{'subs_moderator'}, $conf, $text{'subs_maint'}, 20); print "\n"; print "\n"; print &opt_input("approve_passwd", $text{'subs_mpasswd'}, $conf, $text{'default'}, 10); print "\n"; print "\n"; $aliases_files = &get_aliases_file(); @aliases = &foreign_call($aliases_module, "list_aliases", $aliases_files); foreach $a (@aliases) { $owner = $a->{'value'} if (lc($a->{'name'}) eq lc("$in{'name'}-owner") || lc($a->{'name'}) eq lc("owner-$in{'name'}")); $approval = $a->{'value'} if (lc($a->{'name'}) eq lc("$in{'name'}-approval")); } print "\n"; print "\n"; print "\n"; print "\n"; print "
$text{'subs_sub'} \n"; printf " %s\n", $pol eq "open" ? "checked" : "", $text{'subs_sopen'}; printf " %s\n", $pol eq "auto" ? "checked" : "", $text{'subs_sauto'}; printf " %s\n", $pol eq "closed" ? "checked" : "", $text{'subs_closed'}; print "
$text{'subs_unsub'} \n"; printf " %s\n", $upol eq "open" ? "checked" : "", $text{'subs_uopen'}; printf " %s\n", $upol eq "auto" ? "checked" : "", $text{'subs_uauto'}; printf " %s\n", $upol eq "closed" ? "checked" : "", $text{'subs_closed'}; print "
$text{'subs_confirm'} \n"; printf " %s\n", $confirm ? "checked" : "", $text{'yes'}; printf " %s


$text{'subs_owner'}$text{'subs_approval'}
\n"; print "
\n"; &ui_print_footer("edit_list.cgi?name=$in{'name'}", $text{'edit_return'});