<?php
class Order extends CI_Controller {
    public function __construct() {
        parent::__construct();
        $this->load->model('order_model');
    }

    public function index() {
        $this->load->view('order/index');
    }

    public function search() {
        $order_id = $this->input->get_post('orderId');
        $order_array = $this->order_model->get_order_by_id($order_id);
        $order_in_ht_array = $this->order_model->get_order_by_id_in_ht($order_id);
        $data['online'] = $order_array;
        $data['ht'] = $order_in_ht_array;
        $data['order_id'] = $order_id;
        $this->load->view('order/detail', $data);
    }
}
