/** * List cities */ public function action_list() { $obj = ORM::factory('Novaposhta_City'); $pg = Pagination::get($obj->count_all(false), 14); $obj = $obj->find_per_page($pg->offset, $pg->items_per_page); // Data for template $this->title = __('Новая Почта - Населенные пункты'); $this->content = View::factory('shop/backend/novaposhta/v_list', ['pg' => $pg, 'obj' => $obj, 'total_items' => $pg->total_items]); }
public function action_list() { $obj = ORM::factory('Shop_Customer'); $pg = Pagination::get($obj->count_all(false), Config::get('shop.per_page_backend')); $obj = $obj->find_per_page($pg->offset, $pg->items_per_page, true); // Data for template $this->title = __('Клиенты'); $this->content = View::factory('shop/backend/customers/v_list', ['pg' => $pg, 'obj' => $obj]); }
public function action_list() { $this->save_referer('shop_order'); $obj = ORM::factory('Shop_Order'); $pg = Pagination::get($obj->count_all(false), Config::get('shop.per_page_backend')); $obj = $obj->find_per_page($pg->offset, $pg->items_per_page, true); // Data for template $this->title = __('Заказы'); $this->content = View::factory('shop/backend/orders/v_list', ['pg' => $pg, 'obj' => $obj, 'total_items' => $pg->total_items]); }
/** * List */ private function _list($obj) { $this->title = __('publications.page_manager'); $this->save_referer(Request::get('controller')); $pag = Pagination::get($obj->count_all(false), $this->settings_mod['per_page_backend']); $total_items = $pag->total_items; $obj = $obj->offset($pag->offset)->limit($pag->items_per_page)->get_order_by('date', 'DESC')->order_by('id', 'DESC')->find_all(); $category_id = $this->request->param('id', 0); $sel_category = Tree::instance('publications_categories', $this->curr_module)->form_select('id', $category_id, [0, ''], ['class' => 'form-control']); $this->content = View::factory($this->view, ['obj' => $obj, 'sel_category' => $sel_category, 'total_items' => $total_items])->bind('pag', $pag); }
/** * List */ public function action_list() { $this->title = __('shop.category_manager'); $this->save_referer(Request::get('controller')); if ($this->settings_mod['max_nested'] > 1) { $obj = Tree::instance('shop_categories', $this->curr_module)->for_table(); $total_items = count($obj); } else { $obj = ORM::factory('Shop_Category'); $pag = Pagination::get($obj->count_all(false), $this->settings_mod['per_page_backend']); $total_items = $pag->total_items; $obj = $obj->offset($pag->offset)->limit($pag->items_per_page)->get_order_by('position', 'ASC')->find_all(); } $this->content = View::factory($this->view, ['obj' => $obj, 'total_items' => $total_items])->bind('pag', $pag); }
public static function GetRes($input) { //\De::str($input); $query = \DB::select(); $query->from('res_data'); $query->where('post_id', $input['post_id']); $query->where('bbs_type_id', $input['bbs_type_id']); $query->where('display_flag', 1); $query->limit(\Pagination::get('per_page')); $query->offset(\Pagination::get('offset')); $data = $query->execute()->as_array(); //\De::str($data); $result = @$data; return $result; }