403Webshell
Server IP : 43.241.58.20  /  Your IP : 216.73.216.25
Web Server : Apache/2
System : Linux ns1-1556229.dragonhispeed.com 3.16.0 #1 SMP Fri Mar 29 22:50:14 MSK 2024 x86_64
User : ratsitne ( 1130)
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/ratsitne/.trash/files/admin.1/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /home/ratsitne/.trash/files/admin.1/category-add.php
<?php
include '../config.php';
include 'auth.php';
$page_title = 'เพิ่มหมวดหมู่';
ob_start();

if ($_SERVER['REQUEST_METHOD'] == 'POST') {
    $category_name = $_POST['category_name'];
    $created_at = date('Y-m-d H:i:s');

    $query = "INSERT INTO categories (category_name, created_at) VALUES ('$category_name', '$created_at')";
    if (mysqli_query($conn, $query)) {
        $_SESSION['success_message'] = 'เพิ่มข้อมูลหมวดหมู่เรียบร้อยแล้ว';
    } else {
        $_SESSION['error_message'] = 'เกิดข้อผิดพลาด: ' . mysqli_error($conn);
    }
    header('Location: ' . $admin_url . '/category-list.php');
    exit;
}
?>
<form method="POST">
    <div class="card">
        <div class="card-header">
            <h3 class="card-title">เพิ่มหมวดหมู่</h3>
        </div>
        <div class="card-body">
            <?php if (isset($_SESSION['error_message'])): ?>
                <div class="alert alert-danger alert-dismissible fade show">
                    <button type="button" class="btn-close" data-bs-dismiss="alert" aria-label="Close"></button>
                    <i class="bi bi-exclamation-triangle me-1"></i>
                    <?php echo $_SESSION['error_message']; unset($_SESSION['error_message']); ?>
                </div>
            <?php endif; ?>

            <div class="form-group">
                <label for="category_name">ชื่อหมวดหมู่</label>
                <input type="text" name="category_name" id="category_name" class="form-control" required>
            </div>
        </div>
        <div class="card-footer">
            <button type="submit" class="btn btn-primary"><i class="bi bi-floppy me-1"></i>บันทึกข้อมูล</button>
            <a href="<?php echo $admin_url . '/category-list.php'; ?>" class='btn btn-secondary'>ย้อนกลับ</a>
        </div>
    </div>
</form>
<?php
$content = ob_get_clean();
$js_script = '';
include 'template_master.php';
?>

Youez - 2016 - github.com/yon3zu
LinuXploit