當前位置: 首頁>>代碼示例>>PHP>>正文


PHP multipage函數代碼示例

本文整理匯總了PHP中multipage函數的典型用法代碼示例。如果您正苦於以下問題:PHP multipage函數的具體用法?PHP multipage怎麽用?PHP multipage使用的例子?那麽, 這裏精選的函數代碼示例或許可以為您提供幫助。


在下文中一共展示了multipage函數的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: index

 public function index($subject_category_id = 0)
 {
     if (!$this->check_power('subject_category_list, subject_category_manage')) {
         return;
     }
     $subject_category_id = intval($subject_category_id);
     $subject_category_id && ($subject_category = SubjectCategoryModel::get_subject_category($subject_category_id));
     if (empty($subject_category)) {
         message('學科分類不存在');
     }
     $param = array();
     $page = intval($this->input->get('page'));
     $per_page = intval($this->input->get('per_page'));
     $page = $page ? $page : 1;
     $page = 0;
     $per_page = $per_page ? $per_page : 20;
     $query = array('subject_category_id' => $subject_category_id);
     $order_by = 'ctime asc';
     $select_what = '*';
     $list = SubjectCategoryModel::get_method_tactic_list($query, $page, $per_page, $order_by, $select_what);
     foreach ($list as &$row) {
         $row['has_relate_info'] = $this->_has_relate_info($row['id']);
     }
     $data['subject_category'] = $subject_category;
     $data['subject_category_id'] = $subject_category_id;
     $data['list'] = $list;
     $data['priv_manage'] = $this->check_power('subject_category_manage', FALSE);
     $data['priv_delete'] = $this->check_power('subject_category_delete', FALSE);
     // 分頁
     $purl = site_url('admin/method_tactic/index/' . $subject_category_id . '/') . (count($param) ? '?' . implode('&', $param) : '');
     $total = SubjectCategoryModel::count_method_tactic_lists($query);
     $data['pagination'] = multipage($total, $per_page, $page, $purl);
     // 模版
     $this->load->view('method_tactic/index', $data);
 }
開發者ID:Vincent-Shen,項目名稱:origin,代碼行數:35,代碼來源:method_tactic.php

示例2: site_story_list

function site_story_list()
{
    global $story_process;
    $page = max(1, MooGetGPC('page', 'integer'));
    $limit = 15;
    $offset = ($page - 1) * $limit;
    $state = MooGetGPC('state', 'integer', 'G') ? MooGetGPC('state', 'integer', 'G') : 1;
    $where = " WHERE `state` = " . $state;
    $sql = "SELECT COUNT(*) num FROM {$GLOBALS['dbTablePre']}story {$where}";
    $total = $GLOBALS['_MooClass']['MooMySQL']->getOne($sql);
    $sql = "SELECT * FROM {$GLOBALS['dbTablePre']}story {$where} ORDER BY `sid` DESC LIMIT {$offset},{$limit}";
    $ret_list = $GLOBALS['_MooClass']['MooMySQL']->getAll($sql);
    //最上麵一條 可上移
    if ($page != 1) {
        $upable = 1;
        $preoffset = $offset - 1;
        $sql = "SELECT `sid` FROM {$GLOBALS['dbTablePre']}story {$where} ORDER BY `sid` DESC LIMIT {$preoffset},1";
        $pre_ret = $GLOBALS['_MooClass']['MooMySQL']->getOne($sql);
    }
    //最下麵一條 可下移
    if ($page != ceil($total['num'] / $limit)) {
        $downable = 1;
        $nextoffset = $offset + $limit;
        $sql = "SELECT `sid` FROM {$GLOBALS['dbTablePre']}story {$where} ORDER BY `sid` DESC LIMIT {$nextoffset},1";
        $next_ret = $GLOBALS['_MooClass']['MooMySQL']->getOne($sql);
    }
    $currenturl = "index.php?action=site_story&h=list&state=" . $state;
    $pages = multipage($total['num'], $limit, $page, $currenturl);
    //note 插入日誌
    serverlog(1, $GLOBALS['dbTablePre'] . 'story', '查看成功故事列表', $GLOBALS['adminid']);
    require adminTemplate('site_story_list');
}
開發者ID:noikiy,項目名稱:zays,代碼行數:32,代碼來源:site_story.php

