Exemplo n.º 1
0
 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');
 }
Exemplo n.º 2
0
 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();
 }
Exemplo n.º 3
0
 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();
 }
Exemplo n.º 4
0
 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();
 }
Exemplo n.º 5
0
 /**
  * 简历列表
  */
 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();
 }
Exemplo n.º 6
0
 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();
 }
 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();
 }
Exemplo n.º 8
0
 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();
 }
Exemplo n.º 9
0
 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');
 }
Exemplo n.º 10
0
	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();
	}
Exemplo n.º 11
0
 /**
  * 显示结果
  */
 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());
 }
Exemplo n.º 12
0
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;
}
Exemplo n.º 13
0
 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();
 }
Exemplo n.º 14
0
 function showPage()
 {
     $curpage = getcurpage();
     // берём контроллер для текущей страницы
     include __corePath . "controllers/{$curpage}.php";
     $page = new page($curpage, $this->db, $this->config);
     $page->prepare();
     $page->render();
     echo $page->show();
     //показываем страницу
 }
Exemplo n.º 15
0
 public function lists_select($where = "")
 {
     if ($where) {
         $page = new page($this->where($where)->count(), 10, 5, 1);
         $video = $this->field("vid,cnname,uploadtime,py_video.cid,username,cntitle,entitle,pid,uuid")->where($where)->order(array("uploadtime" => "desc"))->select($page->limit());
     } else {
         $page = new page($this->count(), 10, 5, 1);
         $video = $this->field("vid,cnname,uploadtime,py_video.cid,username,cntitle,entitle,pid,uuid")->order(array("uploadtime" => "desc"))->select($page->limit());
     }
     return array($video, $page->show());
 }
Exemplo n.º 16
0
 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();
 }
Exemplo n.º 17
0
 public function index()
 {
     header('Content-Type:text/html;charset=utf-8');
     load('extend');
     // 导入扩展函数(对中文字符串的截取)
     import("ORG.Util.Page");
     // 导入分页类
     $l = M('link');
     $count = $l->count();
     $page = new Page($count, 20);
     $show = $page->show();
     if (!isset($_GET['search'])) {
         $list = $l->order('l_time desc')->limit($page->firstRow . ',' . $page->listRows)->select();
     } else {
         //按留言标题、留言姓名
         $methodone = isset($_GET['search_bzb']) ? $_GET['search_bzb'] : '';
         $bzb = $_GET['bzb'];
         if (!empty($bzb)) {
             $sql = $methodone . ' like "%' . $bzb . '%"';
         }
         //按添加时间排序
         $methodtwo = $_GET['search_tdb'];
         $px = $_GET['order'];
         $order = $methodtwo . ' ' . $px;
         //筛选
         if (isset($_GET['sh'])) {
             if ($_GET['sh'] != 'status') {
                 $ha = 'l_status = ' . $_GET['sh'];
             }
         }
         //查找记录后,更新显示条数
         $count = $l->where($sql)->having($ha)->count();
         $page = new page($count, 20);
         $show = $page->show();
         $list = $l->where($sql)->having($ha)->order($order)->limit($page->firstRow . ',' . $page->listRows)->select();
         foreach ($list as $key => $val) {
             $val[$methodone] = str_replace($bzb, '<b>' . $bzb . '</b>', $val[$methodone]);
             $list[$key][$methodone] = $val[$methodone];
         }
     }
     $time = time();
     foreach ($list as $key => $val) {
         //判断过期链接
         if ($time >= $val['l_overtime']) {
             $data['l_status'] = 2;
             $id = $val['id'];
             $l->where('id=' . $id)->save($data);
         }
     }
     $this->assign(array('list' => $list, 'page' => $show));
     $this->display();
 }
 public function TeacherList($pagefirst, $pagesize)
 {
     $num = $this->count();
     import('ORG.Util.Page');
     $page = new page($num, $pagesize);
     $this->page = $page->show();
     $this->list = $this->query("SELECT tech_id, tech_name, tech_status FROM teacher LIMIT {$pagefirst},{$pagesize}");
     if (!empty($this->list)) {
         return $this->list;
     } else {
         return false;
     }
 }
 public function studentList($pagefirst, $pagesize)
 {
     $num = $this->count();
     import('ORG.Util.Page');
     $page = new page($num, $pagesize);
     $this->page = $page->show();
     $this->list = $this->query("SELECT uid, name, sex, xueyuan, zhuanye, class, grade, year, type, email, long_num FROM student LIMIT {$pagefirst},{$pagesize}");
     if (!empty($this->list)) {
         return $this->list;
     } else {
         return false;
     }
 }
