Repository navigation
Expand file tree
/
Copy pathindex.php
More file actions
239 lines (229 loc) · 14.7 KB
/
Copy pathindex.php
File metadata and controls
239 lines (229 loc) · 14.7 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
<?php
// Incluir configuração centralizada do banco de dados
require_once __DIR__ . '/php/config.php';
$conn = getConnection();
$events = [];
$sql = "SELECT id, title, description, event_date, location FROM events ORDER BY event_date ASC";
try {
$result = $conn->query($sql);
if ($result) {
while ($row = $result->fetch_assoc()) {
$events[] = $row;
}
}
} catch (Exception $e) {
// Se a tabela não existir, continua com array vazio
$events = [];
}
$conn->close();
?>
<!DOCTYPE html>
<html lang="pt-BR">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Event Website</title>
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0/dist/css/bootstrap.min.css" rel="stylesheet">
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap-icons@1.10.5/font/bootstrap-icons.css">
<link href="https://fonts.googleapis.com/css2?family=Playfair+Display:wght@400;600;700&family=Poppins:wght@300;400;600&display=swap" rel="stylesheet">
<link rel="stylesheet" href="css/style.css">
</head>
<body>
<nav class="navbar navbar-expand-lg navbar-light bg-light fixed-top">
<div class="container">
<a class="navbar-brand" href="index.php">Event</a>
<button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbarNav">
<span class="navbar-toggler-icon"></span>
</button>
<div class="collapse navbar-collapse" id="navbarNav">
<ul class="navbar-nav ms-auto">
<li class="nav-item"><a class="nav-link active" href="index.php">Home</a></li>
<li class="nav-item"><a class="nav-link" href="quem_somos.html">Quem Somos</a></li>
<li class="nav-item"><a class="nav-link" href="cadastro.html">Cadastro</a></li>
<li class="nav-item"><a class="nav-link" href="consulta.php">Consulta</a></li>
<li class="nav-item"><a class="nav-link" href="atualizacao.php">Atualização</a></li>
<li class="nav-item"><a class="nav-link" href="exclusao.php">Exclusão</a></li>
<li class="nav-item"><a class="nav-link" href="admin_login.html">Admin</a></li>
</ul>
</div>
</div>
</nav>
<main class="container mt-5 pt-4">
<!-- Carousel -->
<div id="eventCarousel" class="carousel slide carousel-fade" data-bs-ride="carousel" style="margin-top: 56px;">
<div class="carousel-indicators">
<?php for ($i = 0; $i < max(1, count($events)); $i++): ?>
<button type="button" data-bs-target="#eventCarousel" data-bs-slide-to="<?php echo $i; ?>" <?php echo $i === 0 ? 'class="active"' : ''; ?>></button>
<?php endfor; ?>
</div>
<div class="carousel-inner">
<?php if (count($events) === 0): ?>
<div class="carousel-item active gradient-hero">
<div class="carousel-caption d-flex flex-column justify-content-center align-items-center text-center h-100">
<small class="text-uppercase text-light opacity-75 mb-3">Featured</small>
<h1 class="display-5 fw-semibold hero-title text-light">An elegant evening of networking, entertainment, and celebration.</h1>
<p class="lead hero-desc text-light mx-auto" style="max-width:720px;">Join industry leaders and creative minds for a memorable night of connection and inspiration.</p>
<div class="d-flex gap-2 my-3">
<span class="badge bg-white text-dark rounded-pill"><i class="bi bi-calendar-event me-2"></i>June 5, 2025</span>
<span class="badge bg-white text-dark rounded-pill"><i class="bi bi-geo-alt me-2"></i>Chicago, IL</span>
<span class="badge bg-white text-dark rounded-pill"><i class="bi bi-people me-2"></i>400+ Attendees</span>
</div>
<a href="cadastro.html" class="btn btn-light btn-lg rounded-pill mt-2">Register Now</a>
</div>
</div>
<?php else: ?>
<?php $first = true; foreach ($events as $ev): ?>
<div class="carousel-item <?php echo $first ? 'active' : ''; ?> gradient-hero" style="background-image: url('https://source.unsplash.com/1600x900/?<?php echo rawurlencode($ev['title']); ?>,conference'); background-size: cover; background-position: center;">
<div class="carousel-caption d-flex flex-column justify-content-center align-items-center text-center h-100">
<small class="text-uppercase text-light opacity-75 mb-3"><?php echo htmlspecialchars($ev['location']); ?></small>
<h1 class="display-5 fw-semibold hero-title text-light"><?php echo htmlspecialchars($ev['title']); ?></h1>
<p class="lead hero-desc text-light mx-auto" style="max-width:720px;"><?php echo htmlspecialchars(substr($ev['description'], 0, 180)); ?><?php echo strlen($ev['description'])>180 ? '...' : ''; ?></p>
<div class="d-flex gap-2 my-3">
<span class="badge bg-white text-dark rounded-pill"><i class="bi bi-calendar-event me-2"></i><?php echo date('F j, Y', strtotime($ev['event_date'])); ?></span>
<span class="badge bg-white text-dark rounded-pill"><i class="bi bi-geo-alt me-2"></i><?php echo htmlspecialchars($ev['location']); ?></span>
<span class="badge bg-white text-dark rounded-pill"><i class="bi bi-people me-2"></i>400+ Attendees</span>
</div>
<a href="cadastro.html" class="btn btn-light btn-lg rounded-pill mt-2">Register Now</a>
</div>
</div>
<?php $first = false; endforeach; ?>
<?php endif; ?>
</div>
<button class="carousel-control-prev" type="button" data-bs-target="#eventCarousel" data-bs-slide="prev">
<span class="carousel-control-prev-icon" aria-hidden="true"></span>
<span class="visually-hidden">Previous</span>
</button>
<button class="carousel-control-next" type="button" data-bs-target="#eventCarousel" data-bs-slide="next">
<span class="carousel-control-next-icon" aria-hidden="true"></span>
<span class="visually-hidden">Next</span>
</button>
</div>
<!-- Quick intro -->
<section class="mt-5">
<div class="row align-items-center">
<div class="col-md-6">
<h2>About Our Events</h2>
<p>We organize high quality conferences, workshops and networking events. Browse upcoming events and secure your spot.</p>
<a href="cadastro.html" class="btn btn-outline-primary">See Events & Register</a>
</div>
<div class="col-md-6">
<img src="https://source.unsplash.com/800x500/?meeting,conference" class="img-fluid rounded" alt="About">
</div>
</div>
</section>
<!-- Register Section -->
<section id="register" class="my-5">
<div class="container">
<div class="text-center mb-4">
<h2>Register for an Event</h2>
<p class="mx-auto" style="max-width:900px;color:var(--muted-foreground);">Sign up for our upcoming events and be part of something amazing</p>
</div>
<div class="row g-4 align-items-start">
<div class="col-lg-5">
<div class="card p-4 shadow-sm">
<h5 class="mb-3">Registration Form</h5>
<form id="eventRegisterForm">
<div class="mb-3">
<label class="form-label">Full Name</label>
<input type="text" id="reg_name" name="name" class="form-control" placeholder="Enter your name" required>
</div>
<div class="mb-3">
<label class="form-label">Email Address</label>
<input type="email" id="reg_email" name="email" class="form-control" placeholder="Enter your email" required>
</div>
<div class="mb-3">
<label class="form-label">Select Event</label>
<select id="reg_event" name="event_id" class="form-select">
<option value="">Choose an event</option>
<?php foreach($events as $ev): ?>
<option value="<?php echo htmlspecialchars($ev['id']); ?>" data-date="<?php echo htmlspecialchars($ev['event_date']); ?>"><?php echo htmlspecialchars($ev['title']); ?></option>
<?php endforeach; ?>
</select>
</div>
<div class="mb-3">
<label class="form-label">Event Date</label>
<input type="datetime-local" id="reg_event_date" name="event_date" class="form-control" placeholder="dd / mm / aaaa">
</div>
<div class="d-grid">
<button type="submit" class="btn btn-dark">Register Now</button>
</div>
</form>
<div id="registerResult" class="mt-3" style="display:none;"></div>
</div>
</div>
<div class="col-lg-7">
<h5 class="mb-3">Upcoming Events</h5>
<div class="list-group">
<?php if (count($events) === 0): ?>
<div class="list-group-item">No upcoming events.</div>
<?php else: ?>
<?php foreach ($events as $ev): ?>
<div class="list-group-item d-flex justify-content-between align-items-center">
<div>
<div class="fw-semibold"><?php echo htmlspecialchars($ev['title']); ?></div>
<small class="text-muted"><i class="bi bi-calendar-event"></i> <?php echo date('F j, Y', strtotime($ev['event_date'])); ?></small>
</div>
<a href="#register" class="select-event btn btn-link" data-id="<?php echo htmlspecialchars($ev['id']); ?>" data-date="<?php echo htmlspecialchars($ev['event_date']); ?>">Select</a>
</div>
<?php endforeach; ?>
<?php endif; ?>
</div>
</div>
</div>
</div>
</section>
<!-- About Us -->
<section class="about-section my-5">
<div class="container">
<div class="text-center mb-4">
<h2>About Us</h2>
<p class="mx-auto" style="max-width:900px;color:var(--muted-foreground);">EventHub is dedicated to bringing people together through exceptional events. We believe in the power of connection and the magic that happens when passionate individuals gather to learn, share, and grow together.</p>
</div>
<div class="row g-4 mb-4">
<div class="col-md-4">
<div class="about-card p-4 h-100 text-center">
<div class="icon-circle bg-blue mb-3"><i class="bi bi-bullseye text-white fs-3"></i></div>
<h5>Our Mission</h5>
<p class="text-muted">To create meaningful connections through world-class events that inspire, educate, and bring communities together.</p>
</div>
</div>
<div class="col-md-4">
<div class="about-card p-4 h-100 text-center">
<div class="icon-circle bg-purple mb-3"><i class="bi bi-heart text-white fs-3"></i></div>
<h5>Our Values</h5>
<p class="text-muted">We prioritize inclusivity, excellence, and innovation in every event we host, ensuring memorable experiences for all attendees.</p>
</div>
</div>
<div class="col-md-4">
<div class="about-card p-4 h-100 text-center">
<div class="icon-circle bg-pink mb-3"><i class="bi bi-lightning-charge text-white fs-3"></i></div>
<h5>Our Impact</h5>
<p class="text-muted">Over 10,000 successful events hosted, connecting more than 500,000 participants worldwide and counting.</p>
</div>
</div>
</div>
<div class="stat-banner rounded-4 text-white py-5">
<div class="row text-center">
<div class="col-md-4 mb-3 mb-md-0">
<div class="stat-value display-6">500K+</div>
<div class="stat-label">Participants</div>
</div>
<div class="col-md-4 mb-3 mb-md-0">
<div class="stat-value display-6">10K+</div>
<div class="stat-label">Events Hosted</div>
</div>
<div class="col-md-4">
<div class="stat-value display-6">98%</div>
<div class="stat-label">Satisfaction Rate</div>
</div>
</div>
</div>
</div>
</section>
</main>
<footer class="bg-dark text-white text-center py-3 mt-5">
<p>© 2025 Event Website. All rights reserved.</p>
</footer>
<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0/dist/js/bootstrap.bundle.min.js"></script>
</body>
</html>