\n
\n
Database connection unavailable. Please check your configuration and logs.
\n
\n'; include_once($rootPath . '/components/insta_footer.php'); // Stop execution to prevent subsequent fatal errors from using $conn exit; } ?> 'index']]; require_once($rootPath . '/components/banner.php'); ?>
query($trips_query); $trips = []; if ($result && $result->num_rows > 0) { while ($row = $result->fetch_assoc()) { $trips[] = $row; } } ?>

Manage Trips

New Trip
×
0) { echo ''; echo '
'; foreach ($trips as $trip) { $available = $trip['vehicle_capacity'] - $trip['places_booked']; $publishStatusBadge = $trip['published'] == 1 ? 'PUBLISHED' : 'DRAFT'; $tripImagePath = ''; $tripImagesGlob = glob($rootPath . '/assets/images/trips/' . $trip['trip_id'] . '_*.jpg'); if (!empty($tripImagesGlob)) { $tripImagePath = str_replace($rootPath, '', $tripImagesGlob[0]); } else { $tripImagePath = 'assets/images/placeholder.jpg'; } echo '
' . htmlspecialchars($trip['trip_name']) . '
' . strtoupper($publishStatusBadge) . '
' . htmlspecialchars($trip['trip_name']) . '
📍 ' . htmlspecialchars($trip['location']) . '

Dates: ' . date('M d', strtotime($trip['start_date'])) . ' - ' . date('M d, Y', strtotime($trip['end_date'])) . '
Capacity: ' . $trip['places_booked'] . ' / ' . $trip['vehicle_capacity'] . '
Costs: Members: R ' . number_format($trip['cost_members'], 2) . ' | Non-Members: R ' . number_format($trip['cost_nonmembers'], 2) . ' | Pensioner Members: R ' . number_format($trip['cost_pensioner_member'], 2) . ' | Pensioners: R ' . number_format($trip['cost_pensioner'], 2) . '

'; } echo '
'; } else { echo "

No trips found. Create one

"; } ?>
query($events_query); $events = []; if ($result && $result->num_rows > 0) { while ($row = $result->fetch_assoc()) { $events[] = $row; } } ?>

Manage Events

New Event
0) { echo ''; echo '
'; foreach ($events as $event) { $eventImagePath = $event['image'] ? htmlspecialchars($event['image']) : 'assets/images/placeholder.jpg'; $publishStatusBadge = $event['published'] == 1 ? 'PUBLISHED' : 'DRAFT'; echo '
' . htmlspecialchars($event['name']) . '
' . strtoupper($publishStatusBadge) . '
' . htmlspecialchars($event['name']) . '
📍 ' . htmlspecialchars($event['location']) . '

Type: ' . htmlspecialchars($event['type']) . '
Date: ' . convertDate($event['date']) . '

'; } echo '
'; } else { echo '

No events found. Create one

'; } ?>
query($courses_query); $courses = []; if ($result && $result->num_rows > 0) { while ($row = $result->fetch_assoc()) { $courses[] = $row; } } ?>

Manage Courses

New Course
×
0): ?>

Instructor: ()
Capacity: /   Available:
Costs: Members: R | Non-Members: R

No courses found. Create one

prepare("SELECT b.blog_id, b.title, b.description, b.status, b.date, b.image, CONCAT(u.first_name, ' ', u.last_name) AS author_name, u.email AS author_email, u.profile_pic FROM blogs b JOIN users u ON b.author = u.user_id WHERE b.status = 'published' ORDER BY b.date DESC"); if ($stmt) { $stmt->execute(); $res = $stmt->get_result(); if ($res && $res->num_rows > 0) { while ($r = $res->fetch_assoc()) $posts[] = $r; } } } ?>

Manage Blogs

New Blog
0): ?>

No blogs found. Create one