当前位置: 首页>>代码示例>>PHP>>正文


PHP get_exists_page_number函数代码示例

本文整理汇总了PHP中get_exists_page_number函数的典型用法代码示例。如果您正苦于以下问题:PHP get_exists_page_number函数的具体用法?PHP get_exists_page_number怎么用?PHP get_exists_page_number使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。


在下文中一共展示了get_exists_page_number函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: _list_block

 private function _list_block($type = 'accept', $action = 'view', $page = 1)
 {
     $list = array();
     $user_id = $this->session->userdata('user_id');
     $action = trim(strip_tags($action));
     $is_search = $this->input->post('search', true) !== false;
     $search = $this->input->post('search', true);
     if ($is_search) {
         $action = 'search';
         $this->session->set_userdata('friendlist_search', $search);
     }
     if ($action == 'search') {
         $search = $this->session->userdata('friendlist_search');
     }
     $order_by['date_update'] = 'DESC';
     $items_count = $this->Friendlist_model->get_list_count($user_id, $type, $search);
     $items_on_page = $this->pg_module->get_module_config('users', 'items_per_page');
     $this->load->helper('sort_order');
     $page = intval($page) < 1 ? 1 : get_exists_page_number(intval($page), $items_count, $items_on_page);
     if ($items_count) {
         $list = $this->Friendlist_model->get_list($user_id, $type, $page, $items_on_page, $order_by, $search);
     }
     $url = site_url() . "friendlist/{$this->list_methods[$type]}/{$action}/";
     $this->load->helper('navigation');
     $page_data = get_user_pages_data($url, $items_count, $items_on_page, $page, 'briefPage');
     $page_data['date_format'] = $this->pg_date->get_format('date_literal', 'st');
     $page_data['date_time_format'] = $this->pg_date->get_format('date_time_literal', 'st');
     $this->template_lite->assign('counts', $this->_get_counts());
     $this->template_lite->assign('search', $search);
     $this->template_lite->assign('page_data', $page_data);
     $this->template_lite->assign('list', $list);
     $this->template_lite->assign('type', $type);
     $this->template_lite->assign('method', $this->list_methods[$type]);
     $this->template_lite->view('friendlist');
 }
开发者ID:Calit2-UCI,项目名称:IoT_Map,代码行数:35,代码来源:friendlist.php

示例2: index

 public function index($action = 'view', $page = 1)
 {
     $list = array();
     $user_id = $this->session->userdata('user_id');
     $action = trim(strip_tags($action));
     $is_search = $this->input->post('search', true) !== false;
     $search = $this->input->post('search', true);
     if ($is_search) {
         $action = 'search';
         $this->session->set_userdata('blacklist_search', $search);
     }
     if ($action == 'search') {
         $search = $this->session->userdata('blacklist_search');
     }
     $order_by['date_add'] = 'DESC';
     $items_count = $this->Blacklist_model->get_list_count($user_id, $search);
     $items_on_page = $this->pg_module->get_module_config('users', 'items_per_page');
     $this->load->helper('sort_order');
     $page = get_exists_page_number(intval($page), $items_count, $items_on_page);
     if ($items_count) {
         $list = $this->Blacklist_model->get_list($user_id, $page, $items_on_page, $order_by, $search);
     }
     $url = site_url() . "blacklist/index/{$action}";
     $this->load->helper('navigation');
     $page_data = get_user_pages_data($url, $items_count, $items_on_page, $page, 'briefPage');
     $page_data['date_format'] = $this->pg_date->get_format('date_literal', 'st');
     $page_data['date_time_format'] = $this->pg_date->get_format('date_time_literal', 'st');
     $this->Menu_model->breadcrumbs_set_active(l('blacklist', 'blacklist'));
     $this->template_lite->assign('count', $this->Blacklist_model->get_list_count($user_id));
     $this->template_lite->assign('search', $search);
     $this->template_lite->assign('page_data', $page_data);
     $this->template_lite->assign('list', $list);
     $this->template_lite->view('list');
 }
开发者ID:Calit2-UCI,项目名称:IoT_Map,代码行数:34,代码来源:blacklist.php

