Exemplo n.º 1
0
 function input()
 {
     //load header
     $header = new header();
     $header->admin('Thêm m?i s?n ph?m');
     $data['manufacturer'] = $this->db->select('*')->from('product_manufacturer')->get()->result_array();
     $data['brand'] = $this->db->select('*')->from('product_brand')->get()->result_array();
     $data['cate'] = $this->db->select('*')->from('product_category')->get()->result_array();
     $this->load->view('/admin/product/input', $data);
 }
Exemplo n.º 2
0
 function index()
 {
     $this->load->model('log_model');
     $id_u = $this->log_model->getId();
     $user = $this->db->select('*')->from('user')->where('id_u', $id_u)->get()->result_array();
     foreach ($user as $val) {
     }
     $title = 'Danh sách tài khoản mail của  ' . $val['name'];
     //load header
     $header = new header();
     $header->admin($title);
     $data['mail'] = $this->db->select('*')->from('mail')->where('id_u', $id_u)->get()->result_array();
     $this->load->view('/mail/index', $data);
 }
Exemplo n.º 3
0
 function order($offset = 0)
 {
     $post = $this->input->post();
     $limit = 10;
     //new model
     $this->load->model('admin_model');
     //load header
     $header = new header();
     $header->admin('Quản trị đơn hàng');
     //asign model value
     $result = $this->admin_model->order($limit, $offset);
     // pagination
     $this->load->library('pagination');
     $config = array();
     $config['base_url'] = site_url("/admin/order/");
     $config['total_rows'] = count($result);
     $config['per_page'] = $limit;
     $config['uri_segment'] = 5;
     $this->pagination->initialize($config);
     $data['pagination'] = $this->pagination->create_links();
     //asign view value
     $data['order_stat'] = $this->db->select('*')->from('order_status')->get()->result_array();
     $data['order'] = $result;
     $data['total_rows'] = count($result);
     $data['user'] = $this->db->select('*')->from('order_info')->get()->result_array();
     $this->load->view('/admin/order/index', $data);
 }