-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.php
More file actions
132 lines (124 loc) · 4.58 KB
/
Copy pathindex.php
File metadata and controls
132 lines (124 loc) · 4.58 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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<title>Project</title>
<!-- Bootstrap Icons CDN -->
<link href="https://cdn.jsdelivr.net/npm/bootstrap-icons/font/bootstrap-icons.css" rel="stylesheet">
<link rel="stylesheet" href="css/index.css">
<link rel="stylesheet" href="css/style.css">
</head>
<body>
<noscript>
<meta http-equiv="refresh" content="0; URL=enable-js.php">
</noscript>
<?php
// Database connection details
require_once(__DIR__ . "/db_config.php");
// Create connection
$conn = new mysqli($host, $username, $password, $dbname);
// Check connection
if ($conn->connect_error) {
die("Connection failed: " . $conn->connect_error);
}
// Query to fetch the two soonest events
$sql = "SELECT event_title, event_date, event_desc, event_img FROM events WHERE event_date >= CURDATE() ORDER BY event_date ASC LIMIT 2";
$result = $conn->query($sql);
// Fetch the events into an array for later use
$events = [];
if ($result->num_rows > 0) {
while ($row = $result->fetch_assoc()) {
$events[] = $row;
}
}
$conn->close();
?>
<?php
require_once("header.php")
?>
<!---------------------- CONTENT ---------------------->
<main>
<img src="img/ClubImage.png" alt="backHome" class="homeImg">
<div class="ovalContainer">
<p class="ovalText"></p>
</div>
<!------About Section--->
<div class="about">
<div class="txtContainer">
<div class="title">
<h1>What do we do?</h1>
</div>
<a href="about.php" class="AboutLink">Read More</a>
</div>
<div class="imgContainer">
<img src="img/ActualPhotos/table.jpeg" alt="aboutHome">
</div>
<div class="pContainer">
<p>
The Entrepreneurship Club is a student organization intended to compliment the entrepreneurial curriculum offered at the Offutt School of Business
while further contributing to the entrepreneurial spirit of Concordia College.
The club provides students with tangible resources that expose, expand, and elucidate the entrepreneurial journey
intended to prepare each student for successful entrepreneurial pursuits.
</p>
</div>
</div>
<!----Events Page-->
<div class="event">
<div class="leftSide">
<div class="title">
<h1>Events</h1>
</div>
<div class="recentEvents">
<h2>Coming Up</h2>
<?php if (!empty($events)): ?>
<?php foreach ($events as $event): ?>
<div class="event-item">
<img src="data:image/jpeg;base64,<?php echo base64_encode($event['event_img']); ?>" alt="eventImage">
<p>
<?php echo htmlspecialchars($event['event_title']); ?><br>
<?php echo date('m/d/Y', strtotime($event['event_date'])); ?><br>
<?php echo htmlspecialchars($event['event_desc']); ?>
</p>
</div>
<?php endforeach; ?>
<?php else: ?>
<p>No upcoming events found.</p>
<?php endif; ?>
</div>
</div>
<div class="rightSide">
<div class="imgContainer">
<img src="img\ActualPhotos/schedule.jpeg" alt="eventHome">
</div>
<a href="schedule.php" class="EventLink">Schedule</a>
</div>
</div>
<!----Contact Page-->
<div class="contact">
<div class="txtContainer">
<div class="contactImgContainer">
<img src="img/programsImage.png" alt="contactHome">
</div>
<div class="title">
<h1>Join Us!</h1>
</div>
<div class="pContainer">
<p>
Lorem ipsum dolor sit amet, consectetur adipiscing elit,
sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.
Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut
aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit.
</p>
</div>
<a href="contact.php" class="ContactLink">Read More</a>
</div>
</div>
</div>
</main>
<?php
require_once("footer.php")
?>
</body>
</html>