示例3: site_loveclinic_list

function site_loveclinic_list()
{
    $page = max(1, MooGetGPC('page', 'integer'));
    $limit = 15;
    $offset = ($page - 1) * $limit;
    $type = MooGetGPC('type', 'integer', 'G') ? MooGetGPC('type', 'integer', 'G') : 1;
    $where = " WHERE sid > '0' and type = " . $type;
    $sql = "SELECT COUNT(*) num FROM {$GLOBALS['dbTablePre']}love_clinic {$where}";
    $total = $GLOBALS['_MooClass']['MooMySQL']->getOne($sql);
    $sql = "SELECT * FROM {$GLOBALS['dbTablePre']}love_clinic {$where} ORDER BY sort DESC LIMIT {$offset},{$limit}";
    $ret_list = $GLOBALS['_MooClass']['MooMySQL']->getAll($sql);
    //最上麵一條 可上移
    if ($page != 1) {
        $upable = 1;
        $preoffset = $offset - 1;
        $sql = "SELECT id,sort FROM {$GLOBALS['dbTablePre']}love_clinic {$where} ORDER BY sort DESC LIMIT {$preoffset},1";
        $pre_ret = $GLOBALS['_MooClass']['MooMySQL']->getOne($sql);
    }
    //最下麵一條 可下移
    if ($page != ceil($total['num'] / $limit)) {
        $downable = 1;
        $nextoffset = $offset + $limit;
        $sql = "SELECT id,sort FROM {$GLOBALS['dbTablePre']}love_clinic {$where} ORDER BY sort DESC LIMIT {$nextoffset},1";
        $next_ret = $GLOBALS['_MooClass']['MooMySQL']->getOne($sql);
    }
    $currenturl = "index.php?action=site_loveclinic&h=list&type=" . $type;
    $pages = multipage($total['num'], $limit, $page, $currenturl);
    //note 插入日誌
    serverlog(1, $GLOBALS['dbTablePre'] . 'love_clinic', '查看情感問題列表', $GLOBALS['adminid']);
    require adminTemplate('site_loveclinic_list');
}
開發者ID:noikiy,項目名稱:zays,代碼行數:31,代碼來源:site_loveclinic.php

示例4: transfer_list

function transfer_list()
{
    $page = max(1, MooGetGPC('page', 'integer', 'G'));
    $limit = 16;
    $offset = ($page - 1) * $limit;
    $uid = MooGetGPC('uid', 'integer', 'P');
    $sid = MooGetGPC('sid', 'integer', 'P');
    $s_str = $and = '';
    if ($uid > 0) {
        $s_str .= 'uid like \'%' . $uid . '%\'';
        $and = ' AND ';
    }
    if ($sid > 0) {
        $s_str .= $and . 'sid=' . $sid;
    }
    if (!empty($s_str)) {
        $s_str = ' WHERE ' . $s_str;
    }
    $sql = "SELECT * FROM {$GLOBALS['dbTablePre']}members_transfer {$s_str} ORDER BY id DESC LIMIT {$offset},{$limit}";
    $transfer = $GLOBALS['_MooClass']['MooMySQL']->getAll($sql);
    $total = getcount('members_transfer', $s_str);
    $currenturl = "index.php?action=other_members_transfer&h=list";
    $pages = multipage($total, $limit, $page, $currenturl);
    require_once adminTemplate('transfer_list');
}
開發者ID:noikiy,項目名稱:zays,代碼行數:25,代碼來源:other_members_transfer.php