Exemplo n.º 20
0
 public function lessonList($pagefirst, $pagesize)
 {
     $num = $this->count();
     import('ORG.Util.Page');
     $page = new page($num, $pagesize);
     $this->page = $page->show();
     $this->list = $this->query("SELECT lesson.*, xueyuan.* FROM lesson LEFT JOIN xueyuan ON lesson.xy_id = xueyuan.xy_id LIMIT {$pagefirst},{$pagesize}");
     if (!empty($this->list)) {
         return $this->list;
     } else {
         return false;
     }
 }
Exemplo n.º 21
0
 public function index()
 {
     import('ORG.Util.Page');
     // 导入分页类
     $aCounty = (int) getRequest('county');
     $aWhere = $this->model->getConditionArray();
     $aTown = $this->model->getTownName($aCounty);
     //查询4家公司信息(瀑布流分页)
     $count = D('Company')->where($aWhere)->count();
     $Page = new page($count, 2);
     $Page->setConfig('theme', " %upPage% %downPage% %first% %prePage% %linkPage% %nextPage% %end%");
     $show = $Page->show();
     //$aCompany = D('Company')->where($aWhere)->order('ord DESC')->limit($Page->firstRow.','.$Page->listRows)->select();
     if ($_GET['caseord']) {
         unset($_GET['caseord']);
         $aCompany = D('Company')->where($aWhere)->order('reserve_count DESC,ord DESC')->limit($Page->firstRow . ',' . $Page->listRows)->select();
     } else {
         $aCompany = D('Company')->where($aWhere)->order('ord DESC')->limit($Page->firstRow . ',' . $Page->listRows)->select();
     }
     //每家公司查询5条记录
     foreach ($aCompany as $key => $aValue) {
         $case = $this->model->getTop($aValue['id'], 5);
         $aCompany[$key]['case'] = $case;
     }
     //dump($aCompany);die;
     $comtype = getRequest('comtype');
     $aDistrict = D("District")->getFieldById(9);
     unset($_GET['_URL_']);
     $Acondition = $_GET;
     $Bcondition = $_GET;
     $Ccondition = $_GET;
     unset($Acondition['comtype']);
     unset($Acondition['p']);
     $comtypeurl = U("", $Acondition);
     unset($Bcondition['county']);
     unset($Bcondition['p']);
     $countyurl = U("", $Bcondition);
     unset($Ccondition['town']);
     unset($Ccondition['p']);
     $townurl = U("", $Ccondition);
     $this->assign('page', $show);
     $this->assign('comtypeurl', $comtypeurl);
     $this->assign('countyurl', $countyurl);
     $this->assign('townurl', $townurl);
     $this->assign('town', $aTown);
     $this->assign('comtype', $comtype);
     $this->assign('district', $aDistrict);
     $this->assign('company', $aCompany);
     $this->assign('county', $aCounty);
     $this->display();
 }
Exemplo n.º 22
0
 public function index()
 {
     //导入Page.class.php文件
     import("ORG.Util.Page");
     //实例化分页类
     $totalRow = M("bbsinfo")->count();
     $page = new page($totalRow, 5);
     //获得当前页面显示的记录
     $result = M("bbsinfo")->limit($page->firstRow, $page->listRows)->select();
     $this->assign("result", $result);
     $this->assign("pageList", $page->show());
     //分页栏
     $this->display();
 }
Exemplo n.º 23
0
 public function index()
 {
     $Feedback = D("Feedback");
     $count = $Feedback->count('ischecked=1');
     import("ORG.Util.Page");
     $listRows = 15;
     $p = new page($count, $listRows);
     $list = $Feedback->findAll('ischecked=1', '*', 'id desc', $p->firstRow . ',' . $p->listRows);
     $page = $p->show();
     $this->assign('titler', '留言反馈');
     $this->assign('list', $list);
     $this->assign('page', $page);
     $this->display();
 }
Exemplo n.º 24
0
 function index()
 {
     $shop_cate_mod = D('shop_cate');
     import("ORG.Util.Page");
     $count = $shop_cate_mod->order('sort_order')->count();
     $p = new page($count, 20);
     $list = $shop_cate_mod->limit($p->firstRow . ',' . $p->listRows)->order('sort_order')->select();
     $key = 1;
     foreach ($list as $k => $val) {
         $list[$k]['key'] = ++$p->firstRow;
     }
     $this->assign('list', $list);
     $this->assign('page', $p->show());
     $this->display();
 }
