/[Frey]/branches/zimbardo/lib/App/RoomReservation/Messages.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

Contents of /branches/zimbardo/lib/App/RoomReservation/Messages.pm

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1173 - (show annotations)
Sun Jul 5 21:40:54 2009 UTC (14 years, 10 months ago) by dpavlin
File size: 5075 byte(s)
translation

1 package App::RoomReservation::Messages;
2 use Moose::Role;
3
4 sub seat_confirmation_message {
5 my ( $self, $col, $value ) = @_;
6
7 die "wrong column name $col = $value" unless $col =~ m{^(token|email)$};
8
9 $col =~ s{token}{md5(id||email)};
10
11 my $sth = $self->dbh->prepare(qq{
12 select
13 ime||' '||prezime,
14 _seat_number,
15 email,
16 md5(id||email) as token,
17 _confirmed,
18 _canceled
19 from reservation
20 where
21 $col = ?
22 });
23
24 $sth->execute( $value );
25
26 die qq|<error>Can't find user $col = $value</error>| if $sth->rows == 0;
27
28 my ( $name, $seat, $email, $token, $confirmed, $canceled ) = $sth->fetchrow_array;
29
30 if ( $confirmed && $canceled ) {
31
32 my $html =
33 qq|
34 <br><br>
35 $name,
36 <br><br>
37 <em>Vas dolazak na predavanje je odjavljen i ne mozete se vise prijaviti.</em>
38 <br>
39 <em>Your registration has been canceled. You can not register again.</em>
40 <br><br>
41 Ako ste to ucinili greskom a ipak zelite prisustvovati predavanju,
42 molimo da nas kontaktirate e-mailom.
43 <br><br>
44 If you canceled your registration for the lecture by mistake please
45 contact us by e-mail.
46 |;
47
48 $self->send( $email,
49 "Dolazak odjavljen / Registration canceled",
50 $html
51 );
52
53 return $html;
54
55 } elsif ( $confirmed ) {
56
57 my $url = $self->url_for( 'Confirmation/cancel_as_markup?token=', $token );
58
59 my $html =
60 qq|
61 <big>Potvrda o uspjesnoj prijavi za predavanje profesora Philipa Zimbarda "The Lucifer Effect"</big><br>
62 <big>Confirmation - successful registration for Philip Zimbardo's lecture „The Lucifer Effect“</big>
63 <br><br>
64 <big>Ime i prezime / Name and surname : $name</big>
65 <br><br>
66 |
67 . ( $seat
68 ? qq|
69 <big>Broj prijave / Registration number : $seat</big>.
70 <br><br>
71
72 Predavanje ce se odrzati 28. rujna 2009. u 12 sati u Kristalnoj dvorani hotela Westin, ulica Krsnjavoga 1, Zagreb.<br><br>
73 Ova potvrda sadrzi vas registracijski broj. Potvrdu ispisite na pisacu i obavezno donesite sa sobom na predavanje jer je to vasa ulaznica i trazit ce se da ju predate prilikom ulaza u dvoranu. Ulaz u dvoranu biti ce moguc od 11,30 do 12,00 kad ce se zatvoriti vrata. Pozivamo vas da na vrijeme zauzmete mjesto u dvorani.<br><br>
74 Tijekom rujna cemo vam poslati podsjetnik na predavanje te zamoliti da, ukoliko iz nekog razloga ne mozete doci na predavanje, odjavite svoj dolazak kako biste omogucili zainteresiranima s liste cekanja da ipak dođu na predavanje. U toj poruci dobit cete link uz pomoc kojeg cete moci jednostavno odjaviti svoj dolazak.<br><br>
75 Dobro dosli!<br><br>
76 Odsjek za psihologiju Filozofskog fakulteta Sveucilista u Zagrebu<br><br>
77
78 ----<br><br>
79
80 The lecture will take place on 28th Sept 2009 at 12h at the Crystal Ballroom of the Hotel Westin Zagreb, 1 Izidor Krsnjavi Street, Zagreb.<br><br>
81
82 This confirmation (voucher) includes your registration number and serves as your ticket. Please don’t forget to print this confirmation (voucher) and bring it with you when arriving to the lecture. Entrance to the hall will begin from 11.30h and continue till 12.00h. We kindly ask you to take your seat in the hall before noon.<br><br>
83
84 During September you will receive a reminder notice. If you are, for any reason, unable to attend the lecture please un-register your attendance to allow other people from the waiting list to attend the lecture. You will receive e-mail message with the link for easy cancellation.<br><br>
85
86
87 Welcome!<br><br>
88
89
90 Department of Psychology<br>
91 Faculty of Humanities and Social Sciences<br>
92 University of Zagreb
93
94 | : qq|
95 we <big>currently don't have any seats available</big>,
96 but you will be notified if we get some vacancies for this lecture!
97 | )
98 ;
99
100 $self->send( $email,
101 "Potvrda / Confirmation - Zimbardo" . ( $seat ? " [no. $seat]" : " [wating for vacancy]" ),
102 $html . <<__EMAIL__
103
104 <br><br>
105 Ako zelite odjaviti svoj dolazak na predavanje molimo slijedite ovaj link:
106
107 $url
108
109 __EMAIL__
110 );
111
112 return $html;
113
114 } else { # not verified
115
116 my $url = $self->url_for( 'Confirmation/verify_as_markup?token=', $token );
117
118 $self->send( $self->email,
119 'Potvrdite prijavu za Zimbarda / Confirm your registration for Zimbardo', <<__EMAIL__
120
121 Svoju prijavu za predavanje potvrdite tako da slijedite ovaj link:
122 Confirm your registration for the lecture by following this link:
123 <br>
124 $url
125 <br><br>
126 Dobit cete poruku s Vasim brojem prijave koja ce sluziti kao ulaznica na predavanje.<br>
127 You will receive the message with your registration number (voucher) that serves as the ticket for the lecture.
128
129 __EMAIL__
130 );
131
132 return qq|
133 <br><br>
134 $name, <br><br>
135 Vasa prijava je zaprimljena, ali <u>nije valjana</u> sve dok ju ne potvrdite!.
136 <br><br>
137 Your registration is received but it is <u>not valid</u> until you confirm it!
138 <br><br>
139 <div style="color:red">
140 Molimo provjerite svoj e-mail i u njemu cete naci link uz pomoc kojeg cete prijavu
141 jednostavno potvrditi.<br><br>
142 Please check you e-mail. You will receive the message with the link to confirm your registration.
143
144 </div>
145 |;
146
147 }
148
149 }
150
151 1;

  ViewVC Help
Powered by ViewVC 1.1.26