示例5: index

 public function index()
 {
     if (!$this->check_power('subject_category_list, subject_category_manage')) {
         return;
     }
     $param = array();
     $page = intval($this->input->get('page'));
     $per_page = intval($this->input->get('per_page'));
     $page = $page ? $page : 1;
     $page = 0;
     $per_page = $per_page ? $per_page : 20;
     $query = array();
     $order_by = 'ctime asc';
     $select_what = '*';
     $list = SubjectCategoryModel::get_subject_category_list($query, $page, $per_page, $order_by, $select_what);
     foreach ($list as $k => &$row) {
         $subjects = SubjectCategoryModel::get_subject_category_subjects($row['id'], true);
         $tmp_subject = array();
         foreach ($subjects as $subject) {
             $tmp_subject[] = $subject['subject_name'];
         }
         $row['subject'] = trim(implode('、', $tmp_subject), '、');
         $row['has_relate_info'] = $this->_has_relate_info($row['id']);
     }
     $data['list'] = $list;
     $data['priv_manage'] = $this->check_power('subject_category_manage', FALSE);
     $data['priv_delete'] = $this->check_power('subject_category_delete', FALSE);
     // 分頁
     $purl = site_url('admin/subject_category/index/') . (count($param) ? '?' . implode('&', $param) : '');
     $total = SubjectCategoryModel::count_subject_category_lists($query);
     $data['pagination'] = multipage($total, $per_page, $page, $purl);
     // 模版
     $this->load->view('subject_category/index', $data);
 }
開發者ID:Vincent-Shen,項目名稱:origin,代碼行數:34,代碼來源:subject_category.php

示例6: index

 public function index()
 {
     $param['pr_subjectid'] = self::$pr_subjectid;
     $param['knowledge_name'] = trim($this->input->get('knowledge_name'));
     $param['pr_knowledgeid'] = implode(',', $this->input->get('pr_knowledgeid'));
     $size = C('default_perpage_num');
     $page = isset($_GET['page']) && intval($_GET['page']) > 1 ? intval($_GET['page']) : 1;
     $offset = ($page - 1) * $size;
     $total = ProfessionRelatedModel::professionRelatedListCount($param);
     if ($total) {
         $data['list'] = ProfessionRelatedModel::professionRelatedList($param, $page, $size);
         $profession_ids = array();
         foreach ($data['list'] as &$item) {
             $item['pr_professionid'] = json_decode($item['pr_professionid'], true);
             $profession_ids = array_merge($profession_ids, $item['pr_professionid']);
         }
         $profession_id_str = implode(',', array_unique($profession_ids));
         $data['profession'] = ProfessionModel::professionInfo($profession_id_str);
     }
     // 分頁
     $purl = site_url('admin/vocational_aptitude/index/') . ($param ? '?' . implode('&', $param) : '');
     $data['pagination'] = multipage($total, $size, $page, $purl);
     $data['search'] = $param;
     $data['priv_edit'] = $this->check_power_new('vocational_aptitude_edit', FALSE);
     $data['priv_delete'] = $this->check_power_new('vocational_aptitude_remove', FALSE);
     $this->load->view('vocational_aptitude/index', $data);
 }
開發者ID:Vincent-Shen,項目名稱:origin,代碼行數:27,代碼來源:vocational_aptitude.php

示例7: lib_arcpagelist

/**
 *
 * @version        $Id: arcpagelist.lib.php 1 9:29 2010年7月6日Z tianya $
 * @package        DedeCMS.Taglib
 * @copyright      Copyright (c) 2007 - 2010, DesDev, Inc.
 * @license        http://help.dedecms.com/usersguide/license.html
 * @link           http://www.dedecms.com
 */
