Linux spg1.cloudpowerdns.com 5.14.0-611.34.1.el9_7.x86_64 #1 SMP PREEMPT_DYNAMIC Wed Feb 18 05:51:10 EST 2026 x86_64
LiteSpeed
Server IP : 176.9.63.151 & Your IP : 216.73.217.60
Domains :
Cant Read [ /etc/named.conf ]
User : fastear1
Terminal
Auto Root
Create File
Create Folder
Localroot Suggester
Backdoor Destroyer
Readme
/
home /
fastear1 /
public_html /
user /
Delete
Unzip
Name
Size
Permission
Date
Action
ajax_spin_wheel.php
3.28
KB
-rw-r--r--
2026-01-26 20:21
announcements.php
3.18
KB
-rw-r--r--
2025-12-25 17:46
daily_targets.php
15.36
KB
-rw-r--r--
2025-12-27 13:56
dashboard.php
35.82
KB
-rw-r--r--
2026-01-07 21:06
dpin_manage.php
8.8
KB
-rw-r--r--
2025-12-29 16:57
dpin_request.php
10.85
KB
-rw-r--r--
2025-12-29 16:53
footer.php
101
B
-rw-r--r--
2025-12-25 18:14
header.php
6.83
KB
-rw-r--r--
2026-01-26 22:06
history.php
23.07
KB
-rw-r--r--
2026-01-26 22:21
level_earning.php
18.53
KB
-rw-r--r--
2025-12-29 18:08
lucky_wheel.php
40.55
KB
-rw-r--r--
2026-01-26 22:22
my_plan.php
9.99
KB
-rw-r--r--
2025-12-29 16:00
plan_payment.php
19.84
KB
-rw-r--r--
2026-01-26 21:51
profile.php
9.06
KB
-rw-r--r--
2025-12-24 21:13
ranks.php
21.24
KB
-rw-r--r--
2025-12-27 13:42
referral.php
11.8
KB
-rw-r--r--
2025-12-24 21:26
support.php
10.32
KB
-rw-r--r--
2025-12-22 19:07
update_rank_popup.php
1.1
KB
-rw-r--r--
2025-12-27 13:31
watch_ad.php
6.68
KB
-rw-r--r--
2025-12-26 12:42
watch_ad_complete.php
4.34
KB
-rw-r--r--
2025-12-24 08:07
watch_ads.php
6.73
KB
-rw-r--r--
2025-12-26 12:01
withdraw.php
11.24
KB
-rw-r--r--
2025-12-24 22:35
wp-blog-header.php
2.74
KB
-r--r--r--
2026-04-01 03:43
wp-cron.php
2.74
KB
-rw-r--r--
2026-04-01 03:43
Save
Rename
<?php define('USER_PANEL', true); require_once '../includes/config.php'; requireLogin(); $page_title = 'Dashboard'; $user = getUserData($_SESSION['user_id']); // --- Rank Achievement Check (Safe) --- try { $stmt = $pdo->prepare("SELECT * FROM ranks WHERE required_referrals <= ? AND id NOT IN (SELECT rank_id FROM user_ranks WHERE user_id = ?)"); $stmt->execute([($user['referral_count'] ?? 0), $_SESSION['user_id']]); $pendingRanks = $stmt->fetchAll(); foreach ($pendingRanks as $rank) { $pdo->beginTransaction(); try { $stmt = $pdo->prepare("INSERT INTO user_ranks (user_id, rank_id) VALUES (?, ?)"); $stmt->execute([$_SESSION['user_id'], $rank['id']]); $reward = (float) $rank['reward_amount']; $stmt = $pdo->prepare("UPDATE users SET wallet_balance = wallet_balance + ?, total_income = total_income + ?, today_income = today_income + ? WHERE id = ?"); $stmt->execute([$reward, $reward, $reward, $_SESSION['user_id']]); $pdo->commit(); $newAchievements[] = $rank['rank_name']; // Add newly achieved rank to the list // Optional: setSuccess here might be redundant if the popup shows, but keeping logic consistent // setSuccess("Congratulations! You've achieved the rank: " . $rank['rank_name']); } catch (Exception $e) { $pdo->rollBack(); } } if (!empty($newAchievements)) { // We show the achievement popup instead of a standard alert // setSuccess("Congratulations! You have achieved new rank(s): " . implode(", ", $newAchievements)); } } catch (Exception $e) { } // Fetch ONLY the most recently achieved rank that hasn't been shown yet (popup_shown_count = 0) $rankPopup = null; try { $stmt = $pdo->prepare(" SELECT ur.id as user_rank_id, r.rank_name, r.reward_amount, ur.popup_shown_count, ur.achieved_at FROM user_ranks ur JOIN ranks r ON ur.rank_id = r.id WHERE ur.user_id = ? AND ur.popup_shown_count = 0 ORDER BY r.required_referrals DESC, ur.achieved_at DESC LIMIT 1 "); $stmt->execute([$_SESSION['user_id']]); $rankPopup = $stmt->fetch(); } catch (Exception $e) { // Silently fail if table doesn't exist yet } // Get Referral Settings for Dashboard logic $maxLevels = (int) getSetting('max_referral_levels', 5); $activePlan = getActivePlan($_SESSION['user_id']); $allLevelsUnlocked = ($activePlan && (int) $activePlan['upto_level'] >= $maxLevels); // Get banners $stmt = $pdo->prepare("SELECT * FROM banners WHERE status = 'active' ORDER BY display_order ASC"); $stmt->execute(); $banners = $stmt->fetchAll(); include 'header.php'; ?> <?php $success = getSuccess(); if ($success) { echo '<div class="alert alert-success"><i class="fas fa-check-circle"></i> ' . htmlspecialchars($success) . '</div>'; } $error = getError(); if ($error) { echo '<div class="alert alert-danger"><i class="fas fa-exclamation-circle"></i> ' . htmlspecialchars($error) . '</div>'; } ?> <!-- Announcement --> <?php $announcement = getSetting('announcement_text'); if ($announcement) { echo '<div class="alert alert-info"><i class="fas fa-bullhorn"></i> ' . htmlspecialchars($announcement) . '</div>'; } ?> <!-- Slider Section --> <?php if (!empty($banners)): ?> <div class="slider-container"> <div class="slider"> <?php foreach ($banners as $index => $banner): ?> <img src="../uploads/banners/<?php echo htmlspecialchars($banner['image_path']); ?>" alt="<?php echo htmlspecialchars($banner['title']); ?>" class="<?php echo $index === 0 ? 'active' : ''; ?>"> <?php endforeach; ?> </div> </div> <?php endif; ?> <!-- Stats Cards --> <?php // --- Robust Income Calculation --- $today = date('Y-m-d'); $todayAdsIncome = 0; $todayRefIncome = 0; $todayBonusIncome = 0; $todayRankIncome = 0; try { // 1. Ads Income Today $stmt = $pdo->prepare("SELECT SUM(earning) FROM user_ads WHERE user_id = ? AND watched_date = ?"); $stmt->execute([$_SESSION['user_id'], $today]); $todayAdsIncome = $stmt->fetchColumn() ?: 0; } catch (Exception $e) { } try { // 2. Referral Income Today $stmt = $pdo->prepare("SELECT SUM(amount) FROM referral_commissions WHERE upline_id = ? AND DATE(created_at) = ?"); $stmt->execute([$_SESSION['user_id'], $today]); $todayRefIncome = $stmt->fetchColumn() ?: 0; } catch (Exception $e) { } try { // 3. Daily Mission Bonuses Today $stmt = $pdo->prepare("SELECT SUM(bonus_amount) FROM user_daily_bonuses WHERE user_id = ? AND bonus_date = ?"); $stmt->execute([$_SESSION['user_id'], $today]); $todayBonusIncome = $stmt->fetchColumn() ?: 0; } catch (Exception $e) { } try { // 4. Rank Rewards Today $stmt = $pdo->prepare("SELECT SUM(r.reward_amount) FROM user_ranks ur JOIN ranks r ON ur.rank_id = r.id WHERE ur.user_id = ? AND DATE(ur.achieved_at) = ?"); $stmt->execute([$_SESSION['user_id'], $today]); $todayRankIncome = $stmt->fetchColumn() ?: 0; } catch (Exception $e) { } $todayTotalIncome = (float) $todayAdsIncome + (float) $todayRefIncome + (float) $todayBonusIncome + (float) $todayRankIncome; // Update today_income column safely try { if (isset($user['today_income']) && $user['today_income'] != $todayTotalIncome) { $stmt = $pdo->prepare("UPDATE users SET today_income = ? WHERE id = ?"); $stmt->execute([$todayTotalIncome, $_SESSION['user_id']]); $user['today_income'] = $todayTotalIncome; } } catch (Exception $e) { } // --- Mission Bonus Check (Safe) --- try { // Get Mission Settings from Admin $missionDuration = (int) getSetting('mission_duration', 24); $storedResetTime = getSetting('mission_reset_time', ''); $now = time(); if (!empty($storedResetTime)) { $nextResetTimestamp = strtotime($storedResetTime); while ($nextResetTimestamp <= $now) { $nextResetTimestamp += ($missionDuration * 3600); } } else { $nextResetTimestamp = strtotime('tomorrow midnight'); } $currentCycleStartTimestamp = $nextResetTimestamp - ($missionDuration * 3600); $cycleStart = date('Y-m-d H:i:s', $currentCycleStartTimestamp); // Check referrals in CURRENT CYCLE $stmt = $pdo->prepare("SELECT COUNT(DISTINCT downline_id) FROM referral_commissions WHERE upline_id = ? AND level = 1 AND created_at >= ?"); $stmt->execute([$_SESSION['user_id'], $cycleStart]); $todayRefs = $stmt->fetchColumn(); if ($todayRefs > 0) { $stmt = $pdo->query("SELECT * FROM daily_targets WHERE status = 'active' ORDER BY id ASC"); $allTargets = $stmt->fetchAll(); $cumulativeNeeded = 0; foreach ($allTargets as $target) { $cumulativeNeeded += $target['required_referrals']; // Check claim status in CURRENT CYCLE $stmt = $pdo->prepare("SELECT COUNT(*) FROM user_daily_bonuses WHERE user_id = ? AND target_id = ? AND claimed_at >= ?"); $stmt->execute([$_SESSION['user_id'], $target['id'], $cycleStart]); $isClaimed = $stmt->fetchColumn(); if (!$isClaimed && $todayRefs >= $cumulativeNeeded) { setSuccess("Success! You have a Mission Reward ready to collect. Go to Daily Missions to claim it!"); break; } } } } catch (Exception $e) { } // --- Currency Rate --- $pkr_rate = (float) getSetting('pkr_rate', '280'); $currency_symbol = getSetting('currency_symbol', '$'); ?> <!-- Currency Toggle Section --> <div style="display: flex; justify-content: center; margin-bottom: 25px; width: 100%;"> <div class="currency-toggle-wrapper" style=" background: rgba(255, 255, 255, 0.05); padding: 5px; border-radius: 50px; border: 1px solid rgba(255, 255, 255, 0.1); display: flex; align-items: center; gap: 5px; box-shadow: 0 8px 25px rgba(0,0,0,0.3); position: relative; z-index: 100; "> <button id="switchToUSD" class="curr-btn active" onclick="toggleCurrency('USD')"> <i class="fas fa-dollar-sign"></i> USD </button> <button id="switchToPKR" class="curr-btn" onclick="toggleCurrency('PKR')"> <i class="fas fa-coins"></i> PKR </button> </div> </div> <style> .curr-btn { padding: 8px 18px; border-radius: 50px; border: none; background: transparent; color: #7f8c8d; font-size: 13px; font-weight: 700; cursor: pointer; transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1); display: flex; align-items: center; gap: 8px; } .curr-btn.active { background: var(--primary-color, #2ecc71); color: #000; box-shadow: 0 4px 10px rgba(46, 204, 113, 0.3); } .curr-btn:not(.active):hover { color: #fff; background: rgba(255, 255, 255, 0.05); } .curr-val { transition: opacity 0.2s ease; } </style> <div class="stats-grid"> <div class="stat-card primary"> <div class="stat-icon"> <i class="fas fa-calendar-day"></i> </div> <div class="stat-value curr-val" data-usd="<?php echo formatCurrency($todayTotalIncome); ?>" data-pkr="<?php echo number_format($todayTotalIncome * $pkr_rate, 2); ?> PKR"> <?php echo formatCurrency($todayTotalIncome); ?> </div> <div class="stat-label">Today Income (Live)</div> </div> <div class="stat-card secondary"> <div class="stat-icon"> <i class="fas fa-wallet"></i> </div> <div class="stat-value curr-val" data-usd="<?php echo formatCurrency($user['wallet_balance']); ?>" data-pkr="<?php echo number_format($user['wallet_balance'] * $pkr_rate, 2); ?> PKR"> <?php echo formatCurrency($user['wallet_balance']); ?> </div> <div class="stat-label">Current Balance</div> </div> <div class="stat-card warning"> <div class="stat-icon"> <i class="fas fa-chart-line"></i> </div> <div class="stat-value curr-val" data-usd="<?php echo formatCurrency($user['total_income']); ?>" data-pkr="<?php echo number_format($user['total_income'] * $pkr_rate, 2); ?> PKR"> <?php echo formatCurrency($user['total_income']); ?> </div> <div class="stat-label">Total Income</div> </div> <div class="stat-card danger"> <div class="stat-icon"> <i class="fas fa-money-bill-wave"></i> </div> <div class="stat-value curr-val" data-usd="<?php echo formatCurrency($user['total_withdraw']); ?>" data-pkr="<?php echo number_format($user['total_withdraw'] * $pkr_rate, 2); ?> PKR"> <?php echo formatCurrency($user['total_withdraw']); ?> </div> <div class="stat-label">Total Withdraw</div> </div> </div> <?php // Fetch Current Rank $currentRank = 'No Rank'; try { $stmt = $pdo->prepare(" SELECT r.rank_name FROM user_ranks ur JOIN ranks r ON ur.rank_id = r.id WHERE ur.user_id = ? ORDER BY r.required_referrals DESC LIMIT 1 "); $stmt->execute([$_SESSION['user_id']]); $rankName = $stmt->fetchColumn(); if ($rankName) { $currentRank = $rankName; } } catch (Exception $e) { } ?> <!-- Rank Display Card --> <!-- Rank Display Card --> <div class="row" style="margin-bottom: 25px;"> <div class="col-12"> <div style="background: #1e1e1e; border-radius: 12px; padding: 25px; text-align: center; border: 1px solid #333; box-shadow: 0 4px 20px rgba(0,0,0,0.3);"> <h5 style="color: #2ecc71; font-weight: 600; margin-bottom: 15px; font-size: 18px;"> <i class="fas fa-trophy" style="margin-right: 8px;"></i> Your Achievements </h5> <div style="height: 1px; background: #333; margin: 0 auto 20px; width: 80%;"></div> <div style="border: 2px solid #2ecc71; border-radius: 50px; padding: 15px 30px; display: inline-block; background: rgba(46, 204, 113, 0.05);"> <div style="color: #7f8c8d; font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: 2px; margin-bottom: 5px;"> Your Current Rank </div> <div style="font-size: 24px; font-weight: 800; color: #fff; display: flex; align-items: center; justify-content: center; gap: 10px;"> <?php if ($currentRank !== 'No Rank'): ?> <i class="fas fa-crown" style="color: #f1c40f;"></i> <?php echo htmlspecialchars($currentRank); ?> <?php else: ?> <i class="fas fa-ban" style="color: #7f8c8d;"></i> No Rank Yet <?php endif; ?> </div> </div> <div style="margin-top: 20px;"> <a href="ranks.php" style="color: #3498db; font-size: 12px; font-weight: 600; text-decoration: none;"> View All Ranks <i class="fas fa-arrow-right" style="margin-left: 5px;"></i> </a> </div> </div> </div> </div> <!-- Quick Actions --> <div class="card"> <div class="card-header"> <i class="fas fa-bolt"></i> Quick Actions </div> <div class="card-body"> <div style="display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px;"> <a href="watch_ads.php" class="btn btn-primary"> <i class="fas fa-eye"></i> Watch Ads </a> <a href="my_plan.php" class="btn btn-secondary"> <i class="fas fa-box"></i> My Plan </a> <a href="withdraw.php" class="btn btn-success"> <i class="fas fa-money-bill-wave"></i> Withdraw </a> <a href="referral.php" class="btn btn-primary"> <i class="fas fa-users"></i> Referrals </a> </div> </div> </div> <!-- Account Status --> <div class="card"> <div class="card-header"> <i class="fas fa-info-circle"></i> Account Status </div> <div class="card-body"> <table style="width: 100%;"> <tr> <td style="padding: 10px 0; color: var(--text-secondary);"> <i class="fas fa-id-badge"></i> Member ID </td> <td style="padding: 10px 0; text-align: right; color: var(--primary-color); font-weight: bold;"> <?php echo htmlspecialchars($user['referral_code']); ?> </td> </tr> <tr> <td style="padding: 10px 0; color: var(--text-secondary);"> <i class="fas fa-user"></i> Full Name </td> <td style="padding: 10px 0; text-align: right; color: var(--text-primary);"> <?php echo htmlspecialchars($user['full_name']); ?> </td> </tr> <tr> <td style="padding: 10px 0; color: var(--text-secondary);"> <i class="fas fa-envelope"></i> Email </td> <td style="padding: 10px 0; text-align: right; color: var(--text-primary);"> <?php echo htmlspecialchars($user['email']); ?> </td> </tr> <tr> <td style="padding: 10px 0; color: var(--text-secondary);"> <i class="fas fa-phone"></i> Phone </td> <td style="padding: 10px 0; text-align: right; color: var(--text-primary);"> <?php echo htmlspecialchars($user['phone']); ?> </td> </tr> <tr> <td style="padding: 10px 0; color: var(--text-secondary);"> <i class="fas fa-users"></i> Referrals </td> <td style="padding: 10px 0; text-align: right; color: var(--text-primary);"> <?php echo $user['referral_count']; ?> </td> </tr> <tr> <td style="padding: 10px 0; color: var(--text-secondary);"> <i class="fas fa-chart-line"></i> Ads Earning </td> <td style="padding: 10px 0; text-align: right;"> <?php if ($user['ads_earning_active']): ?> <span class="badge badge-success">Active</span> <?php else: ?> <span class="badge badge-danger">Stopped</span> <?php endif; ?> </td> </tr> <tr> <td style="padding: 10px 0; color: var(--text-secondary);"> <i class="fas fa-calendar"></i> Member Since </td> <td style="padding: 10px 0; text-align: right; color: var(--text-primary);"> <?php echo date('M d, Y', strtotime($user['created_at'])); ?> </td> </tr> </table> </div> </div> <!-- Active Plan --> <?php $activePlan = getActivePlan($_SESSION['user_id']); if ($activePlan): $isLifetime = ($activePlan['plan_duration'] == 0); ?> <div class="card"> <div class="card-header"> <i class="fas fa-box"></i> Active Plan </div> <div class="card-body"> <h3 style="color: var(--primary-color); margin-bottom: 10px;"> <?php echo htmlspecialchars($activePlan['plan_name']); ?> </h3> <p style="color: var(--text-secondary); margin-bottom: 15px;"> <i class="fas fa-eye"></i> Daily Ads Limit: <strong><?php echo $activePlan['ads_limit_per_day']; ?></strong> ads </p> <p style="color: var(--text-secondary); margin-bottom: 15px;"> <i class="fas fa-network-wired"></i> Referral Income: <strong>Upto Level <?php echo $activePlan['upto_level']; ?></strong> </p> <?php if (!$isLifetime): ?> <div class="progress"> <?php $daysLeft = (strtotime($activePlan['end_date']) - time()) / (60 * 60 * 24); $totalDays = $activePlan['plan_duration']; $progress = max(0, min(100, (($totalDays - $daysLeft) / $totalDays) * 100)); ?> <div class="progress-bar" style="width: <?php echo $progress; ?>%"></div> </div> <p style="color: var(--text-secondary); margin-top: 10px; font-size: 12px;"> <i class="fas fa-calendar"></i> Expires on: <?php echo date('M d, Y', strtotime($activePlan['end_date'])); ?> (<?php echo ceil($daysLeft); ?> days left) </p> <?php else: ?> <div class="alert alert-success" style="padding: 10px; margin: 0;"> <i class="fas fa-infinity"></i> <strong>Lifetime Validity</strong> - Enjoy permanent access! </div> <?php endif; ?> <!-- Premium Upgrade / Status Notice --> <?php if ($allLevelsUnlocked): ?> <div class="upgrade-premium-banner" style=" margin-top: 25px; padding: 25px; border-radius: 20px; background: rgba(46, 204, 113, 0.05); border: 1px solid rgba(46, 204, 113, 0.2); text-align: center; "> <div style="display: flex; align-items: center; justify-content: center; gap: 10px; margin-bottom: 15px;"> <div style="width: 32px; height: 32px; background: #27ae60; border-radius: 50%; display: flex; align-items: center; justify-content: center; color: white;"> <i class="fas fa-crown"></i> </div> <span style="color: #2ecc71; font-size: 13px; font-weight: 800; text-transform: uppercase; letter-spacing: 1.5px;">All Levels Unlocked</span> </div> <p style="color: var(--text-secondary); font-size: 13px; margin-bottom: 0; line-height: 1.6;"> Congratulations! Your plan has unlocked all <strong><?php echo $maxLevels; ?> reflection levels</strong>. You are earning maximum commissions. </p> </div> <?php else: ?> <div class="upgrade-premium-banner" style=" margin-top: 25px; padding: 20px; border-radius: 20px; background: rgba(255, 255, 255, 0.02); border: 1px solid rgba(155, 89, 182, 0.2); text-align: center; "> <div style="display: flex; align-items: center; justify-content: center; gap: 10px; margin-bottom: 12px;"> <div style="width: 28px; height: 28px; background: #8e44ad; border-radius: 50%; display: flex; align-items: center; justify-content: center; color: white; font-size: 12px;"> <i class="fas fa-arrow-up"></i> </div> <span style="color: #9b59b6; font-size: 12px; font-weight: 800; text-transform: uppercase; letter-spacing: 1.5px;">Upgrade Your Account</span> </div> <p style="color: var(--text-secondary); font-size: 13px; margin-bottom: 15px; line-height: 1.5;"> Unlock deeper referral levels and maximize your daily earning potential. </p> <a href="my_plan.php" style=" display: flex; align-items: center; justify-content: center; gap: 10px; width: 100%; padding: 12px; background: #8e44ad; color: white; text-decoration: none; border-radius: 12px; font-weight: 700; font-size: 14px; transition: all 0.3s; " onmouseover="this.style.background='#9b59b6'" onmouseout="this.style.background='#8e44ad'"> <i class="fas fa-rocket"></i> Upgrade Now </a> </div> <?php endif; ?> </div> </div> <?php else: ?> <div class="card"> <div class="card-header"> <i class="fas fa-box"></i> No Active Plan </div> <div class="card-body text-center"> <p style="color: var(--text-secondary); margin-bottom: 15px;"> You don't have an active plan. Purchase a plan to start earning! </p> <a href="my_plan.php" class="btn btn-primary"> <i class="fas fa-box"></i> View Plans </a> </div> </div> <?php endif; ?> <!-- Rank Achievement Congratulations Popup - Professional Compact Design --> <?php if ($rankPopup): ?> <div class="rank-popup-overlay" id="rankPopup" style="display: none;"> <div class="rank-popup-container"> <div class="rank-popup-content"> <!-- Top Accent Line --> <div class="popup-accent-line"></div> <!-- Trophy Icon --> <div class="trophy-section"> <div class="trophy-icon"> <i class="fas fa-trophy"></i> </div> </div> <!-- Content --> <div class="popup-body"> <h3 class="popup-title">Rank Achieved!</h3> <!-- Rank Display --> <div class="rank-display"> <div class="rank-icon-small"> <i class="fas fa-crown"></i> </div> <div class="rank-info"> <span class="rank-label-small">NEW RANK</span> <h4 class="rank-name-compact"><?php echo htmlspecialchars($rankPopup['rank_name']); ?></h4> </div> </div> <!-- Reward Display --> <div class="reward-display-compact"> <div class="reward-icon-small"> <i class="fas fa-gift"></i> </div> <div class="reward-info"> <span class="reward-label-small">REWARD</span> <div class="reward-value curr-val" data-usd="<?php echo formatCurrency($rankPopup['reward_amount']); ?>" data-pkr="<?php echo number_format($rankPopup['reward_amount'] * $pkr_rate, 2); ?> PKR"> <?php echo formatCurrency($rankPopup['reward_amount']); ?> </div> </div> <div class="reward-check"> <i class="fas fa-check-circle"></i> </div> </div> <!-- Message --> <p class="popup-message"> Keep growing your network to unlock more rewards! </p> <!-- Button --> <button class="popup-btn-compact" onclick="closeRankPopup(<?php echo $rankPopup['user_rank_id']; ?>)"> Continue <i class="fas fa-arrow-right"></i> </button> </div> </div> </div> </div> <?php endif; ?> <style> /* Compact Professional Popup Styles */ .rank-popup-overlay { position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0, 0, 0, 0.88); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); z-index: 99999; display: flex; align-items: center; justify-content: center; animation: fadeIn 0.3s ease; } @keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } } .rank-popup-container { max-width: 380px; width: 90%; animation: slideUp 0.4s cubic-bezier(0.34, 1.56, 0.64, 1); } @keyframes slideUp { from { transform: translateY(30px) scale(0.95); opacity: 0; } to { transform: translateY(0) scale(1); opacity: 1; } } .rank-popup-content { background: linear-gradient(145deg, #1c1c1c 0%, #2a2a2a 100%); border-radius: 16px; overflow: hidden; box-shadow: 0 20px 40px rgba(0, 0, 0, 0.6), 0 0 0 1px rgba(255, 255, 255, 0.08); } .popup-accent-line { height: 3px; background: linear-gradient(90deg, #f1c40f 0%, #f39c12 50%, #f1c40f 100%); background-size: 200% 100%; animation: shimmer 2s linear infinite; } @keyframes shimmer { 0% { background-position: 0% 0%; } 100% { background-position: 200% 0%; } } .trophy-section { text-align: center; padding: 25px 20px 15px; background: radial-gradient(circle at center, rgba(241, 196, 15, 0.08) 0%, transparent 70%); } .trophy-icon { font-size: 50px; color: #f1c40f; display: inline-block; animation: trophyBounce 2s ease-in-out infinite; filter: drop-shadow(0 0 15px rgba(241, 196, 15, 0.4)); } @keyframes trophyBounce { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-8px); } } .popup-body { padding: 0 25px 25px; } .popup-title { font-size: 22px; font-weight: 800; text-align: center; margin: 0 0 20px 0; background: linear-gradient(135deg, #f1c40f 0%, #f39c12 100%); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; } .rank-display { background: linear-gradient(135deg, rgba(241, 196, 15, 0.08) 0%, rgba(243, 156, 18, 0.04) 100%); border: 1.5px solid rgba(241, 196, 15, 0.25); border-radius: 12px; padding: 15px; display: flex; align-items: center; gap: 12px; margin-bottom: 12px; } .rank-icon-small { width: 42px; height: 42px; background: linear-gradient(135deg, #f1c40f 0%, #f39c12 100%); border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 20px; color: #1a1a1a; flex-shrink: 0; box-shadow: 0 4px 12px rgba(241, 196, 15, 0.3); } .rank-info { flex: 1; } .rank-label-small { display: block; font-size: 9px; color: #7f8c8d; font-weight: 700; letter-spacing: 1.2px; margin-bottom: 3px; } .rank-name-compact { font-size: 18px; font-weight: 800; color: #fff; margin: 0; line-height: 1.2; } .reward-display-compact { background: linear-gradient(135deg, rgba(46, 204, 113, 0.08) 0%, rgba(39, 174, 96, 0.04) 100%); border: 1.5px solid rgba(46, 204, 113, 0.25); border-radius: 12px; padding: 15px; display: flex; align-items: center; gap: 12px; margin-bottom: 15px; } .reward-icon-small { width: 42px; height: 42px; background: linear-gradient(135deg, #2ecc71 0%, #27ae60 100%); border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 20px; color: #fff; flex-shrink: 0; box-shadow: 0 4px 12px rgba(46, 204, 113, 0.3); } .reward-info { flex: 1; } .reward-label-small { display: block; font-size: 9px; color: #7f8c8d; font-weight: 700; letter-spacing: 1.2px; margin-bottom: 3px; } .reward-value { font-size: 20px; font-weight: 900; color: #2ecc71; line-height: 1.2; } .reward-check { font-size: 20px; color: #2ecc71; opacity: 0.8; } .popup-message { text-align: center; color: #95a5a6; font-size: 13px; line-height: 1.5; margin: 0 0 18px 0; padding: 0 5px; } .popup-btn-compact { width: 100%; background: linear-gradient(135deg, #2ecc71 0%, #27ae60 100%); color: #fff; border: none; padding: 13px 24px; font-size: 15px; font-weight: 700; border-radius: 10px; cursor: pointer; transition: all 0.3s ease; box-shadow: 0 4px 15px rgba(46, 204, 113, 0.35); display: flex; align-items: center; justify-content: center; gap: 8px; } .popup-btn-compact:hover { transform: translateY(-2px); box-shadow: 0 6px 20px rgba(46, 204, 113, 0.45); } .popup-btn-compact:active { transform: translateY(0); } .popup-btn-compact i { font-size: 13px; transition: transform 0.3s; } .popup-btn-compact:hover i { transform: translateX(3px); } /* Mobile Responsive */ @media (max-width: 576px) { .rank-popup-container { max-width: 340px; width: 92%; } .trophy-icon { font-size: 45px; } .trophy-section { padding: 20px 15px 12px; } .popup-body { padding: 0 20px 20px; } .popup-title { font-size: 20px; margin-bottom: 16px; } .rank-display, .reward-display-compact { padding: 12px; gap: 10px; } .rank-icon-small, .reward-icon-small { width: 38px; height: 38px; font-size: 18px; } .rank-name-compact { font-size: 16px; } .reward-value { font-size: 18px; } .popup-message { font-size: 12px; margin-bottom: 15px; } .popup-btn-compact { padding: 12px 20px; font-size: 14px; } } </style> <script> function toggleCurrency(type) { const usdBtn = document.getElementById('switchToUSD'); const pkrBtn = document.getElementById('switchToPKR'); if(!usdBtn || !pkrBtn) return; const vals = document.querySelectorAll('.curr-val'); if (type === 'PKR') { usdBtn.classList.remove('active'); pkrBtn.classList.add('active'); vals.forEach(el => { el.style.opacity = '0'; setTimeout(() => { el.innerText = el.getAttribute('data-pkr'); el.style.opacity = '1'; }, 150); }); localStorage.setItem('preferred_currency', 'PKR'); } else { pkrBtn.classList.remove('active'); usdBtn.classList.add('active'); vals.forEach(el => { el.style.opacity = '0'; setTimeout(() => { el.innerText = el.getAttribute('data-usd'); el.style.opacity = '1'; }, 150); }); localStorage.setItem('preferred_currency', 'USD'); } } document.addEventListener('DOMContentLoaded', function () { // Handle Rank Popup <?php if ($rankPopup): ?> setTimeout(function () { const popup = document.getElementById('rankPopup'); if(popup) popup.style.display = 'flex'; }, 600); <?php endif; ?> // Handle Currency Preference const preferred = localStorage.getItem('preferred_currency'); if (preferred === 'PKR') { toggleCurrency('PKR'); } }); function closeRankPopup(userRankId) { const popup = document.getElementById('rankPopup'); if(!popup) return; popup.style.opacity = '0'; popup.style.transform = 'scale(0.95)'; setTimeout(function () { popup.style.display = 'none'; }, 300); fetch('update_rank_popup.php', { method: 'POST', headers: { 'Content-Type': 'application/x-www-form-urlencoded' }, body: 'user_rank_id=' + userRankId }); } </script> <?php include 'footer.php'; ?>