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

Email "out of office" setup

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

Email addresses and their configuration

<%perl> $sth = $dbh->prepare(<execute(); Address Status Which message? -Expiry date % while (my $row= $sth->fetchrow_hashref()) { <% $row->{'emailaddr'} |h %> % if (defined $row->{'textid'}) { -% my $expires = expires2timet($row->{'expires'}); -% if (defined($expires) && $expires < time) { -expired -% } else { active -% } <% $row->{'desc'} |h %> -<% expirestime2show($expires) |h %> % } else { inactive - % } % } +

Outbound messages

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

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

- - - + +<&| txtable, tx => $row &> % $sthi->execute($row->{'textid'}); % while (my $rowi= $sthi->fetchrow_hashref()) { % } - - -
Short name:<% $row->{'desc'} |h %>
Expires:<% - expirestime2show(expires2timet($row->{'expires'})) - |h %>
Used for:<% $rowi->{'emailaddr'} |h %>
Subject:<% $row->{'subject'} |h %>
-

+

 <% $row->{'text'} |h %>
 
+ +
% }

Add new message