function lib_arcpagelist(&$ctag, &$refObj)
{
    global $dsql;
    $attlist = "tagid|,style|1";
    FillAttsDefault($ctag->CAttribute->Items, $attlist);
    extract($ctag->CAttribute->Items, EXTR_SKIP);
    $row = $dsql->GetOne("SELECT * FROM #@__arcmulti WHERE tagid='{$tagid}'");
    if (is_array($row)) {
        $ids = explode(',', $row['arcids']);
        $totalnum = count($ids);
        $pagestr = '<div id="page_' . $tagid . '">';
        if ($row['pagesize'] < $totalnum) {
            $pagestr .= multipage($totalnum, 1, $row['pagesize'], $tagid);
        } else {
            $pagestr .= '共1頁';
        }
        $pagestr .= '</div>';
        return $pagestr;
    } else {
        $pagestr = '<div id="page_' . $tagid . '">';
        $pagestr .= '沒有檢索到對應分頁';
        $pagestr .= '</div>';
        return $pagestr;
    }
}
開發者ID:hensonvip,項目名稱:ymroad,代碼行數:33,代碼來源:arcpagelist.lib.php

示例8: cooperation_search

function cooperation_search()
{
    $page = max(1, MooGetGPC('page', 'integer', 'G'));
    $limit = 20;
    $offset = ($page - 1) * $limit;
    $where = array();
    $where['sid'] = MooGetGPC('sid', 'integer', 'P');
    $where['activities'] = MooGetGPC('activities', 'string', 'P');
    $where['cooperation'] = MooGetGPC('cooperation', 'integer', 'P');
    if (!empty($where)) {
        foreach ($where as $key => $value) {
            if (!empty($value)) {
                $where[$key] = '`' . $key . '`=\'' . $value . '\'';
            } else {
                unset($where[$key]);
            }
        }
    }
    $where = empty($where) ? '' : 'where ' . implode(' and ', $where);
    $count = $GLOBALS['_MooClass']['MooMySQL']->getOne('SELECT COUNT(`id`) AS num FROM ' . $GLOBALS['dbTablePre'] . 'cooperation ' . $where);
    $data = $GLOBALS['_MooClass']['MooMySQL']->getAll('SELECT * FROM ' . $GLOBALS['dbTablePre'] . 'cooperation ' . $where . ' ORDER BY id DESC LIMIT  ' . $offset . ',' . $limit);
    $currenturl = 'http://' . $_SERVER['SERVER_NAME'] . ':' . $_SERVER["SERVER_PORT"] . $_SERVER["REQUEST_URI"];
    $currenturl2 = preg_replace("/(&page=\\d+)/", "", $currenturl);
    $total['num'] = isset($total['num']) && $total['num'] ? $total['num'] : 0;
    $pages = multipage($total['num'], $limit, $page, $currenturl);
    $page_num = ceil($total['num'] / $limit);
    $cooperation_config = $GLOBALS['cooperation_config'];
    $activities = $GLOBALS['activities'];
    $activitie = MooGetGPC('activities', 'string', 'P');
    $sids = MooGetGPC('sid', 'integer', 'P');
    serverlog(1, $GLOBALS['dbTablePre'] . 'cooperation', "{$GLOBALS['username']}查看誌願者合作列表", $GLOBALS['adminid']);
    require adminTemplate('active_cooperation_list');
    exit;
}
開發者ID:noikiy,項目名稱:zays,代碼行數:34,代碼來源:active_cooperation.php

示例9: index

 /**
  * 列表頁麵
  *
  * @return void
  */
 public function index()
 {
     /** 搜索 */
     $search = array();
     $search['status != '] = '-1';
     $get = $this->input->get();
     if (!empty($get['begin_time'])) {
         $search['create_time >='] = strtotime($get['begin_time'] . "00:00:00");
     }
     if (!empty($get['end_time'])) {
         $search['create_time <='] = strtotime($get['end_time'] . "23:59:59");
     }
     if (!empty($get['keyword'])) {
         $search['title like'] = '%' . trim($get['keyword']) . '%';
     }
     $data = array();
     /** 分頁連接 */
     $total = EvaluationStandardModel::get_count(array('status != ' => '-1'));
     $current_page = isset($_GET['page']) && intval($_GET['page']) > 1 ? intval($_GET['page']) : 1;
     $per_page = 15;
     $purl = current_url();
     $data['pagination'] = multipage($total['count'], 15, $current_page, $purl);
     /** 獲取數據 */
     $limit = $per_page * ($current_page - 1) . ',' . $per_page;
     $data['list'] = EvaluationStandardModel::get_multiterm($search, '*', $limit);
     $data['search'] = $get;
     $this->load->view('interview/evaluation_standard_index', $data);
 }
