-
Notifications
You must be signed in to change notification settings - Fork 2
/
index.php
130 lines (109 loc) · 3.23 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
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
<html lang="de">
<!-- Eingebundene Style-Dokumente -->
<link rel="stylesheet" type="text/css" href="style/css/normalize.css">
<link rel="stylesheet" type="text/css" href="style/css/main.css">
<link rel="stylesheet" type="text/css" href="style/css/datepicker.css">
<link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Roboto+Condensed">
<link rel="shortcut icon" href="favicon.ico" type="image/x-icon">
<link rel="icon" href="favicon.ico" type="image/x-icon">
<!-- ============================ -->
<!-- Eingebundene Skripts -->
<script src="bin/js/jquery.js"></script>
<script src="bin/js/main.js"></script>
<script src="bin/js/jscolor.js"></script>
<script src="bin/js/datepicker.js"></script>
<script src="bin/js/datepicker.de.min.js"></script>
<!-- ==================== -->
<?php
# Eingebundene PHP-Skripte #
include_once('bin/functions.php');
############################
$lang = 'DE';
if ( !logged_in() ) {
mainLogin();
}
if ( logged_in() ) {
if(isset($_GET['fct'])){
if($_GET['fct'] == 'logout'){
logout();
}
else if($_GET['fct'] == 'help'){
getHelp($lang);
}
}
if (isset($_GET['site'])) {
$currentpage = $_GET['site'];
switch ($currentpage) {
case "main":
$active = array('active','normal','normal','normal','normal');
break;
case "rooms":
$active = array('normal','active','normal','normal','normal');
break;
case "guests":
$active = array('normal','normal','active','normal','normal');
break;
case "checkin":
$active = array('normal','normal','normal','active','normal');
break;
case "settings":
$active = array('normal','normal','normal','normal','active');
break;
default:
$currentpage = '404';
$active = array('normal','normal','normal','normal','normal');
break;
}
}
else {
$currentpage = 'main';
$active = array('active','normal','normal','normal','normal');
}
echo '<head><meta charset="utf-8"><title>roomPlaner - '.getPage($currentpage).'</title></head><body>';
echo '<div class="naviholder">';
generateNavi($active);
echo '</div>';
echo '
<div class="contentHolder">
<div class="content">';
if($currentpage){
if($currentpage == 'main'){
getOccupancy();
}
else if($currentpage == 'rooms'){
manageRooms();
}
else if($currentpage == 'guests'){
manageGuests();
}
else if($currentpage == 'checkin'){
checkinPanel();
}
else if($currentpage == 'settings'){
if(checkAdmin($_SESSION['knownUser'])){
editSettings();
}
else {
echo '<center><img src="style/images/na.png" /><br />Noch keine Benutzer-Einstellungen vorhanden</center>';
}
}
else if($currentpage == '404'){
echo '<center><img src="style/images/na.png" /><br />Seite nicht vorhanden</center>';
}
}
else {
echo 'Swoffle';
}
echo '</div><div class="clear"></div>
</div>
<div class="footer">';
if($currentpage == 'main'){
occupancyAdder();
}
else if($currentpage == 'settings'){
donateButton();
}
echo '</div>
';
}
?>