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


PHP Pages::show方法代码示例

本文整理汇总了PHP中Pages::show方法的典型用法代码示例。如果您正苦于以下问题:PHP Pages::show方法的具体用法?PHP Pages::show怎么用?PHP Pages::show使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Pages的用法示例。


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

示例1: _List

 protected function _List($model, $map = '', $fields = '*', $orderby = 'id desc', $listRows = 0, $pageClass = 'Pages')
 {
     $listRows = $listRows ? $listRows : 10;
     $c_model = clone $model;
     $count = $c_model->where($map)->count('*');
     if ($count > 0) {
         import('ORG.Util.' . $pageClass);
         $Page = new Pages($count, $listRows);
         $nowPage = isset($_GET['p']) ? $_GET['p'] : 1;
         $list = $model->order($orderby)->where($map)->page($nowPage . ',' . $Page->listRows)->select();
         //echo $model->getLastSql();
         $page = $Page->show();
         return array('listinfo' => $list, 'page' => $page, 'result_count' => intval($count));
     }
 }
开发者ID:xuyi5918,项目名称:ThinkPHPDistribution,代码行数:15,代码来源:BaseAction.class.php

示例2: header

    $logged_in = false;
}
// check the maintenance
if (mobbo::mobbo_settings('maintenance') == 1) {
    if (!isset($_GET['actions']) and $_GET['actions'] != '405') {
        if (!isset($_SESSION['id']) or mobbo::users_info('rank') < 5) {
            header("Location: /action/405");
        }
    }
}
// say to the system what its the filename
$pagina = $_SERVER['PHP_SELF'];
/*
 *
 * End of the Habbo Environment Parsering
 *
 */
/*
 *
 * Index.php - main file.
 *
 */
if (isset($_GET['settings'])) {
    $vars = mobbo::array_explode_with_keys(htmlentities($_GET['settings']));
} else {
    $vars = array('languages' => 1, 'settings' => 1);
}
$page = new Pages($vars);
echo $page->show();
die;
// End of File
开发者ID:habb0,项目名称:mobbo,代码行数:31,代码来源:index.php

示例3: defaultAction

 public function defaultAction()
 {
     $provinceCacheFile = dirname(__FILE__) . '/include/cityCache.php';
     $provinceCache = trim(file_get_contents($provinceCacheFile));
     //加载缓存
     if ($provinceCache != '') {
         $provinces = json_decode($provinceCache, true);
     } else {
         //组合
         $provinces = $this->_getAllProvince();
         foreach ($provinces as &$value) {
             $citys = $this->_getAllCity($value['province_id']);
             if (count($citys) > 1) {
                 array_unshift($citys, array('city_id' => '', 'short_name' => '全部'));
             }
             $value['city'] = $citys;
         }
         $cityCache = json_encode($provinces);
         if (!file_put_contents($provinceCacheFile, $cityCache)) {
             echo '文件: ' . $provinceCacheFile . ' 不可写';
             exit;
         }
     }
     //变量声明
     $level = '';
     $disease = '';
     $keyword = '';
     $district = '';
     $province = '';
     //省
     if ($_GET['province']) {
         $province = $this->_getProvinceById((int) $_GET['province']);
     }
     //地区,市
     if ($_GET['city']) {
         $city = $this->_getCityById((int) $_GET['city']);
         $districts = $this->_getAllDistrict((int) $_GET['city']);
         //区域
         if ($_GET['district']) {
             $district = $this->_getDistrictById((int) $_GET['district']);
         }
         //街道
         $street = '';
     }
     //一样级别
     if ($_GET['level']) {
         $level = (int) $_GET['level'];
     }
     //疾病id
     if ($_GET['disease']) {
         $disease = (int) $_GET['disease'];
     }
     //关键词
     if ($_GET['keyword']) {
         $keyword = htmlspecialchars($_GET['keyword']);
     }
     //页数
     if ($_GET['p']) {
         $p = htmlspecialchars($_GET['p']);
     }
     $result = DBXapian::searchHospital($disease, $province['province_id'], $city['city_id'], $district['district_id'], $street, $level, $keyword, $p, self::$PAGE_SIZE);
     $hospital = $result[0];
     $count = $result[1];
     $pa = new Pages($count, self::$PAGE_SIZE);
     $page = $pa->show();
     $this->assign('provinces', $provinces);
     $this->assign('province', $province);
     $this->assign('city', $city);
     $this->assign('districts', $districts);
     $this->assign('district', $district);
     $this->assign('level', $level);
     $this->assign('disease', $disease);
     $this->assign('keyword', $keyword);
     $this->assign('hospital', $hospital);
     $this->assign('page', $page);
     $this->display();
 }
开发者ID:fengxiangyun,项目名称:diary,代码行数:77,代码来源:HospitalAction.class.php


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