開發者ID:Vincent-Shen,項目名稱:origin,代碼行數:33,代碼來源:evaluation_standard.php

示例10: index

 public function index($exam_pid = 0)
 {
     if (!$exam_pid) {
         message('請指定考試期次!');
     }
     $exam = ExamModel::get_exam_by_id($exam_pid);
     if (!$exam) {
         message('考試期次不存在!');
     }
     $data = array();
     $cond_param['exam_pid'] = $exam_pid;
     $cond_param['ct_name'] = trim($this->input->get('ct_name'));
     $cond_param['stu_name'] = trim($this->input->get('stu_name'));
     $cond_param['subject_id'] = intval($this->input->get('subject_id'));
     $page = intval($this->input->get('page'));
     $page = $page ? $page : 1;
     $perpage = C('default_perpage_num');
     $total = TeacherStudentModel::teacherStudentListCount($cond_param);
     if ($total) {
         $data['list'] = TeacherStudentModel::teacherStudentList('*', $cond_param, $page, $perpage);
     }
     $purl = site_url('admin/teacher_student/index/' . $exam_pid) . ($cond_param ? '?' . implode('&', $cond_param) : '');
     $data['pagination'] = multipage($total, $perpage, $page, $purl);
     $data['search'] = $cond_param;
     $data['exam'] = $exam;
     $data['subject'] = C('subject');
     $this->load->view('teacher_student/index', $data);
 }
開發者ID:Vincent-Shen,項目名稱:origin,代碼行數:28,代碼來源:teacher_student.php

示例11: index

 /**
  * ription 角色列表
  *
  * @author
  *
  * @final
  *
  * @param int $trash
  *            是否回收站
  * @param int $group_id
  */
 public function index()
 {
     if (!$this->check_power('role_manage')) {
         return;
     }
     // 查詢條件
     $where = array();
     $param = array();
     $search = array();
     $trash = intval($this->input->get('trash'));
     $search['trash'] = $trash;
     if ($trash) {
         $where[] = "is_delete=1";
         $param[] = "trash=1";
     }
     if ($search['group_id'] = intval($this->input->get('group_id'))) {
         $where[] = "group_id='{$search['group_id']}'";
         $param[] = "group_id={$search['group_id']}";
     }
     $where = $where ? implode(' AND ', $where) : ' 1 ';
     // 統計數量
     $sql = "SELECT COUNT(*) nums FROM {pre}role WHERE {$where}";
     $res = $this->db->query($sql);
     $row = $res->row_array();
     $total = $row['nums'];
     /*
      * 分頁讀取數據列表,並處理相關數據
      */
     $size = 15;
     $page = isset($_GET['page']) && intval($_GET['page']) > 1 ? intval($_GET['page']) : 1;
     $offset = ($page - 1) * $size;
     if ($total) {
         /* 查看所有角色下的管理員 */
         $sql = "SELECT * FROM {pre}admin_role group by role_id";
         $res = $this->db->query($sql);
         $temp = array();
         foreach ($res->result_array() as $row) {
             $temp[$row['role_id']] = $row['admin_id'];
         }
         $sql = "SELECT * FROM {pre}role\n                    WHERE {$where} ORDER BY role_id DESC LIMIT {$offset},{$size}";
         $res = $this->db->query($sql);
         $list = array();
         foreach ($res->result_array() as $row) {
             /* 判斷該角色是否已分配管理員 */
             $row['is_delete'] = empty($temp[$row['role_id']]) ? 1 : 0;
             $list[] = $row;
         }
     }
     $data['list'] = $list;
     $data['search'] = $search;
     $data['priv_delete'] = $this->check_power('cpuser_delete', FALSE);
     $data['priv_role'] = $this->check_power('cpuser_role', FALSE);
     $data['priv_import_cpuser'] = $this->check_power('import_cpuser', FALSE);
     // 分頁
     $purl = site_url('admin/role/index') . ($param ? '?' . implode('&', $param) : '');
     $data['pagination'] = multipage($total, $size, $page, $purl);
     // 模版
     $this->load->view('role/index', $data);
 }