示例3: my

 public function my()
 {
     if ($this->session->userdata('auth_type') != 'user') {
         log_message('error', 'banners API: Wrong auth type ("' . $this->session->userdata('auth_type') . '")');
         $this->set_api_content('errors', l('api_error_wrong_auth_type', 'banners'));
         return false;
     }
     $user_id = $this->session->userdata('user_id');
     if (!$user_id) {
         log_message('error', 'banners API: Empty user id');
         $this->set_api_content('errors', l('api_error_empty_user_id', 'banners'));
         return false;
     }
     $params['where']['user_id'] = $user_id;
     $cnt_banners = $this->Banners_model->cnt_banners($params);
     $items_on_page = 10;
     $page = $this->input->post('page', true);
     $this->load->helper('sort_order');
     $page = get_exists_page_number($page, $cnt_banners, $items_on_page);
     $banners = $this->Banners_model->get_banners($page, $items_on_page, array('id' => 'DESC'), $params);
     // get place objects for banner
     if ($banners) {
         $this->load->model('banners/models/Banner_place_model');
         foreach ($banners as $key => $banner) {
             $banners[$key]['banner_place_obj'] = $banner['banner_place_id'] ? $this->Banner_place_model->get($banner['banner_place_id']) : null;
         }
         $this->set_api_content('data', array('banners' => $banners));
     } else {
         $this->set_api_content('messages', l('api_error_empty_list', 'banners'));
     }
 }
开发者ID:Calit2-UCI,项目名称:IoT_Map,代码行数:31,代码来源:api_banners.php

示例4: my

 public function my($page = 1)
 {
     if ($this->session->userdata("auth_type") != "user") {
         show_404();
         return;
     }
     $params["where"]["user_id"] = $this->session->userdata("user_id");
     $cnt_banners = $this->Banners_model->cnt_banners($params);
     $items_on_page = $this->pg_module->get_module_config('banners', 'items_per_page');
     $this->load->helper('sort_order');
     $page = get_exists_page_number($page, $cnt_banners, $items_on_page);
     $banners = $this->Banners_model->get_banners($page, $items_on_page, array("id" => "DESC"), $params);
     // get place objects for banner
     if ($banners) {
         $this->load->model('banners/models/Banner_place_model');
         foreach ($banners as $key => $banner) {
             $banners[$key]['banner_place_obj'] = $banner['banner_place_id'] ? $this->Banner_place_model->get($banner['banner_place_id']) : null;
         }
     }
     $this->template_lite->assign('banners', $banners);
     $this->load->helper("navigation");
     $page_data = get_user_pages_data(site_url() . "banners/my/", $cnt_banners, $items_on_page, $page, 'briefPage');
     $page_data['date_format'] = $this->pg_date->get_format('date_literal', 'st');
     $this->template_lite->assign('page_data', $page_data);
     $this->Menu_model->breadcrumbs_set_active(l('header_my_banners', 'banners'), site_url() . 'users/account/banners');
     $this->template_lite->view('my_list');
 }
开发者ID:Calit2-UCI,项目名称:IoT_Map,代码行数:27,代码来源:banners.php

示例5: index

 /**
  *
  */
 function index($type_name = "all", $page = 1)
 {
     $page = intval($page) ? intval($page) : 1;
     $type_name = empty($type_name) ? "all" : $type_name;
     $moder_type_name = !empty($type_name) && $type_name != 'all' ? $type_name : "";
     $count = $this->Moderation_model->get_moderation_list_count($moder_type_name);
     $items_on_page = $this->pg_module->get_module_config('start', 'admin_items_per_page');
     $this->load->helper('sort_order');
     $page = get_exists_page_number($page, $count, $items_on_page);
     $_SESSION["mobjects_list"]["type_name"] = $type_name;
     $_SESSION["mobjects_list"]["page"] = $page;
     if ($count > 0) {
         // get tags
         $list = $this->Moderation_model->get_moderation_list($moder_type_name, $page, $items_on_page);
         $this->template_lite->assign('list', $list);
     }
     $this->load->helper("navigation");
     $page_data = get_admin_pages_data(site_url() . "admin/moderation/index/" . $type_name . "/", $count, $items_on_page, $page, 'briefPage');
     $this->template_lite->assign('page_data', $page_data);
     $this->template_lite->assign('type_name', $type_name);
     $moder_types = $this->Moderation_type_model->get_types();
     if (is_array($moder_types) && count($moder_types)) {
         foreach ($moder_types as $key => $mtype) {
             $moder_types[$key]["count"] = $this->Moderation_model->get_moderation_list_count($mtype["name"]);
         }
     }
     $this->template_lite->assign('moder_types', $moder_types);
     $this->system_messages->set_data('header', l('admin_header_moderation_managment', 'moderation'));
     $this->template_lite->view('admin_moder_list');
 }
