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 /
deployment_package /
Delete
Unzip
Name
Size
Permission
Date
Action
admin
[ DIR ]
drwxr-xr-x
2025-10-18 01:48
assets
[ DIR ]
drwxr-xr-x
2025-10-18 01:48
db
[ DIR ]
drwxr-xr-x
2025-10-18 01:48
includes
[ DIR ]
drwxr-xr-x
2025-10-18 01:48
uploads
[ DIR ]
drwxr-xr-x
2025-10-18 01:48
user
[ DIR ]
drwxr-xr-x
2025-10-18 01:48
DEPLOYMENT_INSTRUCTIONS.md
3.05
KB
-rw-r--r--
2025-10-18 01:48
FIX_DUPLICATE_COMMISSIONS.md
3.63
KB
-rw-r--r--
2025-10-18 00:32
FIX_USER_EDIT_ISSUE.md
6.15
KB
-rw-r--r--
2025-10-18 00:44
IMPROVEMENTS_SUMMARY.md
4.11
KB
-rw-r--r--
2025-10-18 00:40
README.txt
2.34
KB
-rw-r--r--
2025-10-17 23:08
README_DEPLOYMENT.txt
1.74
KB
-rw-r--r--
2025-10-18 01:49
README_REFERRAL_COMMISSIONS.md
4.02
KB
-rw-r--r--
2025-10-18 00:22
SQL_CHANGES_SUMMARY.md
2.02
KB
-rw-r--r--
2025-10-18 00:25
apply_database_fixes.php
5.17
KB
-rw-r--r--
2025-10-18 00:39
check_commission_levels.php
3.16
KB
-rw-r--r--
2025-10-18 00:53
check_database_structure.php
3.9
KB
-rw-r--r--
2025-10-18 00:55
check_duplicate_commissions.php
4.38
KB
-rw-r--r--
2025-10-18 00:32
check_referrals_table.php
2.28
KB
-rw-r--r--
2025-10-18 00:39
complete_setup.sql
5.34
KB
-rw-r--r--
2025-10-18 00:25
complete_setup_for_import.sql
5.36
KB
-rw-r--r--
2025-10-18 01:59
create_table_direct.php
3.44
KB
-rw-r--r--
2025-10-18 00:09
css_test.php
999
B
-rw-r--r--
2025-10-18 02:06
debug_referral_chain.php
6.88
KB
-rw-r--r--
2025-10-18 00:54
fix_duplicate_commissions.php
2.67
KB
-rw-r--r--
2025-10-18 00:31
fix_referral_commissions.sql
677
B
-rw-r--r--
2025-10-18 00:25
fix_referral_commissions_for_import.sql
705
B
-rw-r--r--
2025-10-18 01:59
index.php
25.74
KB
-rw-r--r--
2025-10-18 02:05
index_with_css_fix.php
25.82
KB
-rw-r--r--
2025-10-18 02:06
login.php
4.15
KB
-rw-r--r--
2025-10-18 02:05
logout.php
88
B
-rw-r--r--
2025-10-17 23:02
register.php
6.58
KB
-rw-r--r--
2025-10-18 02:05
run_setup.bat
714
B
-rw-r--r--
2025-10-18 00:23
setup_referral_commissions.php
2.73
KB
-rw-r--r--
2025-10-18 00:21
test.php
59
B
-rw-r--r--
2025-10-17 23:16
test_commission_application.php
6.93
KB
-rw-r--r--
2025-10-18 00:55
test_commission_display.php
3.26
KB
-rw-r--r--
2025-10-18 00:19
test_commission_fix.php
3.16
KB
-rw-r--r--
2025-10-18 00:39
test_mobile_menu.php
2.73
KB
-rw-r--r--
2025-10-18 01:24
test_referral.php
2.07
KB
-rw-r--r--
2025-10-17 23:55
update_referral_commissions.sql
682
B
-rw-r--r--
2025-10-18 00:25
update_referral_commissions_for_import.sql
710
B
-rw-r--r--
2025-10-18 01:59
update_referrals_table.sql
398
B
-rw-r--r--
2025-10-18 00:31
update_referrals_table_for_import.sql
426
B
-rw-r--r--
2025-10-18 01:59
verify_commissions.php
3.28
KB
-rw-r--r--
2025-10-18 00:20
verify_commissions_working.php
8.2
KB
-rw-r--r--
2025-10-18 00:56
Save
Rename
<?php require_once 'includes/db.php'; echo "<h2>Applying Database Fixes for Commission System</h2>"; try { // Start transaction $pdo->beginTransaction(); // Check if the new columns exist in referrals table echo "<h3>Checking Referrals Table Structure...</h3>"; $stmt = $pdo->prepare("SHOW COLUMNS FROM referrals LIKE 'transaction_id'"); $stmt->execute(); $transaction_id_exists = $stmt->fetch(); $stmt = $pdo->prepare("SHOW COLUMNS FROM referrals LIKE 'source_transaction_id'"); $stmt->execute(); $source_transaction_id_exists = $stmt->fetch(); if ($transaction_id_exists && $source_transaction_id_exists) { echo "<p style='color: green;'>✓ New columns already exist in referrals table</p>"; } else { echo "<p style='color: orange;'>⚠ Adding new columns to referrals table...</p>"; // Add new columns to referrals table $alterTable = " ALTER TABLE referrals ADD COLUMN transaction_id INT AFTER commission_amount, ADD COLUMN source_transaction_id INT AFTER transaction_id "; $pdo->exec($alterTable); echo "<p style='color: green;'>✓ New columns added successfully</p>"; // Add foreign key constraints (if supported by your MySQL version) try { $addFK1 = "ALTER TABLE referrals ADD FOREIGN KEY (transaction_id) REFERENCES transactions(id)"; $pdo->exec($addFK1); $addFK2 = "ALTER TABLE referrals ADD FOREIGN KEY (source_transaction_id) REFERENCES transactions(id)"; $pdo->exec($addFK2); echo "<p style='color: green;'>✓ Foreign key constraints added successfully</p>"; } catch (PDOException $e) { echo "<p style='color: orange;'>⚠ Foreign key constraints could not be added (this is OK): " . $e->getMessage() . "</p>"; } } // Check if referral_commissions table exists echo "<h3>Checking Referral Commissions Table...</h3>"; try { $stmt = $pdo->prepare("SELECT * FROM referral_commissions LIMIT 1"); $stmt->execute(); echo "<p style='color: green;'>✓ Referral commissions table exists</p>"; } catch (PDOException $e) { if (strpos($e->getMessage(), 'Base table or view not found') !== false) { echo "<p style='color: orange;'>⚠ Creating referral_commissions table...</p>"; // 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 ) "; $pdo->exec($createTable); // Insert default commission levels $insertLevels = " INSERT INTO referral_commissions (level, commission_percentage) VALUES (1, 10.00), (2, 5.00), (3, 2.00) ON DUPLICATE KEY UPDATE commission_percentage = VALUES(commission_percentage) "; $pdo->exec($insertLevels); echo "<p style='color: green;'>✓ Referral commissions table created and populated</p>"; } else { throw $e; } } // Commit transaction $pdo->commit(); echo "<h3>Verifying Database Structure...</h3>"; // Show current table structure $stmt = $pdo->prepare("DESCRIBE referrals"); $stmt->execute(); $columns = $stmt->fetchAll(); echo "<p>Current Referrals Table Structure:</p>"; echo "<table border='1' cellpadding='5' cellspacing='0'>"; echo "<tr><th>Field</th><th>Type</th><th>Null</th><th>Key</th><th>Default</th><th>Extra</th></tr>"; foreach ($columns as $column) { echo "<tr>"; echo "<td>" . $column['Field'] . "</td>"; echo "<td>" . $column['Type'] . "</td>"; echo "<td>" . $column['Null'] . "</td>"; echo "<td>" . $column['Key'] . "</td>"; echo "<td>" . $column['Default'] . "</td>"; echo "<td>" . $column['Extra'] . "</td>"; echo "</tr>"; } echo "</table>"; echo "<p style='color: green; font-weight: bold;'>✓ All database fixes applied successfully!</p>"; } catch (PDOException $e) { // Rollback transaction on error $pdo->rollback(); echo "<p style='color: red;'>✗ Error applying database fixes: " . $e->getMessage() . "</p>"; echo "<p style='color: red;'>Transaction rolled back.</p>"; } echo "<hr>"; echo "<p><a href='check_referrals_table.php'>Check Referrals Table Structure</a> | "; echo "<a href='test_commission_fix.php'>Test Commission Fix</a> | "; echo "<a href='admin/referral_commissions.php'>Go to Admin Referral Commissions</a></p>"; ?>