開發者ID:Vincent-Shen,項目名稱:origin,代碼行數:70,代碼來源:role.php

示例12: index

 public function index($mode = '')
 {
     if (!$this->check_power('comparison_list,comparison_manage')) {
         return;
     }
     $size = C('admin_page_size');
     $page = isset($_GET['page']) && intval($_GET['page']) > 1 ? intval($_GET['page']) : 1;
     $order_by = 'cmp_type_id DESC';
     $select_what = 'cmp_type_id,cmp_type_name,grade_id,class_id,subject_id,cmp_type_flag,updatetime,addtime';
     $query = $param = $search = array();
     // 查詢條件
     $mode = $mode == 'trash' ? 'trash' : '';
     $search['type_flag'] = $this->input->get('type_flag');
     if ($mode == 'trash') {
         $query['cmp_type_flag'] = -1;
     } else {
         if (strlen($search['type_flag'])) {
             $query['cmp_type_flag'] = intval($search['type_flag']);
         } else {
             $query['cmp_type_flag'][] = array('>', -1);
         }
     }
     if ($search['grade_id'] = (int) $this->input->get('grade_id')) {
         $param[] = "grade_id=" . $search['grade_id'];
         $query['grade_id'] = $search['grade_id'];
     }
     if ($search['class_id'] = (int) $this->input->get('class_id')) {
         $param[] = "class_id=" . $search['class_id'];
         $query['class_id'] = $search['class_id'];
     }
     if ($search['subject_id'] = (int) $this->input->get('subject_id')) {
         $param[] = "subject_id=" . $search['subject_id'];
         $query['subject_id'] = $search['subject_id'];
     }
     if ($search['keyword'] = trim($this->input->get('keyword'))) {
         $param[] = "keyword=" . urlencode($search['keyword']);
         $query['keyword'] = $search['keyword'];
     }
     // 獲取數據
     $total = ComparisonTypeModel::get_comparison_type_count($query);
     $list = array();
     if ($total) {
         $list = ComparisonTypeModel::get_comparison_type_list($query, $page, $size, $order_by, $select_what);
     }
     $data['mode'] =& $mode;
     $data['list'] =& $list;
     $data['search'] =& $search;
     // 分頁
     $purl = site_url('admin/comparison_type/index/') . ($param ? '?' . implode('&', $param) : '');
     $data['pagination'] = multipage($total, $size, $page, $purl);
     // 學科、類型
     $data['grades'] = C('grades');
     $data['subjects'] = CpUserModel::get_allowed_subjects();
     $data['class_list'] = ClassModel::get_class_list();
     $data['priv_manage'] = $this->check_power('comparison_manage', FALSE);
     // 模版
     $this->load->view('comparison_type/index', $data);
 }
開發者ID:Vincent-Shen,項目名稱:origin,代碼行數:58,代碼來源:comparison_type.php

示例13: active_rightbottom_message

