-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.php
More file actions
71 lines (66 loc) · 3.27 KB
/
Copy pathindex.php
File metadata and controls
71 lines (66 loc) · 3.27 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
<?php
require "./Database.php";
$sql = "SELECT * FROM $TableName ORDER BY `DateTime`";
$res = mysqli_query($conn, $sql);
?>
<!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">
<title>Document</title>
<!-- Bootstrap for navbar -->
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.0.2/dist/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-EVSTQN3/azprG1Anm3QDgpJLIm9Nao0Yz1ztcQTwFspd3yD65VohhpuuCOmLASjC" crossorigin="anonymous">
<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.0.2/dist/js/bootstrap.min.js" integrity="sha384-cVKIPhGWiC2Al4u+LWgxfKTRIcfu0JTxR+EQDz/bgldoEyl4H0zUF0QKbrJ0EcQF" crossorigin="anonymous"></script>
<!-- Style -->
<link rel="stylesheet" href="./CSS/Index.css">
</head>
<body>
<nav class="navbar navbar-expand-lg navbar-dark bg-dark">
<div class="container-fluid">
<a class="navbar-brand fontB" href="./index.php"><b>Deshbandhu</b> College</a>
<!-- <form class="form-dark" method="GET" action="./Events.php">
<input type="text" placeholder="Search" class="form-control dark font_style" id="search" name="search">
</form> -->
<div class="ms-auto" id="LINKS">
<ul class="navbar-nav">
<a class="nav-link fontA" aria-current="page" href="./AdminPanel.php">Admin Panel</a>
<li class="nav-item">
<a class="nav-link fontA" aria-current="page" href="./EventDetailsForm.php">Host An Event?</a>
</li>
</ul>
</div>
</div>
</nav>
<div class="EventList">
<?php while($row = $res->fetch_assoc()) { ?>
<div class="EventDiv fontA fontWhite">
<span class="display-3 fontB"><?php echo $row["Topic"] ?></span>
<span class="display-4">
<?php
$days = (int)$row['NumDays'] - 1;
$date = new DateTime($row["DateTime"]);
if($days == 1) {
echo $date->format("Y-m-d");
}
else {
$start = clone $date;
$end = (clone $date)->modify("+$days day");
echo $start->format("Y-m-d") . " to " . $end->format("Y-m-d");
}
echo " at " . $date->format("h:i A");
?>
</span>
<span class="h2">Department/Organization: <?php echo $row['Department'] ?></span>
<div class="Grid3">
<span class="h5">Mode: <?php echo $row['Mode']?></span>
<span class="h5">Type of event: <?php echo $row['Type']?></span>
<span class="h5">Aegis: <?php echo $row['Aegis']?></span>
</div>
</div>
<?php } ?>
</div>
</body>
</html>
<?php exit(); ?>