开发者ID:Calit2-UCI,项目名称:IoT_Map,代码行数:33,代码来源:admin_moderation.php

示例6: index

 /**
  * Main page
  */
 public function index($order = "sorter", $order_direction = "ASC", $page = 1)
 {
     $current_settings = isset($_SESSION["kisses_list"]) ? $_SESSION["kisses_list"] : array();
     if (!isset($current_settings["order"])) {
         $current_settings["order"] = $order;
     }
     if (!isset($current_settings["order_direction"])) {
         $current_settings["order_direction"] = $order_direction;
     }
     if (!isset($current_settings["page"])) {
         $current_settings["page"] = $page;
     }
     $kisses_count = $this->Kisses_model->get_count();
     if (!$this->pg_module->get_module_config('kisses', 'system_settings_page')) {
         $items_on_page = $this->pg_module->get_module_config('kisses', 'admin_items_per_page');
     } else {
         $items_on_page = $this->pg_module->get_module_config('start', 'admin_items_per_page');
     }
     if (!$order) {
         $order = $current_settings["order"];
     }
     $this->template_lite->assign('order', $order);
     $current_settings["order"] = $order;
     if (!$order_direction) {
         $order_direction = $current_settings["order_direction"];
     }
     $this->template_lite->assign('order_direction', $order_direction);
     $current_settings["order_direction"] = $order_direction;
     if (!$page) {
         $page = $current_settings["page"];
     }
     $this->load->helper('sort_order');
     $page = get_exists_page_number($page, $kisses_count, $items_on_page);
     $current_settings["page"] = $page;
     $_SESSION["kisses_list"] = $current_settings;
     $sort_links = array("sorter" => site_url() . "admin/kisses/index/sorter/" . (($order != 'sorter' xor $order_direction == 'DESC') ? 'ASC' : 'DESC'), "date_created" => site_url() . "admin/kisses/index/date_created/" . (($order != 'date_created' xor $order_direction == 'DESC') ? 'ASC' : 'DESC'));
     $this->template_lite->assign('sort_links', $sort_links);
     $kisses = $this->Kisses_model->get_list($page, $items_on_page, array(), array($order => $order_direction), array());
     $mediafile = array();
     $file_url = '';
     foreach ($kisses as $media) {
         $mediafile[0] = $this->Uploads_model->format_upload($this->Kisses_model->image_upload_gid, '', $media['image']);
         /*echo '<pre>';
         		print_r($mediafile);
         		echo '</pre>';*/
         $file_url = $mediafile[0]['url'] . "kisses-";
         break;
     }
     $this->load->helper("navigation");
     $url = site_url() . "admin/kisses/index/{$order}/{$order_direction}/";
     $page_data = get_admin_pages_data($url, $kisses_count, $items_on_page, $page, 'briefPage');
     $page_data["date_format"] = $this->pg_date->get_format('date_time_literal', 'st');
     $this->template_lite->assign('page_data', $page_data);
     $this->template_lite->assign('kisses', $kisses);
     $this->template_lite->assign('file_url', $file_url);
     $this->system_messages->set_data('header', l('admin_header_kisses_list', 'kisses'));
     $this->template_lite->view('index');
 }
开发者ID:Calit2-UCI,项目名称:IoT_Map,代码行数:61,代码来源:admin_kisses.php

