ÿØÿà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_tpl.php
<?php
global $DB, $INFO, $print, $v_lang, $CORE;

// Check if required variables are defined
if (!isset($order) || !isset($order_items) || !isset($order_statuses) || !isset($shipping_method)) {
    // Redirect to orders list if variables are not defined
    $print->refresh('?act=admin&code=orders');
    exit();
}
?>
<section class="content">
<div class="container-fluid">
    <div class="row">
        <div class="col-12">
            <ol class="breadcrumb">
                <li class="breadcrumb-item"><a href="?act=admin&code=home">Trang chá»§</a></li>
                <li class="breadcrumb-item"><a href="?act=admin&code=orders">ÄÆ¡n hàng</a></li>
                <li class="breadcrumb-item active">Chi tiết đơn hàng #<?php echo $order['id']; ?></li>
            </ol>

            <?php if (isset($_GET['msg']) && $_GET['msg'] == 'updated'): ?>
            <div class="alert alert-success">
                Cập nhật đơn hàng thành công!
            </div>
            <?php endif; ?>

            <div class="row">
                <div class="col-md-8">
                    <!-- Order Details -->
                    <div class="card">
                        <div class="card-header">
                            <h3 class="card-title">Chi tiết đơn hàng #<?php echo $order['id']; ?></h3>
                        </div>
                        <div class="card-body">
                            <div class="row">
                                <div class="col-md-6">
                                    <h5>Thông tin khách hàng</h5>
                                    <p><strong>HỠtên:</strong> <?php echo $order['fullname']; ?></p>
                                    <p><strong>Email:</strong> <?php echo $order['email']; ?></p>
                                    <p><strong>Äiện thoại:</strong> <?php echo $order['phone']; ?></p>
                                    <p><strong>Äịa chỉ:</strong> <?php echo $order['address']; ?></p>
                                    <p><strong>Thành phố:</strong> <?php echo $order['city']; ?></p>
                                </div>
                                <div class="col-md-6">
                                    <h5>Thông tin đơn hàng</h5>
                                    <p><strong>Mã đơn hàng:</strong> #<?php echo $order['id']; ?></p>
                                    <p><strong>Ngày đặt:</strong> <?php echo date('d/m/Y H:i', strtotime($order['order_date'])); ?></p>
                                    <p><strong>Phương thức thanh toán:</strong> 
                                        <?php 
                                        if ($order['payment_method'] == 'cod') {
                                            echo 'Thanh toán khi nhận hàng';
                                        } elseif ($order['payment_method'] == 'bank') {
                                            echo 'Chuyển khoản ngân hàng';
                                        } else {
                                            echo $order['payment_method'];
                                        }
                                        ?>
                                    </p>
                                    <p><strong>Phương thức vận chuyển:</strong> <?php echo $shipping_method; ?></p>
                                    <p><strong>Phí vận chuyển:</strong> <?php echo number_format($order['shipping_cost']); ?> VNÄ</p>
                                    <p><strong>Trạng thái:</strong> 
                                        <?php 
                                        $status_class = '';
                                        switch($order['status']) {
                                            case 0: $status_class = 'badge-warning'; break; // Äang xá»­ lý
                                            case 1: $status_class = 'badge-info'; break;    // Äã xác nhận
                                            case 2: $status_class = 'badge-primary'; break; // Äang giao hàng
                                            case 3: $status_class = 'badge-success'; break; // Äã giao hàng
                                            case 4: $status_class = 'badge-danger'; break;  // Äã há»§y
                                        }
                                        ?>
                                        <span class="badge <?php echo $status_class; ?>">
                                            <?php echo $order_statuses[$order['status']]; ?>
                                        </span>
                                    </p>
                                </div>
                            </div>

                            <hr>

                            <h5>Ghi chú của khách hàng</h5>
                            <p><?php echo !empty($order['notes']) ? nl2br($order['notes']) : 'Không có ghi chú'; ?></p>

                            <hr>

                            <h5>Sản phẩm đã đặt</h5>
                            <div class="table-responsive">
                                <table class="table table-bordered">
                                    <thead>
                                        <tr>
                                            <th style="width: 100px">Hình ảnh</th>
                                            <th>Sản phẩm</th>
                                            <th style="width: 100px">Giá</th>
                                            <th style="width: 80px">Số lượng</th>
                                            <th style="width: 120px">Thành tiá»n</th>
                                        </tr>
                                    </thead>
                                    <tbody>
                                        <?php 
                                        $subtotal = 0;
                                        foreach ($order_items as $item): 
                                            $item_total = $item['price'] * $item['quantity'];
                                            $subtotal += $item_total;
                                        ?>
                                        <tr>
                                            <td>
                                                <?php if (!empty($item['path_img'])): ?>
                                                <img src="<?php echo $item['path_img']; ?>" alt="<?php echo $item['title']; ?>" style="max-width: 80px; max-height: 80px;">
                                                <?php else: ?>
                                                <img src="upload/products/no-image.jpg" alt="No Image" style="max-width: 80px; max-height: 80px;">
                                                <?php endif; ?>
                                            </td>
                                            <td>
                                                <a href="?act=admin&code=product&type=product&id=<?php echo $item['product_id']; ?>" target="_blank">
                                                    <?php echo $item['title']; ?>
                                                </a>
                                            </td>
                                            <td><?php echo number_format($item['price']); ?> VNÄ</td>
                                            <td><?php echo $item['quantity']; ?></td>
                                            <td><?php echo number_format($item_total); ?> VNÄ</td>
                                        </tr>
                                        <?php endforeach; ?>
                                    </tbody>
                                    <tfoot>
                                        <tr>
                                            <th colspan="4" class="text-right">Tạm tính:</th>
                                            <th><?php echo number_format($subtotal); ?> VNÄ</th>
                                        </tr>
                                        <tr>
                                            <th colspan="4" class="text-right">Phí vận chuyển:</th>
                                            <th><?php echo number_format($order['shipping_cost']); ?> VNÄ</th>
                                        </tr>
                                        <tr>
                                            <th colspan="4" class="text-right">Tổng cộng:</th>
                                            <th><?php echo number_format($order['total']); ?> VNÄ</th>
                                        </tr>
                                    </tfoot>
                                </table>
                            </div>
                        </div>
                    </div>
                </div>

                <div class="col-md-4">
                    <!-- Order Actions -->
                    <div class="card">
                        <div class="card-header">
                            <h3 class="card-title">Cập nhật đơn hàng</h3>
                        </div>
                        <div class="card-body">
                            <form method="post" action="">
                                <div class="form-group">
                                    <label for="status">Trạng thái đơn hàng</label>
                                    <select class="form-control" id="status" name="status">
                                        <?php foreach ($order_statuses as $key => $value): ?>
                                        <option value="<?php echo $key; ?>" <?php echo ($order['status'] == $key) ? 'selected' : ''; ?>><?php echo $value; ?></option>
                                        <?php endforeach; ?>
                                    </select>
                                </div>
                                <div class="form-group">
                                    <label for="notes_admin">Ghi chú của admin</label>
                                    <textarea class="form-control" id="notes_admin" name="notes_admin" rows="5"><?php echo isset($order['notes_admin']) ? $order['notes_admin'] : ''; ?></textarea>
                                </div>
                                <div class="form-group">
                                    <button type="submit" name="update_order" class="btn btn-primary">Cập nhật đơn hàng</button>
                                    <a href="?act=admin&code=orders" class="btn btn-default">Quay lại</a>
                                </div>
                            </form>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>
</div>
</section>

ZeroDay Forums Mini