ThinkPHP/Library/Think/Page.class.php

(开头部分) 7KB

这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。

<?php
// +----------------------------------------------------------------------
// | ThinkPHP [ WE CAN DO IT JUST THINK IT ]
// +----------------------------------------------------------------------
// | Copyright (c) 2006-2014 http://thinkphp.cn All rights reserved.
// +----------------------------------------------------------------------
// | Licensed ( http://www.apache.org/licenses/LICENSE-2.0 )
// +----------------------------------------------------------------------
// | Author: 麦当苗儿 <zuojiazi@vip.qq.com> <http://www.zjzit.cn>
// +----------------------------------------------------------------------
namespace Think;


// +----------------------------------------------------------------------  
// | ThinkPHP [ WE CAN DO IT JUST THINK IT ]  
// +----------------------------------------------------------------------  
// | Copyright (c) 2009 http://thinkphp.cn All rights reserved.  
// +----------------------------------------------------------------------  
// | Licensed ( http://www.apache.org/licenses/LICENSE-2.0 )  
// +----------------------------------------------------------------------  
// | Author: liu21st <liu21st@gmail.com>  
// |         lanfengye <zibin_5257@163.com>  
// +----------------------------------------------------------------------  
class Page {  
      
    // 分页栏每页显示的页数  
    public $rollPage = 5;  
    // 页数跳转时要带的参数  
    public $parameter  ;  
    // 分页URL地址  
    public $url     =   '';  
    // 默认列表每页显示行数  
    public $listRows = 20;  
    // 起始行数  
    public $firstRow    ;  
    // 分页总页面数  
    protected $totalPages  ;  
    // 总行数  
    protected $totalRows  ;  
    // 当前页数  
    protected $nowPage    ;  
    // 分页的栏的总页数  
    protected $coolPages   ;  
    // 分页显示定制  
    protected $config  =    array('header'=>'条记录','prev'=>'上一页','next'=>'下一页','first'=>'第一页','last'=>'<span id="lastspan">最后一页</span>','theme'=>'<ul><li><span> %totalRow% %header% %nowPage%/%totalPage% 页</span></li> %first%  %upPage% %prePage%  %linkPage% %downPage%  %nextPage% %end%</ul>');  
    // 默认分页变量名  
    protected $varPage;  
    /** 
     * 架构函数 
     * @access public 
     * @param array $totalRows  总的记录数 
     * @param array $listRows  每页显示记录数 
     * @param array $parameter  分页跳转的参数 
     */  
    public function __construct($totalRows,$listRows='',$parameter='',$url='') {  
        $this->totalRows    =   $totalRows;  
        $this->parameter    =   $parameter;  
        $this->varPage      =   C('VAR_PAGE') ? C('VAR_PAGE') : 'p' ;  
        if(!empty($listRows)) {  
            $this->listRows =   intval($listRows);  
后面还有 99 行代码,解锁后查看完整代码

24 小时内免费解锁 3 个项目,之后 1 积分/个。 规则说明

AI 解读

登录后可用,每次 10 积分,解读结果公开显示在下面。

还没有人解读过这个文件。