--- trunk/lib/App/RoomReservation/Messages.pm 2009/07/01 22:39:34 1153
+++ trunk/lib/App/RoomReservation/Messages.pm 2009/07/02 10:12:54 1155
@@ -14,7 +14,8 @@
_seat_number,
email,
md5(id||email) as token,
- _confirmed
+ _confirmed,
+ _canceled
from reservation
where
$col = ?
@@ -24,9 +25,26 @@
die "can't find user $col = $value" if $sth->rows == 0;
- my ( $name, $seat, $email, $token, $confirmed ) = $sth->fetchrow_array;
+ my ( $name, $seat, $email, $token, $confirmed, $canceled ) = $sth->fetchrow_array;
- if ( $confirmed ) {
+ if ( $confirmed && $canceled ) {
+
+ my $html =
+ qq|
+ $name, you have canceled your reservation allready
+
+ If you did that by mistake, and you want to attend this lecture, please
+ contact us via e-mail.
+ |;
+
+ $self->send( $email,
+ "Lecture confirmation canceled",
+ $html
+ );
+
+ return $html;
+
+ } elsif ( $confirmed ) {
my $url = $self->url_for( 'Confirmation/cancel_as_markup?token=' . $token );
@@ -46,7 +64,7 @@
;
$self->send( $email,
- "Lecture confirmation" . $seat ? " [seat $seat]" : " [wating for vacancy]",
+ "Lecture confirmation" . ( $seat ? " [seat $seat]" : " [wating for vacancy]" ),
$html . <<__EMAIL__
If you wish to cancel your reservation please click on link below: