/[Frey]/branches/zimbardo/lib/App/RoomReservation/Confirmation.pm
This is repository of my old source code which isn't updated any more. Go to git.rot13.org for current projects!
ViewVC logotype

Diff of /branches/zimbardo/lib/App/RoomReservation/Confirmation.pm

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1172 by dpavlin, Sun Jul 5 21:40:16 2009 UTC revision 1181 by dpavlin, Tue Jul 7 22:07:51 2009 UTC
# Line 16  sub verify_as_markup { Line 16  sub verify_as_markup {
16    
17          my $dbh = $self->dbh;          my $dbh = $self->dbh;
18    
19            my $size = $self->room->seats;
20    
21          my $sth = $dbh->prepare(qq{          my $sth = $dbh->prepare(qq{
22                  update reservation                  update reservation
23                  set                  set
# Line 23  sub verify_as_markup { Line 25  sub verify_as_markup {
25                          _seat_number = (                          _seat_number = (
26                                  select                                  select
27                                          min(seat.nr)                                          min(seat.nr)
28                                  from (select generate_series(1,600) as nr) as seat                                  from (select generate_series(1,$size) as nr) as seat
29                                  full join reservation on reservation._seat_number = seat.nr                                  full join reservation on reservation._seat_number = seat.nr
30                                  where id is null                                  where id is null
31                                  group by seat.nr                                  group by seat.nr
# Line 82  sub cancel_as_markup { Line 84  sub cancel_as_markup {
84    
85          if ( $sth->rows == 1 ) {          if ( $sth->rows == 1 ) {
86                  qq|                  qq|
87                          Your <em>reservation is canceled</em>, thanks for your effort to provide seat to somebody else                          Vaš <em>dolazak je odjavljen</em>.
88    
89                            Hvala što ste omogućili dolazak nekom drugom!
90                  |;                  |;
91          } else {          } else {
92                  die qq|<error>Can't find reservation which you are trying to cancel.<br>                  die qq|<error>Can't find reservation which you are trying to cancel.<br>

Legend:
Removed from v.1172  
changed lines
  Added in v.1181

  ViewVC Help
Powered by ViewVC 1.1.26