X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ian/git?p=nj-awaymsg.git;a=blobdiff_plain;f=mason%2Fmain;h=42cfaac56e48329390f41856deb226eb73c93593;hp=ec7c6536abc0158f524c84bcae49484c4778b5fd;hb=47aa1f68c037b4f199b66740c94f837a7110ca2f;hpb=42a6560ca0aa3325296f3ea72096232cdc056cb5 diff --git a/mason/main b/mason/main index ec7c653..42cfaac 100755 --- a/mason/main +++ b/mason/main @@ -1,49 +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

-

Our email addresses

- +

Email away message setup

+

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

+ +