forked from ictslgti/sis
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathNoticeEventView.php
More file actions
209 lines (166 loc) · 8.17 KB
/
Copy pathNoticeEventView.php
File metadata and controls
209 lines (166 loc) · 8.17 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
196
197
198
199
200
201
202
203
204
205
206
207
208
209
<!-- BLOCK#1 START DON'T CHANGE THE ORDER-->
<?php
$title = "Home | SLGTI";
include_once("config.php");
include_once("head.php");
include_once("menu.php");
?>
<!--END DON'T CHANGE THE ORDER-->
<!--BLOCK#2 START YOUR CODE HERE -->
<form method ="post" action="NoticeEventUpload">
<div class="row border border-light shadow bg-white rounded">
<div class="col">
<blockquote class="blockquote text-center">
<h1 class="display-4 text-primary">View EVENT</h1>
<p class="">Srilanka German Training Institute</p>
<footer class="blockquote-footer">This section to view.<cite title="Source Title"></cite></footer>
</blockquote>
</div>
</div>
<br><br>
<?php
if(isset($_POST["evName"])){
$eid=$_POST["evName"];
$sql="SELECT * from `notice_event` e,`notice_event_stutas` s WHERE e.status=s.id and s.`status`='$eid' order by event_date > curdate() desc";
$result = mysqli_query($con,$sql);
if (mysqli_num_rows($result)>0) {
while($row=mysqli_fetch_assoc($result)){
$e_name=$row['event_name'];
$e_venue=$row['event_venue'];
$e_date=$row['event_date'];
$e_time=$row['event_time'];
$e_cguest=$row['event_chief_guest'];
$e_comm=$row['event_comment'];
$file_name=$row['event_docs_url'];
$C_date=date('Y-m-d');
if($e_date > $C_date)$mess='<h4 class="text-success">soon<h4>';else $mess='<h4 class="text-danger">closed<h4>';
echo '<div class="row">
<div class="col-md-4 col-sm-12 border-dark shadow bg-white rounded">
<blockquote class="blockquote text-center">
<p class="">'
.$mess.
'</p>
</blockquote>
</div>
</div>
<br><br>
<div class="row">
<div class="col-md-5 col-sm-12">
<div>
<img src="docs/events/'.$file_name.'" class="img-fluid img-thumbnail" alt="Event Image">
</div>
</div>
<div class="col-md-7 col-sm-12">
<div class="row">
<div class="col-12"> <h3 class="mb-4 text-danger">Event For: '.$e_name.'</h3></div>
<div class="w-100"></div>
<div class="col"><h5 class="border-bottom mb-4"> <i class="fas fa-map-marker-alt text-primary"></i> </i> Venue </h5></div>
<div class="col"><h5 class="border-bottom mb-4">' . $e_venue . '</h5></div>
<div class="w-100"></div>
<div class="col"><h5 class="border-bottom mb-4"> <i class="far fa-calendar-alt text-primary"></i></i> Date / Time </h5></div>
<div class="col"><h5 class="border-bottom mb-4">' . $e_date .' / ' .$e_time. '</h5></div>
<div class="w-100"></div>
<div class="col"><h5 class="border-bottom mb-4"> <i class="fas fa-user text-primary"> </i> Cheif Guest </h5></div>
<div class="col"><h5 class="border-bottom mb-4">' . $e_cguest . '</h5></div>
<div class="w-100"></div>
<div class="col-12"> <h5 class=""><i class="fab fa-audible text-primary"></i> </i> Comment </h5><br>
<h5 >' . $e_comm . '</h5></div>
</div>
</div>
</div>
<br><br><br>
<div class="border-bottom"> </div>
<br><br><br>
';
}
}}
?>
</form>
<?php
$eid =$e_name = $e_venue = $e_date = $e_time =$e_cguest = $e_comm= $file_name=null;
if(isset($_GET['id'])){
$eid=$_GET['id'];
$sql="SELECT * FROM `notice_event` WHERE `event_id`= $eid";
$result = mysqli_query($con,$sql);
if (mysqli_num_rows($result) == 1) {
$row=mysqli_fetch_assoc($result);
$e_name=$row['event_name'];
$e_venue=$row['event_venue'];
$e_date=$row['event_date'];
$e_cguest=$row['event_chief_guest'];
$e_comm=$row['event_comment'];
$file_name=$row['event_docs_url'];
}
}
if(isset($_GET['id'])){
echo '
<div class="row">
<div class="col-md-5 col-sm-12">
<div>
<img src="docs/events/'.$file_name.'" class="img-fluid img-thumbnail" alt="Event Image">
</div>
</div>
<div class="col-md-7 col-sm-12">
<div class="row">
<div class="col-12"> <h3 class="mb-4 text-danger">Event For: '.$e_name.'</h3></div>
<div class="w-100"></div>
<div class="col"><h5 class="border-bottom mb-4"> <i class="fas fa-map-marker-alt text-primary"></i> </i> Venue </h5></div>
<div class="col"><h5 class="border-bottom mb-4">' . $e_venue . '</h5></div>
<div class="w-100"></div>
<div class="col"><h5 class="border-bottom mb-4"> <i class="far fa-calendar-alt text-primary"></i></i> Date / Time </h5></div>
<div class="col"><h5 class="border-bottom mb-4">' . $e_date .' / ' .$e_time. '</h5></div>
<div class="w-100"></div>
<div class="col"><h5 class="border-bottom mb-4"> <i class="fas fa-user text-primary"> </i> Cheif Guest </h5></div>
<div class="col"><h5 class="border-bottom mb-4">' . $e_cguest . '</h5></div>
<div class="w-100"></div>
<div class="col-12"> <h5 class=""><i class="fab fa-audible text-primary"></i> </i> Comment </h5><br>
<h5 >' . $e_comm . '</h5></div>
</div>
</div>
</div>
';
}
?>
<!--BLOCK#3 START DON'T CHANGE THE ORDER-->
<?php include_once("footer.php"); ?>
<!--END DON'T CHANGE THE ORDER-->
<script>
function showCouese(val) {
var xmlhttp = new XMLHttpRequest();
xmlhttp.onreadystatechange = function() {
if (this.readyState == 4 && this.status == 200) {
document.getElementById("Course").innerHTML = this.responseText;
}
};
xmlhttp.open("POST", "controller/getCourse", true);
xmlhttp.setRequestHeader("Content-Type", "application/x-www-form-urlencoded");
xmlhttp.send("department=" + val);
}
function showModule(val) {
var xmlhttp = new XMLHttpRequest();
xmlhttp.onreadystatechange = function() {
if (this.readyState == 4 && this.status == 200) {
document.getElementById("Module").innerHTML = this.responseText;
}
};
xmlhttp.open("POST", "controller/getModule", true);
xmlhttp.setRequestHeader("Content-Type", "application/x-www-form-urlencoded");
xmlhttp.send("course=" + val);
}
function showTeacher() {
var did = document.getElementById("Departmentx").value;
var cid = document.getElementById("Course").value;
var xmlhttp = new XMLHttpRequest();
xmlhttp.onreadystatechange = function() {
if (this.readyState == 4 && this.status == 200) {
document.getElementById("Teacher").innerHTML = this.responseText;
}
};
xmlhttp.open("POST", "controller/getTeacher", true);
xmlhttp.setRequestHeader("Content-Type", "application/x-www-form-urlencoded");
xmlhttp.send("Department=" + did + "&Course="+ cid );
}
</script>
<!--BLOCK#3 START DON'T CHANGE THE ORDER-->
<?php include_once("footer.php"); ?>
<!--END DON'T CHANGE THE ORDER-->