示例7: index

 /**
  * Memberships management
  * 
  * @param string $order sorting order 
  * @param string $order_direction order direction
  * @param integer $page page of results
  * @return void
  */
 public function index($order = null, $order_direction = null, $page = null)
 {
     $memberships_settings = isset($_SESSION['memberships']) ? $_SESSION['memberships'] : array();
     if (!isset($memberships_settings['order'])) {
         $memberships_settings['order'] = 'date_created';
     }
     if (!isset($memberships_settings['order_direction'])) {
         $memberships_settings['order_direction'] = 'DESC';
     }
     if (!isset($memberships_settings['page'])) {
         $memberships_settings['page'] = 1;
     }
     $order = strval($order);
     $order_direction = strval($order_direction);
     $page = intval($page);
     $this->load->helper('sort_order');
     $items_on_page = $this->pg_module->get_module_config('start', 'admin_items_per_page');
     $memberships_count = $this->Memberships_model->getMembershipsCount();
     $page = get_exists_page_number($page, $memberships_count, $items_on_page);
     $memberships_settings['page'] = $page;
     if (!$order) {
         $order = $memberships_settings['order'];
     }
     $this->pg_output->setOutputData('order', $order);
     $memberships_settings['order'] = $order;
     if (!$order_direction) {
         $order_direction = $memberships_settings['order_direction'];
     }
     $this->pg_output->setOutputData('order_direction', $order_direction);
     $memberships_settings['order_direction'] = $order_direction;
     $filters = array();
     $_SESSION['memberships'] = $memberships_settings;
     switch ($order) {
         case 'date_created':
             $order_array = array('id' => $order_direction);
             break;
         default:
             $order_array = array($order => $order_direction);
             break;
     }
     if ($memberships_count > 0) {
         $memberships = $this->Memberships_model->getMembershipsList($filters, $page, $items_on_page, $order_array);
         $memberships = $this->Memberships_model->formatMemberships($memberships);
         $this->pg_output->setOutputData('memberships', $memberships);
     }
     $this->load->helper('navigation');
     $page_data = get_admin_pages_data(site_url() . 'admin/memberships/index/' . $order . '/' . $order_direction . '/', $memberships_count, $items_on_page, $page, 'briefPage');
     $this->pg_output->setOutputData('page_data', $page_data);
     $this->load->library('pg_date');
     $date_format = $this->pg_date->get_format('date_time_literal', 'st');
     $this->pg_output->setOutputData('date_format', $date_format);
     $this->pg_output->setOutputHeader(l('admin_header_list', Memberships_model::MODULE_GID));
 }
开发者ID:Calit2-UCI,项目名称:IoT_Map,代码行数:61,代码来源:admin_memberships.php

示例8: index

 /**
  * Get moderator list
  * 
  * @param string $order sorting data
  * @param string $order_direction sorting direction
  * @param integer $page page of results
  * @return void
  */
 public function index($order = "nickname", $order_direction = "ASC", $page = 1)
 {
     $attrs = array();
     $current_settings = isset($_SESSION["ausers_list"]) ? $_SESSION["ausers_list"] : array();
     if (!isset($current_settings["order"])) {
         $current_settings["order"] = "nickname";
     }
     if (!isset($current_settings["order_direction"])) {
         $current_settings["order_direction"] = "ASC";
     }
     if (!isset($current_settings["page"])) {
         $current_settings["page"] = 1;
     }
     $filter_data = array("all" => $this->Moderators_model->get_users_count(), "not_active" => $this->Moderators_model->get_users_count(array("where" => array("status" => 0))), "active" => $this->Moderators_model->get_users_count(array("where" => array("status" => 1))), "admin" => $this->Moderators_model->get_users_count(array("where" => array("user_type" => 'admin'))), "moderator" => $this->Moderators_model->get_users_count(array("where" => array("user_type" => 'moderator'))));
     $filter = $attrs["where"]['user_type'] = $this->Moderators_model->user_type;
     $this->template_lite->assign('filter', $filter);
     $this->template_lite->assign('filter_data', $filter_data);
     $current_settings["page"] = $page;
     if (!$order) {
         $order = $current_settings["order"];
     }
     $this->template_lite->assign('order', $order);
     $current_settings["order"] = $order;
     if (!$order_direction) {
         $order_direction = $current_settings["order_direction"];
     }
     $this->template_lite->assign('order_direction', $order_direction);
     $current_settings["order_direction"] = $order_direction;
     $users_count = $filter_data[$filter];
     if (!$page) {
         $page = $current_settings["page"];
     }
     $items_on_page = $this->pg_module->get_module_config('start', 'admin_items_per_page');
     $this->load->helper('sort_order');
     $page = get_exists_page_number($page, $users_count, $items_on_page);
     $current_settings["page"] = $page;
     $_SESSION["ausers_list"] = $current_settings;
     $sort_links = array("name" => site_url() . "admin/moderators/index/name/" . (($order != 'name' xor $order_direction == 'DESC') ? 'ASC' : 'DESC'), "nickname" => site_url() . "admin/moderators/index/nickname/" . (($order != 'nickname' xor $order_direction == 'DESC') ? 'ASC' : 'DESC'), "email" => site_url() . "admin/moderators/index/email/" . (($order != 'email' xor $order_direction == 'DESC') ? 'ASC' : 'DESC'), "date_created" => site_url() . "admin/moderators/index/date_created/" . (($order != 'date_created' xor $order_direction == 'DESC') ? 'ASC' : 'DESC'));
     $this->template_lite->assign('sort_links', $sort_links);
     if ($users_count > 0) {
         $users = $this->Moderators_model->get_users_list($page, $items_on_page, array($order => $order_direction), $attrs);
         $this->template_lite->assign('users', $users);
     }
     $this->load->helper("navigation");
     $url = site_url() . "admin/moderators/index/" . $order . "/" . $order_direction . "/";
     $page_data = get_admin_pages_data($url, $users_count, $items_on_page, $page, 'briefPage');
     $page_data["date_format"] = $this->pg_date->get_format('date_time_literal', 'st');
     $this->template_lite->assign('page_data', $page_data);
     $this->system_messages->set_data('header', l('admin_header_moderators_list', 'moderators'));
     $this->template_lite->view('list');
 }
