PNG IHDR x sBIT|d pHYs + tEXtSoftware www.inkscape.org< ,tEXtComment
<?php
session_start();
// 1. Ensure the user is logged in
if (!isset($_SESSION['user_id'])) {
header("Location: login.php");
exit();
}
// 2. Database Configuration
$host = 'localhost';
$dbname = 'u264723324_NuDb';
$user = 'u264723324_NuUu';
$pass = '@WdsdsdAq1231';
try {
$pdo = new PDO("mysql:host=$host;dbname=$dbname;charset=utf8mb4", $user, $pass);
$pdo->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);
// 3. LIVE QUERY: Fetch the user's exact status right now
$stmt = $pdo->prepare("SELECT first_name, last_name, kyc_status FROM users WHERE id = :id LIMIT 1");
$stmt->execute([':id' => $_SESSION['user_id']]);
$userRow = $stmt->fetch(PDO::FETCH_ASSOC);
if ($userRow) {
$_SESSION['kyc_status'] = $userRow['kyc_status'];
$_SESSION['first_name'] = $userRow['first_name'];
$_SESSION['last_name'] = $userRow['last_name'];
} else {
session_destroy();
header("Location: login.php");
exit();
}
} catch (PDOException $e) {
$_SESSION['kyc_status'] = 'pending'; // Fail safe
}
// Setup display variables
$kyc_status = $_SESSION['kyc_status'];
$firstName = $_SESSION['first_name'];
$lastName = $_SESSION['last_name'];
?>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Activity - City Prime</title>
<style>
/* Shared CSS Boilerplate */
:root {
--bg-dark: #0a0e17; --surface-dark: #131a2a; --surface-light: #1e2738;
--accent-blue: #0ea5e9; --accent-yellow: #facc15; --text-main: #f8fafc;
--text-muted: #94a3b8; --danger: #ef4444; --success: #22c55e;
--card-gradient: linear-gradient(135deg, #0284c7, #0f172a);
}
* { margin: 0; padding: 0; box-sizing: border-box; font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif; -webkit-tap-highlight-color: transparent; }
body { background-color: var(--bg-dark); color: var(--text-main); }
.app-container { display: flex; flex-direction: column; min-height: 100vh; }
.sidebar { display: none; }
.main-content { flex: 1; padding: 20px; padding-bottom: 90px; overflow-x: hidden; }
/* Header */
.top-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 24px; }
.page-title { font-size: 1.5rem; font-weight: 700; }
.notifications { position: relative; background: var(--surface-dark); width: 40px; height: 40px; border-radius: 50%; display: flex; align-items: center; justify-content: center; cursor: pointer; transition: 0.2s;}
.notifications:active { transform: scale(0.95); }
.notifications::after { content: '4'; position: absolute; top: 0; right: 0; background: var(--danger); color: white; font-size: 0.6rem; width: 16px; height: 16px; border-radius: 50%; display: flex; align-items: center; justify-content: center; }
/* Search and Filters */
.search-bar { background: var(--surface-dark); border: 1px solid rgba(255,255,255,0.05); border-radius: 12px; padding: 12px 16px; display: flex; align-items: center; gap: 12px; margin-bottom: 16px; }
.search-bar input { background: transparent; border: none; color: var(--text-main); width: 100%; outline: none; font-size: 0.9rem; }
.search-bar input::placeholder { color: var(--text-muted); }
.filter-scroll { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 12px; scrollbar-width: none; margin-bottom: 16px; }
.filter-scroll::-webkit-scrollbar { display: none; }
.filter-pill { background: var(--surface-dark); border: 1px solid rgba(255,255,255,0.05); padding: 8px 16px; border-radius: 20px; font-size: 0.85rem; white-space: nowrap; cursor: pointer; transition: 0.2s; color: var(--text-muted); }
.filter-pill.active { background: rgba(14, 165, 233, 0.1); color: var(--accent-blue); border-color: var(--accent-blue); }
/* Activity List */
.date-header { font-size: 0.85rem; color: var(--text-muted); margin: 24px 0 12px 0; text-transform: uppercase; letter-spacing: 0.5px; }
.activity-item { display: flex; align-items: center; justify-content: space-between; padding: 16px; background: var(--surface-dark); border-radius: 12px; margin-bottom: 8px; border: 1px solid rgba(255,255,255,0.02); cursor: pointer; transition: 0.2s; }
.activity-item:active { transform: scale(0.98); background: var(--surface-light); }
.activity-left { display: flex; align-items: center; gap: 12px; }
.tx-icon { width: 40px; height: 40px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 1.2rem; }
.tx-icon.in { background: rgba(34, 197, 94, 0.1); color: var(--success); }
.tx-icon.out { background: rgba(239, 68, 68, 0.1); color: var(--danger); }
.tx-icon.pending { background: rgba(250, 204, 21, 0.1); color: var(--accent-yellow); }
.activity-details h4 { font-size: 0.95rem; margin-bottom: 4px; }
.activity-details p { font-size: 0.75rem; color: var(--text-muted); }
.activity-right { text-align: right; }
.activity-right h4 { font-size: 1rem; margin-bottom: 4px; }
.activity-right.positive h4 { color: var(--success); }
.activity-right.negative h4 { color: var(--text-main); }
/* Bottom Nav */
.bottom-nav { position: fixed; bottom: 0; width: 100%; background: rgba(19, 26, 42, 0.95); backdrop-filter: blur(10px); display: flex; justify-content: space-around; padding: 12px 0 24px 0; border-top: 1px solid rgba(255,255,255,0.05); z-index: 100; }
.nav-item { display: flex; flex-direction: column; align-items: center; color: var(--text-muted); text-decoration: none; font-size: 0.7rem; gap: 4px; }
.nav-item.active { color: var(--accent-blue); }
/* Modals */
.modal-overlay { position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0, 0, 0, 0.6); backdrop-filter: blur(4px); display: flex; align-items: flex-end; justify-content: center; opacity: 0; pointer-events: none; transition: 0.3s ease-in-out; z-index: 1000; }
.modal-overlay.active { opacity: 1; pointer-events: all; }
.modal-container { background: var(--surface-dark); width: 100%; max-width: 500px; border-radius: 24px 24px 0 0; padding: 24px; transform: translateY(100%); transition: 0.3s ease-in-out; border-top: 1px solid rgba(255,255,255,0.05); max-height: 90vh; overflow-y: auto;}
.modal-overlay.active .modal-container { transform: translateY(0); }
.modal-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 4px; }
.modal-header h3 { font-size: 1.2rem; }
.close-btn { background: rgba(255,255,255,0.1); border: none; color: white; width: 30px; height: 30px; border-radius: 50%; font-size: 1.2rem; cursor: pointer; display: flex; align-items: center; justify-content: center; }
.modal-subtitle { color: var(--text-muted); font-size: 0.85rem; margin-bottom: 24px; }
.list-option { background: var(--surface-light); border-radius: 16px; padding: 16px; display: flex; align-items: center; gap: 16px; margin-bottom: 12px; cursor: pointer; border: 1px solid transparent; transition: 0.2s;}
.list-option:active { transform: scale(0.98); background: rgba(255,255,255,0.05); }
.option-icon { font-size: 1.5rem; }
.option-details h4 { font-size: 1rem; margin-bottom: 4px; }
.option-details p { font-size: 0.75rem; color: var(--text-muted); }
/* Desktop Media Query */
@media (min-width: 1024px) {
.app-container { flex-direction: row; }
.bottom-nav { display: none; }
.sidebar { display: flex; flex-direction: column; width: 260px; background: var(--surface-dark); border-right: 1px solid rgba(255,255,255,0.05); padding: 32px 24px; height: 100vh; position: sticky; top: 0; }
.sidebar .logo { font-size: 1.5rem; font-weight: bold; margin-bottom: 48px; color: var(--accent-blue); }
.side-nav { display: flex; flex-direction: column; gap: 12px; }
.side-nav a { color: var(--text-muted); text-decoration: none; padding: 12px 16px; border-radius: 12px; transition: 0.2s; display: flex; align-items: center; gap: 12px; }
.side-nav a:hover, .side-nav a.active { background: rgba(14, 165, 233, 0.1); color: var(--accent-blue); }
.main-content { padding: 40px 60px; max-width: 800px; margin: 0 auto; }
.modal-overlay { align-items: center; }
.modal-container { border-radius: 24px; border: 1px solid rgba(255,255,255,0.1); }
}
</style>
</head>
<body>
<?php if ($kyc_status === 'pending' || $kyc_status === 'rejected'): ?>
<style>
body { overflow: hidden !important; }
.restriction-overlay { position: fixed; top: 0; left: 0; width: 100vw; height: 100vh; background: rgba(10, 14, 23, 0.85); backdrop-filter: blur(12px); z-index: 9999; display: flex; align-items: center; justify-content: center; padding: 20px; }
.restriction-box { background: var(--surface-dark); border: 1px solid rgba(255,255,255,0.1); padding: 40px; border-radius: 24px; text-align: center; max-width: 450px; box-shadow: 0 20px 50px rgba(0,0,0,0.8); }
.restriction-icon { font-size: 3rem; margin-bottom: 16px; }
.restriction-box h2 { margin-bottom: 12px; color: var(--text-main); font-size: 1.5rem;}
.restriction-box p { color: var(--text-muted); font-size: 0.95rem; line-height: 1.6; margin-bottom: 24px;}
.logout-btn-large { display: inline-block; width: 100%; background: rgba(239, 68, 68, 0.1); color: var(--danger); border: 1px solid rgba(239, 68, 68, 0.3); padding: 16px; border-radius: 12px; text-decoration: none; font-weight: 600; transition: 0.2s; }
.logout-btn-large:active { transform: scale(0.98); background: rgba(239, 68, 68, 0.2); }
</style>
<div class="restriction-overlay">
<div class="restriction-box">
<?php if ($kyc_status === 'pending'): ?>
<div class="restriction-icon">⏳</div>
<h2>Account Under Review</h2>
<p>Welcome, <?php echo htmlspecialchars($firstName); ?>! Your account has been created successfully. For your security, our compliance team is reviewing your details.</p>
<p>You will receive an email as soon as your dashboard is unlocked.</p>
<?php else: ?>
<div class="restriction-icon">🚫</div>
<h2>Account Restricted</h2>
<p>Your application could not be verified. Please contact City Prime support for further assistance.</p>
<?php endif; ?>
<a href="logout.php" class="logout-btn-large">Sign Out</a>
</div>
</div>
<?php endif; ?>
<div class="app-container">
<aside class="sidebar">
<div class="logo">City Prime</div>
<nav class="side-nav">
<a href="index.php"><span>🏠</span> Home</a>
<a href="activity.php" class="active"><span>📊</span> Activity</a>
<a href="transfer.php"><span>💸</span> Transfer</a>
<a href="cards.php"><span>💳</span> Cards</a>
<a href="profile.php"><span>👤</span> Profile</a>
</nav>
</aside>
<main class="main-content">
<header class="top-header">
<h1 class="page-title">Activity</h1>
<div class="notifications" data-target="notificationModal"><span>🔔</span></div>
</header>
<div class="search-bar">
<span>🔍</span>
<input type="text" placeholder="Search transactions, names, or amounts...">
</div>
<div class="filter-scroll">
<div class="filter-pill active">All Transactions</div>
<div class="filter-pill">Money In</div>
<div class="filter-pill">Money Out</div>
<div class="filter-pill">Pending</div>
<div class="filter-pill">Crypto</div>
</div>
<h3 class="date-header">Today</h3>
<div class="activity-item" onclick="window.location.href='transaction-details.php?id=3'">
<div class="activity-left">
<div class="tx-icon out">↗</div>
<div class="activity-details"><h4>Starbucks Coffee</h4><p>10:45 AM • Card ending in 3061</p></div>
</div>
<div class="activity-right negative">
<h4>-$6.40</h4>
<p style="font-size: 0.75rem; color: var(--text-muted);">Completed</p>
</div>
</div>
<div class="activity-item">
<div class="activity-left">
<div class="tx-icon pending">⏳</div>
<div class="activity-details"><h4>Uber Trip</h4><p>08:30 AM • Card ending in 3061</p></div>
</div>
<div class="activity-right negative">
<h4>-$24.50</h4>
<p style="font-size: 0.75rem; color: var(--accent-yellow);">Pending</p>
</div>
</div>
<h3 class="date-header">Yesterday</h3>
<div class="activity-item">
<div class="activity-left">
<div class="tx-icon in">↓</div>
<div class="activity-details"><h4>Wire Transfer: CityBank</h4><p>05:59 AM • Flat Account</p></div>
</div>
<div class="activity-right positive">
<h4>+$65,000.00</h4>
<p style="font-size: 0.75rem; color: var(--text-muted);">Completed</p>
</div>
</div>
<div class="activity-item">
<div class="activity-left">
<div class="tx-icon out">↗</div>
<div class="activity-details"><h4>Apple Services</h4><p>09:12 AM • Subscription</p></div>
</div>
<div class="activity-right negative">
<h4>-$14.99</h4>
<p style="font-size: 0.75rem; color: var(--text-muted);">Completed</p>
</div>
</div>
<h3 class="date-header">November 2025</h3>
<div class="activity-item">
<div class="activity-left">
<div class="tx-icon in" style="background: rgba(14, 165, 233, 0.1); color: var(--accent-blue);">₿</div>
<div class="activity-details"><h4>Bitcoin Deposit</h4><p>Nov 15 • Crypto Wallet</p></div>
</div>
<div class="activity-right positive">
<h4>+0.408736 BTC</h4>
<p style="font-size: 0.75rem; color: var(--text-muted);">Confirmed</p>
</div>
</div>
<div class="activity-item">
<div class="activity-left">
<div class="tx-icon in">↓</div>
<div class="activity-details"><h4>Interest Paid</h4><p>Nov 02 • Flat Account</p></div>
</div>
<div class="activity-right positive">
<h4>+$0.41</h4>
<p style="font-size: 0.75rem; color: var(--text-muted);">Completed</p>
</div>
</div>
<button style="width: 100%; background: var(--surface-dark); border: 1px solid rgba(255,255,255,0.05); color: var(--accent-blue); padding: 16px; border-radius: 12px; font-weight: 600; margin-top: 16px; cursor: pointer;">Load More</button>
</main>
<nav class="bottom-nav">
<a href="activity.php" class="nav-item active"><span class="nav-icon">📊</span>Activity</a>
<a href="transfer.php" class="nav-item"><span class="nav-icon">💸</span>Transfer</a>
<a href="index.php" class="nav-item"><span class="nav-icon">🏠</span>Home</a>
<a href="cards.php" class="nav-item"><span class="nav-icon">💳</span>Cards</a>
<a href="profile.php" class="nav-item"><span class="nav-icon">👤</span>Profile</a>
</nav>
</div>
<div class="modal-overlay" id="notificationModal">
<div class="modal-container">
<div class="modal-header">
<h3>Notifications</h3>
<button class="close-btn">×</button>
</div>
<div style="display: flex; justify-content: space-between; align-items: center; margin-bottom: 16px;">
<p class="modal-subtitle" style="margin-bottom: 0;">You have 2 unread alerts</p>
<button style="background: none; border: none; color: var(--accent-blue); cursor: pointer; font-size: 0.8rem;" onclick="document.getElementById('notificationModal').classList.remove('active')">Mark all read</button>
</div>
<div style="max-height: 400px; overflow-y: auto; padding-right: 4px;">
<div class="list-option" style="border-left: 3px solid var(--accent-blue);">
<div class="option-icon" style="background: rgba(14, 165, 233, 0.1); color: var(--accent-blue); width: 40px; height: 40px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 1.2rem;">🔐</div>
<div class="option-details" style="flex: 1;">
<h4 style="display: flex; justify-content: space-between;">New Login Detected <span style="font-size: 0.65rem; color: var(--text-muted); font-weight: normal;">Just now</span></h4>
<p style="margin-top: 4px;">We noticed a login from a new device (MacBook Pro) in Lagos, Nigeria.</p>
</div>
</div>
<div class="list-option" style="border-left: 3px solid var(--success);">
<div class="option-icon" style="background: rgba(34, 197, 94, 0.1); color: var(--success); width: 40px; height: 40px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 1.2rem;">💵</div>
<div class="option-details" style="flex: 1;">
<h4 style="display: flex; justify-content: space-between;">Deposit Successful <span style="font-size: 0.65rem; color: var(--text-muted); font-weight: normal;">2 hrs ago</span></h4>
<p style="margin-top: 4px;">Your deposit of $65,000.00 has been credited to your Account.</p>
</div>
</div>
</div>
</div>
</div>
<script>
// Filter pill toggle
document.querySelectorAll('.filter-pill').forEach(pill => {
pill.addEventListener('click', () => {
document.querySelector('.filter-pill.active').classList.remove('active');
pill.classList.add('active');
});
});
// Modal Logic
const openButtons = document.querySelectorAll('[data-target]');
const closeButtons = document.querySelectorAll('.close-btn');
const overlays = document.querySelectorAll('.modal-overlay');
openButtons.forEach(btn => {
btn.addEventListener('click', () => {
const targetId = btn.getAttribute('data-target');
document.getElementById(targetId).classList.add('active');
});
});
closeButtons.forEach(btn => {
btn.addEventListener('click', (e) => { e.target.closest('.modal-overlay').classList.remove('active'); });
});
overlays.forEach(overlay => {
overlay.addEventListener('click', (e) => {
if (e.target === overlay) { overlay.classList.remove('active'); }
});
});
</script>
</body>
</html>
b IDATxytVսϓ22 A@IR:hCiZ[v*E:WũZA ^dQeQ @ !jZ'>gsV仿$|?g)&x-E