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 /
.trash /
admin.1 /
Delete
Unzip
Name
Size
Permission
Date
Action
ads.php
13.96
KB
-rw-r--r--
2025-10-17 23:08
auth.php
343
B
-rw-r--r--
2025-10-17 23:20
dashboard.php
8.71
KB
-rw-r--r--
2025-10-18 00:40
deposit_methods.php
12.36
KB
-rw-r--r--
2025-10-17 23:06
deposits.php
13.24
KB
-rw-r--r--
2025-10-18 00:56
dpin.php
6.16
KB
-rw-r--r--
2025-10-17 23:06
footer.php
565
B
-rw-r--r--
2025-10-17 23:05
header.php
13.06
KB
-rw-r--r--
2025-10-18 02:06
login.php
3.37
KB
-rw-r--r--
2025-10-17 23:09
login_as_user.php
1020
B
-rw-r--r--
2025-10-17 23:05
logout.php
88
B
-rw-r--r--
2025-10-17 23:08
plans.php
13.65
KB
-rw-r--r--
2025-10-17 23:06
referral_commissions.php
11.93
KB
-rw-r--r--
2025-10-18 00:13
team_commissions.php
6.66
KB
-rw-r--r--
2025-10-17 23:45
test_modals.php
4.44
KB
-rw-r--r--
2025-10-18 00:49
test_referral_commissions.php
2.87
KB
-rw-r--r--
2025-10-18 00:13
test_user_edit.php
4.96
KB
-rw-r--r--
2025-10-18 00:44
transactions.php
6.36
KB
-rw-r--r--
2025-10-17 23:08
users.php
13.55
KB
-rw-r--r--
2025-10-18 00:49
withdraw_methods.php
12.49
KB
-rw-r--r--
2025-10-17 23:08
withdraws.php
9.16
KB
-rw-r--r--
2025-10-17 23:39
Save
Rename
<?php $title = 'Referral Commissions'; include 'header.php'; $error = ''; $success = ''; // Handle commission level updates if ($_SERVER['REQUEST_METHOD'] === 'POST' && isset($_POST['action'])) { if ($_POST['action'] === 'update_commission') { $level = intval($_POST['level']); $percentage = floatval($_POST['percentage']); // Validation if ($level < 1 || $level > 10) { $error = 'Level must be between 1 and 10.'; } elseif ($percentage < 0 || $percentage > 100) { $error = 'Percentage must be between 0 and 100.'; } else { try { // Use INSERT ... ON DUPLICATE KEY UPDATE to handle both insert and update $stmt = $pdo->prepare("INSERT INTO referral_commissions (level, commission_percentage) VALUES (?, ?) ON DUPLICATE KEY UPDATE commission_percentage = VALUES(commission_percentage)"); $stmt->execute([$level, $percentage]); $success = 'Commission level ' . $level . ' saved successfully.'; } catch (PDOException $e) { $error = 'Failed to update commission level. Please try again.'; } } } elseif ($_POST['action'] === 'delete_commission') { $level = intval($_POST['level']); try { $stmt = $pdo->prepare("DELETE FROM referral_commissions WHERE level = ?"); $stmt->execute([$level]); $success = 'Commission level ' . $level . ' deleted successfully.'; } catch (PDOException $e) { $error = 'Failed to delete commission level. Please try again.'; } } } // Get all commission levels try { $stmt = $pdo->prepare("SELECT * FROM referral_commissions ORDER BY level ASC"); $stmt->execute(); $commission_levels = $stmt->fetchAll(); } catch (PDOException $e) { // If table doesn't exist, try to create it if (strpos($e->getMessage(), 'Base table or view not found') !== false) { try { // Create the referral_commissions table $createTable = "CREATE TABLE IF NOT EXISTS referral_commissions ( id INT AUTO_INCREMENT PRIMARY KEY, level INT NOT NULL UNIQUE, commission_percentage DECIMAL(5, 2) NOT NULL, created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP, updated_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP )"; $createStmt = $pdo->prepare($createTable); $createStmt->execute(); // Insert default commission levels $defaultLevels = [ [1, 10.00], [2, 5.00], [3, 2.00] ]; foreach ($defaultLevels as $levelData) { list($level, $percentage) = $levelData; $insertStmt = $pdo->prepare("INSERT IGNORE INTO referral_commissions (level, commission_percentage) VALUES (?, ?)"); $insertStmt->execute([$level, $percentage]); } // Try to fetch again $stmt = $pdo->prepare("SELECT * FROM referral_commissions ORDER BY level ASC"); $stmt->execute(); $commission_levels = $stmt->fetchAll(); $success = 'Database initialized successfully. Default commission levels added.'; } catch (PDOException $createError) { $commission_levels = []; $error = 'Failed to initialize database: ' . $createError->getMessage(); } } else { $commission_levels = []; $error = 'Failed to fetch commission levels. Error: ' . $e->getMessage(); } } ?> <div class="d-flex justify-content-between flex-wrap flex-md-nowrap align-items-center pt-3 pb-2 mb-3 border-bottom"> <h1 class="h2">Referral Commissions</h1> <button class="btn btn-primary" data-bs-toggle="modal" data-bs-target="#addLevelModal">Add New Level</button> </div> <?php if ($error): ?> <div class="alert alert-danger"><?php echo htmlspecialchars($error); ?></div> <?php endif; ?> <?php if ($success): ?> <div class="alert alert-success"><?php echo htmlspecialchars($success); ?></div> <?php endif; ?> <div class="row"> <div class="col-12"> <div class="card"> <div class="card-body"> <h5 class="card-title">Commission Levels</h5> <?php if (count($commission_levels) > 0): ?> <div class="table-responsive"> <table class="table table-striped"> <thead> <tr> <th>Level</th> <th>Commission Percentage</th> <th>Actions</th> </tr> </thead> <tbody> <?php foreach ($commission_levels as $level): ?> <tr> <td><?php echo $level['level']; ?></td> <td><?php echo number_format($level['commission_percentage'], 2); ?>%</td> <td> <button class="btn btn-sm btn-outline-primary" data-bs-toggle="modal" data-bs-target="#editLevelModal<?php echo $level['level']; ?>">Edit</button> <button class="btn btn-sm btn-outline-danger" data-bs-toggle="modal" data-bs-target="#deleteLevelModal<?php echo $level['level']; ?>">Delete</button> <!-- Edit Modal --> <div class="modal fade" id="editLevelModal<?php echo $level['level']; ?>" tabindex="-1"> <div class="modal-dialog"> <div class="modal-content"> <form method="POST"> <div class="modal-header"> <h5 class="modal-title">Edit Commission Level <?php echo $level['level']; ?></h5> <button type="button" class="btn-close" data-bs-dismiss="modal"></button> </div> <div class="modal-body"> <input type="hidden" name="action" value="update_commission"> <input type="hidden" name="level" value="<?php echo $level['level']; ?>"> <div class="mb-3"> <label class="form-label">Commission Percentage (%)</label> <input type="number" class="form-control" name="percentage" step="0.01" min="0" max="100" value="<?php echo $level['commission_percentage']; ?>" required> </div> </div> <div class="modal-footer"> <button type="button" class="btn btn-secondary" data-bs-dismiss="modal">Close</button> <button type="submit" class="btn btn-primary">Save Changes</button> </div> </form> </div> </div> </div> <!-- Delete Modal --> <div class="modal fade" id="deleteLevelModal<?php echo $level['level']; ?>" tabindex="-1"> <div class="modal-dialog"> <div class="modal-content"> <form method="POST"> <div class="modal-header"> <h5 class="modal-title">Delete Commission Level <?php echo $level['level']; ?></h5> <button type="button" class="btn-close" data-bs-dismiss="modal"></button> </div> <div class="modal-body"> <input type="hidden" name="action" value="delete_commission"> <input type="hidden" name="level" value="<?php echo $level['level']; ?>"> <p>Are you sure you want to delete commission level <?php echo $level['level']; ?>?</p> </div> <div class="modal-footer"> <button type="button" class="btn btn-secondary" data-bs-dismiss="modal">Cancel</button> <button type="submit" class="btn btn-danger">Delete Level</button> </div> </form> </div> </div> </div> </td> </tr> <?php endforeach; ?> </tbody> </table> </div> <?php else: ?> <p>No commission levels configured yet.</p> <?php endif; ?> </div> </div> </div> </div> <!-- Add Level Modal --> <div class="modal fade" id="addLevelModal" tabindex="-1"> <div class="modal-dialog"> <div class="modal-content"> <form method="POST"> <div class="modal-header"> <h5 class="modal-title">Add New Commission Level</h5> <button type="button" class="btn-close" data-bs-dismiss="modal"></button> </div> <div class="modal-body"> <input type="hidden" name="action" value="update_commission"> <div class="mb-3"> <label class="form-label">Level (1-10)</label> <input type="number" class="form-control" name="level" min="1" max="10" required> </div> <div class="mb-3"> <label class="form-label">Commission Percentage (%)</label> <input type="number" class="form-control" name="percentage" step="0.01" min="0" max="100" required> </div> </div> <div class="modal-footer"> <button type="button" class="btn btn-secondary" data-bs-dismiss="modal">Close</button> <button type="submit" class="btn btn-primary">Add Level</button> </div> </form> </div> </div> </div> <?php include 'footer.php'; ?>