开发者ID:Calit2-UCI,项目名称:IoT_Map,代码行数:59,代码来源:admin_moderators.php

示例9: _get_list

 private function _get_list($type = 'accept', $action = 'view', $page = 1, $formatted = false)
 {
     $list = array();
     $action = trim(strip_tags($action));
     $order_by['date_update'] = 'DESC';
     $items_count = $this->Friendlist_model->get_list_count($this->user_id, $type);
     $items_on_page = $this->pg_module->get_module_config('users', 'items_per_page');
     $this->load->helper('sort_order');
     $page = intval($page) < 1 ? 1 : get_exists_page_number(intval($page), $items_count, $items_on_page);
     if ($items_count) {
         $list = $this->Friendlist_model->get_list($this->user_id, $type, $page, $items_on_page, $order_by, '', $formatted);
     }
     return $list;
 }
开发者ID:Calit2-UCI,项目名称:IoT_Map,代码行数:14,代码来源:api_friendlist.php

示例10: index

 public function index($order = 'date_created', $order_direction = 'DESC', $page = 1)
 {
     if (!$order) {
         $order = 'date_created';
     }
     if (!$order_direction) {
         $order_direction = 'DESC';
     }
     if (!$page) {
         $page = 1;
     }
     $page = $page < 0 ? 1 : $page;
     $page = floor($page);
     // Грузим настройки
     $current_settings = isset($_SESSION["smessages_list"]) ? $_SESSION["smessages_list"] : array();
     if (!isset($current_settings["order"])) {
         $current_settings["order"] = $order;
     }
     if (!isset($current_settings["order_direction"])) {
         $current_settings["order_direction"] = $order_direction;
     }
     if (!isset($current_settings["page"])) {
         $current_settings["page"] = $page;
     }
     $items_on_page = $this->pg_module->get_module_config('start', 'admin_items_per_page');
     $this->load->helper('sort_order');
     $messages_cnt = $this->Shoutbox_model->get_messages_cnt();
     $page = get_exists_page_number($page, $messages_cnt, $items_on_page);
     $current_settings["page"] = $page;
     // Сохраняем настройки
     $_SESSION["smessages_list"] = $current_settings;
     // Ссылки для сортировки ASC DESC
     $sort_links = array("message" => site_url() . "admin/shoutbox/index/message/" . (($order != 'message' xor $order_direction == 'DESC') ? 'ASC' : 'DESC'), "date_created" => site_url() . "admin/shoutbox/index/date_created/" . (($order != 'date_created' xor $order_direction == 'DESC') ? 'ASC' : 'DESC'));
     $this->template_lite->assign('sort_links', $sort_links);
     if ($messages_cnt > 0) {
         $messages = $this->Shoutbox_model->get_messages($page, $items_on_page, array($order => $order_direction));
         $this->load->helper("navigation");
         $url = site_url() . "admin/shoutbox/index/" . $order . "/" . $order_direction . "/";
         $pages_data = get_admin_pages_data($url, $messages_cnt, $items_on_page, $page, 'briefPage');
         $page_data["date_format"] = $this->pg_date->get_format('date_time_literal', 'st');
         $this->template_lite->assign('page_data', $pages_data);
         $this->template_lite->assign('order', $order);
         $this->template_lite->assign('order_direction', $order_direction);
         $this->template_lite->assign('page', $page);
         $this->template_lite->assign('messages', $messages);
     }
     $this->system_messages->set_data('header', l('admin_header_list', 'shoutbox'));
     $this->template_lite->view('index');
 }
