-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathcoding.php
More file actions
389 lines (310 loc) · 14.1 KB
/
coding.php
File metadata and controls
389 lines (310 loc) · 14.1 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
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
<!DOCTYPE html>
<html lang="en">
<head>
<!-- Basic -->
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Campus Online</title>
<meta name="keywords" content="WebSite Template" />
<meta name="description" content="Porto - Multipurpose Website Template">
<meta name="author" content="okler.net">
<!-- Favicon -->
<link rel="shortcut icon" href="img/favicon.ico" type="image/x-icon" />
<link rel="apple-touch-icon" href="img/apple-touch-icon.png">
<!-- Mobile Metas -->
<meta name="viewport" content="width=device-width, initial-scale=1, minimum-scale=1.0, shrink-to-fit=no">
<!-- Web Fonts -->
<link id="googleFonts" href="https://fonts.googleapis.com/css?family=Poppins:300,400,500,600,700,800%7CShadows+Into+Light%7CPlayfair+Display:400&display=swap" rel="stylesheet" type="text/css">
<!-- Vendor CSS -->
<link rel="stylesheet" href="vendor/bootstrap/css/bootstrap.min.css">
<link rel="stylesheet" href="vendor/fontawesome-free/css/all.min.css">
<link rel="stylesheet" href="vendor/animate/animate.compat.css">
<link rel="stylesheet" href="vendor/simple-line-icons/css/simple-line-icons.min.css">
<link rel="stylesheet" href="vendor/owl.carousel/assets/owl.carousel.min.css">
<link rel="stylesheet" href="vendor/owl.carousel/assets/owl.theme.default.min.css">
<link rel="stylesheet" href="vendor/magnific-popup/magnific-popup.min.css">
<link rel="stylesheet" href="vendor/bootstrap-star-rating/css/star-rating.min.css">
<link rel="stylesheet" href="vendor/bootstrap-star-rating/themes/krajee-fas/theme.min.css">
<!-- Theme CSS -->
<link rel="stylesheet" href="css/theme.css">
<link rel="stylesheet" href="css/theme-elements.css">
<link rel="stylesheet" href="css/theme-blog.css">
<link rel="stylesheet" href="css/theme-shop.css">
<!-- Skin CSS -->
<link id="skinCSS" rel="stylesheet" href="css/skins/default.css">
<!-- Theme Custom CSS -->
<link rel="stylesheet" href="css/custom.css">
<style>
body::after {
content: "";
display: table;
clear: both;
background-color: lightgreen;
}
.left-section {
float: left;
width: 30%;
/* Takes up 1/3 of the available space */
box-sizing: border-box;
}
.left-section-top {
background-color: white;
color: black;
text-align: center;
padding: 20px;
margin: 5px;
min-height: 40px;
max-height: 70px;
line-height: 70px;
/* Set line-height equal to max-height to vertically center text */
display: flex;
align-items: center;
justify-content: center;
border-radius: 5px;
margin-left: 30px;
}
.left-section-top img {
vertical-align: middle;
/* Vertically center the image */
/* Adjust margin as needed */
margin-left: -70px;
/* Adjust margin as needed to move the image slightly to the left */
}
.left-section-top h4 {
margin: 0;
color: black;
/* Remove default margin for h1 */
}
.left-section-bottom {
background-color: white;
color: white;
text-align: center;
padding: 20px;
margin: 5px;
min-height: 300px;
border-radius: 5px;
margin-left: 30px;
}
.right-section {
float: left;
width: 70%;
/* Takes up 2/3 of the available space */
box-sizing: border-box;
}
.right-section-inner {
background-color: white;
/* Adjust the color as needed */
color: black;
/* Set the text color to be visible */
text-align: center;
/* Center the text horizontally */
padding: 20px;
margin: 5px;
margin-right: 200px;
border-radius: 5px;
margin-right: 40px;
margin-bottom: 20px;
}
.profile-menu {
list-style: none;
padding: 10px;
margin: 20px;
margin-right: 30px;
}
.profile-menu li {
margin-bottom: 20px;
margin-top: 20px;
}
.profile-menu a {
text-decoration: none !important;
/* Added !important */
color: #0088cc;
display: flex;
/* Use flex to align icon and text horizontally */
align-items: center;
/* Center items vertically */
padding: 10px;
border-radius: 5px;
transition: background-color 0.3s;
font-size: larger;
}
.profile-menu a svg {
margin-right: 10px;
/* Add margin to separate icon from text */
}
.profile-menu a:hover {
background-color: #0088cc;
color: white;
text-decoration: none !important;
/* Added !important */
}
.nav-link {
text-decoration: none !important;
align-items: center;
padding: 10px;
margin-bottom: 10px;
margin-top: 10px;
}
</style>
</head>
<body data-plugin-page-transition>
<?php include 'events_header.php'; ?>
<div class="body">
<div class="left-section">
<div class="left-section-bottom">
<aside class="sidebar">
<h5 class="font-weight-semi-bold pt-3" style="width: 100%">Clubs</h5>
<ul class="nav nav-list flex-column">
<li class="nav-item"><a class="nav-link" href="iei.php">IEI</a></li>
<li class="nav-item"><a class="nav-link" href="clubs.php">ACE</a></li>
<li class="nav-item"><a class="nav-link" href="eoc.php">EOC</a></li>
<li class="nav-item"><a class="nav-link" href="gdsc.php">GDSC</a></li>
<li class="nav-item"><a class="nav-link" href="cine.php">CINE</a></li>
<li class="nav-item"><a class="nav-link" href="coding.php">CODING</a></li>
<li class="nav-item"><a class="nav-link" href="startup.php">STARTUP</a></li>
</ul>
</div>
</div>
</div>
</div>
<div class="right-section">
<div class="right-section-inner">
<div role="main" class="main shop pb-4">
<div class="category">
<div class="top-deals-container">
<h2 class="top-deals-heading">CODING CLUB Updates</h2>
</div>
<div class="#" data-appear-animation="fadeInUpShorter" data-appear-animation-delay="200">
<?php
// Include the file to establish a database connection
include 'connect.php';
// Write your SQL query
$sql = "SELECT * FROM event WHERE Category='CODING'";
// Execute the query
$result = mysqli_query($conn, $sql);
// Check if there are any results
if (mysqli_num_rows($result) > 0) {
// Output data of each row
while ($row = mysqli_fetch_assoc($result)) {
// Output the HTML structure with product details
?>
<div class="card" style="border-color: black;">
<div class="row g-0">
<div class="col-lg-4">
<img src="<?php echo $row['image']; ?>" class="card-img" alt="Blog Image">
</div>
<div class="col-lg-8">
<div class="card-body">
<h4 class="card-title"><?php echo $row['eventname']; ?></h4>
<p class="card-text"> <?php echo $row['eventdescription']; ?></p>
<a href="#" class="btn btn-primary read-more" data-bs-toggle="collapse" data-bs-target="#new1" aria-expanded="false" aria-controls="new1">
Read More <i class="fas fa-angle-down"></i>
</a>
</div>
</div>
</div>
<div class="collapse" id="new1" style="width:800px; ">
<div class="card-body">
<p>For More Infromation Contact
CODING CLUB
</p>
</div>
</div>
</div>
<br>
<?php
}
} else {
echo "0 results";
}
// Close the database connection
mysqli_close($conn);
?>
<br>
<!-- Bootstrap Bundle with Popper -->
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/5.1.3/js/bootstrap.bundle.min.js"></script>
<script>
document.addEventListener("DOMContentLoaded", function() {
// Get all elements with the class '.read-more'
const readMoreButtons = document.querySelectorAll('.read-more');
// Loop through each read more button
readMoreButtons.forEach(function(readMoreButton) {
// Get the corresponding collapse element
const collapseElement = document.querySelector(readMoreButton.getAttribute('data-bs-target'));
// Add event listener to the "show.bs.collapse" event of the collapse element
collapseElement.addEventListener('show.bs.collapse', function() {
// Change button text to "Minimize" and change icon
readMoreButton.innerHTML = 'Minimize <i class="fas fa-angle-up"></i>';
});
// Add event listener to the "hide.bs.collapse" event of the collapse element
collapseElement.addEventListener('hide.bs.collapse', function() {
// Change button text to "Read More" and change icon
readMoreButton.innerHTML = 'Read More <i class="fas fa-angle-down"></i>';
});
// Add event listener to the "Read More" button
readMoreButton.addEventListener('click', function(event) {
event.preventDefault(); // Prevent default anchor click behavior
// Toggle the collapse state of the collapse element
const isCollapsed = collapseElement.classList.contains('show');
if (isCollapsed) {
collapseElement.classList.remove('show');
} else {
collapseElement.classList.add('show');
}
});
});
});
</script>
</div>
</div>
</div>
</div>
</div>
</div>
<!-- Bootstrap Bundle with Popper and Bootstrap JS -->
<script src="https://stackpath.bootstrapcdn.com/bootstrap/5.1.3/js/bootstrap.bundle.min.js"></script>
<!-- jQuery -->
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.6.0/jquery.min.js"></script>
<script>
// JavaScript to toggle collapse state
$(document).ready(function() {
$(".read-more").click(function() {
$(this).toggleClass('active');
});
});
</script>
<script>
$(document).ready(function() {
$('.read-more').click(function(e) {
e.preventDefault();
var target = $(this).data('bs-target');
var $target = $(target);
if ($target.hasClass('show')) {
$target.collapse('hide');
} else {
$target.collapse('show');
}
});
});
</script>
</div>
</div>
</div>
</div>
<?php include 'footer.php'; ?>
</div>
<!-- Vendor -->
<script src="vendor/plugins/js/plugins.min.js"></script>
<script src="vendor/bootstrap-star-rating/js/star-rating.min.js"></script>
<script src="vendor/bootstrap-star-rating/themes/krajee-fas/theme.min.js"></script>
<script src="vendor/jquery.countdown/jquery.countdown.min.js"></script>
<!-- Theme Base, Components and Settings -->
<script src="js/theme.js"></script>
<!-- Current Page Vendor and Views -->
<script src="js/views/view.shop.js"></script>
<!-- Theme Custom -->
<script src="js/custom.js"></script>
<!-- Theme Initialization Files -->
<script src="js/theme.init.js"></script>
</body>
</html>