2 # Mailman page Perl template.
3 # Copyright (C) 2003-2005 Jan Kratochvil <project-www.jankratochvil.net@jankratochvil.net>
5 # This program is free software; you can redistribute it and/or modify
6 # it under the terms of the GNU General Public License as published by
7 # the Free Software Foundation; exactly version 2 of June 1991 is required
9 # This program is distributed in the hope that it will be useful,
10 # but WITHOUT ANY WARRANTY; without even the implied warranty of
11 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 # GNU General Public License for more details.
14 # You should have received a copy of the GNU General Public License
15 # along with this program; if not, write to the Free Software
16 # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
20 require 5.6.0; # at least 'use warnings;' but we need some 5.6.0+ modules anyway
21 use vars qw($VERSION $CVS_ID);
22 $VERSION=do { my @r=(q$Revision$=~/\d+/g); sprintf "%d.".("%03d"x$#r),@r; };
37 "title"=>"Mailman Interface",
50 for my $list (@{$W->{"args"}{"list"}}) {
51 print "<h1>List <i>$list</i></h1><blockquote>\n";
52 my $url_base=$W->{"mailman_url"}."/subscribe/$list";
53 my $t=LWP::Simple::get("$url_base?"
56 map({ $_."=".uri_escape($W->{"args"}{$_}); } qw(email pw pw-conf))));
57 $t=($t=~m#^.*<body\b[^>]*>(.*?)</body>#is)[0];
58 $t=~s#(href=")(../[^"]*)(")#$1$url_base/$2$3#gi;
60 print "</blockquote>\n";
63 if ($W->{"args"}{"back"}) {
64 print '<h1>'.a_href($W->{"args"}{"back"},'Back to the original page').'</h1>'."\n";