-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathViewEvents.php
153 lines (141 loc) · 6.01 KB
/
ViewEvents.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
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
<style>
.scrollit {
/* overflow:scroll;
height:450px; */
/* overflow-x: hidden; */
}
.tip {
width: 0px;
height: 0px;
position: absolute;
background: transparent;
border: 10px solid #ccc;
}
.tip-left {
top: 10px;
left: -25px;
border-top-color: transparent;
border-left-color: transparent;
border-bottom-color: transparent;
}
.body .message {
min-height: 30px;
border-radius: 3px;
font-family: Arial;
font-size: 10px;
line-height: 1.5;
color: #797979;
}
.dialogbox .body {
position: relative;
max-width: 300px;
height: auto;
margin: 20px 10px;
padding: 5px;
background-color: #DADADA;
border-radius: 3px;
border: 5px solid #ccc;
;
}
@media screen and (max-width: 500px) {
.sidebar{
margin-top: 50px;
}
}
</style>
<?php
include("MainPage.php");
?>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<!-- <link rel="stylesheet" href="ViewEvents.css" /> -->
<title>Events</title>
</head>
<center>
<div class="scrollit">
<body class="parent-cont">
<div class="sidebar">
<p>
<?php
include("DBConnection.php");
if(mysqli_connect_errno()){
echo mysqli_connect_error();
exit();
}else{
$selectQuery = "SELECT EV.event_id,EV.event_name,EV.event_details,EV.date_start,EV.timestart,EV.date_end,EV.timeend,U.firstName,U.lastName FROM tblevent EV LEFT JOIN tblusers U ON EV.user_id=U.user_id WHERE IsCancelled=False ORDER BY EV.date_start DESC";
$result = mysqli_query($conn,$selectQuery);
if(!$result){
die(mysqli_error($conn));
}
if(mysqli_num_rows($result) > 0){
}else{
$msg = "No Record found";
}
}
?>
<?php
$userType=$_SESSION['userType'];
$user_id=$_SESSION['user_id'];
while($row = mysqli_fetch_assoc($result)){
if($_SESSION['userType']=="CESCo" || $_SESSION['userType']=="CESRep"){
// echo '<tbody><div class="box"><tr>';
// //echo '<td>'.$row['event_id'].'</td>';
// echo 'Event: <font color="blue">'.$row['event_name'].'</font><br>';
// echo 'Venue/Details: '.$row['event_details'].'<br>';
// echo 'Date & Time Start: <font color="maroon">'.$row['date_start'].":".$row['timestart'].'</font><br>';
// echo 'Date & Time End: <font color="maroon">'.$row['date_end'].":".$row['timeend'].'</font><br>';
// echo 'Posted by: <font color="blue">'.$row['firstName']." ".$row['lastName'].'</font><br>';
// echo '<a href="DeleteEvent.php?event_id='. $row["event_id"].'"><img src="delete1.jpg"></img></a>';
// echo '</tr></tbody>';
// echo '<br><br>==================================<br></div>';
echo '<div class="dialogbox">';
echo '<div class="body">';
echo '<span class="tip tip-left"></span>';
echo '<div class="message">';
echo '<span>Event: <font color="green">'.$row['event_name'].'</font><br>';
echo 'Venue/Details: '.$row['event_details'].'<br>';
echo 'Date & Time Start: <font color="maroon">'.$row['date_start'].":".$row['timestart'].'</font><br>';
echo 'Date & Time End: <font color="maroon">'.$row['date_end'].":".$row['timeend'].'</font><br>';
echo 'Posted by: <font color="blue">'.$row['firstName']." ".$row['lastName'].'</font><br>';
// echo '<a href="DeleteEvent.php?event_id='. $row["event_id"].'"><img src="delete1.jpg"></img></a>';
echo '<a href="MainPage.php?pageid=ViewSub&&event_id='. $row["event_id"].'">View Registered Participants</a>';
echo '</span>';
echo '</div>';
echo '</div>';
echo '</div>';
}
else{
// echo '<tbody><div class="box"><tr>';
// //echo '<td>'.$row['event_id'].'</td>';
// echo 'Event: <font color="blue">'.$row['event_name'].'</font><br>';
// echo 'Venue/Details: '.$row['event_details'].'<br>';
// echo 'Date & Time Start: <font color="maroon">'.$row['date_start'].":".$row['timestart'].'</font><br>';
// echo 'Date & Time End: <font color="maroon">'.$row['date_end'].":".$row['timeend'].'</font><br>';
// echo 'Posted by: <font color="blue">'.$row['firstName']." ".$row['lastName'].'</font>';
// echo '</tr></tbody>';
// echo '<br><br>==================================<br></div>';
echo '<div class="dialogbox">';
echo '<div class="body">';
echo '<span class="tip tip-left"></span>';
echo '<div class="message">';
echo '<span>Event: <font color="green">'.$row['event_name'].'</font><br>';
echo 'Venue/Details: '.$row['event_details'].'<br>';
echo 'Date & Time Start: <font color="maroon">'.$row['date_start'].":".$row['timestart'].'</font><br>';
echo 'Date & Time End: <font color="maroon">'.$row['date_end'].":".$row['timeend'].'</font><br>';
echo 'Posted by: <font color="blue">'.$row['firstName']." ".$row['lastName'].'</font>';
echo '</span>';
echo '</div>';
echo '</div>';
echo '</div>';
}
}?>
</p>
</div>
</body>
</html>
</div>
</center>