⚝
One Hat Cyber Team
⚝
Your IP:
216.73.216.124
Server IP:
50.28.103.30
Server:
Linux host.jcukjv-lwsites.com 4.18.0-553.22.1.el8_10.x86_64 #1 SMP Tue Sep 24 05:16:59 EDT 2024 x86_64
Server Software:
nginx/1.28.0
PHP Version:
8.3.12
Buat File
|
Buat Folder
Eksekusi
Dir :
~
/
www
/
wwwroot
/
china-democracyparty.com
/
2
/
admin
/
Edit File: posts.php
0){ $stmt = $conn->prepare("UPDATE posts SET title=?, slug=?, excerpt=?, content=?, is_published=? WHERE id=?"); $stmt->bind_param("ssssii", $title, $slug, $excerpt, $content, $published, $id); $stmt->execute(); $stmt->close(); } else { $stmt = $conn->prepare("INSERT INTO posts(title, slug, excerpt, content, is_published) VALUES(?,?,?,?,?)"); $stmt->bind_param("ssssi", $title, $slug, $excerpt, $content, $published); $stmt->execute(); $stmt->close(); } header("Location: /admin/posts.php"); exit; } // Handle delete if(isset($_GET['delete'])){ $id = intval($_GET['delete']); $conn->query("DELETE FROM posts WHERE id={$id}"); header("Location: /admin/posts.php"); exit; } // Load list / edit $edit = null; if(isset($_GET['id'])){ $id = intval($_GET['id']); $res = $conn->query("SELECT * FROM posts WHERE id={$id} LIMIT 1"); $edit = $res->fetch_assoc(); } $posts = $conn->query("SELECT id,title,slug,is_published,created_at FROM posts ORDER BY created_at DESC"); $page_title = '管理文章'; include __DIR__ . '/../includes/header.php'; ?>
文章列表
ID
标题
Slug
发布
操作
fetch_assoc()): ?>
编辑
删除
标题
Slug(URL)
摘要
内容(支持 HTML)
>
发布
保存
Simpan