function active_rightbottom_message()
{
    $type = MooGetGPC('type', 'string');
    $sql_where = ' WHERE  1=1 ';
    //note 顯示全部
    if (isset($_GET['type']) == 'all') {
        $sql_where .= "";
        //note 顯示已處理過的
    } else {
        if ((isset($_GET['type']) ? $_GET['type'] : '') == 'dealed') {
            $sql_where .= " AND dealstate = '1'";
            //note 顯示未處理過的
        } else {
            $sql_where .= " AND dealstate = '0'";
        }
    }
    //分頁
    $page_per = 20;
    $page = max(1, MooGetGPC('page', 'integer', 'G'));
    $limit = 20;
    $offset = ($page - 1) * $limit;
    //所管理的客服id列表
    $myservice_idlist = get_myservice_idlist();
    if (empty($myservice_idlist)) {
        $sql_where .= " AND sid IN({$GLOBALS['adminid']})";
    } elseif ($myservice_idlist == 'all') {
        //all為客服主管能查看所有的
    } else {
        $sql_where .= " AND sid IN({$myservice_idlist})";
    }
    if (isset($_GET['id'])) {
        $id = MooGetGPC('id', 'integer', 'G');
        $sql = "UPDATE {$GLOBALS['dbTablePre']}admin_remark SET status=1 WHERE id='{$id}'";
        $GLOBALS['_MooClass']['MooMySQL']->query($sql);
        salert('操作成功', 'index.php?action=other_rightbottom&h=message');
    }
    $total = getcount('admin_remark', $sql_where);
    $sql = "SELECT * FROM {$GLOBALS['dbTablePre']}admin_remark {$sql_where} ORDER BY id DESC LIMIT {$offset},{$limit}";
    $remark_list = $GLOBALS['_MooClass']['MooMySQL']->getAll($sql);
    //note 獲得當前的url 去除多餘的參數
    /* $currenturl = 'http://'.$_SERVER['SERVER_NAME'].':'.$_SERVER["SERVER_PORT"].$_SERVER["REQUEST_URI"]; 
    	$currenturl = preg_replace("/(&page=\d+)/","",$currenturl);
    	$currenturl = preg_replace("/(&type=undealed)/","",$currenturl);
    	$currenturl = preg_replace("/(&type=dealed)/","",$currenturl);
    	$currenturl = preg_replace("/(&type=all)/","",$currenturl);
    	$currenturl2 = $currenturl;
    	$currenturl = $currenturl."&type=$type";
    	echo $currenturl; */
    $currenturl = "index.php?action=other_rightbottom&h=message&type={$type}";
    //note 跳轉到某一頁
    $page_num = ceil($total / $limit);
    $page_links = multipage($total, $page_per, $page, $currenturl);
    //note 調用模板
    require adminTemplate('other_rightbottom_message');
}
開發者ID:noikiy,項目名稱:zays,代碼行數:55,代碼來源:other_rightbottom.php

示例14: index

 /**
  * @description 產品分類管理列表             
  * @param int $pc_id 產品分類id
  * @param int $keyword 關鍵字
  */
 public function index($mode = '')
 {
     if (!$this->check_power_new('production_category_index')) {
         return;
     }
     // 查詢條件
     $where = array();
     $param = array();
     $search = array();
     $query = array();
     $data = array();
     if ($search['keyword'] = trim($this->input->get('keyword'))) {
         $escape_keyword = $this->db->escape_like_str($search['keyword']);
         $param[] = "keyword=" . urlencode($search['keyword']);
         $query['keyword'] = "pc_name LIKE '%" . $escape_keyword . "%'";
     }
     if ($search['pc_id'] = intval($this->input->get('pc_id'))) {
         $query = array();
         $param[] = "pc_id={$search['pc_id']}";
         $query['pc_id'] = intval($search['pc_id']);
     }
     /*
      * 統計所有學生數量
      */
     $res = CommonModel::get_list($query, 'rd_product_category', 'count(*) AS count');
     $total = $res[0]['count'];
     /*
      *分頁讀取數據列表,並處理相關數據
      */
     $size = 15;
     $page = isset($_GET['page']) && intval($_GET['page']) > 1 ? intval($_GET['page']) : 1;
     $offset = ($page - 1) * $size;
     $list = array();
     if ($total) {
         $res = CommonModel::get_list($query, 'rd_product_category', '*', $page, $size, 'pc_id desc');
         foreach ($res as $row) {
             $row['p_c_time'] = $row['p_c_time'] > 0 ? date('Y-m-d H:i:s', $row['p_c_time']) : date('Y-m-d H:i:s', time());
             $query = array();
             $query['pc_id'] = $row['pc_id'];
             $res = CommonModel::get_list($query, 'v_trans_log_count', 'pt_id_count');
             $row['p_id_count'] = $res[0]['pt_id_count'];
             $list[] = $row;
         }
     }
     $data['list'] = $list;
     // 分頁
     $purl = site_url('admin/production_category/index/') . ($param ? '?' . implode('&', $param) : '');
     $data['pagination'] = multipage($total, $size, $page, $purl);
     $data['search'] = $search;
     // 模版
     $this->load->view('production_category/index', $data);
 }