开发者ID:Calit2-UCI,项目名称:IoT_Map,代码行数:49,代码来源:admin_shoutbox.php

示例11: _folder_content

 /**
  * Return folder content
  * @param string $folder folder name
  * @param string $keyword search keyword
  * @param integer $page page of results
  */
 public function _folder_content($folder, $page)
 {
     $where = array();
     $where['where']['id_user'] = $this->session->userdata('user_id');
     $where['where']['folder'] = $folder;
     $this->load->helper('sort_order');
     $items_on_page = $this->pg_module->get_module_config('mailbox', 'items_per_page');
     $mailbox_count = $this->Mailbox_model->get_messages_count($where);
     $page = get_exists_page_number($page, $mailbox_count, $items_on_page);
     $order_by = array('date_add' => 'DESC');
     $this->Mailbox_model->set_format_settings(array('get_sender' => true, 'get_recipient' => true));
     $messages = $this->Mailbox_model->get_messages($where, $page, $items_on_page, $order_by);
     $this->Mailbox_model->set_format_settings(array('get_sender' => false, 'get_recipient' => false));
     $this->set_api_content('data', $messages);
 }
开发者ID:Calit2-UCI,项目名称:IoT_Map,代码行数:21,代码来源:api_mailbox.php

示例12: index

 public function index($order = "subscribe_type", $order_direction = "DESC", $page = 1)
 {
     $this->load->model('Subscriptions_model');
     $attrs = array();
     $current_settings = isset($_SESSION["subscriptions_list"]) ? $_SESSION["subscriptions_list"] : array();
     if (!isset($current_settings["order"])) {
         $current_settings["order"] = "subscribe_type";
     }
     if (!isset($current_settings["order_direction"])) {
         $current_settings["order_direction"] = "DESC";
     }
     if (!isset($current_settings["page"])) {
         $current_settings["page"] = 1;
     }
     $current_settings["page"] = $page;
     if (!$order) {
         $order = $current_settings["order"];
     }
     $this->template_lite->assign('order', $order);
     $current_settings["order"] = $order;
     if (!$order_direction) {
         $order_direction = $current_settings["order_direction"];
     }
     $this->template_lite->assign('order_direction', $order_direction);
     $current_settings["order_direction"] = $order_direction;
     $subscriptions_count = $this->Subscriptions_model->get_subscriptions_count();
     if (!$page) {
         $page = $current_settings["page"];
     }
     $items_on_page = $this->pg_module->get_module_config('start', 'admin_items_per_page');
     $this->load->helper('sort_order');
     $page = get_exists_page_number($page, $subscriptions_count, $items_on_page);
     $current_settings["page"] = $page;
     $_SESSION["subscriptions_list"] = $current_settings;
     $sort_links = array("subscribe_type" => site_url() . "admin/subscriptions/index/subscribe_type/" . (($order != 'subscribe_type' xor $order_direction == 'DESC') ? 'ASC' : 'DESC'));
     $this->template_lite->assign('sort_links', $sort_links);
     if ($subscriptions_count > 0) {
         $subscriptions = $this->Subscriptions_model->get_subscriptions_list($page, $items_on_page, array($order => $order_direction), $attrs);
         $this->template_lite->assign('subscriptions', $subscriptions);
     }
     $this->load->helper("navigation");
     $url = site_url() . "admin/subscriptions/index/" . $order . "/" . $order_direction . "/";
     $page_data = get_admin_pages_data($url, $subscriptions_count, $items_on_page, $page, 'briefPage');
     $page_data["date_format"] = $this->pg_date->get_format('date_time_literal', 'st');
     $this->template_lite->assign('page_data', $page_data);
     $this->system_messages->set_data('header', l('admin_header_subscriptions_list', 'subscriptions'));
     $this->template_lite->view('list');
 }
开发者ID:Calit2-UCI,项目名称:IoT_Map,代码行数:48,代码来源:admin_subscriptions.php

示例13: favourites

 public function favourites()
 {
     $action = trim(strip_tags($this->input->post('action', true)));
     if (!$action) {
         $action = 'view';
     }
     $items_count = $this->Favourites_model->get_list_count($this->_user_id);
     if ($items_count) {
         $formatted = filter_input(INPUT_POST, 'formatted', FILTER_VALIDATE_BOOLEAN);
         $items_on_page = $this->pg_module->get_module_config('users', 'items_per_page');
         $this->load->helper('sort_order');
         $page = get_exists_page_number(filter_input(INPUT_POST, 'page', FILTER_VALIDATE_INT), $items_count, $items_on_page);
         $list = $this->Favourites_model->get_list($this->_user_id, $page, $items_on_page, array('date_update' => 'DESC'), '', $formatted);
     }
     $this->set_api_content('data', $list);
 }
