예제 #1
0
 function list_all($offset = 0, $limit = 10)
 {
     $catalogues = new Estatecatalogue();
     $catalogues->order_by('name', 'asc');
     $catalogues->where('parentcat_id', NULL);
     $catalogues->get_paged($offset, $limit, TRUE);
     setPagination($this->admin . 'estatecatalogues/list_all/', $catalogues->paged->total_rows, $limit, 4);
     $dis['catalogues'] = $catalogues;
     $dis['base_url'] = base_url();
     $dis['view'] = 'estatecatalogue/list_all';
     $dis['menu_active'] = 'Hình thức';
     $dis['title'] = "Danh sách các Hình thức";
     $dis['title_table'] = "Trang hiện tại:" . $catalogues->paged->current_page . '/' . $catalogues->paged->total_pages;
     $dis['nav_menu'] = array(array("type" => "add", "text" => "Thêm", "link" => "{$this->admin_url}estatecatalogues/edit/", "onclick" => ""));
     $estatesCatalogue = new Estatecatalogue();
     $estatesCatalogue->where('parentcat_id !=', 0);
     $estatesCatalogue->order_by('position');
     $estatesCatalogue->get_iterated();
     $dis['estatesCatalogue'] = $estatesCatalogue;
     $this->viewadmin($dis);
 }