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 /
new.ads /
admin /
Delete
Unzip
Name
Size
Permission
Date
Action
.htaccess
197
B
-r--r--r--
2026-04-01 03:43
applications.php
25.67
KB
-rw-r--r--
2025-11-13 20:36
dashboard.php
19.16
KB
-rw-r--r--
2025-11-13 20:36
error_log
1.69
KB
-rw-r--r--
2026-02-20 13:58
login.php
7.02
KB
-rw-r--r--
2025-11-13 19:20
logout.php
270
B
-rw-r--r--
2025-11-13 19:21
payments.php
26.98
KB
-rw-r--r--
2025-11-13 20:37
settings.php
18.93
KB
-rw-r--r--
2025-11-13 20:37
users.php
24.17
KB
-rw-r--r--
2025-11-13 20:37
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 '../config.php'; require_once '../database.php'; require_once '../libs/functions.php'; require_once '../libs/email.php'; requireAdmin(); $error = ''; $success = ''; // Handle payment actions if ($_SERVER['REQUEST_METHOD'] === 'POST') { $action = $_POST['action']; $transaction_id = (int)$_POST['transaction_id']; $admin_notes = sanitize($_POST['admin_notes'] ?? ''); try { if ($action === 'confirm') { // Update transaction status $db->query("UPDATE transactions SET status = 'confirmed', admin_notes = ? WHERE id = ?", [$admin_notes, $transaction_id]); // Get transaction details to activate QR code $transaction = $db->fetch("SELECT * FROM transactions WHERE id = ?", [$transaction_id]); if ($transaction) { // Activate QR code $db->query("UPDATE applications SET qr_activated = 1 WHERE id = ?", [$transaction['application_id']]); } $success = 'Payment confirmed and QR code activated successfully!'; } elseif ($action === 'reject') { $db->query("UPDATE transactions SET status = 'rejected', admin_notes = ? WHERE id = ?", [$admin_notes, $transaction_id]); $success = 'Payment rejected successfully!'; } // Send email notification try { $trans = $db->fetch("SELECT t.*, u.full_name, u.email FROM transactions t JOIN users u ON t.user_id = u.id WHERE t.id = ?", [$transaction_id]); if ($trans) { if ($action === 'confirm') { EmailNotification::sendPaymentConfirmed($trans['email'], $trans['full_name'], $transaction_id); } elseif ($action === 'reject') { EmailNotification::sendPaymentRejected($trans['email'], $trans['full_name'], $transaction_id, $admin_notes); } } } catch (Exception $e) { error_log('Email notification error: ' . $e->getMessage()); } } catch (Exception $e) { $error = 'Failed to update payment: ' . $e->getMessage(); } } // Get filter parameters $status_filter = $_GET['status'] ?? 'all'; $search = $_GET['search'] ?? ''; // Build query $where_conditions = []; $params = []; if ($status_filter !== 'all') { $where_conditions[] = "t.status = ?"; $params[] = $status_filter; } if (!empty($search)) { $where_conditions[] = "(u.full_name LIKE ? OR u.email LIKE ? OR t.transaction_id LIKE ? OR a.vehicle_number LIKE ?)"; $search_param = "%$search%"; $params = array_merge($params, [$search_param, $search_param, $search_param, $search_param]); } $where_clause = !empty($where_conditions) ? 'WHERE ' . implode(' AND ', $where_conditions) : ''; // Get transactions $transactions = $db->fetchAll(" SELECT t.*, u.full_name as user_name, u.email as user_email, a.vehicle_type, a.vehicle_name, a.vehicle_number, a.qr_activated FROM transactions t JOIN users u ON t.user_id = u.id JOIN applications a ON t.application_id = a.id $where_clause ORDER BY t.created_at DESC ", $params); // Get flash messages $flash_success = getFlashMessage('success'); $flash_error = getFlashMessage('error'); ?> <!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <title>Manage Payments - <?php echo SITE_NAME; ?></title> <link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0/dist/css/bootstrap.min.css" rel="stylesheet"> <link href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.0.0/css/all.min.css" rel="stylesheet"> <link href="../assets/css/style.css" rel="stylesheet"> </head> <body> <!-- Navigation --> <nav class="navbar navbar-expand-lg navbar-light"> <div class="container"> <a class="navbar-brand" href="dashboard.php"> <i class="fas fa-user-shield me-2"></i>Admin Panel </a> <button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbarNav"> <span class="navbar-toggler-icon"></span> </button> <div class="collapse navbar-collapse" id="navbarNav"> <ul class="navbar-nav me-auto"> <li class="nav-item"> <a class="nav-link" href="dashboard.php">Dashboard</a> </li> <li class="nav-item"> <a class="nav-link" href="users.php">Users</a> </li> <li class="nav-item"> <a class="nav-link" href="applications.php">Applications</a> </li> <li class="nav-item"> <a class="nav-link active" href="payments.php">Payments</a> </li> <li class="nav-item"> <a class="nav-link" href="settings.php">Settings</a> </li> </ul> <ul class="navbar-nav"> <li class="nav-item dropdown"> <a class="nav-link dropdown-toggle" href="#" id="navbarDropdown" role="button" data-bs-toggle="dropdown"> <i class="fas fa-user-shield me-1"></i>Admin </a> <ul class="dropdown-menu"> <li><a class="dropdown-item" href="../index.php" target="_blank"><i class="fas fa-external-link-alt me-2"></i>View Website</a></li> <li><hr class="dropdown-divider"></li> <li><a class="dropdown-item" href="logout.php"><i class="fas fa-sign-out-alt me-2"></i>Logout</a></li> </ul> </li> </ul> </div> </div> </nav> <div class="container-fluid mt-4"> <!-- Flash Messages --> <?php if ($success || $flash_success): ?> <div class="alert alert-success alert-dismissible fade show"> <i class="fas fa-check-circle me-2"></i><?php echo $success ?: $flash_success; ?> <button type="button" class="btn-close" data-bs-dismiss="alert"></button> </div> <?php endif; ?> <?php if ($error || $flash_error): ?> <div class="alert alert-danger alert-dismissible fade show"> <i class="fas fa-exclamation-circle me-2"></i><?php echo $error ?: $flash_error; ?> <button type="button" class="btn-close" data-bs-dismiss="alert"></button> </div> <?php endif; ?> <!-- Page Header --> <div class="row mb-4"> <div class="col-12"> <div class="card border-0 shadow-sm"> <div class="card-header bg-info text-white"> <h4 class="mb-0"> <i class="fas fa-credit-card me-2"></i>Manage Payments </h4> </div> <div class="card-body"> <!-- Filters --> <form method="GET" class="row g-3"> <div class="col-md-4"> <label for="status" class="form-label">Filter by Status</label> <select class="form-select" id="status" name="status"> <option value="all" <?php echo $status_filter === 'all' ? 'selected' : ''; ?>>All Payments</option> <option value="pending" <?php echo $status_filter === 'pending' ? 'selected' : ''; ?>>Pending</option> <option value="confirmed" <?php echo $status_filter === 'confirmed' ? 'selected' : ''; ?>>Confirmed</option> <option value="rejected" <?php echo $status_filter === 'rejected' ? 'selected' : ''; ?>>Rejected</option> </select> </div> <div class="col-md-6"> <label for="search" class="form-label">Search</label> <input type="text" class="form-control" id="search" name="search" value="<?php echo htmlspecialchars($search); ?>" placeholder="Search by name, email, transaction ID..."> </div> <div class="col-md-2"> <label class="form-label"> </label> <button type="submit" class="btn btn-primary d-block w-100"> <i class="fas fa-search me-2"></i>Filter </button> </div> </form> </div> </div> </div> </div> <!-- Payments Table --> <div class="row"> <div class="col-12"> <div class="card border-0 shadow-sm"> <div class="card-body p-0"> <?php if (empty($transactions)): ?> <div class="text-center py-5"> <i class="fas fa-inbox fa-4x text-muted mb-3"></i> <h5>No Payments Found</h5> <p class="text-muted">No payments match your current filters.</p> </div> <?php else: ?> <div class="table-responsive"> <table class="table table-hover mb-0"> <thead class="table-light"> <tr> <th>Transaction ID</th> <th>User Details</th> <th>Vehicle</th> <th>Amount</th> <th>Payment Method</th> <th>Status</th> <th>QR Status</th> <th>Date</th> <th>Actions</th> </tr> </thead> <tbody> <?php foreach ($transactions as $trans): ?> <tr> <td> <strong>#<?php echo str_pad($trans['id'], 6, '0', STR_PAD_LEFT); ?></strong> <br><small class="text-muted"><?php echo htmlspecialchars($trans['transaction_id']); ?></small> </td> <td> <div> <strong><?php echo htmlspecialchars($trans['user_name']); ?></strong> <br><small class="text-muted"><?php echo htmlspecialchars($trans['user_email']); ?></small> </div> </td> <td> <div> <strong><?php echo htmlspecialchars($trans['vehicle_name']); ?></strong> <br><small class="text-muted"> <?php echo htmlspecialchars($trans['vehicle_type']); ?> - <?php echo htmlspecialchars($trans['vehicle_number']); ?> </small> </div> </td> <td> <strong class="text-success">PKR <?php echo number_format($trans['amount']); ?></strong> </td> <td> <span class="badge bg-secondary"> <?php echo htmlspecialchars($trans['payment_method']); ?> </span> </td> <td> <span class="badge bg-<?php echo $trans['status'] === 'confirmed' ? 'success' : ($trans['status'] === 'rejected' ? 'danger' : 'warning'); ?>"> <?php echo ucfirst($trans['status']); ?> </span> </td> <td> <span class="badge bg-<?php echo $trans['qr_activated'] ? 'success' : 'secondary'; ?>"> <?php echo $trans['qr_activated'] ? 'Active' : 'Inactive'; ?> </span> </td> <td> <small><?php echo formatDateTime($trans['created_at']); ?></small> </td> <td> <div class="btn-group" role="group"> <button class="btn btn-sm btn-outline-primary" data-bs-toggle="modal" data-bs-target="#viewModal<?php echo $trans['id']; ?>"> <i class="fas fa-eye"></i> </button> <?php if ($trans['status'] === 'pending'): ?> <button class="btn btn-sm btn-outline-success" data-bs-toggle="modal" data-bs-target="#confirmModal<?php echo $trans['id']; ?>"> <i class="fas fa-check"></i> </button> <button class="btn btn-sm btn-outline-danger" data-bs-toggle="modal" data-bs-target="#rejectModal<?php echo $trans['id']; ?>"> <i class="fas fa-times"></i> </button> <?php endif; ?> </div> </td> </tr> <?php endforeach; ?> </tbody> </table> </div> <?php endif; ?> </div> </div> </div> </div> </div> <!-- Modals for each transaction --> <?php foreach ($transactions as $trans): ?> <!-- View Modal --> <div class="modal fade" id="viewModal<?php echo $trans['id']; ?>" tabindex="-1"> <div class="modal-dialog modal-lg"> <div class="modal-content"> <div class="modal-header bg-primary text-white"> <h5 class="modal-title"> <i class="fas fa-receipt me-2"></i>Payment Details - #<?php echo str_pad($trans['id'], 6, '0', STR_PAD_LEFT); ?> </h5> <button type="button" class="btn-close btn-close-white" data-bs-dismiss="modal"></button> </div> <div class="modal-body"> <div class="row"> <div class="col-md-6"> <h6>Transaction Information</h6> <table class="table table-borderless table-sm"> <tr><td><strong>Transaction ID:</strong></td><td>#<?php echo str_pad($trans['id'], 6, '0', STR_PAD_LEFT); ?></td></tr> <tr><td><strong>Payment ID:</strong></td><td><?php echo htmlspecialchars($trans['transaction_id']); ?></td></tr> <tr><td><strong>Amount:</strong></td><td><strong class="text-success">PKR <?php echo number_format($trans['amount']); ?></strong></td></tr> <tr><td><strong>Payment Method:</strong></td><td><?php echo htmlspecialchars($trans['payment_method']); ?></td></tr> <tr><td><strong>Status:</strong></td><td> <span class="badge bg-<?php echo $trans['status'] === 'confirmed' ? 'success' : ($trans['status'] === 'rejected' ? 'danger' : 'warning'); ?>"> <?php echo ucfirst($trans['status']); ?> </span> </td></tr> <tr><td><strong>Date:</strong></td><td><?php echo formatDateTime($trans['created_at']); ?></td></tr> </table> </div> <div class="col-md-6"> <h6>User & Vehicle Information</h6> <table class="table table-borderless table-sm"> <tr><td><strong>User:</strong></td><td><?php echo htmlspecialchars($trans['user_name']); ?></td></tr> <tr><td><strong>Email:</strong></td><td><?php echo htmlspecialchars($trans['user_email']); ?></td></tr> <tr><td><strong>Vehicle Type:</strong></td><td><?php echo htmlspecialchars($trans['vehicle_type']); ?></td></tr> <tr><td><strong>Vehicle Name:</strong></td><td><?php echo htmlspecialchars($trans['vehicle_name']); ?></td></tr> <tr><td><strong>Registration:</strong></td><td><?php echo htmlspecialchars($trans['vehicle_number']); ?></td></tr> <tr><td><strong>QR Status:</strong></td><td> <span class="badge bg-<?php echo $trans['qr_activated'] ? 'success' : 'secondary'; ?>"> <?php echo $trans['qr_activated'] ? 'Active' : 'Inactive'; ?> </span> </td></tr> </table> </div> </div> <?php if ($trans['payment_proof']): ?> <div class="row mt-3"> <div class="col-12"> <h6>Payment Proof</h6> <img src="../uploads/documents/<?php echo htmlspecialchars($trans['payment_proof']); ?>" alt="Payment Proof" class="img-fluid rounded shadow-sm" style="max-height: 400px;"> </div> </div> <?php endif; ?> <?php if ($trans['admin_notes']): ?> <div class="row mt-3"> <div class="col-12"> <div class="alert alert-info"> <h6><i class="fas fa-comment me-2"></i>Admin Notes</h6> <p class="mb-0"><?php echo htmlspecialchars($trans['admin_notes']); ?></p> </div> </div> </div> <?php endif; ?> </div> </div> </div> </div> <?php if ($trans['status'] === 'pending'): ?> <!-- Confirm Modal --> <div class="modal fade" id="confirmModal<?php echo $trans['id']; ?>" tabindex="-1"> <div class="modal-dialog"> <div class="modal-content"> <div class="modal-header bg-success text-white"> <h5 class="modal-title">Confirm Payment</h5> <button type="button" class="btn-close btn-close-white" data-bs-dismiss="modal"></button> </div> <form method="POST"> <div class="modal-body"> <input type="hidden" name="action" value="confirm"> <input type="hidden" name="transaction_id" value="<?php echo $trans['id']; ?>"> <p>Are you sure you want to confirm this payment?</p> <div class="alert alert-warning"> <strong>This will:</strong> <ul class="mb-0"> <li>Mark payment as confirmed</li> <li>Activate the user's QR code</li> <li>Send confirmation email to user</li> </ul> </div> <table class="table table-borderless table-sm"> <tr><td><strong>Amount:</strong></td><td>PKR <?php echo number_format($trans['amount']); ?></td></tr> <tr><td><strong>Payment ID:</strong></td><td><?php echo htmlspecialchars($trans['transaction_id']); ?></td></tr> <tr><td><strong>Method:</strong></td><td><?php echo htmlspecialchars($trans['payment_method']); ?></td></tr> </table> <div class="mb-3"> <label for="admin_notes_confirm_<?php echo $trans['id']; ?>" class="form-label">Admin Notes (Optional)</label> <textarea class="form-control" id="admin_notes_confirm_<?php echo $trans['id']; ?>" name="admin_notes" rows="2" placeholder="Add any notes..."></textarea> </div> </div> <div class="modal-footer"> <button type="button" class="btn btn-secondary" data-bs-dismiss="modal">Cancel</button> <button type="submit" class="btn btn-success"> <i class="fas fa-check me-2"></i>Confirm Payment </button> </div> </form> </div> </div> </div> <!-- Reject Modal --> <div class="modal fade" id="rejectModal<?php echo $trans['id']; ?>" tabindex="-1"> <div class="modal-dialog"> <div class="modal-content"> <div class="modal-header bg-danger text-white"> <h5 class="modal-title">Reject Payment</h5> <button type="button" class="btn-close btn-close-white" data-bs-dismiss="modal"></button> </div> <form method="POST"> <div class="modal-body"> <input type="hidden" name="action" value="reject"> <input type="hidden" name="transaction_id" value="<?php echo $trans['id']; ?>"> <p>Are you sure you want to reject this payment?</p> <table class="table table-borderless table-sm"> <tr><td><strong>Amount:</strong></td><td>PKR <?php echo number_format($trans['amount']); ?></td></tr> <tr><td><strong>Payment ID:</strong></td><td><?php echo htmlspecialchars($trans['transaction_id']); ?></td></tr> <tr><td><strong>Method:</strong></td><td><?php echo htmlspecialchars($trans['payment_method']); ?></td></tr> </table> <div class="mb-3"> <label for="admin_notes_reject_<?php echo $trans['id']; ?>" class="form-label">Reason for Rejection <span class="text-danger">*</span></label> <textarea class="form-control" id="admin_notes_reject_<?php echo $trans['id']; ?>" name="admin_notes" rows="3" required placeholder="Please provide reason for rejection..."></textarea> </div> </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"> <i class="fas fa-times me-2"></i>Reject Payment </button> </div> </form> </div> </div> </div> <?php endif; ?> <?php endforeach; ?> <script src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0/dist/js/bootstrap.bundle.min.js"></script> <script src="../assets/js/main.js"></script> </body> </html>