Exemplo n.º 25
0
 public function index()
 {
     $Job = D("Job");
     $count = $Job->count();
     import("ORG.Util.Page");
     $listRows = 5;
     $p = new page($count, $listRows);
     $list = $Job->findAll('', '*', 'id desc', $p->firstRow . ',' . $p->listRows);
     //$list=$p->order('pid desc')->limit("$p->firstRow.','.$p->listRows")->findAll();
     $page = $p->show();
     $this->assign('titler', '人才招聘');
     $this->assign('list', $list);
     $this->assign('page', $page);
     $this->display();
 }
Exemplo n.º 26
0
 public function index()
 {
     $Scroll = D("Scroll");
     $count = $Scroll->count();
     import("ORG.Util.Page");
     $listRows = 15;
     $p = new page($count, $listRows);
     $list = $Scroll->findAll($data, '*', 'id desc', $p->firstRow . ',' . $p->listRows);
     $page = $p->show();
     if ($list !== false) {
         $this->assign('page', $page);
         $this->assign('list', $list);
         $this->assign('allowbat', $this->allowbat);
     }
     $this->display();
 }
Exemplo n.º 27
0
 public function index()
 {
     $id = intval($_REQUEST['id']);
     $Announce = D("Announce");
     $count = $Announce->count();
     //if($count<=1)$this->error('此类别无产品');
     import("ORG.Util.Page");
     $listRows = 16;
     $p = new page($count, $listRows);
     $list = $Announce->findAll($mapc, '*', 'id desc', $p->firstRow . ',' . $p->listRows);
     //$list=$p->order('pid desc')->limit("$p->firstRow.','.$p->listRows")->findAll();
     $page = $p->show();
     $this->assign('list', $list);
     $this->assign('count', $count);
     $this->assign('page', $page);
     $this->display();
 }
Exemplo n.º 28
0
 /**
  * 获取分页效果,分页数据
  * @return array
  */
 public function getPageResult($wheres = array())
 {
     //保存查询条件
     $wheres['status'] = array('neq', -1);
     //提供分页工具条
     $getpage = $this->where($wheres)->count();
     //获取总条数
     //获取每页显示条数,没有配置就默认10条
     $pagesize = C('PAGE_SIZE') ? C('PAGE_SIZE') : 10;
     //实例page类
     $page = new page($getpage, $pagesize);
     $pageHtml = $page->show();
     //查询数据
     $rows = $this->where($wheres)->limit($page->firstRow, $page->listRows)->select();
     //返回数据
     return array('rows' => $rows, 'pageHtml' => $pageHtml);
 }
Exemplo n.º 29
0
 public function index()
 {
     import("ORG.Util.Page");
     $now = date("Y-m-d");
     $db = new WorldsModel();
     $count['total'] = $db->count();
     //总条数
     $count['new'] = $db->where("substring(time,1,10)='{$now}'")->count();
     //今日更新条数
     $page = new page($count['total'], 10);
     $page->setConfig('header', '条微博');
     $world = $db->relation(true)->order('id desc')->limit($page->firstRow . ',' . $page->listRows)->select();
     $this->assign('count', $count);
     $this->assign('world', $world);
     $this->assign('page_nav', $page->show());
     $this->display();
     //dump($);
 }
Exemplo n.º 30
0
 public function audit()
 {
     import('ORG.Util.Page');
     // 导入分页类
     $count = D('Construction')->where(array('is_approve' => 3))->order('ord')->count();
     $Page = new page($count, 3);
     $Page->setConfig('theme', " %upPage% %downPage% %first% %prePage% %linkPage% %nextPage% %end%");
     $show = $Page->show();
     $aConstruction = $this->model->where(array('is_approve' => 3))->order('ord')->limit($Page->firstRow . ',' . $Page->listRows)->select();
     //$aConstruction = $this->model->join('tb_case on tb_construction.id=tb_case.consid' )->where(array('tb_construction.is_approve'=>3,'tb_case.is_approve'=>3,'tb_construction.status'=>0,'tb_case.status'=>0,'tb_construction.appid'=>1,'tb_case.appid'=>1))->order('tb_construction.ord')->limit($Page->firstRow.','.$Page->listRows)->field('tb_construction.id,tb_case.consid,tb_construction.name cname,tb_construction.focus cfocus,tb_case.focus focus,tb_case.name,tb_case.housetype')->select();
     //echo $this->model->getLastSql();die;
     foreach ($aConstruction as $key => $val) {
         $aConstruction[$key]['case'] = D('Case')->where(array('is_approve' => 3, 'consid' => $val['id']))->limit(4)->select();
     }
     //dump($aConstruction);die;
     $this->assign('cons', $aConstruction);
     $this->assign('page', $show);
     $this->display();
 }