X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ian/git?a=blobdiff_plain;ds=sidebyside;f=mason%2Fmain;h=206da109eaf01b13f7e995abbccacdf5245a964c;hb=9cc1c4dfcca1ae70756fef8b9ebf37aa357c8e60;hp=ec7c6536abc0158f524c84bcae49484c4778b5fd;hpb=42a6560ca0aa3325296f3ea72096232cdc056cb5;p=nj-awaymsg.git diff --git a/mason/main b/mason/main index ec7c653..206da10 100755 --- a/mason/main +++ b/mason/main @@ -1,49 +1,71 @@ <%init> use AwayMsg; db_connect(); +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

+ +