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


PHP page::show方法代码示例

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


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

示例1: index

 public function index()
 {
     $put = I('s');
     if (trim($put) == '') {
         $this->error('搜索内容不能为空!');
         die;
     }
     $where['biaoti'] = $put;
     $where['content'] = $put;
     $where['_logic'] = 'OR';
     $map['_complex'] = $where;
     $map['islock'] = 0;
     //复合查询
     $count = M('article')->where($map)->count();
     import('ORG.Util.Page');
     $page = new page($count, 10);
     $page->setConfig('theme', '<ul class="pages">%first%%upPage%%linkPage%%downPage%%end%</ul>');
     $show = $page->show();
     //返回分页信息
     $article = M('article')->where($map)->limit($page->firstRow . ',' . $page->listRows)->select();
     foreach ($article as $key => $value2) {
         $article[$key]["imgs"] = imgs($article[$key]["imgs"]);
     }
     $this->assign('put', $put);
     $this->assign('show', $show);
     //分页信息
     $this->assign('count', $count);
     //数据总数
     $this->assign('list', $article);
     //数据集
     $sidebar1 = M('article')->where('type=0')->order('approval desc')->limit('10')->select();
     //赞多到少
     $this->assign('approval', $sidebar1);
     $this->display('search');
 }
开发者ID:easley999,项目名称:tzj,代码行数:35,代码来源:SearchAction.class.php

示例2: index

 public function index()
 {
     $objAsk = M('ask');
     $objUser = M('user');
     $word = deep_htmlspecialchars($_GET["word"]);
     $this->assign('searchWord', $word);
     if ($word == '') {
         redirect($_SERVER['HTTP_REFERER']);
     }
     //如果没有输入关键字 就重定向到上一页面
     import('ORG.Util.Page');
     //导入分页类
     $count = $objAsk->where('INSTR(ask_name, "' . $word . '")>0')->count();
     //统计总数
     $this->assign('countSearch', $count);
     $page = new page($count, 10);
     $page->setConfig('theme', '%upPage% %first% %prePage% %linkPage% %downPage%');
     $resultList = $objAsk->where('INSTR(ask_name, "' . $word . '")>0')->order('add_time desc')->limit($page->firstRow . ',' . $page->listRows)->select();
     foreach ($resultList as $k1 => $v1) {
         $resultList[$k1]['username'] = $objUser->where('id=' . $v1['uid'])->getField('username');
     }
     $resultList = deep_htmlspecialchars_decode($resultList);
     $show = $page->show();
     $this->assign('resultList', $resultList);
     $this->assign('page', $show);
     $this->display();
 }
开发者ID:GobYang,项目名称:zhizhao,代码行数:27,代码来源:SearchAction.class.php

示例3: index

 public function index()
 {
     $Feedback = D("Feedback");
     $keyword = $_POST['keyword'];
     $keywords = $_REQUEST['keywords'];
     $uid = intval($_REQUEST['uid']);
     if ($keyword) {
         $data['content'] = array('like', '%' . $keyword . '%');
     } elseif ($keywords) {
         $data['content'] = array('like', '%' . safe_b64decode($keywords) . '%');
     }
     $count = $Feedback->count($data);
     import("ORG.Util.Page");
     $listRows = 15;
     $p = new page($count, $listRows);
     $list = $Feedback->findAll($data, '*', 'id desc', $p->firstRow . ',' . $p->listRows);
     if ($keyword) {
         $p->parameter = 'keywords=' . safe_b64encode($keyword);
     }
     $page = $p->show();
     if ($list !== false) {
         $this->assign('page', $page);
         $this->assign('list', $list);
         $this->assign('allowbat', $this->allowbat);
     }
     $this->display();
 }
开发者ID:dalinhuang,项目名称:concourse,代码行数:27,代码来源:FeedbackAction.class.php

