33 |
where |
where |
34 |
md5(id||email) = ? |
md5(id||email) = ? |
35 |
and _confirmed is false |
and _confirmed is false |
36 |
|
and _canceled is false |
37 |
}); |
}); |
38 |
|
|
39 |
$sth->execute( $self->token ); |
$sth->execute( $self->token ); |
52 |
|
|
53 |
if ( $sth->rows == 1 ) { |
if ( $sth->rows == 1 ) { |
54 |
|
|
|
$sth = $dbh->prepare(qq{ |
|
|
select |
|
|
ime||' '||prezime, |
|
|
_seat_number, |
|
|
email |
|
|
from reservation |
|
|
where |
|
|
_confirmed is true |
|
|
-- and _seat_number is not null |
|
|
and md5(id||email) = ? |
|
|
}); |
|
|
|
|
|
$sth->execute( $self->token ); |
|
|
|
|
55 |
die "can't find account associated with ", $self->token unless $sth->rows == 1; |
die "can't find account associated with ", $self->token unless $sth->rows == 1; |
56 |
|
|
57 |
my @reservation = $sth->fetchrow_array; |
return $self->seat_confirmation_message( token => $self->token ); |
|
push @reservation, |
|
|
$self->url_for( 'Confirmation/cancel_as_markup?token=' . $self->token ); |
|
|
|
|
|
return $self->seat_confirmation_message( @reservation ); |
|
58 |
|
|
59 |
} else { |
} else { |
60 |
die "Problem with confirmation.\n"; |
die "Problem with confirmation.\n"; |
69 |
my $sth = $dbh->prepare(qq{ |
my $sth = $dbh->prepare(qq{ |
70 |
update reservation |
update reservation |
71 |
set |
set |
72 |
_confirmed = false, |
_canceled = true, |
73 |
_seat_number = null |
_seat_number = null |
74 |
where |
where |
75 |
md5(id||email) = ? |
md5(id||email) = ? |