1 <& elements/search.html,
3 'name_singular' => 'member',
5 'count_query' => $count_query,
6 'header' => [ 'Email address' ],
7 'fields' => [ $email_sub, ], #just this one for now
8 'html_init' => $html_init,
13 #make sure the mailing list is attached to a customer service i can see/view
15 $cgi->param('listnum') =~ /^(\d+)$/ or die 'illegal listnum';
18 my $mailinglist = qsearchs('mailinglist', { 'listnum' => $listnum })
19 or die "unknown listnum $listnum";
20 my $title = $mailinglist->listname. ' mailing list';
22 my $svc_mailinglist = $mailinglist->svc_mailinglist;
25 'table' => 'mailinglistmember',
26 'hashref' => { 'listnum' => $listnum },
29 my $count_query = "SELECT COUNT(*) FROM mailinglistmember WHERE listnum = $listnum";
33 my $r = $member->email; #just this one for now
34 my $a = qq[<A HREF="javascript:areyousure('$r', ]. $member->membernum. ')">';
35 $r .= " (${a}remove</A>)";
40 if ( $svc_mailinglist ) {
41 my $svcnum = $svc_mailinglist->svcnum;
42 my $label = encode_entities($svc_mailinglist->label);
43 $html_init .= qq[<A HREF="${p}/view/svc_mailinglist.cgi?$svcnum">View customer mailing list: $label</A><BR><BR>];
46 $html_init .= <<"END";
47 <SCRIPT TYPE="text/javascript">
48 function areyousure(email,membernum) {
49 if ( confirm('Are you sure you want to remove ' + email + ' from this mailing list?') )
50 window.location.href="${p}misc/delete-mailinglistmember.html?" + membernum;