示例4: index

 public function index()
 {
     $Link = D("Link");
     $keyword = $_POST['keyword'];
     $keywords = $_REQUEST['keywords'];
     if ($keyword) {
         $data['title'] = array('like', '%' . $keyword . '%');
     } elseif ($keywords) {
         $data['title'] = array('like', '%' . safe_b64decode($keywords) . '%');
     }
     $count = $Link->count($data);
     import("ORG.Util.Page");
     $listRows = 15;
     $p = new page($count, $listRows);
     $list = $Link->findAll($data, '*', 'types desc, orders desc', $p->firstRow . ',' . $p->listRows);
     if ($keyword) {
         $p->parameter = 'keywords=' . safe_b64encode($keyword);
     }
     $page = $p->show();
     if ($list !== false) {
         $this->assign('page', $page);
         $this->assign('keyword', $keyword);
         $this->assign('list', $list);
         $this->assign("linkfolder", __ROOT__ . '/' . C(ATTACHDIR) . '/logo');
         $this->assign('allowbat', $this->allowbat);
     }
     $this->display();
 }
开发者ID:dalinhuang,项目名称:concourse,代码行数:28,代码来源:LinkAction.class.php

示例5: resumeList

 /**
  * 简历列表
  */
 public function resumeList()
 {
     $db = V('resume');
     $db->view = array('user_info' => array('type' => 'inner', 'on' => 'resume.uid=user_info.uid', 'field' => 'name'));
     $cond = array();
     if (isset($_GET['resume_name'])) {
         $cond[] = 'resume_name like "%' . $_GET['resume_name'] . '%"';
     }
     if (isset($_GET['name'])) {
         $cond[] = 'name like "%' . $_GET['name'] . '%"';
     }
     if (isset($_GET['created'])) {
         $cond['created'] = array('gt' => strtotime($_GET['created']), 'lt' => time());
     }
     if (isset($_GET['updated'])) {
         $cond['updated'] = array('gt' => strtotime($_GET['updated']), 'lt' => time());
     }
     if (isset($_GET['verify'])) {
         $cond['verify'] = $_GET['verify'];
     }
     $nums = $db->where($cond)->count();
     $page = new page($nums, 13);
     $resumes = $db->where($cond)->findall($page->limit());
     $this->assign('resumes', $resumes);
     $this->assign('page', $page->show());
     $this->display();
 }
开发者ID:com-itzcy,项目名称:hdjob,代码行数:30,代码来源:resumeControl.php

示例6: review

 public function review()
 {
     $uid = intval($_GET['uid']);
     if ($uid == '') {
         parent::error404();
     }
     //分配根据GET传过来的uid用户的信息
     $objUser = M('user');
     $userMessage = $objUser->where('id=' . $uid)->field('id,username,face,introduce,point,exp')->find();
     $userMessage = deep_htmlspecialchars_decode($userMessage);
     if ($userMessage == '') {
         parent::error404();
     }
     $this->assign('userMessage', $userMessage);
     //分配该用户的评论
     $objComment = M('comment');
     import('ORG.Util.Page');
     //导入分页类
     $count = $objComment->where(array('comment_uid' => $uid))->count();
     $page = new page($count, 20);
     $page->setConfig('theme', '%upPage% %first% %prePage% %linkPage% %downPage%');
     $commentList = $objComment->where(array('comment_uid' => $uid))->field('aid,time,comment')->order('time desc')->limit($page->firstRow . ',' . $page->listRows)->select();
     foreach ($commentList as $k1 => $v1) {
         $commentList[$k1]['url'] = '__APP__/List/detail/id/' . $v1['aid'] . '.html';
     }
     $commentList = deep_htmlspecialchars_decode($commentList);
     $show = $page->show();
     $this->assign('page', $show);
     $this->assign('commentList', $commentList);
     //分配Pagetitle
     $this->pageTitle = $userMessage['username'] . '的个人主页_支招网';
     $this->display();
 }
开发者ID:GobYang,项目名称:zhizhao,代码行数:33,代码来源:UserAction.class.php

