Example #1
0
 function list_by_parent($id, $offset = 0, $limit = 20)
 {
     $catalogue = new Landcategory($id);
     $lands = new Land();
     $lands->where('landcategory_id', $id);
     $lands->order_by('name', 'asc');
     $lands->get_paged($offset, $limit, TRUE);
     setPagination($this->admin . 'estatetypes/list_by_parent/', $lands->paged->total_rows, $limit, 5);
     $dis['types'] = $lands;
     $dis['catalogue'] = $catalogue;
     $dis['base_url'] = base_url();
     $dis['view'] = 'land/list_by_parent';
     $dis['menu_active'] = 'Danh mục nhà đất';
     $dis['title'] = "Danh sách các loại thuộc <span style='color:#F00;'>" . $catalogue->name . '</span>';
     $dis['title_table'] = "Trang hiện tại:" . $lands->paged->current_page . '/' . $lands->paged->total_pages;
     $dis['nav_menu'] = array(array("type" => "back", "text" => "Quay về", "link" => "{$this->admin_url}estatecatalogues/list_all/", "onclick" => ""), array("type" => "add", "text" => "Thêm", "link" => "{$this->admin_url}lands/edit_by_parent/" . $catalogue->id, "onclick" => ""));
     $this->viewadmin($dis);
 }