![]() Server : Apache/2 System : Linux server-15-235-50-60 5.15.0-164-generic #174-Ubuntu SMP Fri Nov 14 20:25:16 UTC 2025 x86_64 User : gositeme ( 1004) PHP Version : 8.2.29 Disable Function : exec,system,passthru,shell_exec,proc_close,proc_open,dl,popen,show_source,posix_kill,posix_mkfifo,posix_getpwuid,posix_setpgid,posix_setsid,posix_setuid,posix_setgid,posix_seteuid,posix_setegid,posix_uname Directory : /home/gositeme/domains/soundstudiopro.com/private_html/ |
<?php
session_start();
require_once 'config/database.php';
$event_id = $_GET['id'] ?? null;
// Check if this is an AJAX request
$isAjaxRequest = isset($_GET['page']) || (isset($_SERVER['HTTP_X_REQUESTED_WITH']) && $_SERVER['HTTP_X_REQUESTED_WITH'] === 'XMLHttpRequest');
if (!$event_id) {
if ($isAjaxRequest) {
echo json_encode(['success' => false, 'error' => 'No event ID provided']);
exit;
} else {
header('Location: /events.php');
exit;
}
}
$pdo = getDBConnection();
$user_id = $_SESSION['user_id'] ?? null;
// Get event details
$stmt = $pdo->prepare("
SELECT
e.*,
u.name as creator_name,
u.profile_image as creator_image,
COUNT(DISTINCT ea.user_id) as attendee_count,
COUNT(DISTINCT el.user_id) as like_count,
COUNT(DISTINCT ec.id) as comment_count,
CASE WHEN ea2.user_id IS NOT NULL THEN ea2.status ELSE NULL END as user_rsvp_status
FROM events e
JOIN users u ON e.creator_id = u.id
LEFT JOIN event_attendees ea ON e.id = ea.event_id AND ea.status = 'attending'
LEFT JOIN event_likes el ON e.id = el.event_id
LEFT JOIN event_comments ec ON e.id = ec.event_id
LEFT JOIN event_attendees ea2 ON e.id = ea2.event_id AND ea2.user_id = ?
WHERE e.id = ? AND e.status = 'published'
GROUP BY e.id
");
$stmt->execute([$user_id, $event_id]);
$event = $stmt->fetch();
if (!$event) {
if ($isAjaxRequest) {
echo json_encode(['success' => false, 'error' => 'Event not found']);
exit;
} else {
header('Location: /events.php');
exit;
}
}
// Get attendees
$stmt = $pdo->prepare("
SELECT
ea.*,
u.name,
u.profile_image
FROM event_attendees ea
JOIN users u ON ea.user_id = u.id
WHERE ea.event_id = ?
ORDER BY ea.rsvp_date DESC
");
$stmt->execute([$event_id]);
$attendees = $stmt->fetchAll();
// Get comments
$stmt = $pdo->prepare("
SELECT
ec.*,
u.name,
u.profile_image
FROM event_comments ec
JOIN users u ON ec.user_id = u.id
WHERE ec.event_id = ?
ORDER BY ec.created_at DESC
");
$stmt->execute([$event_id]);
$comments = $stmt->fetchAll();
// Set page variables for header
$current_page = 'events';
$page_title = $event['title'] . ' - SoundStudioPro Events';
$page_description = $event['description'];
include 'includes/header.php';
// Helper functions
function formatEventDate($start_date, $end_date) {
$start = new DateTime($start_date);
$end = new DateTime($end_date);
if ($start->format('Y-m-d') === $end->format('Y-m-d')) {
return $start->format('l, F j, Y') . ' at ' . $start->format('g:i A');
} else {
return $start->format('l, F j, Y g:i A') . ' - ' . $end->format('l, F j, Y g:i A');
}
}
function getEventTypeIcon($event_type) {
$icons = [
'live_music' => 'fas fa-music',
'workshop' => 'fas fa-graduation-cap',
'networking' => 'fas fa-users',
'release_party' => 'fas fa-champagne-glasses',
'battle' => 'fas fa-trophy',
'open_mic' => 'fas fa-microphone',
'studio_session' => 'fas fa-record-vinyl',
'other' => 'fas fa-calendar'
];
return $icons[$event_type] ?? 'fas fa-calendar';
}
function getEventTypeColor($event_type) {
$colors = [
'live_music' => '#667eea',
'workshop' => '#48bb78',
'networking' => '#ed8936',
'release_party' => '#9f7aea',
'battle' => '#f56565',
'open_mic' => '#38b2ac',
'studio_session' => '#ed64a6',
'other' => '#a0aec0'
];
return $colors[$event_type] ?? '#a0aec0';
}
?>
<div class="event-details-page">
<!-- Hero Section -->
<section class="event-hero">
<div class="hero-background">
<div class="hero-pattern"></div>
</div>
<div class="container">
<div class="event-hero-content">
<div class="breadcrumb">
<a href="/events.php" class="breadcrumb-link">
<i class="fas fa-arrow-left"></i>
Back to Events
</a>
</div>
<div class="event-header">
<div class="event-type-badge" style="background: <?= getEventTypeColor($event['event_type']) ?>">
<i class="<?= getEventTypeIcon($event['event_type']) ?>"></i>
<?= ucwords(str_replace('_', ' ', $event['event_type'])) ?>
</div>
<h1 class="event-title"><?= htmlspecialchars($event['title']) ?></h1>
<div class="event-creator">
<div class="creator-avatar">
<?= strtoupper(substr($event['creator_name'], 0, 1)) ?>
</div>
<div class="creator-info">
<span class="creator-label">Created by</span>
<a href="/artist_profile.php?id=<?= $event['creator_id'] ?>" class="creator-name">
<?= htmlspecialchars($event['creator_name']) ?>
</a>
</div>
</div>
</div>
</div>
</div>
</section>
<!-- Main Content -->
<div class="event-main-content">
<div class="container">
<div class="event-layout">
<!-- Main Content Area -->
<div class="event-content">
<!-- Event Description -->
<div class="content-section">
<h2 class="section-title">About This Event</h2>
<div class="event-description">
<p><?= nl2br(htmlspecialchars($event['description'])) ?></p>
</div>
</div>
<!-- Event Details -->
<div class="content-section">
<h2 class="section-title">Event Details</h2>
<div class="details-grid">
<div class="detail-card">
<div class="detail-icon">
<i class="fas fa-calendar"></i>
</div>
<div class="detail-content">
<h3>Date & Time</h3>
<p><?= formatEventDate($event['start_date'], $event['end_date']) ?></p>
</div>
</div>
<?php if ($event['location']): ?>
<div class="detail-card">
<div class="detail-icon">
<i class="fas fa-map-marker-alt"></i>
</div>
<div class="detail-content">
<h3>Location</h3>
<p><?= htmlspecialchars($event['location']) ?></p>
</div>
</div>
<?php endif; ?>
<?php if ($event['venue_name']): ?>
<div class="detail-card">
<div class="detail-icon">
<i class="fas fa-building"></i>
</div>
<div class="detail-content">
<h3>Venue</h3>
<p><?= htmlspecialchars($event['venue_name']) ?></p>
</div>
</div>
<?php endif; ?>
<div class="detail-card">
<div class="detail-icon">
<i class="fas fa-ticket-alt"></i>
</div>
<div class="detail-content">
<h3>Price</h3>
<p><?= $event['is_free'] ? 'Free' : '$' . number_format($event['ticket_price'], 2) ?></p>
</div>
</div>
<?php if ($event['max_attendees']): ?>
<div class="detail-card">
<div class="detail-icon">
<i class="fas fa-users"></i>
</div>
<div class="detail-content">
<h3>Capacity</h3>
<p><?= $event['current_attendees'] ?> / <?= $event['max_attendees'] ?> spots filled</p>
</div>
</div>
<?php endif; ?>
</div>
</div>
<!-- Event Actions -->
<div class="content-section">
<h2 class="section-title">Join This Event</h2>
<div class="action-section">
<?php if ($user_id): ?>
<div class="action-buttons">
<button class="btn btn-primary btn-lg" onclick="rsvpEvent(<?= $event['id'] ?>, 'attending')"
<?= $event['user_rsvp_status'] === 'attending' ? 'disabled' : '' ?>>
<i class="fas fa-check"></i>
<?= $event['user_rsvp_status'] === 'attending' ? 'Attending' : 'Attend Event' ?>
</button>
<button class="btn btn-secondary" onclick="rsvpEvent(<?= $event['id'] ?>, 'maybe')"
<?= $event['user_rsvp_status'] === 'maybe' ? 'disabled' : '' ?>>
<i class="fas fa-question"></i>
Maybe
</button>
<button class="btn btn-outline" onclick="likeEvent(<?= $event['id'] ?>)">
<i class="fas fa-heart"></i>
Like
</button>
<button class="btn btn-outline" onclick="shareEvent(<?= $event['id'] ?>)">
<i class="fas fa-share"></i>
Share
</button>
</div>
<?php else: ?>
<div class="login-prompt">
<div class="login-prompt-content">
<i class="fas fa-sign-in-alt"></i>
<h3>Login to Join This Event</h3>
<p>Connect with other attendees and join the SoundStudioPro community!</p>
<a href="/auth/login_new.php" class="btn btn-primary btn-lg">
<i class="fas fa-sign-in-alt"></i>
Login to Join
</a>
</div>
</div>
<?php endif; ?>
</div>
</div>
<!-- Comments Section -->
<div class="content-section">
<h2 class="section-title">Comments (<?= count($comments) ?>)</h2>
<?php if ($user_id): ?>
<div class="comment-form">
<div class="comment-input">
<textarea id="commentText" placeholder="Share your thoughts about this event..."></textarea>
</div>
<button onclick="addComment(<?= $event['id'] ?>)" class="btn btn-primary">
<i class="fas fa-paper-plane"></i>
Post Comment
</button>
</div>
<?php endif; ?>
<div class="comments-list">
<?php if (empty($comments)): ?>
<div class="no-comments">
<i class="fas fa-comment-slash"></i>
<h3>No comments yet</h3>
<p>Be the first to share your thoughts about this event!</p>
</div>
<?php else: ?>
<?php foreach ($comments as $comment): ?>
<div class="comment-item">
<div class="comment-avatar">
<?= strtoupper(substr($comment['name'], 0, 1)) ?>
</div>
<div class="comment-content">
<div class="comment-header">
<a href="/artist_profile.php?id=<?= $comment['user_id'] ?>" class="comment-author">
<?= htmlspecialchars($comment['name']) ?>
</a>
<span class="comment-date"><?= date('M j, Y g:i A', strtotime($comment['created_at'])) ?></span>
</div>
<p class="comment-text"><?= nl2br(htmlspecialchars($comment['comment'])) ?></p>
</div>
</div>
<?php endforeach; ?>
<?php endif; ?>
</div>
</div>
</div>
<!-- Sidebar -->
<div class="event-sidebar">
<!-- Event Stats -->
<div class="sidebar-card">
<h3 class="card-title">Event Stats</h3>
<div class="stats-grid">
<div class="stat-item">
<div class="stat-icon">
<i class="fas fa-users"></i>
</div>
<div class="stat-content">
<span class="stat-number"><?= $event['attendee_count'] ?></span>
<span class="stat-label">Attending</span>
</div>
</div>
<div class="stat-item">
<div class="stat-icon">
<i class="fas fa-heart"></i>
</div>
<div class="stat-content">
<span class="stat-number"><?= $event['like_count'] ?></span>
<span class="stat-label">Likes</span>
</div>
</div>
<div class="stat-item">
<div class="stat-icon">
<i class="fas fa-comment"></i>
</div>
<div class="stat-content">
<span class="stat-number"><?= $event['comment_count'] ?></span>
<span class="stat-label">Comments</span>
</div>
</div>
</div>
</div>
<!-- Attendees -->
<div class="sidebar-card">
<h3 class="card-title">Attendees (<?= $event['attendee_count'] ?>)</h3>
<div class="attendees-list">
<?php if (empty($attendees)): ?>
<div class="no-attendees">
<i class="fas fa-user-plus"></i>
<p>No attendees yet</p>
<span>Be the first to join!</span>
</div>
<?php else: ?>
<?php foreach ($attendees as $attendee): ?>
<div class="attendee-item">
<div class="attendee-avatar">
<?= strtoupper(substr($attendee['name'], 0, 1)) ?>
</div>
<div class="attendee-info">
<a href="/artist_profile.php?id=<?= $attendee['user_id'] ?>" class="attendee-name">
<?= htmlspecialchars($attendee['name']) ?>
</a>
<span class="attendee-status"><?= ucfirst($attendee['status']) ?></span>
</div>
</div>
<?php endforeach; ?>
<?php endif; ?>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<style>
/* Event Details Page */
.event-details-page {
min-height: 100vh;
background: var(--bg-primary);
color: var(--text-primary);
}
/* Hero Section */
.event-hero {
position: relative;
padding: 6rem 0 4rem;
background: linear-gradient(135deg, rgba(102, 126, 234, 0.1) 0%, rgba(118, 75, 162, 0.1) 100%);
overflow: hidden;
}
.hero-background {
position: absolute;
top: 0;
left: 0;
right: 0;
bottom: 0;
z-index: 1;
}
.hero-pattern {
position: absolute;
top: 0;
left: 0;
right: 0;
bottom: 0;
background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="grid" width="20" height="20" patternUnits="userSpaceOnUse"><path d="M 20 0 L 0 0 0 20" fill="none" stroke="rgba(102,126,234,0.1)" stroke-width="1"/></pattern></defs><rect width="100" height="100" fill="url(%23grid)"/></svg>');
opacity: 0.3;
}
.event-hero-content {
position: relative;
z-index: 2;
text-align: center;
}
.breadcrumb {
margin-bottom: 2rem;
}
.breadcrumb-link {
display: inline-flex;
align-items: center;
gap: 0.5rem;
color: var(--primary);
text-decoration: none;
font-weight: 600;
transition: var(--transition-normal);
}
.breadcrumb-link:hover {
color: var(--accent);
transform: translateX(-2px);
}
.event-header {
max-width: 800px;
margin: 0 auto;
}
.event-type-badge {
display: inline-flex;
align-items: center;
gap: 0.5rem;
color: white;
padding: 0.75rem 1.5rem;
border-radius: var(--radius-full);
font-size: 0.9rem;
font-weight: 600;
margin-bottom: 1.5rem;
}
.event-title {
font-size: 3.5rem;
font-weight: 800;
margin-bottom: 2rem;
background: var(--gradient-primary);
background-clip: text;
-webkit-background-clip: text;
-webkit-text-fill-color: transparent;
line-height: 1.1;
}
.event-creator {
display: flex;
align-items: center;
justify-content: center;
gap: 1rem;
}
.creator-avatar {
width: 60px;
height: 60px;
background: var(--gradient-primary);
border-radius: 50%;
display: flex;
align-items: center;
justify-content: center;
color: white;
font-size: 1.8rem;
font-weight: 700;
}
.creator-info {
text-align: left;
}
.creator-label {
display: block;
color: var(--text-secondary);
font-size: 0.9rem;
margin-bottom: 0.25rem;
}
.creator-name {
color: var(--primary);
text-decoration: none;
font-weight: 600;
font-size: 1.1rem;
}
.creator-name:hover {
color: var(--accent);
text-decoration: underline;
}
/* Main Content */
.event-main-content {
padding: 4rem 0;
}
.event-layout {
display: grid;
grid-template-columns: 1fr 350px;
gap: 3rem;
align-items: start;
}
.event-content {
display: flex;
flex-direction: column;
gap: 3rem;
}
.content-section {
background: var(--bg-card);
border: 1px solid var(--border-light);
border-radius: var(--radius-lg);
padding: 2.5rem;
backdrop-filter: blur(10px);
}
.section-title {
font-size: 1.8rem;
font-weight: 700;
margin-bottom: 1.5rem;
color: var(--text-primary);
}
.event-description p {
font-size: 1.1rem;
line-height: 1.8;
color: var(--text-secondary);
margin: 0;
}
/* Details Grid */
.details-grid {
display: grid;
grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
gap: 1.5rem;
}
.detail-card {
display: flex;
align-items: flex-start;
gap: 1rem;
padding: 1.5rem;
background: var(--bg-glass);
border: 1px solid var(--border-light);
border-radius: var(--radius-md);
transition: var(--transition-normal);
}
.detail-card:hover {
transform: translateY(-2px);
border-color: var(--border-accent);
}
.detail-icon {
width: 50px;
height: 50px;
background: var(--gradient-primary);
border-radius: var(--radius-md);
display: flex;
align-items: center;
justify-content: center;
color: white;
font-size: 1.2rem;
flex-shrink: 0;
}
.detail-content h3 {
font-size: 1rem;
font-weight: 600;
margin-bottom: 0.5rem;
color: var(--text-primary);
}
.detail-content p {
color: var(--text-secondary);
margin: 0;
line-height: 1.5;
}
/* Action Section */
.action-section {
text-align: center;
}
.action-buttons {
display: flex;
gap: 1rem;
flex-wrap: wrap;
justify-content: center;
}
.login-prompt {
padding: 3rem 2rem;
background: var(--bg-glass);
border: 1px solid var(--border-light);
border-radius: var(--radius-lg);
}
.login-prompt-content {
text-align: center;
}
.login-prompt-content i {
font-size: 3rem;
color: var(--primary);
margin-bottom: 1rem;
}
.login-prompt-content h3 {
font-size: 1.5rem;
margin-bottom: 0.5rem;
color: var(--text-primary);
}
.login-prompt-content p {
color: var(--text-secondary);
margin-bottom: 2rem;
}
/* Comments */
.comment-form {
display: flex;
gap: 1rem;
margin-bottom: 2rem;
align-items: flex-start;
}
.comment-input {
flex: 1;
}
.comment-input textarea {
width: 100%;
min-height: 100px;
padding: 1rem;
background: var(--bg-glass);
border: 1px solid var(--border-light);
border-radius: var(--radius-md);
color: var(--text-primary);
font-size: 1rem;
resize: vertical;
font-family: var(--font-primary);
}
.comment-input textarea:focus {
outline: none;
border-color: var(--primary);
}
.comments-list {
display: flex;
flex-direction: column;
gap: 1.5rem;
}
.comment-item {
display: flex;
gap: 1rem;
padding: 1.5rem;
background: var(--bg-glass);
border: 1px solid var(--border-light);
border-radius: var(--radius-md);
}
.comment-avatar {
width: 50px;
height: 50px;
background: var(--gradient-primary);
border-radius: 50%;
display: flex;
align-items: center;
justify-content: center;
color: white;
font-weight: 700;
flex-shrink: 0;
}
.comment-content {
flex: 1;
}
.comment-header {
display: flex;
justify-content: space-between;
align-items: center;
margin-bottom: 0.5rem;
}
.comment-author {
color: var(--primary);
text-decoration: none;
font-weight: 600;
}
.comment-author:hover {
text-decoration: underline;
}
.comment-date {
font-size: 0.9rem;
color: var(--text-muted);
}
.comment-text {
color: var(--text-secondary);
line-height: 1.6;
margin: 0;
}
.no-comments {
text-align: center;
padding: 3rem 2rem;
color: var(--text-secondary);
}
.no-comments i {
font-size: 3rem;
color: var(--text-muted);
margin-bottom: 1rem;
}
.no-comments h3 {
font-size: 1.2rem;
margin-bottom: 0.5rem;
color: var(--text-primary);
}
/* Sidebar */
.event-sidebar {
display: flex;
flex-direction: column;
gap: 2rem;
position: sticky;
top: 2rem;
}
.sidebar-card {
background: var(--bg-card);
border: 1px solid var(--border-light);
border-radius: var(--radius-lg);
padding: 2rem;
backdrop-filter: blur(10px);
}
.card-title {
font-size: 1.3rem;
font-weight: 700;
margin-bottom: 1.5rem;
color: var(--text-primary);
}
.stats-grid {
display: flex;
flex-direction: column;
gap: 1rem;
}
.stat-item {
display: flex;
align-items: center;
gap: 1rem;
padding: 1rem;
background: var(--bg-glass);
border-radius: var(--radius-md);
}
.stat-icon {
width: 40px;
height: 40px;
background: var(--gradient-primary);
border-radius: var(--radius-md);
display: flex;
align-items: center;
justify-content: center;
color: white;
font-size: 1rem;
}
.stat-content {
display: flex;
flex-direction: column;
}
.stat-number {
font-size: 1.5rem;
font-weight: 700;
color: var(--text-primary);
line-height: 1;
}
.stat-label {
font-size: 0.9rem;
color: var(--text-secondary);
}
.attendees-list {
display: flex;
flex-direction: column;
gap: 1rem;
}
.attendee-item {
display: flex;
align-items: center;
gap: 1rem;
padding: 1rem;
background: var(--bg-glass);
border-radius: var(--radius-md);
transition: var(--transition-normal);
}
.attendee-item:hover {
background: var(--bg-tertiary);
}
.attendee-avatar {
width: 40px;
height: 40px;
background: var(--gradient-primary);
border-radius: 50%;
display: flex;
align-items: center;
justify-content: center;
color: white;
font-weight: 700;
font-size: 0.9rem;
}
.attendee-info {
display: flex;
flex-direction: column;
}
.attendee-name {
color: var(--primary);
text-decoration: none;
font-weight: 600;
font-size: 0.9rem;
}
.attendee-name:hover {
text-decoration: underline;
}
.attendee-status {
font-size: 0.8rem;
color: var(--text-muted);
text-transform: uppercase;
}
.no-attendees {
text-align: center;
padding: 2rem 1rem;
color: var(--text-secondary);
}
.no-attendees i {
font-size: 2rem;
color: var(--text-muted);
margin-bottom: 0.5rem;
}
.no-attendees p {
font-weight: 600;
margin-bottom: 0.25rem;
}
.no-attendees span {
font-size: 0.9rem;
color: var(--text-muted);
}
/* Responsive Design */
@media (max-width: 1024px) {
.event-layout {
grid-template-columns: 1fr;
gap: 2rem;
}
.event-sidebar {
position: static;
}
.details-grid {
grid-template-columns: 1fr;
}
}
@media (max-width: 768px) {
.event-title {
font-size: 2.5rem;
}
.action-buttons {
flex-direction: column;
align-items: center;
}
.comment-form {
flex-direction: column;
}
.event-hero {
padding: 4rem 0 2rem;
}
.event-main-content {
padding: 2rem 0;
}
.content-section {
padding: 1.5rem;
}
.sidebar-card {
padding: 1.5rem;
}
}
</style>
<script>
function rsvpEvent(eventId, status) {
if (!<?= $user_id ? 'true' : 'false' ?>) {
if (window.ajaxNavigation) {
window.ajaxNavigation.navigateToPage('/auth/login_new.php');
} else {
window.location.href = '/auth/login_new.php';
}
return;
}
fetch('/api_events.php', {
method: 'POST',
headers: {
'Content-Type': 'application/json',
},
body: JSON.stringify({
action: 'rsvp',
event_id: eventId,
status: status
})
})
.then(response => response.json())
.then(data => {
if (data.success) {
location.reload();
} else {
alert('Error: ' + data.message);
}
})
.catch(error => {
console.error('Error:', error);
alert('An error occurred. Please try again.');
});
}
function likeEvent(eventId) {
if (!<?= $user_id ? 'true' : 'false' ?>) {
if (window.ajaxNavigation) {
window.ajaxNavigation.navigateToPage('/auth/login_new.php');
} else {
window.location.href = '/auth/login_new.php';
}
return;
}
fetch('/api_events.php', {
method: 'POST',
headers: {
'Content-Type': 'application/json',
},
body: JSON.stringify({
action: 'like',
event_id: eventId
})
})
.then(response => response.json())
.then(data => {
if (data.success) {
location.reload();
} else {
alert('Error: ' + data.message);
}
})
.catch(error => {
console.error('Error:', error);
alert('An error occurred. Please try again.');
});
}
function shareEvent(eventId) {
const url = window.location.href;
const title = '<?= htmlspecialchars($event['title']) ?>';
if (navigator.share) {
navigator.share({
title: title,
url: url
});
} else {
navigator.clipboard.writeText(url).then(() => {
alert('Event link copied to clipboard!');
});
}
}
function addComment(eventId) {
const commentText = document.getElementById('commentText').value.trim();
if (!commentText) {
alert('Please enter a comment');
return;
}
fetch('/api_events.php', {
method: 'POST',
headers: {
'Content-Type': 'application/json',
},
body: JSON.stringify({
action: 'comment',
event_id: eventId,
comment: commentText
})
})
.then(response => response.json())
.then(data => {
if (data.success) {
location.reload();
} else {
alert('Error: ' + data.message);
}
})
.catch(error => {
console.error('Error:', error);
alert('An error occurred. Please try again.');
});
}
</script>
<?php include 'includes/footer.php'; ?>