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 /
data sycho /
admin /
Delete
Unzip
Name
Size
Permission
Date
Action
.htaccess
197
B
-r--r--r--
2026-04-01 03:43
contact.php
9.39
KB
-rw-r--r--
2026-03-01 23:09
dashboard.php
12.62
KB
-rw-r--r--
2026-03-01 23:07
login.php
3.36
KB
-rw-r--r--
2026-03-01 20:35
logout.php
90
B
-rw-r--r--
2026-03-01 20:36
orders.php
24.63
KB
-rw-r--r--
2026-03-01 23:09
payment_methods.php
16.54
KB
-rw-r--r--
2026-03-01 23:03
save_contact.php
1.4
KB
-rw-r--r--
2026-03-01 20:30
services.php
15.75
KB
-rw-r--r--
2026-03-01 23:05
settings.php
6.88
KB
-rw-r--r--
2026-03-01 23:10
users.php
7.52
KB
-rw-r--r--
2026-03-01 23:08
verify_payment.php
13.79
KB
-rw-r--r--
2026-03-01 23: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 include '../includes/db.php'; session_start(); // Admin Auth Check if (!isset($_SESSION['admin_id'])) { header('Location: login.php'); exit; } $error_msg = ""; $success_msg = isset($_GET['success']) ? "Operation successful." : ""; // Handle Service Add/Update if (isset($_POST['save_service'])) { $name = $_POST['name']; $price = $_POST['price']; $features = $_POST['features']; $is_premium = isset($_POST['is_premium']) ? 1 : 0; if (isset($_POST['id']) && !empty($_POST['id'])) { $stmt = $pdo->prepare("UPDATE services SET name = ?, price = ?, features = ?, is_premium = ? WHERE id = ?"); $stmt->execute([$name, $price, $features, $is_premium, $_POST['id']]); } else { $stmt = $pdo->prepare("INSERT INTO services (name, price, features, is_premium) VALUES (?, ?, ?, ?)"); $stmt->execute([$name, $price, $features, $is_premium]); } header('Location: services.php?success=1'); exit; } // Handle Force Delete (Cascade Purge) if (isset($_GET['delete'])) { $id = $_GET['delete']; try { $pdo->beginTransaction(); // 1. Purge Order Status History linked to this service's orders $stmt_h = $pdo->prepare("DELETE FROM order_status_history WHERE order_id IN (SELECT id FROM orders WHERE service_id = ?)"); $stmt_h->execute([$id]); // 2. Purge Orders linked to this service $stmt_o = $pdo->prepare("DELETE FROM orders WHERE service_id = ?"); $stmt_o->execute([$id]); // 3. Purge the Service itself $stmt_s = $pdo->prepare("DELETE FROM services WHERE id = ?"); $stmt_s->execute([$id]); $pdo->commit(); header('Location: services.php?deleted=1'); exit; } catch (Exception $e) { $pdo->rollBack(); $error_msg = "Critical Force-Purge Exception: " . $e->getMessage(); } } $services = $pdo->query("SELECT * FROM services ORDER BY created_at DESC")->fetchAll(); $sidebar_links = [ ['name' => 'Dashboard', 'icon' => 'fas fa-chart-line', 'active' => true, 'url' => 'dashboard.php'], ['name' => 'Users', 'icon' => 'fas fa-users', 'active' => false, 'url' => 'users.php'], ['name' => 'Services', 'icon' => 'fas fa-layer-group', 'active' => false, 'url' => 'services.php'], ['name' => 'Orders', 'icon' => 'fas fa-shopping-cart', 'active' => false, 'url' => 'orders.php'], ['name' => 'Payment Setup', 'icon' => 'fas fa-credit-card', 'active' => false, 'url' => 'payment_methods.php'], ['name' => 'Contact Details', 'icon' => 'fas fa-address-book', 'active' => false, 'url' => 'contact.php'], ['name' => 'Admin Details', 'icon' => 'fas fa-user-shield', 'active' => false, 'url' => 'settings.php'], ]; ?> <!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <title>Manage Services | Admin</title> <link rel="stylesheet" href="../assets/css/style.css"> <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/css/all.min.css"> <style> :root { --sidebar-width: 280px; } body { background: #fafafa; overflow: hidden; color: #0f172a; } .sidebar { width: var(--sidebar-width); height: 100vh; background: #ffffff; border-right: 1px solid rgba(0,0,0,0.05); position: fixed; left: 0; top: 0; padding: 3rem 1.5rem; display: flex; flex-direction: column; } .main-content { margin-left: var(--sidebar-width); height: 100vh; padding: 4rem; overflow-y: auto; } .sidebar-link { display: flex; align-items: center; gap: 1.2rem; padding: 1.1rem 1.5rem; border-radius: 12px; color: #64748b; margin-bottom: 0.5rem; font-weight: 600; text-decoration: none; } .sidebar-link.active { color: var(--primary); background: #f0fdf4; } .card { background: #fff; padding: 2.5rem; border-radius: 20px; border: 1px solid rgba(0,0,0,0.05); box-shadow: 0 10px 30px rgba(0,0,0,0.02); } table { width: 100%; border-collapse: collapse; margin-top: 2rem; } th { text-align: left; padding: 1.2rem; color: #64748b; text-transform: uppercase; font-size: 0.75rem; border-bottom: 2px solid #f1f5f9; } td { padding: 1.2rem; border-bottom: 1px solid #f1f5f9; font-weight: 600; } .alert { padding: 1rem; border-radius: 8px; margin-bottom: 2rem; font-size: 0.9rem; font-weight: 600; } .alert-error { background: #fee2e2; color: #991b1b; border: 1px solid #fecaca; } .alert-success { background: #dcfce7; color: #166534; border: 1px solid #bbf7d0; } </style> </head> <body> <!-- Mobile Admin Header --> <div class="mobile-admin-header"> <a href="dashboard.php" class="logo" style="font-size: 1.4rem; text-decoration:none; color:#0f172a;">CodeBy<span style="color: var(--primary);">Sycho</span></a> <div class="mobile-toggle" onclick="toggleSidebar()"> <span></span> <span></span> <span></span> </div> </div> <!-- Sidebar Overlay --> <div class="sidebar-overlay" id="sidebarOverlay" onclick="toggleSidebar()"></div> <aside class="sidebar" id="adminSidebar"> <div class="mobile-only" style="text-align: right; padding: 0 1rem 2rem 0;"> <button onclick="toggleSidebar()" style="background:none; border:none; font-size: 1.5rem; color: #64748b;"><i class="fas fa-times"></i></button> </div> <a href="dashboard.php" class="logo" style="margin-bottom: 5rem; display: block; font-size: 1.8rem; text-decoration:none; color:#0f172a;">CodeBy<span style="color: var(--primary);">Sycho</span></a> <div style="flex-grow: 1;"> <?php foreach ($sidebar_links as $link): ?> <a href="<?php echo $link['url']; ?>" class="sidebar-link <?php echo $link['active'] ? 'active' : ''; ?>"> <i class="<?php echo $link['icon']; ?>"></i> <?php echo $link['name']; ?> </a> <?php endforeach; ?> </div> <div style="border-top: 1px solid #f1f5f9; padding-top: 2rem;"> <a href="logout.php" style="color: #ef4444; font-weight: 700; text-decoration: none;"><i class="fas fa-power-off"></i> Logout</a> </div> </aside> <script> function toggleSidebar() { document.getElementById('adminSidebar').classList.toggle('active'); document.getElementById('sidebarOverlay').classList.toggle('active'); } </script> <main class="main-content"> <div style="margin-bottom: 3.5rem;"> <p style="font-size: 0.75rem; font-weight: 800; color: var(--primary); text-transform: uppercase; letter-spacing: 2px; margin-bottom: 0.5rem;">Inventory Control</p> <h1 style="font-size: 1.8rem; font-weight: 800; color: #0f172a; letter-spacing: -0.5px;">Service Inventory</h1> </div> <?php if ($error_msg): ?> <div class="alert alert-error"><i class="fas fa-exclamation-circle" style="margin-right:0.8rem"></i> <?php echo $error_msg; ?></div> <?php endif; ?> <?php if ($success_msg || isset($_GET['deleted'])): ?> <div class="alert alert-success"><i class="fas fa-check-circle" style="margin-right:0.8rem"></i> <?php echo $success_msg ?: "Service successfully purged."; ?></div> <?php endif; ?> <div class="dashboard-grid" style="display: grid; grid-template-columns: 1fr 1.5fr; gap: 2rem; align-items: start;"> <!-- Service Configuration form --> <div class="card admin-card"> <h3 style="margin-bottom: 1.5rem; font-size: 1.1rem; font-weight: 800; color: var(--text-main);">Add / Edit Service</h3> <form action="" method="POST"> <input type="hidden" name="id" id="service_id"> <div class="form-group" style="margin-bottom: 1.2rem;"> <label style="display: block; margin-bottom: 0.6rem; font-size: 0.85rem; font-weight: 700; color: #475569;">Service Name</label> <input type="text" name="name" id="service_name" required placeholder="e.g. Web Development" style="width: 100%; padding: 0.8rem; border-radius: 12px; border: 1px solid #e2e8f0; background: #f8fafc; font-size: 0.95rem;"> </div> <div class="form-group" style="margin-bottom: 1.2rem;"> <label style="display: block; margin-bottom: 0.6rem; font-size: 0.85rem; font-weight: 700; color: #475569;">Price ($)</label> <input type="number" name="price" id="service_price" required placeholder="0.00" style="width: 100%; padding: 0.8rem; border-radius: 12px; border: 1px solid #e2e8f0; background: #f8fafc; font-size: 0.95rem;"> </div> <div class="form-group" style="margin-bottom: 1.2rem;"> <label style="display: block; margin-bottom: 0.6rem; font-size: 0.85rem; font-weight: 700; color: #475569;">Features (One per line)</label> <textarea name="features" id="service_features" rows="4" placeholder="List core features..." style="width: 100%; padding: 0.8rem; border-radius: 12px; border: 1px solid #e2e8f0; background: #f8fafc; font-family: inherit; font-size: 0.95rem;"></textarea> </div> <div style="margin-bottom: 1.5rem;"> <label style="display:flex; align-items:center; gap:0.6rem; font-weight:700; font-size:0.9rem; cursor:pointer; color: #475569;"> <input type="checkbox" name="is_premium" id="service_premium" style="width:1.2rem; height:1.2rem;"> Premium Service Tier </label> </div> <button type="submit" name="save_service" class="btn-primary" style="width: 100%; padding: 1.1rem; border-radius: 15px; font-weight: 800; font-size: 1rem; box-shadow: 0 10px 20px var(--primary-glow);">Update Catalog</button> </form> </div> <!-- Inventory List --> <div class="card admin-card" style="display: flex; flex-direction: column;"> <h3 style="margin-bottom: 1.5rem; font-size: 1.1rem; font-weight: 800; color: var(--text-main);">Active Catalog</h3> <div class="scroll-container" style="max-height: 450px; overflow-y: auto; padding-right: 5px;"> <!-- Desktop Table (Hidden on Mobile) --> <table class="desktop-only-table" style="width: 100%; border-collapse: collapse;"> <thead> <tr> <th style="text-align: left; padding: 1rem; font-size: 0.75rem; color: #64748b; text-transform: uppercase;">Name</th> <th style="text-align: left; padding: 1rem; font-size: 0.75rem; color: #64748b; text-transform: uppercase;">Price</th> <th style="text-align: left; padding: 1rem; font-size: 0.75rem; color: #64748b; text-transform: uppercase;">Status</th> <th style="text-align: left; padding: 1rem; font-size: 0.75rem; color: #64748b; text-transform: uppercase;">Management</th> </tr> </thead> <tbody> <?php foreach ($services as $s): ?> <tr style="border-bottom: 1px solid #f1f5f9;"> <td style="padding: 1rem; font-weight: 700; color: var(--text-main);"><?php echo htmlspecialchars($s['name']); ?></td> <td style="padding: 1rem; font-weight: 600; color: #0f172a;">$<?php echo number_format($s['price'], 2); ?></td> <td style="padding: 1rem;"><?php echo $s['is_premium'] ? '<span style="color:var(--primary); font-weight: 700;">Premium</span>' : '<span style="color: #64748b; font-weight: 600;">Standard</span>'; ?></td> <td style="padding: 1rem;"> <div style="display: flex; gap: 0.8rem;"> <button onclick="editService(<?php echo htmlspecialchars(json_encode($s)); ?>)" style="background:none; border:none; color:var(--primary); font-weight:700; cursor:pointer;">Edit</button> <a href="?delete=<?php echo $s['id']; ?>" onclick="return confirm('Purge this service?')" style="color: #ef4444; font-weight:700; text-decoration:none;">Delete</a> </div> </td> </tr> <?php endforeach; ?> </tbody> </table> <!-- Mobile Cards View (Hidden on Desktop) --> <div class="mobile-only-list"> <?php foreach ($services as $s): ?> <div style="background: #fdfdfd; border: 1px solid #f1f5f9; border-radius: 15px; padding: 1.2rem; margin-bottom: 1rem;"> <div style="display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 0.5rem;"> <h4 style="margin: 0; font-weight: 800; color: var(--text-main); font-size: 1rem;"><?php echo htmlspecialchars($s['name']); ?></h4> <span style="font-weight: 800; color: var(--primary);">$<?php echo number_format($s['price'], 2); ?></span> </div> <div style="margin-bottom: 1rem;"> <?php if ($s['is_premium']): ?> <span style="background: var(--primary-light); color: var(--primary); padding: 0.3rem 0.6rem; border-radius: 6px; font-size: 0.7rem; font-weight: 800; text-transform: uppercase;">Premium Tier</span> <?php else: ?> <span style="background: #f1f5f9; color: #64748b; padding: 0.3rem 0.6rem; border-radius: 6px; font-size: 0.7rem; font-weight: 800; text-transform: uppercase;">Standard</span> <?php endif; ?> </div> <div style="display: flex; gap: 0.8rem; border-top: 1px solid #f1f5f9; padding-top: 1rem;"> <button onclick="editService(<?php echo htmlspecialchars(json_encode($s)); ?>)" style="flex: 1; background: var(--primary-light); color: var(--primary); border: none; padding: 0.6rem; border-radius: 8px; font-weight: 800;">Edit</button> <a href="?delete=<?php echo $s['id']; ?>" style="flex: 1; text-align: center; background: #fee2e2; color: #ef4444; text-decoration: none; padding: 0.6rem; border-radius: 8px; font-weight: 800;" onclick="return confirm('Purge this service?')">Delete</a> </div> </div> <?php endforeach; ?> </div> </div> </div> </div> </main> </div> </main> <script> function editService(service) { document.getElementById('service_id').value = service.id; document.getElementById('service_name').value = service.name; document.getElementById('service_price').value = service.price; document.getElementById('service_features').value = service.features; document.getElementById('service_premium').checked = (service.is_premium == 1); window.scrollTo({ top: 0, behavior: 'smooth' }); } </script> </body> </html>