function listByParent($id, $offset = 0, $limit = 20) { $products = new Product(); $products->where_related_productcat('id', $id); $products->get_paged($offset, $limit, TRUE); setPagination($this->admin . 'products/listByParent/' . $id . '/', $products->paged->total_rows, $limit, 5); $dis['base_url'] = base_url(); $dis['title_table'] = "Trang hiện tại:" . $products->paged->current_page . '/' . $products->paged->total_pages; $dis['products'] = $products; $dis['view'] = 'products/list'; $dis['menu_active'] = "Sản phẩm"; $dis['searchKey'] = ""; $dis['title'] = ""; $dis['nav_menu'] = array(array("type" => "add", "text" => "Thêm", "link" => "{$this->admin_url}products/edit/0/" . $id, "onclick" => "")); $this->viewadmin($dis); }