示例7: index

 public function index()
 {
     $id = intval($_REQUEST['id']);
     if ($id > 0) {
         $mapc['cid'] = $id;
     }
     $Product = D("Product");
     $count = $Product->count($mapc);
     //if($count<=1)$this->error('此类别无产品');
     import("ORG.Util.Page");
     $listRows = 16;
     $p = new page($count, $listRows);
     $list = $Product->findAll($mapc, '*', 'id desc', $p->firstRow . ',' . $p->listRows);
     //$list=$p->order('pid desc')->limit("$p->firstRow.','.$p->listRows")->findAll();
     $page = $p->show();
     /**/
     //分类
     $map['module'] = 1;
     //分类
     $Category = D('Category')->order("id desc")->where($map)->findall();
     $this->assign('titler', '产品中心');
     $this->assign('cate', $Category);
     $this->assign('Product', $Product);
     $this->assign('count', $count);
     $this->assign('page', $page);
     $this->display();
 }
开发者ID:dalinhuang,项目名称:concourse,代码行数:27,代码来源:PromotionAction.class.php

示例8: index

 public function index()
 {
     //$Member=D("Member");
     $Member = D("MemberView");
     $keyword = $_POST['keyword'];
     $keywords = $_REQUEST['keywords'];
     if ($keyword) {
         $data['username'] = array('like', '%' . $keyword . '%');
     } elseif ($keywords) {
         $data['username'] = array('like', '%' . safe_b64decode($keywords) . '%');
     }
     $count = $Member->count($data);
     import("ORG.Util.Page");
     $listRows = 15;
     $p = new page($count, $listRows);
     $list = $Member->findAll($data, '*', 'Member.id desc', $p->firstRow . ',' . $p->listRows);
     if ($keyword) {
         $p->parameter = 'keywords=' . safe_b64encode($keyword);
     }
     $page = $p->show();
     if ($list !== false) {
         $this->assign('page', $page);
         $this->assign('list', $list);
         $this->assign('allowbat', $this->allowbat);
     }
     $this->display();
 }
开发者ID:dalinhuang,项目名称:concourse,代码行数:27,代码来源:MemberAction.class.php

示例9: index

 public function index()
 {
     $put = I('s');
     if (trim($put) == '') {
         $this->error('搜索内容不能为空!');
         die;
     }
     $where['title'] = $put;
     $where['content'] = $put;
     $count = M('Article')->where($where)->count();
     import('ORG.Util.Page');
     $page = new page($count, 10);
     $page->setConfig('theme', '<ul class="pagination"><li>%upPage%</li><li>%downPage%</li><li>%prePage%</li><li>%linkPage%</li><li>%nextPage%</li><li>%end%</li></ul>');
     $show = $page->show();
     //返回分页信息
     $article = M('article')->where($where)->limit($page->firstRow . ',' . $page->listRows)->select();
     $this->assign('put', $put);
     $this->assign('show', $show);
     //分页信息
     $this->assign('count', $count);
     //数据总数
     $this->assign('list', $article);
     //数据集
     //侧栏的数据分配
     $sidebar1 = M('Article')->where("ispush=1 and islock=0")->order('approval desc')->limit('5')->select();
     $sidebar2 = M('Article')->where("ispush=1 and islock=0")->order('opposition desc')->limit('5')->select();
     $sidebar3 = M('Article')->where("ispush=1 and islock=0")->order('rand()')->limit('5')->select();
     //赞多到少
     $this->assign('sidebar1', $sidebar1);
     //赞少到多
     $this->assign('sidebar2', $sidebar2);
     //随机5篇
     $this->assign('sidebar3', $sidebar3);
     $this->display('search');
 }
开发者ID:xazzz,项目名称:EasyCMS,代码行数:35,代码来源:SearchAction.class.php

示例10: index

	public function index(){
		$total = $this->db->totalShop();
		$page = new page($total,1);
		$data = $this->db->getShop($page->limit());
		$this->assign('page',$page->show());
		$this->assign('data',$data);
		$this->display();
	}
