⚝
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
/
5
/
View File Name :
blog-post.php
<!DOCTYPE html> <html lang="en"> <?php include __DIR__ . '/view/head.php'; ?> <?php require_once __DIR__ . '/sql.php'; // 获取文章 ID $id = $_GET['id'] ?? 0; // 文章基本数据 $sql = "SELECT * FROM blogs WHERE id = ?"; $stmt = $conn->prepare($sql); $stmt->bind_param("i", $id); $stmt->execute(); $data = $stmt->get_result()->fetch_assoc(); // 如果没有找到内容 if (!$data) { echo "<h2>文章不存在</h2>"; exit; } // 增加浏览次数 $conn->query("UPDATE blogs SET views = views + 1 WHERE id = $id"); ?> <body> <style> .zh{ font-family: 'Zhi Mang Xing', cursive; } </style> <?php include __DIR__ . '/view/header.php'; ?> <div class="main-wrapper"> <article class="blog-post px-3 py-5 p-md-5"> <div class="container"> <header class="blog-post-header"> <h2 class="title mb-2"> <?= htmlspecialchars($data['title']) ?> </h2> <div class="meta mb-3"> <span class="date"><?= $data['created_at'] ?></span> <span class="comment">浏览 <?= $data['views'] ?></span> </div> </header> <div class="blog-post-body"> <?php if (!empty($data['image'])): ?> <figure class="blog-banner"> <img class="img-fluid" src="<?= $data['image'] ?>" alt=""> </figure> <?php endif; ?> <p><?= nl2br($data['content']) ?></p> </div> </div> </article> <footer class="footer text-center py-2 theme-bg-dark"> <small class="copyright"> Copyright © 2025 </small> </footer> </div> <script src="assets/plugins/jquery-3.3.1.min.js"></script> <script src="assets/plugins/bootstrap/js/bootstrap.min.js"></script> </body> </html>