forked from MissionsgemeindeWeinstadt/Sitzplatzbuchung
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.php
78 lines (73 loc) · 1.84 KB
/
index.php
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
<?php
require_once('version.php');
require_once('baseutils.php');
require_once('config.php');
require_once('helper.php');
require_once('client.php');
require_once('event.php');
require_once('booking.php');
require_once('adminlog.php');
require_once('ui.php');
require_once('manager.php');
header("Cache-Control: no-store, no-cache, must-revalidate, max-age=0");
connectToDb();
initClientIdentification();
$action = get_param_value('a');
if ($action != null)
{
if ($action == 'saveBooking')
{
verifyFormTokenOrExit();
handleSaveBookingAction();
}
else if ($action == 'cancelBooking')
{
verifyFormTokenOrExit();
handleCancelBookingAction();
}
else if ($action == 'makeClientPersistent')
{
verifyFormTokenOrExit();
handleMakeClientPersistentAction();
}
else if ($action == 'bookingSimulator')
handleBookingSimulatorAction();
else if ($action == 'autoReloadCheck')
handleAutoReloadCheckAction();
else if ($action == 'saveEvent')
handleSaveEventAction();
else if ($action == 'saveClient')
handleSaveClientAction();
else
{
echo 'alert("Diese Aktion ist nicht (mehr) gültig.");';
echo 'location.reload();';
}
}
else
{
$page = get_param_value('p', 'main');
if ($page == 'main')
renderMainPage();
else if ($page == 'help')
renderHelpPage();
else if ($page == 'admin')
renderAdminPage();
else if ($page == 'clients')
renderClients();
else if ($page == 'events')
renderEvents();
else if ($page == 'bookings')
renderBookings();
else if ($page == 'adminlog')
renderAdminlogs();
else if ($page == 'debugFreeSeatsCalculation')
renderDebugFreeSeatsCalculation();
else if ($page == 'bookingSimulator')
renderBookingSimulator();
else if ($page == 'visitorList')
renderVisitorsSheet();
else
renderNotFoundError();
writeMainHtmlAfterContent();
}