X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ian/git?a=blobdiff_plain;ds=sidebyside;f=mason%2Fmain;h=42cfaac56e48329390f41856deb226eb73c93593;hb=47aa1f68c037b4f199b66740c94f837a7110ca2f;hp=5997c3af035faf164ad6dc953b3a72ce68143101;hpb=0652dacb9b7ebbdd9c5ec7502ee5a5533a22cdc8;p=nj-awaymsg.git diff --git a/mason/main b/mason/main index 5997c3a..42cfaac 100755 --- a/mason/main +++ b/mason/main @@ -1,54 +1,74 @@ <%init> use AwayMsg; db_connect(); +my ($sth,$row,$sthi,$rowi); -Email "out of office" setup +Email away message setup -

Email "out of office" setup

-

Email addresses and their configuration

- +

Email away message setup

+

Email addresses and their configuration

<%perl> -my %row; -my $sth = $dbh->prepare(<prepare(<execute(); - - -% $sth->execute(); % while (my $row= $sth->fetchrow_hashref()) { % if (defined $row->{'textid'}) { -% my $expires = expires2timet($row->{'expires'}); -% if (defined($expires) && $expires < time) { - -% } else { -% } - -% if (defined $expires) { - -% } else { - -% } + % } else { - % } % }
Address Status Which message?Expiry date
<% $row->{'emailaddr'} |h %>expiredactive<% $row->{'name'} |h %><% $row->{'expires'} |h %>never<% $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

+ +