-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathindex.php
427 lines (388 loc) · 15.5 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
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
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
<?php
@session_start();
?>
<!DOCTYPE html>
<html lang="en" dir="ltr">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<title>Welcome to Campus Cauldron!</title>
<!-- SPACE FOR FONTS -->
<link rel="preconnect" href="https://fonts.gstatic.com">
<link href="https://fonts.googleapis.com/css2?family=Bree+Serif&family=Montserrat:wght@800&family=Raleway:ital,wght@1,300&family=Roboto+Slab:wght@600&family=Ubuntu:ital,wght@1,300&display=swap" rel="stylesheet">
<!-- FONT AWESOME LINKS -->
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css">
<script src="https://kit.fontawesome.com/959552e028.js" crossorigin="anonymous"></script>
<!-- STYLESHEETS -->
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap@4.5.3/dist/css/bootstrap.min.css" integrity="sha384-TX8t27EcRE3e/ihU7zmQxVncDAy5uIKz4rEkgIXeMed4M0jlfIDPvg6uqKI2xXr2" crossorigin="anonymous">
<link rel="stylesheet" href="css/styles.css">
</head>
<!-- FOR EVENTS AND FESTS -->
<style>
#test {
margin-top: 3rem;
height: 665px;
overflow: auto;
text-align: justify;
border: 3px solid black;
padding: 10px;
}
@media (min-width: 768px) {
.carousel-inner .active,
.carousel-inner .active+.carousel-item,
.carousel-inner .active+.carousel-item+.carousel-item {
display: block;
}
.carousel-inner .carousel-item.active:not(.carousel-item-right):not(.carousel-item-left),
.carousel-inner .carousel-item.active:not(.carousel-item-right):not(.carousel-item-left)+.carousel-item,
.carousel-inner .carousel-item.active:not(.carousel-item-right):not(.carousel-item-left)+.carousel-item+.carousel-item {
transition: none;
margin-right: initial;
}
.carousel-inner .carousel-item-next,
.carousel-inner .carousel-item-prev {
position: relative;
transform: translate3d(0, 0, 0);
}
.carousel-inner .active.carousel-item+.carousel-item+.carousel-item+.carousel-item {
position: absolute;
top: 0;
right: -33.3333%;
z-index: -1;
display: block;
visibility: visible;
}
.active.carousel-item-left+.carousel-item-next.carousel-item-left,
.carousel-item-next.carousel-item-left+.carousel-item,
.carousel-item-next.carousel-item-left+.carousel-item+.carousel-item,
.carousel-item-next.carousel-item-left+.carousel-item+.carousel-item+.carousel-item {
position: relative;
transform: translate3d(-100%, 0, 0);
visibility: visible;
}
.carousel-inner .carousel-item-prev.carousel-item-right {
position: absolute;
top: 0;
left: 0;
z-index: -1;
display: block;
visibility: visible;
}
.active.carousel-item-right+.carousel-item-prev.carousel-item-right,
.carousel-item-prev.carousel-item-right+.carousel-item,
.carousel-item-prev.carousel-item-right+.carousel-item+.carousel-item,
.carousel-item-prev.carousel-item-right+.carousel-item+.carousel-item+.carousel-item {
position: relative;
transform: translate3d(100%, 0, 0);
visibility: visible;
display: block;
visibility: visible;
}
.my-img:hover {
-ms-transform: scale(1.2);
/* IE 9 */
-webkit-transform: scale(1.2);
/* Safari 3-8 */
transform: scale(1.2);
}
}
.accordion {
background-color: #eee;
color: #444;
cursor: pointer;
padding: 18px;
width: 100%;
border: none;
text-align: left;
outline: none;
font-size: 15px;
transition: 0.4s;
margin-top: 20px
}
.active,
.accordion:hover {
background-color: #ccc;
}
.panel {
padding: 5px 18px;
background-color: white;
max-height: 0;
overflow: hidden;
transition: max-height 0.2s ease-out;
}
</style>
<body>
<!-- NAVBAR -->
<?php include 'include/navbar.php' ?>
<!-- INTRODUCTION -->
<section id="introduction" class="introduction">
<div class="intro-container">
<div class="row">
<div class="col-lg-6">
<h1 id="intro-head">Its always nice to have someone to answer your questions.</h1>
<h4 id="intro-text">Campus Cauldron gives you just that!</h4>
</div>
<div class="col-lg-6">
<img id="intro-img" src="images/intro_img.jpg" alt="">
</div>
</div>
</div>
</section>
<hr id="after-intro" class="section-diff" style="width:70%">
<!-- NOTICES AND LINKS -->
<section id="Notices-and-Links">
<div>
<div class="row">
<div class="col-lg-3">
<div class="notice-panel">
<h3 class="notice-head"><i class="icon far fa-calendar-alt"></i>Notices</h3>
<marquee height="510" direction="up" scrollamount="3">
<?php
include 'conn.php';
$sql = "select * from notice ORDER BY notice_id DESC";
$rs_result = mysqli_query($con, $sql);
?>
<?php
while ($row = mysqli_fetch_assoc($rs_result)) {
?>
<p><a class="notice-link" href="npdf/<?php echo $row["npdf"]; ?>" target="_blank">
<strong style="font-family: 'Montserrat', sans-serif; font-size:20px;"><?php echo $row["title"]; ?></strong>
<br>
<em>Date: <?php echo $row["date"]; ?></em>
<hr>
</a></p>
<?php
};
?>
</marquee>
</div>
</div>
<div class="col-lg-6">
<div id="test">
<?php
include 'conn.php';
$sql = "select * from q_and_a WHERE ans_approved=1 ORDER BY id DESC";
$rs_result = mysqli_query($con, $sql);
?>
<?php
while ($row = mysqli_fetch_assoc($rs_result)) {
?>
<h5 id="list-item-1"><?php echo $row["question"]; ?></h5>
<p><?php echo $row["answer"] ?>
<br> Answered by <b><?php echo $row["ans_by"] ?></b></p>
<hr>
<?php
};
?>
</div>
</div>
<div class="col-lg-3">
<a class="my-links" href="#after-notice">
<h3 class="links-head"><i class="icon far fa-image"></i>Gallery</h3>
</a>
<a class="my-links" href="#after-gallery">
<h3 class="links-head"><i class="icon fas fa-drafting-compass"></i>Clubs and Cells</h3>
</a>
<a class="my-links" href="#after-clubs">
<h3 class="links-head"><i class="icon far fa-calendar-times"></i>Events and Fests</h3>
</a>
<a class="my-links" href="#after-fests">
<h3 class="links-head"><i class="icon fas fa-question"></i>FAQs</h3>
</a>
<a class="my-links" href="#after-questions">
<h3 class="links-head"><i class="icon fas fa-map-marked-alt"></i>College Map</h3>
</a>
</div>
</div>
</div>
</section>
<hr id="after-notice" class="section-diff" style="width:70%">
<!-- GALLERY -->
<section id="gallery">
<h1 class="gallery-head">Caught Within The Frames</h1>
<div class="container">
<div class="row">
<div class="col-lg-4">
<img class="gallery-images" src="images/Images_CC/1.jpg" alt="">
<br>
<img class="gallery-images" src="images/Images_CC/2.jpg" alt="">
<br>
<img class="gallery-images" src="images/Images_CC/3.jpg" alt="">
</div>
<div class="col-lg-4">
<img class="gallery-images" src="images/Images_CC/4.jpg" alt="">
<br>
<img class="gallery-images" src="images/Images_CC/6.jpeg" alt="">
<br>
<img class="gallery-images" src="images/Images_CC/10.jpeg" alt="">
</div>
<div class="col-lg-4">
<img class="gallery-images" src="images/Images_CC/8.jpg" alt="">
<br>
<img class="gallery-images" src="images/Images_CC/9.jpeg" alt="">
<br>
<img class="gallery-images" src="images/Images_CC/5.jpg" alt="">
<br>
</div>
</div>
<div id="gallery-btn">
<a id="gallery-link" href="gallery.php">
<h5 class="intro-link-head">View All</h5>
</a>
</div>
</div>
</section>
<hr id="after-gallery" class="section-diff" style="width:70%">
<!-- CLUBS AND COUNCILS -->
<section id="clubs-and-councils">
<h1 class="clubs-head">Clubs and Councils</h1>
<div class="container">
<div class="row">
<?php
include 'conn.php';
$sql = "select * from club ORDER BY club_id DESC LIMIT 6";
$rs_result = mysqli_query($con, $sql);
?>
<?php
while ($row = mysqli_fetch_assoc($rs_result)) {
?>
<div class="col-lg-4">
<a class="div-link" href="#">
<div class="my-card">
<img href="#" height="350px" width="150px" src="club_logo/<?php print $row["club_logo"]; ?>" alt="Avatar" style="width:100%">
<div class="container">
<h4><b><?php print $row["club_name"]; ?></b></h4>
<p><?php echo $row["club_info"]; ?></p>
</div>
</div>
</a>
</div>
<?php
};
?>
</div>
</div>
</section>
<hr id="after-clubs" class="section-diff" style="width:70%">
<!-- EVENTS AND FESTS -->
<section id="events-and-fests">
<h1 class="events-head">Events And Fests</h1>
<div class="container-fluid">
<div id="carouselExample" class="carousel slide" data-ride="carousel" data-interval="9000">
<div class="carousel-inner row w-10 mxauto" role="listbox">
<?php
include 'conn.php';
$sql = "select * from event ORDER BY event_id DESC";
$rs_result = mysqli_query($con, $sql);
?>
<div class="carousel-item col-md-4 active">
<img class="my-img img-fluid mx-auto d-bloc" src="images/techzion.jpg" alt="slide">
<div style="background-color: #31326f; color:white">
<a class="btn nav-link" target="_blank" href="https://bietjhs.ac.in"> <b>Techzion</b><br>
<p>FEE & EEF
<br>A Magnificent Event For Tech Enthusiasts
<br>22-25 jan 2020</p></a>
</div>
</div>
<?php
while ($row = mysqli_fetch_assoc($rs_result)) {
?>
<div class="carousel-item col-md-4">
<img class="my-img img-fluid mx-auto d-block" src="event_img/<?php print $row["event_img"] ?>" alt="slides">
<div style="background-color: #31326f; color:white">
<a class="btn nav-link" target="_blank" href="https://<?php echo $row["event_link"] ?>">
<b><?php echo $row["event_name"] ?></b><br>
<p><?php echo $row["council_name"] ?>
<br><?php echo $row["event_info"] ?>
<br><?php echo $row["event_date"] ?></p></a>
</div>
</div>
<?php
};
?>
</div>
<a class="carousel-control-prev" href="#carouselExample" role="button" data-slide="prev">
<i class="fa fa-chevron-left fa-lg text-muted"></i>
<span class="sr-only">Previous</span>
</a>
<a class="carousel-control-next text-faded" href="#carouselExample" role="button" data-slide="next">
<i class="fa fa-chevron-right fa-lg text-muted"></i>
<span class="sr-only">Next</span>
</a>
</div>
</div>
</section>
<hr id="after-fests" class="section-diff" style="width:70%">
<!-- QUESTIONS -->
<section style="text-align:center;">
<h1 class="events-head">FAQs</h1>
<div class="container">
<?php
include 'conn.php';
$sql = "select * from faq ORDER BY faq_id DESC";
$rs_result = mysqli_query($con, $sql);
?>
<div class="accordion " id="accordionExample">
<?php
$n = 1;
while ($row = mysqli_fetch_assoc($rs_result)) {
?>
<div class="card">
<div style="background-color: #31326f;" class=" card-header" id="heading1">
<h1 class="question mb-0">
<button style="color:white;" class="btn nav-link" type="button" data-toggle="collapse" data-target="#collapse<?php echo $n; ?>" aria-expanded="true" aria-controls="collapse<?php echo $n; ?>">
<h2><?php echo $row["question"]; ?></h2>
</button>
</h1>
</div>
<div id="collapse<?php echo $n; ?>" class="collapse" aria-labelledby="heading1" data-parent="#accordionExample">
<div style="color: black; background-color:white;" class="card-body collapse-item">
<h4 class="answer"><?php echo $row["answer"]; ?></h4>
</div>
</div>
</div>
<?php
$n = $n + 1;
};
?>
</div>
</div>
</section>
<hr id="after-questions" class="section-diff" style="width:70%">
<!-- COLLEGE MAP -->
<section id="map">
<div class="container">
<h1 class="map-head">Feeling Lost in the magnificence of the campus?</h1>
<iframe src="https://www.google.com/maps/embed?pb=!1m18!1m12!1m3!1d3602.3755268252967!2d78.63823101550054!3d25.459133183775105!2m3!1f0!2f0!3f0!3m2!1i1024!2i768!4f13.1!3m3!1m2!1s0x39777701fa29d96b%3A0x274c37abc80c1ad1!2sBundelkhand%20Institute%20Of%20Engineering%20and%20Technology!5e0!3m2!1sen!2sin!4v1606041154250!5m2!1sen!2sin" width="100%" height="450" frameborder="0" style="border:0;" allowfullscreen="" aria-hidden="false" tabindex="0"></iframe>
</div>
</section>
<hr id="after-map" class="section-diff" style="width:70%">
<!-- Footer -->
<?php include 'include/footer.php' ?>
<!-- FOR EVENTS AND FESTS -->
<script type="text/javascript">
$('#carouselExample').on('slide.bs.carousel', function(e) {
var $e = $(e.relatedTarget);
var idx = $e.index();
console.log("IDX : " + idx);
var itemsPerSlide = 6;
var totalItems = $('.carousel-item').length;
if (idx >= totalItems - (itemsPerSlide - 1)) {
var it = itemsPerSlide - (totalItems - idx);
for (var i = 0; i < it; i++) {
// append slides to end
if (e.direction == "left") {
$('.carousel-item').eq(i).appendTo('.carousel-inner');
} else {
$('.carousel-item').eq(0).appendTo('.carousel-inner');
}
}
}
});
</script>
<!-- SCRIPTS -->
<script src="https://code.jquery.com/jquery-3.2.1.slim.min.js" integrity="sha384-KJ3o2DKtIkvYIK3UENzmM7KCkRr/rE9/Qpg6aAZGJwFDMVNA/GpGFF93hXpG5KkN" crossorigin="anonymous"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.12.9/umd/popper.min.js" integrity="sha384-ApNbgh9B+Y1QKtv3Rn7W3mgPxhU9K/ScQsAP7hUibX39j7fakFPskvXusvfa0b4Q" crossorigin="anonymous"></script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0/js/bootstrap.min.js" integrity="sha384-JZR6Spejh4U02d8jOt6vLEHfe/JQGiRRSQQxSfFWpi1MquVdAyjUar5+76PVCmYl" crossorigin="anonymous"></script>
</body>
</html>