14 if (defined $create) {
16 foreach my $k (keys %ARGS) {
17 if ($k =~ m/^t(\d{0,7})$/) {
22 die unless defined $textid;
27 if ($ARGS{'create'}) {
28 my $date = `date --iso-8601=minutes`; chomp $date or die;
29 $tx = { desc => "Message created $date",
30 subject => "Away from my email",
34 my $sth = $dbh->prepare("SELECT * FROM texts WHERE textid=?");
35 $sth->execute($textid);
36 $tx = $sth->fetchrow_hashref();#
39 if (!$tx) { die "no such text $textid"; }
42 <html lang="en"><head>
43 <title>Editing - <% $tx->{'desc'} |h %> - Email away message setup</title>
45 <h1>Edit "<% $tx->{'desc'} |h %>"</h1>
46 <form action="save" method="post">
47 <&| txtable, tx => $tx, inputs => 1 &>
48 <tr><td colspan=2><textarea cols=79 rows=15><%
49 $tx->{'text'} |h %></textarea></td></tr>
52 <input type="submit" name="t<% $tx->{'textid'} %>" value="Save">