-
Notifications
You must be signed in to change notification settings - Fork 6
/
registrations.php
72 lines (61 loc) · 2.31 KB
/
registrations.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
<?php
session_start();
if (!isset($_SESSION['user_id'])) {
header('Location: login.php?back=registrations.php');
}
?>
<!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>Registrations - Fest Management</title>
<?php include 'includes/_links.php'; ?>
</head>
<body>
<?php include 'includes/_navbar.php'; ?>
<main>
<?php include 'includes/_dash_head.php'; ?>
<div class="container py-5" style="position: relative;">
<h1 class="h3 font-weight-normal mb-4">
Registrations
</h1>
<table class="table table-hover">
<thead>
<tr>
<th>Name</th>
<th>Event</th>
<th>Actions</th>
</tr>
</thead>
<tbody>
<?php
include 'includes/db_connect.php';
$query = 'SELECT * FROM registrations NATURAL JOIN participants NATURAL JOIN events';
$result = $db->query($query);
if ($result) {
while ($row = $result->fetch_assoc()) { ?>
<tr>
<td><?php echo $row['participant_name']; ?></td>
<td><?php echo $row['event_name']; ?></td>
<td>
<a href="view_participant.php?id=<?php echo $row['participant_id']; ?>" class="">
<i class="far fa-eye"></i> View
</a>
<a href="tel:<?php echo $row['participant_phone']; ?>" class="ml-2">
<i class="fas fa-phone-alt"></i> Call
</a>
</td>
</tr>
<?php }
}
?>
</tbody>
</table>
<?php include 'includes/_error_toast.php'; ?>
</div>
</main>
<?php include 'includes/_scripts.php'; ?>
</body>
</html>