-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathreservierung.php
More file actions
275 lines (220 loc) · 10.2 KB
/
reservierung.php
File metadata and controls
275 lines (220 loc) · 10.2 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
<!DOCTYPE html>
<html lang="de">
<?php require_once "php/recaptcha_config.php" ?>
<head>
<meta charset="utf-8">
<title>Reservierung</title>
<!-- Imports ---------------------->
<!-- Bootstrap JS -->
<script src="js/bootstrap.js"></script>
<!-- jQuery -->
<script src="js/jquery-1.11.1.js"></script>
<!-- Sticky Header -->
<script src="js/sticky.js"></script>
<!-- Calendar -->
<script type="text/javascript" src="js/bootstrap-datepicker.js"></script>
<!-- Bootstrap CSS-->
<link href="css/bootstrap.css" rel="stylesheet">
<!-- Calendar CSS -->
<link href="css/datepicker.css" rel="stylesheet" type="text/css"/>
<!-- Validierung / Plausibilitätsprüfung -->
<script type="text/javascript" src="js/validate_form.js"></script>
<!-- reCAPTCHA API -->
<script src="https://www.google.com/recaptcha/api.js?hl=<?php echo LANG;?>"></script>
<!-- async defer -->
<!-- ImageMap Skalierung -->
<script src="js/jquery.rwdImageMaps.min.js"></script>
<!-- jQuery $(document).ready() Funktion -->
<script>
$(document).ready(function (e) {
// ImageMap skalierbar
$('img[usemap]').rwdImageMaps();
// Datepicker für Datumsfeld initialisieren
$('#date').datepicker({
format : "dd.mm.yyyy",
weekStart : 1,
startDate : "-0d",
endDate : "+1y",
language : "de",
autoclose : true,
todayHighlight : true
});
// Tischnummer aus ImageMap in Formularfeld übertragen und
// Verfügbarkeit des Tisches prüfen
$('area').on('click', function () {
var date = $('#date').val();
var tableNo = this.id.replace(/t/, '');
$('#table_no').val(tableNo);
if (date != "") {
isAvailable(date, tableNo);
}
return false;
});
// Verfügbarkeit bei onchange von Datum prüfen
$('#date').on('change', function() {
var date = $('#date').val();
var tableNo = $('#table_no').val();
if (tableNo != "") {
isAvailable(date, tableNo);
}
return false;
});
// Verfügbarkeit bei onchange von Tischnummer prüfen
$('#table_no').on('change', function() {
var date = $('#date').val();
var tableNo = $('#table_no').val();
if (date != "") {
isAvailable(date, tableNo);
}
return false;
});
});
</script>
<!-- Styles ---------------------->
<style type="text/css">
a {
/ word-wrap: break-word;
}
.header {
padding-top: 15px;
height: 50px;
margin-left: auto;
margin-right: auto;
background-color: white;
}
.navigation {
width: 95%;
margin-left: auto;
margin-right: auto;
}
.sticky {
position: fixed;
top: 0;
width: 100%;
z-index: 100;
border-top: 0;
}
.content {
width: 95%;
margin-left: auto;
margin-right: auto;
}
.saalplan {
max-width: 60%;
min-width: 300px;
height: auto;
display: inline-block;
margin: 20px 20px 20px 0px;
float: left;
padding: 10px;
}
.reservierung {
min-width: 30%;
max-width: 400px;
display: inline-block;
margin: 20px;
}
.intro {
margin: 0px 20px 0px 0px;
}
.reducedPadding {
padding-top: 2px;
padding-bottom: 2px;
}
.floatRight {
float: right;
}
img[usemap] {
border: none;
height: auto;
max-width: 100%;
width: auto;
}
</style>
</head>
<body>
<div>
<img src="images/restaurant2.jpg" width="100%">
</div>
<div id="pageHeader" class="header">
<div class="navigation">
<ul class="nav nav-tabs" style="background-color:white;">
<li role="presentation"><a href="index.html">Start</a>
</li>
<li role="presentation" class="active"><a href="reservierung.php">Reservierung</a>
</li>
<li role="presentation"><a href="kontakt.php">Kontakt</a>
</li>
<li role="presentation"><a href="impressum.php">Impressum</a>
</li>
</ul>
</div>
</div>
<div class="content" id="content">
<div class="intro">
<h1>Reservierung</h1>
<p>Auf dieser Seite können Sie Ihren Lieblingsplatz reservieren.
Klicken Sie einfach im Saalplan auf den gewünschten Tisch.
</p>
</div>
<form name="booking_form" action="confirm.php" method="post" onsubmit="return validateForm();">
<div class="panel panel-default saalplan">
<img src="images/saalplan.png" width="700" height="500" usemap="#table_map" alt="Bild des Saalplans"/>
<map name="table_map" id="table_map">
<area id="t1" alt="Bereich Tisch1" title="Tisch 1" shape="rect" coords="611,384,650,453" style="outline:none;" href="#"/>
<area id="t2" alt="Bereich Tisch2" title="Tisch 2" shape="rect" coords="645,264,686,296" style="outline:none;" href="#"/>
<area id="t3" alt="Bereich Tisch3" title="Tisch 3" shape="rect" coords="577,264,618,296" style="outline:none;" href="#"/>
<area id="t4" alt="Bereich Tisch4" title="Tisch 4" shape="rect" coords="576,196,617,228" style="outline:none;" href="#"/>
<area id="t5" alt="Bereich Tisch5" title="Tisch 5" shape="rect" coords="645,196,686,228" style="outline:none;" href="#"/>
<area id="t6" alt="Bereich Tisch6" title="Tisch 6" shape="rect" coords="403,422,439,468" style="outline:none;" href="#"/>
<area id="t7" alt="Bereich Tisch7" title="Tisch 7" shape="rect" coords="328,429,369,461" style="outline:none;" href="#"/>
<area id="t8" alt="Bereich Tisch8" title="Tisch 8" shape="rect" coords="258,422,293,467" style="outline:none;" href="#"/>
<area id="t9" alt="Bereich Tisch9" title="Tisch 9" shape="rect" coords="403,323,438,369" style="outline:none;" href="#"/>
<area id="t10" alt="Bereich Tisch10" title="Tisch 10" shape="rect" coords="328,326,369,359" style="outline:none;" href="#"/>
<area id="t11" alt="Bereich Tisch11" title="Tisch 11" shape="rect" coords="256,322,293,368" style="outline:none;" href="#"/>
<area id="t12" alt="Bereich Tisch12" title="Tisch 12" shape="rect" coords="366,132,407,165" style="outline:none;" href="#"/>
<area id="t13" alt="Bereich Tisch13" title="Tisch 13" shape="rect" coords="267,132,308,165" style="outline:none;" href="#"/>
<area id="t14" alt="Bereich Tisch14" title="Tisch 14" shape="rect" coords="366,44,407,77" style="outline:none;" href="#"/>
<area id="t15" alt="Bereich Tisch15" title="Tisch 15" shape="rect" coords="268,36,304,82" style="outline:none;" href="#"/>
<area id="t16" alt="Bereich Tisch16" title="Tisch 16" shape="rect" coords="147,379,182,443" style="outline:none;" href="#"/>
<area id="t17" alt="Bereich Tisch17" title="Tisch 17" shape="rect" coords="145,281,186,313" style="outline:none;" href="#"/>
<area id="t18" alt="Bereich Tisch18" title="Tisch 18" shape="rect" coords="143,156,184,188" style="outline:none;" href="#"/>
<area id="t19" alt="Bereich Tisch19" title="Tisch 19" shape="rect" coords="145,55,180,120" style="outline:none;" href="#"/>
<area id="t20" alt="Bereich Tisch20" title="Tisch 20" shape="rect" coords="32,353,70,457" style="outline:none;" href="#"/>
<area id="t21" alt="Bereich Tisch21" title="Tisch 21" shape="rect" coords="32,192,70,296" style="outline:none;" href="#"/>
<area id="t22" alt="Bereich Tisch22" title="Tisch 22" shape="rect" coords="32,33,70,137" style="outline:none;" href="#"/>
</map>
</div>
<div class="panel panel-default reservierung">
<div class="panel-heading">
<h3>Reservierung vornehmen</h3>
</div>
<div class="panel-body">
<p>Datum:*<span><input class="form-control reducedPadding" type="text" name="date" id="date" placeholder="tt.mm.jjjj"></input></span>
</p>
<p>Uhrzeit:*<span><input class="form-control reducedPadding" type="text" name="time" id="time" placeholder="hh:mm"></input></span>
</p>
<p>Tischnummer:*<span><input class="form-control reducedPadding" type="text" name="table_no" id="table_no" placeholder=""></input></span>
<div id="infoDiv"></div>
</p>
<p>Anzahl Personen:<span><input class="form-control reducedPadding" type="text" name="persons" id="persons" placeholder=""></input></span>
</p>
<hr>
<p>Vorname:<span><input class="form-control reducedPadding" type="text" name="first_name" id="first_name" placeholder="Vorname"></input></span>
</p>
<p>Name:*<span><input class="form-control reducedPadding" type="text" name="last_name" id="last_name" placeholder="Name"></input></span>
</p>
<p>E-Mail:*<span><input class="form-control reducedPadding" type="text" name="email" id="email" placeholder="name@example.de"></input></span>
</p>
<p>Telefon:<span><input class="form-control reducedPadding" type="text" name="phone" id="phone" placeholder="01234 567890"></input></span>
</p>
<hr>
<div class="g-recaptcha" data-sitekey="<?php echo SITE_KEY;?>"></div><br/>
<div id="errorDiv"></div>
<button class="btn btn-primary reducedPadding floatRight" type="submit">Reservieren</button>
</div>
</div>
</form>
</div>
</body>
</html>