-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathcalendar.php
More file actions
195 lines (179 loc) · 8.8 KB
/
Copy pathcalendar.php
File metadata and controls
195 lines (179 loc) · 8.8 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
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<?php
include './scripts/CheckCookie.php';
include './scripts/MyDB.php';
$chc = new CheckCookie();
session_start();
if (!isset($_SESSION['username'])) {
$db = new Database();
$dbCon = $db->getConnection();
$result = $chc->checkCook($dbCon, "guest");
if ($result != "guest") {
$_SESSION['username'] = $result[0];
$_SESSION['first'] = $result[1];
$_SESSION['last'] = $result[2];
$_SESSION['type'] = $result[3];
$usrname = $_SESSION['username'];
$first_name = $_SESSION['first'];
$last_name = $_SESSION['last'];
$type = $_SESSION['type'];
}
} else {
if ($_SESSION['type'] != "user") {
header("Location:" . $chc->redirectPage($_SESSION['type']));
}
$usrname = $_SESSION['username'];
$first_name = $_SESSION['first'];
$last_name = $_SESSION['last'];
$type = $_SESSION['type'];
}
?>
<html xmlns="http://www.w3.org/1999/xhtml"><!-- InstanceBegin template="/Templates/site_template.dwt" codeOutsideHTMLIsLocked="false" -->
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>eReserve</title>
<link href="styles/mainstyle.css" rel="stylesheet" type="text/css" />
<!-- InstanceBeginEditable name="Attachments" -->
<link href="styles/calendarStyle.css" rel="stylesheet" type="text/css" />
<link href="styles/navMenu.css" rel="stylesheet" type="text/css" />
<script src="js/jquery-1.10.2.min.js" ></script>
<script src="js/common.js" ></script>
<script src="js/calendar.js"></script>
<!-- InstanceEndEditable -->
<link rel="shortcut icon" href="favicon.ico" type="image/x-icon"/>
</head>
<body>
<div class="container">
<div class="header">
<div class="logo" id="logo">
<a href="home.php">
<img src="images/logo.png" alt="eReserve Logo" name="ereserve_logo" id="ereserve_logo" />
</a>
</div>
<div class="siteName">
<span id="mainTitle">University Room Reservation System</span>
<br />
<span id="subTitle">University of Moratuwa</span>
</div>
</div>
<div class="titleBar">
<!-- InstanceBeginEditable name="PageTitle" -->Check Reservations<!-- InstanceEndEditable -->
<div id="logName">
<!-- InstanceBeginEditable name="UserType" -->
<?php
if (isset($usrname)) {
echo '
<a href="scripts/Logout.php">
<input type="submit" name="logout" id="logout" value="logout" class="redBtn"/>
</a>
';
echo $first_name . " " . $last_name;
}
?>
<!-- InstanceEndEditable -->
</div>
</div>
<div class="sidebar">
<!-- InstanceBeginEditable name="SideBar" -->
<div id="navigation">
<ul>
<a href="home.php"><li>Home</li></a>
<a href="request.php"><li>Request Reservations</li></a>
<a href="cancel.php"><li>Cancel Reservation</li></a>
<a href="my_history.php"><li>Reservation History</li></a>
</ul>
</div>
<!-- InstanceEndEditable -->
</div>
<div class="content">
<!-- InstanceBeginEditable name="Content" -->
<div id="roomSelect">
<div id="reg2">
<table cellpadding="0" cellspacing="0">
<tr>
<td><span class="subhead">OR</span></td>
</tr>
<tr>
<td><a href="calendar.php"><button id="allBtn" name="allBtn" type="button" class="blueBtn">View All<br/> Rooms</button></a></td>
</tr>
</table>
</div>
<div id="reg1">
<form id="roomSelector" name="dateSelector" >
<table cellpadding="0" cellspacing="0">
<tr>
<td><span class="subhead">Search for a room</span></td>
</tr>
<tr>
<td>
<input type="radio" name="roomS" id="roomS" value="1" checked>by Room ID</input>
 
<input type="radio" name="roomS" id="roomS" value="2" >by Room Name</input>
</td>
</tr>
<tr>
<td><input type="text" name="roomID" id="roomID" class="textBox" /></td>
<td><button id="showBtn" name="showBtn" type="button" class="greenBtn">Search</button></td>
</tr>
</table>
<input type="hidden" name="submit1" value="1"/>
</form>
</div>
<div id="reg3">
<table cellpadding="0" cellspacing="0">
<tr>
<td><span class="subhead">Filter by</span></td>
<td>
<label>Faculty</label>
<select id="fac" name="fac" class="dropList" >
</select>
 
<label>Department</label>
<select id="dep" name="dep" class="dropList"></select>
</td>
</tr>
</table>
</div>
</div>
<div id="roomSheet">
<table id="roomSheetData" class="dataTable" cellspacing="0"></table>
</div>
<div class="overlay" id="overlay">
<div id="ovBox">
<div id="dateSelect">
<form id="dateSelector" name="dateSelector" >
<label>Year</label>
<select id="year" name="year" class="dropList" ></select>
 
<label>Month</label>
<select id="month" name="month" class="dropList"></select>
 
<label>Date</label>
<select id="date" name="date" class="dropList"></select>
<button id="closeOvr" name="closeOvr" type="button" class="redBtn"><b>X</b></button>
</form>
</div>
<br/>
<b> Room ID : </b><span id="ovrID"></span><br/>
<b> Room Name : </b><span id="ovrName"></span>
<br/>
<div id="resData">
<table id="resDataSheet" class="dataTable" cellspacing="0"></table>
</div>
<div id="btnPanel">
<button id="reqRes" name="reqRes" type="button" class="greenBtn">Request<br/>Reservation</button>
</div>
</div>
</div>
<!-- InstanceEndEditable -->
</div>
</div>
<!--
<div class="footer">
<marquee onmouseover="this.stop()" onmouseout="this.start()" scrollamount="8" direction="left">
Copyrights Reserved ©2013 Udith Arosha Gunaratna
</marquee>
</div>
-->
</body>
<!-- InstanceEnd --></html>