開發者ID:Vincent-Shen,項目名稱:origin,代碼行數:57,代碼來源:production_category.php

示例15: system_adminuser_list

function system_adminuser_list()
{
    global $adminid;
    //echo $adminid;
    //echo getGroupID($adminid);
    $sql_where = '';
    $page_per = 15;
    $page = max(1, MooGetGPC('page', 'integer'));
    $limit = 15;
    $offset = ($page - 1) * $limit;
    $currenturl = "index.php?action=system_adminuser&h=list";
    $username = MooGetGPC('username', 'string');
    $usercode = MooGetGPC('usercode', 'string');
    if (!empty($username)) {
        $currenturl = "index.php?action=system_adminuser&h=list&username={$username}";
        $sql_where = " WHERE username LIKE '{$username}%'";
    }
    if (!empty($uid)) {
        $currenturl = "index.php?action=system_adminuser&h=list&uid={$uid}";
        $sql_where = " WHERE uid LIKE '{$uid}%'";
    }
    $choose = MooGetGPC('choose', 'string', 'P');
    $content = trim(MooGetGPC('content', 'string', 'P'));
    if ($choose == 'username') {
        $sql_where = " WHERE username LIKE '{$content}%'";
        $currenturl = "index.php?action=system_adminuser&h=list&username={$content}";
    } elseif ($choose == 'usercode') {
        $sql_where = " WHERE usercode LIKE '{$content}%'";
        $currenturl = "index.php?action=system_adminuser&h=list&usercode={$content}";
    }
    /*
     * if(!empty($username)){ $sql_where = " WHERE username LIKE
     * '{$username}%'"; }
     */
    $sql = "SELECT COUNT(uid) AS COUNT FROM {$GLOBALS['dbTablePre']}admin_user {$sql_where}";
    $admin_user = $GLOBALS['_MooClass']['MooMySQL']->getOne($sql);
    $total = $admin_user['COUNT'];
    if ($choose == 'username') {
        $sql_where = " WHERE a.username LIKE '{$content}%'";
    } elseif ($choose == 'userid') {
        $sql_where = " WHERE a.uid LIKE '{$content}%'";
    }
    $sql = "SELECT a.*,b.groupname FROM {$GLOBALS['dbTablePre']}admin_user as a \n    \t\tLEFT JOIN {$GLOBALS['dbTablePre']}admin_group as b \n    \t\tON a.groupid=b.groupid {$sql_where} ORDER BY a.uid DESC\n    \t\tLIMIT {$offset},{$limit}";
    $adminuser_list = $GLOBALS['_MooClass']['MooMySQL']->getAll($sql);
    /* $url = "http://".$_SERVER['SERVER_NAME'].$_SERVER['REQUEST_URI'];
    	echo $url; */
    $pages = multipage($total, $page_per, $page, $currenturl);
    $page_num = ceil($total / $limit);
    require_once adminTemplate('adminuser_list');
    serverlog(1, $GLOBALS['dbTablePre'] . 'admin_user', "{$GLOBALS['adminid']}號客服{$GLOBALS['username']}查看會員管理員列表", $GLOBALS['adminid']);
}
開發者ID:noikiy,項目名稱:zays,代碼行數:51,代碼來源:system_adminuser.php


注:本文中的multipage函數示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。