MMCT TEAM
Server IP : 2a02:4780:3:2287:0:3736:a38e:8  /  Your IP : 216.73.217.17
Web Server : LiteSpeed
System : Linux sg-nme-web2187.main-hosting.eu 5.14.0-611.54.1.el9_7.x86_64 #1 SMP PREEMPT_DYNAMIC Wed May 6 18:03:03 EDT 2026 x86_64
User : u926327694 ( 926327694)
PHP Version : 7.4.33
Disable Function : system, 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/u926327694/domains/smsoft.in/public_html/att/../alumini/

[  Home  ][  C0mmand  ][  Upload File  ]

Current File : /home/u926327694/domains/smsoft.in/public_html/att/../alumini/event-details.php
<?php
if(isset($_GET['id']))
{
    $id = $_GET['id'];
    include('header.php');
    function e($str) {
        return htmlspecialchars($str, ENT_QUOTES, 'UTF-8');
    }
    
    // Track event views
    $student_id = $row_student['id'];
    $view_on = date('Y-m-d H:i:s');
    
    $sel_views = mysqli_query($con, "SELECT * FROM event_views WHERE student_id = '$student_id' AND event_id = '$id'");
    if (mysqli_num_rows($sel_views) > 0) {
        mysqli_query($con, "UPDATE event_views SET number_of_view = number_of_view + 1, view_on = '$view_on' WHERE student_id = '$student_id' AND event_id = '$id'");
    } else {
        mysqli_query($con, "INSERT INTO event_views (student_id, event_id, view_on, number_of_view) VALUES ('$student_id', '$id', '$view_on', 1)");
    }
    
    $sel_event = mysqli_query($con,"select * from events where is_active=1 and id=$id");
    $res_event = mysqli_fetch_array($sel_event);
    
    if (!$res_event) {
        echo "<script>window.location='events.php';</script>";
        exit;
    }
    
    // Build share URL
    $protocol = (!empty($_SERVER['HTTPS']) && $_SERVER['HTTPS'] !== 'off') ? "https://" : "http://";
    $host = $_SERVER['HTTP_HOST'];
    $event_link = $protocol . $host . '/event-details.php?id=' . $id;
    $whatsapp_text = rawurlencode($res_event['event_name'] . " - " . $event_link);
    $whatsapp_url = "https://api.whatsapp.com/send?text=" . $whatsapp_text;
?>

<!-- Scroll Progress -->
<div class="scroll-progress" id="scrollProgress"></div>

<!-- Hero Section -->
<section class="event-hero">
    <img src="adminweb/<?php echo $res_event['event_photo']; ?>" alt="<?php echo e($res_event['event_name']); ?>" class="event-hero-image">
    <div class="event-hero-overlay"></div>
    
    <!-- Back Button -->
    <a href="events.php" class="back-btn">
        <i class="bi bi-arrow-left"></i>
        <span class="d-none d-sm-inline">Back to Events</span>
    </a>
    
    <!-- Share Buttons -->
    <div class="share-buttons">
        <a href="<?php echo $whatsapp_url; ?>" target="_blank" class="share-btn whatsapp" title="Share on WhatsApp">
            <i class="bi bi-whatsapp"></i>
        </a>
        <button class="share-btn copy" onclick="copyToClipboard('<?php echo $event_link; ?>')" title="Copy Link">
            <i class="bi bi-link-45deg"></i>
        </button>
    </div>
    
    <!-- Hero Content -->
    <div class="event-hero-content">
        <span class="event-category-badge">Alumni Event</span>
        <h1 class="event-title"><?php echo e($res_event['event_name']); ?></h1>
        
        <div class="event-meta-grid">
            <div class="event-meta-item">
                <i class="bi bi-calendar3"></i>
                <span><?php echo date('l, M d, Y', strtotime($res_event['event_date'])); ?></span>
            </div>
            <?php /*
            <div class="event-meta-item">
                <i class="bi bi-clock"></i>
                <span><?php echo e($res_event['event_time'] ?? '10:00 AM'); ?></span>
            </div>
            <div class="event-meta-item">
                <i class="bi bi-geo-alt"></i>
                <span><?php echo e($res_event['event_location'] ?? 'RCU Campus'); ?></span>
            </div> */ ?>
        </div>
    </div>
</section>

<!-- Main Content -->
<main class="main-content">
    <div class="container">
        <!-- About Section -->
        <div class="content-card fade-in">
            <h2 class="section-title">
                <i class="bi bi-info-circle"></i>
                About Event
            </h2>
            <div class="about-text">
                <?php echo $res_event['event_description']; ?>
            </div>
            
            <!-- Stats -->
            <div class="stats-grid">
                <div class="stat-item">
                    <div class="stat-number"><?php echo mysqli_num_rows(mysqli_query($con, "SELECT * FROM event_views WHERE event_id = $id")); ?></div>
                    <div class="stat-label">Views</div>
                </div>
            </div>
        </div>

        <!-- Related Events -->
        <div class="content-card">
            <h2 class="section-title">
                <i class="bi bi-calendar-range"></i>
                Related Events
            </h2>
            <div class="related-events-grid">
                <?php
                $related_query = "SELECT * FROM events WHERE is_active = 1 AND id != $id ORDER BY event_date DESC LIMIT 3";
                $sel_related = mysqli_query($con, $related_query);
                
                if ($sel_related && mysqli_num_rows($sel_related) > 0) {
                    while ($related = mysqli_fetch_assoc($sel_related)) {
                        $related_id = $related['id'];
                        $related_link = "event-details.php?id=" . $related_id;
                        $related_protocol = (!empty($_SERVER['HTTPS']) && $_SERVER['HTTPS'] !== 'off') ? "https://" : "http://";
                        $related_event_link = $related_protocol . $host . '/' . $related_link;
                        $related_whatsapp_text = rawurlencode($related['event_name'] . " - " . $related_event_link);
                        $related_whatsapp_url = "https://api.whatsapp.com/send?text=" . $related_whatsapp_text;
                ?>
                <div class="related-event-card">
                    <a href="<?php echo $related_link; ?>" class="text-decoration-none">
                        <div class="related-event-image">
                            <img src="adminweb/<?php echo $related['event_photo']; ?>" alt="<?php echo e($related['event_name']); ?>">
                            <div class="related-event-date-badge">
                                <?php echo date('d', strtotime($related['event_date'])); ?> <?php echo date('M', strtotime($related['event_date'])); ?>
                            </div>
                        </div>
                        <div class="related-event-body">
                            <h4 class="related-event-title">
                                <?php echo e($related['event_name']); ?>
                            </h4>
                            <div class="related-event-date">
                                <i class="bi bi-calendar3 me-1"></i>
                                <?php echo date('M d, Y', strtotime($related['event_date'])); ?>
                            </div>
                        </div>
                    </a>
                    <div class="related-event-footer">
                        <a href="<?php echo $related_link; ?>" class="read-more-btn">
                            Read more
                            <i class="bi bi-arrow-right"></i>
                        </a>
                        <button class="related-share-btn" onclick="copyToClipboard('<?php echo $related_event_link; ?>')" title="Copy Link">
                            <i class="bi bi-link-45deg"></i>
                        </button>
                        <a href="<?php echo $related_whatsapp_url; ?>" target="_blank" class="related-share-btn" title="Share on WhatsApp">
                            <i class="bi bi-whatsapp"></i>
                        </a>
                    </div>
                </div>
                <?php
                    }
                } else {
                ?>
                <div class="col-12 text-center py-4">
                    <p class="text-muted">No related events found</p>
                </div>
                <?php } ?>
            </div>
        </div>
    </div>
</main>

<!-- Toast -->
<div class="toast-notification success" id="toast">
    <div class="toast-icon">
        <i class="bi bi-check-lg fs-5"></i>
    </div>
    <div>
        <h6 class="fw-bold mb-0">Success!</h6>
        <small class="text-muted">Link copied to clipboard</small>
    </div>
</div>

<!-- Bootstrap JS -->
<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.2/dist/js/bootstrap.bundle.min.js"></script>

<script>
    // Scroll Progress
    window.addEventListener('scroll', function() {
        const scrollTop = document.documentElement.scrollTop || document.body.scrollTop;
        const scrollHeight = document.documentElement.scrollHeight - document.documentElement.clientHeight;
        const scrollPercentage = (scrollTop / scrollHeight) * 100;
        document.getElementById('scrollProgress').style.width = scrollPercentage + '%';
    });

    // Copy to Clipboard
    function copyToClipboard(text) {
        if (!text) return;
        
        if (navigator.clipboard && navigator.clipboard.writeText) {
            navigator.clipboard.writeText(text).then(function() {
                showToast();
            });
        } else {
            var ta = document.createElement('textarea');
            ta.value = text;
            document.body.appendChild(ta);
            ta.select();
            document.execCommand('copy');
            document.body.removeChild(ta);
            showToast();
        }
    }

    function showToast() {
        const toast = document.getElementById('toast');
        toast.classList.add('show');
        setTimeout(function() {
            toast.classList.remove('show');
        }, 3000);
    }

    // Intersection Observer for Animations
    const observerOptions = {
        threshold: 0.1,
        rootMargin: '0px 0px -50px 0px'
    };

    const observer = new IntersectionObserver(function(entries) {
        entries.forEach(entry => {
            if (entry.isIntersecting) {
                entry.target.style.opacity = '1';
                entry.target.style.transform = 'translateY(0)';
            }
        });
    }, observerOptions);

    document.querySelectorAll('.content-card').forEach(card => {
        card.style.opacity = '0';
        card.style.transform = 'translateY(30px)';
        card.style.transition = 'opacity 0.6s ease, transform 0.6s ease';
        observer.observe(card);
    });
</script>

<?php include('footer.php'); ?>

<?php
}
else
{
    echo"<script>window.location='events.php';</script>";
}
?>

MMCT - 2023