JFIF ( %"1"%)+...383,7(-.- 404 Not Found
Sh3ll
OdayForums


Server : Apache/2.4.6 (CentOS) OpenSSL/1.0.2k-fips PHP/7.4.20
System : Linux st2.domain.com 3.10.0-1127.10.1.el7.x86_64 #1 SMP Wed Jun 3 14:28:03 UTC 2020 x86_64
User : apache ( 48)
PHP Version : 7.4.20
Disable Function : NONE
Directory :  /proc/self/root/var/www/html/tien-dien/code/admin/orders/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Current File : //proc/self/root/var/www/html/tien-dien/code/admin/orders/order.php
<?php
global $DB, $INFO, $print, $v_lang, $CORE;

// Set page title
$CORE->page_title = 'Chi tiết đơn hàng | ';

// Initialize variables
$id = isset($_GET['id']) ? intval($_GET['id']) : 0;

// Define order status labels
$order_statuses = array(
    0 => 'Đang xử lý',
    1 => 'Đã xác nhận',
    2 => 'Đang giao hàng',
    3 => 'Đã giao hàng',
    4 => 'Đã hủy'
);

// Get order details
if ($id > 0) {
    $query = "SELECT * FROM tb_orders WHERE order_id = '$id'";
    $result = $DB->query($query);
    if ($DB->get_num_rows() > 0) {
        $order = $DB->fetch_row($result);

        // Add 'id' key for backward compatibility with templates
        $order['id'] = $order['order_id'];

        // Get order items
        $query_items = "SELECT oi.*, p.title, p.path_img 
                        FROM tb_order_items oi 
                        LEFT JOIN tb_product p ON oi.product_id = p.id 
                        WHERE oi.order_id = '$id'";
        $result_items = $DB->query($query_items);
        $order_items = array();
        while ($item = $DB->fetch_row($result_items)) {
            $order_items[] = $item;
        }

        // Get shipping method
        $shipping_method = '';
        if ($order['shipping_method_id'] > 0) {
            $query_shipping = "SELECT * FROM tb_shipping_methods WHERE id = '{$order['shipping_method_id']}'";
            $result_shipping = $DB->query($query_shipping);
            if ($DB->get_num_rows() > 0) {
                $shipping = $DB->fetch_row($result_shipping);
                $shipping_method = $shipping['name'];
            }
        }
    } else {
        $print->refresh('?act=admin&code=orders');
        exit();
    }
} else {
    $print->refresh('?act=admin&code=orders');
    exit();
}

// Process form submission
if ($_SERVER['REQUEST_METHOD'] === 'POST' && isset($_POST['update_order'])) {
    // Get form data
    $status = intval($_POST['status']);
    $notes_admin = $DB->real_escape_string($_POST['notes_admin']);

    // Update order
    $query = "UPDATE tb_orders SET 
              status = '$status',
              notes_admin = '$notes_admin'
              WHERE order_id = '$id'";
    $DB->query($query);

    // Redirect to refresh the page
    $print->refresh('?act=admin&code=orders&type=order&id=' . $id . '&msg=updated');
    exit();
}
?>

ZeroDay Forums Mini