开发者ID:Calit2-UCI,项目名称:IoT_Map,代码行数:16,代码来源:api_favourites.php

示例14: index

 public function index($order = "name", $order_direction = "ASC", $page = 1)
 {
     $attrs = array();
     $current_settings = isset($_SESSION["menu_list"]) ? $_SESSION["menu_list"] : array();
     if (!isset($current_settings["order"])) {
         $current_settings["order"] = "nickname";
     }
     if (!isset($current_settings["order_direction"])) {
         $current_settings["order_direction"] = "ASC";
     }
     if (!isset($current_settings["page"])) {
         $current_settings["page"] = 1;
     }
     $current_settings["page"] = $page;
     if (!$order) {
         $order = $current_settings["order"];
     }
     $this->template_lite->assign('order', $order);
     $current_settings["order"] = $order;
     if (!$order_direction) {
         $order_direction = $current_settings["order_direction"];
     }
     $this->template_lite->assign('order_direction', $order_direction);
     $current_settings["order_direction"] = $order_direction;
     $menu_count = $this->Menu_model->get_menus_count();
     if (!$page) {
         $page = $current_settings["page"];
     }
     $items_on_page = $this->pg_module->get_module_config('start', 'admin_items_per_page');
     $this->load->helper('sort_order');
     $page = get_exists_page_number($page, $menu_count, $items_on_page);
     $current_settings["page"] = $page;
     $_SESSION["menu_list"] = $current_settings;
     $sort_links = array("name" => site_url() . "admin/menu/index/name/" . (($order != 'name' xor $order_direction == 'DESC') ? 'ASC' : 'DESC'), "gid" => site_url() . "admin/menu/index/gid/" . (($order != 'gid' xor $order_direction == 'DESC') ? 'ASC' : 'DESC'), "date_created" => site_url() . "admin/menu/index/date_created/" . (($order != 'date_created' xor $order_direction == 'DESC') ? 'ASC' : 'DESC'));
     $this->template_lite->assign('sort_links', $sort_links);
     if ($menu_count > 0) {
         $menus = $this->Menu_model->get_menus_list($page, $items_on_page, array($order => $order_direction));
         $this->template_lite->assign('menus', $menus);
     }
     $this->load->helper("navigation");
     $url = site_url() . "admin/menu/index/" . $order . "/" . $order_direction . "/";
     $page_data = get_admin_pages_data($url, $menu_count, $items_on_page, $page, 'briefPage');
     $page_data["date_format"] = $this->pg_date->get_format('date_time_literal', 'st');
     $this->template_lite->assign('page_data', $page_data);
     $this->system_messages->set_data('header', l('admin_header_menu_list', 'menu'));
     $this->template_lite->view('list');
 }
开发者ID:Calit2-UCI,项目名称:IoT_Map,代码行数:47,代码来源:admin_menu.php

示例15: index

 public function index($page = 1)
 {
     $this->load->helper('sort_order');
     $items_on_page = $this->pg_module->get_module_config('start', 'admin_items_per_page');
     $packages_count = $this->Packages_model->get_packages_count();
     $page = get_exists_page_number($page, $packages_count, $items_on_page);
     $order_by["gid"] = "ASC";
     $packages = $this->Packages_model->get_packages_list(array(), null, $order_by, $page, $items_on_page);
     $this->template_lite->assign('packages', $packages);
     $this->load->helper("navigation");
     $page_data = get_admin_pages_data(site_url() . "admin/packages/index/", $packages_count, $items_on_page, $page, 'briefPage');
     $page_data["date_format"] = $this->pg_date->get_format('date_time_literal', 'st');
     $this->template_lite->assign('page_data', $page_data);
     $this->Menu_model->set_menu_active_item('admin_payments_menu', 'packages_menu_item');
     $this->system_messages->set_data('header', l('admin_header_packages_list', 'packages'));
     $this->template_lite->view('list_packages');
 }
开发者ID:Calit2-UCI,项目名称:IoT_Map,代码行数:17,代码来源:admin_packages.php


注:本文中的get_exists_page_number函数示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。