X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ian/git?a=blobdiff_plain;f=mason%2Fmain;h=55528eebe15265ce24fba3395cc5878aff27d5a4;hb=6d236f348881a1c212a5f085a615e4c5a86cd050;hp=ec7c6536abc0158f524c84bcae49484c4778b5fd;hpb=42a6560ca0aa3325296f3ea72096232cdc056cb5;p=nj-awaymsg.git diff --git a/mason/main b/mason/main index ec7c653..55528ee 100755 --- a/mason/main +++ b/mason/main @@ -1,49 +1,72 @@ <%init> use AwayMsg; db_connect(); +www_begin($r,$m); +my ($sth,$row,$sthi,$rowi); - -Email "out of office" setup - -

Email "out of office" setup

-

Our email addresses

- +<&htmlhead, subpage => 'Overview' &> +

Email addresses and their configuration

<%perl> -my %row; -my $sth = $dbh->prepare(<prepare(<execute(); - - +
- + - % while (my $row= $sth->fetchrow_hashref()) { % if (defined $row->{'textid'}) { -% my $expiry = expires2timet($row->{'expires'}); -% if ($expiry > time) { -% } else { - -% } - - + % } else { - % } % }
AddressO-o-o statusStatus Which message?Expiry date
<% $row->{'emailaddr'} |h %>activeexpired<% $row->{'textid'} |h %><% $row->{'expires'} |h %><% $row->{'desc'} |h %>inactive
+ +
+

Outbound messages

+<%perl> +$sth = $dbh->prepare("SELECT * FROM texts ORDER BY desc"); +$sthi = $dbh->prepare(<execute(); + +% while (my $row= $sth->fetchrow_hashref()) { +
+

Message "<% $row->{'desc'} |h %>"

+ +<&| txtable, tx => $row &> +% $sthi->execute($row->{'textid'}); +% while (my $rowi= $sthi->fetchrow_hashref()) { +Used for:<% $rowi->{'emailaddr'} |h %> +% } + +
+<% $row->{'text'} |h %>
+
+ + +
+% } +

Add new message

+ +