开发者ID:happyun,项目名称:tuan,代码行数:8,代码来源:ShopControl.class.php

示例11: word

 /**
  * 显示结果
  */
 public function word($word)
 {
     $where = "uuid like '%" . intval($word) . "%'";
     $count = $this->where($where)->count();
     $page = new page($count, 10, 4, 2);
     $union = $this->where($where)->select($page->limit());
     return array("union" => $union, "count" => $count, "page" => $page->show());
 }
开发者ID:a707937337,项目名称:proxy,代码行数:11,代码来源:UnionModel.class.php

示例12: print_project_foot

function print_project_foot($project_count, $page_size)
{
    require_once 'utils/page.class.php';
    $page = new page(array('total' => $project_count, 'perpage' => $page_size));
    //echo '<div id="project_page">'.$page->show(7).'</div>';
    echo $page->show(7);
    //echo project_info_path;
}
开发者ID:laiello,项目名称:xiyoulinux,代码行数:8,代码来源:index.php

示例13: index

 public function index()
 {
     $sortId = intval($_GET['sid']);
     if ($sortId == '') {
         parent::error404();
     }
     $sort = intval($_GET['sort']);
     if ($sort == '') {
         parent::error404();
     }
     $objAsk = D('AskView');
     $where = array('sort_id' => $sortId);
     if ($sort == 1) {
         $order = 'add_time desc';
     } elseif ($sort == 2) {
         $order = 'reward desc,add_time desc';
     } elseif ($sort == 3) {
         $order = 'comment_num desc,add_time desc';
     }
     import('ORG.Util.Page');
     //导入分页类
     $count = $objAsk->where($where)->count();
     //统计总数
     $page = new page($count, 12);
     $page->setConfig('theme', '%upPage% %first% %prePage% %linkPage% %downPage%');
     $askList = $objAsk->where($where)->field('id,ask_name,add_time,comment_num,reward,solve,username,sort_name')->order($order)->limit($page->firstRow . ',' . $page->listRows)->select();
     $askList = deep_htmlspecialchars_decode($askList);
     $show = $page->show();
     $this->assign('askList', $askList);
     $this->assign('page', $show);
     //分配pageTitle
     if ($sortId == 1) {
         $pageTitle = '生活_支招网';
     } else {
         if ($sortId == 2) {
             $pageTitle = '情感_支招网';
         } else {
             if ($sortId == 3) {
                 $pageTitle = '健康_支招网';
             } else {
                 if ($sortId == 4) {
                     $pageTitle = '职场_支招网';
                 } else {
                     if ($sortId == 5) {
                         $pageTitle = '公益_支招网';
                     }
                 }
             }
         }
     }
     $this->assign('pageTitle', $pageTitle);
     //获取列表广告
     $this->listBanner = $this->getListBanner();
     $this->display();
 }
开发者ID:GobYang,项目名称:zhizhao,代码行数:55,代码来源:ListAction.class.php

示例14: showPage

 function showPage()
 {
     $curpage = getcurpage();
     // берём контроллер для текущей страницы
     include __corePath . "controllers/{$curpage}.php";
     $page = new page($curpage, $this->db, $this->config);
     $page->prepare();
     $page->render();
     echo $page->show();
     //показываем страницу
 }
开发者ID:openweb-tech,项目名称:hotbackup,代码行数:11,代码来源:app.php

示例15: check

 public function check()
 {
     $db = M('wish');
     $page = new page($db->count(), 5, 4, 2);
     $this->assign('page', $page->show());
     $wish = $db->select($page->limit());
     foreach ($wish as $k => $v) {
         $wish[$k]['content'] = $this->change_face($v['content']);
     }
     $this->assign('wish', $wish);
     $this->display();
 }
开发者ID:sxau-web-team,项目名称:wish-web,代码行数:12,代码来源:IndexControl.class.php


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