-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathview.php
More file actions
191 lines (152 loc) · 6.05 KB
/
view.php
File metadata and controls
191 lines (152 loc) · 6.05 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
<?php
session_start();
include("lib/connection.php");
if (empty($_SESSION['memberId']))
{
header("Location: index.php");
exit();
}
$eventNumber = $_REQUEST['event'];
$eventNumber = mysqli_real_escape_string($mysqli,$eventNumber);
$_SESSION['eventId'] = $_REQUEST['event'];
$sql = "SELECT * FROM event WHERE eventId='$eventNumber' ";
$res = $mysqli->query($sql);
$count = $res->num_rows;
if ($count == 1)
{
$data=$res->fetch_array();
$title = $data['title'];
$originalDate = $data['dat'];
$from = $data['fromTime'];
$till = $data['till'];
$location = $data['location'];
$desc = $data['description'];
$stat = $data['verificationStatus'];
$poster = "images/posters/" . $data['poster'];
//$permission = "images/permissionLetters/" . $data['permission'];
$comments = $data['comments'];
$date = date("d-m-Y", strtotime($originalDate));
// echo "Title : $title </br>";
// echo "Date : $date </br>";
// echo "From : $from</br>";
// echo "till : $till </br>";
// echo "location : $location </br>";
// echo "description : $desc </br>";
// echo "Verification : $stat";
}
else if ($count == 0)
{
$message = "There was no event selected.";
$_SESSION['message'] = $message;
header("Location: landing.php");
}
if ($stat == "yes")
{
$processStatus = " <h8 style=\"color:green; text-align:center; margin-top:10px;\"><strong>Approved!</strong> </h8>";
}
else if ($stat == "pending")
{
$processStatus = " <h8 style=\"color:orange; text-align:center; margin-top:10px;\"><strong>Pending!</strong> </h8>";
}
else if ($stat == "mid")
{
$processStatus = " <h8 style=\"color:orange; text-align:center; margin-top:10px;\"><strong>Approved by Faculty Coordinator!</strong> </h8>";
}
else if ($stat == "rejected")
{
$processStatus = " <h8 style=\"color:red; text-align:center; margin-top:10px;\"><strong>Rejected!</strong> </h8>";
}
else if ($stat == "rejectedMid")
{
$processStatus = " <h8 style=\"color:red; text-align:center; margin-top:10px;\"><strong>Rejected by Faculty Coordinator!</strong> </h8>";
}
?>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8" />
<title>Events Portal</title>
<link rel="stylesheet" type="text/css" href="eventaddmodStyle.css">
<style>
.wrapper{
margin: 0 auto -51px;
}
h2{
color: #0094ff;
font-size: 27px;
margin-bottom: 0px;
overflow: hidden;
}
h4{
font-size: 21px;
color: #606060;
margin-bottom: 5px;
}
form{
position: static;
background-color: #fff;
margin: 0;
border: none;
box-shadow: none;
padding: 0;
width: auto;
}
#subBtn{
margin: 20px auto 5px 166px;
}
.deny{
background-color: #e60808;
}
.allow{
background-color: #23bc0c;
}
</style>
</head>
<body>
<div class="wrapper">
<script src="home.js"></script>
<header></header>
<div style="height: auto; width: 600px; margin: auto; left: 0; right: 0; top: 0; bottom: 0px;">
<form>
<h2><?php echo $title;?></h2>
<div style="border: 1px solid #b2b0b0; box-shadow: 0 0 10px darkgrey; padding: 10px; height: auto; width: 600px; text-align:center;">
<div style="float: left; margin-right: 20px; margin-top:20px; text-align:center; width: 140px;">
<h4 style="color:black;"> <i><u>Date</u></i></h4>
<h4><?php echo $date; ?></h4>
<h4 style="color:black;"> <i><u>Time</u></i></h4>
<h4 style="display: inline-block;"><?php echo $from; ?></h4>
<h5 style="display: inline-block; margin: 0 3px; font-size: 18px;">-</h5>
<h4 style="display: inline-block;"><?php echo $till; ?></h4>
<h4 style="color:black;"> <i><u>Place</u></i></h4>
<h4><?php echo $location; ?></h4>
</div>
<div style="margin-bototm:20px;float: left; border: 1px solid darkgrey; width: 400px; height: 238px; overflow-y: scroll; padding: 5px; ">
<p><?php echo $desc; ?></p>
</div>
</br></br> </br> </br>
<label style="margin-top:20px;"><i> <u>Poster</i></u> </label><br>
<a href="<?php echo $poster;?>">
<img src="<?php echo $poster; ?>" width=550px style= >
</a>
</br>
<!-- <label> Permission Letter</label>
<a href="<?php echo $permission;?>">
<img src="<?php echo $permission; ?>" width=550px style= >
</a> -->
<?php
if ($comments)
{
echo "<label> <u>Comments:</u> </label>";
echo "<h8 style=\"color:blue; text-align:center; margin-top:10px;\">" . $comments . "</h8></br></br>";
}
?>
<p> Verification status : <?php echo $processStatus; ?> </p>
</div>
</form>
</div>
</div>
<div class="footer" style="margin-top:60px;">
<p style="margin-top: 7px;"></p>
</div>
</body>
</html>