Inheritance: extends module
 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();
 }
示例#2
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();
 }
示例#3
0
 public function actionIndex()
 {
     $page = new page();
     $page->title = zotop::t('系统管理');
     $page->navbar = $this->navbar();
     $page->display();
 }
示例#4
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();
 }
示例#5
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');
 }
示例#6
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');
 }
示例#7
0
 function index_action()
 {
     $this->public_action();
     if ($_GET['type'] == 0) {
         $table = "question";
     } elseif ($_GET['type'] == 1) {
         $table = "answer";
     } elseif ($_GET['type'] == 2) {
         $table = "answer_review";
     }
     include LIB_PATH . "page3.class.php";
     $limit = 10;
     $page = $_GET["page"] < 1 ? 1 : $_GET["page"];
     $ststrsql = ($page - 1) * $limit;
     $page_url = "index.php?c=" . $_GET['c'] . "&type=" . intval($_GET['type']) . "&page={{page}}";
     $num = $this->obj->DB_select_num($table, "`uid`='" . $this->uid . "'");
     if ($num > $limit) {
         $pages = ceil($num / $limit);
         $page = new page($page, $limit, $num, $page_url);
         $pagenav = $page->numPage();
     }
     if ($_GET["type"] == 0) {
         $list = $this->obj->DB_select_all($table, "`uid`='" . $this->uid . "'  ORDER BY `add_time` DESC LIMIT {$ststrsql},{$limit}");
     } else {
         $list = $this->obj->DB_select_alls($table, "question", "a.`uid`='" . $this->uid . "' and a.`qid`=b.`id`  ORDER BY a.`add_time` DESC LIMIT {$ststrsql},{$limit}", "a.`content`,a.`add_time`,b.`id`,b.`title`,a.`id` as `aid`");
     }
     if ($list[0] != '') {
         $this->yunset("q_list", $list);
     }
     $this->yunset("gettype", $_GET["type"]);
     $this->yunset("pagenav", $pagenav);
     $this->user_tpl('my_question');
 }
 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();
 }
示例#9
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();
 }
示例#10
0
function categoryList()
{
    $page = new page();
    $categ = new category();
    $get_list = $categ->getAllList();
    $page->printCategories($get_list);
}
function addPage($link, $name, $description)
{
    $link = "playlist/" . $link;
    $title = $name . " Playlist";
    $page = new page();
    $page->addPage($link, $title, $description, "Switch", "VideoChunk");
}
示例#12
0
 public function actionIndex()
 {
     $page = new page();
     $page->title = zotop::t('模板管理');
     $page->set('navbar', $this->navbar());
     $page->display();
 }
示例#13
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();
 }
示例#14
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();
 }
示例#15
0
 public function show()
 {
     //if (!$this->QX[$this->get['open']][$this->get['action']]) $this->fun->Msg('你没有此权限');
     if (is_numeric($this->get['weight'])) {
         $this->default_value();
         $start = (double) $this->get['weight'] / 10;
         $stop = $start + 0.09;
         switch ($this->get['weight']) {
             case '03':
                 $weight = "and weight<={$stop}";
                 break;
             case '010':
                 $weight = "and weight>={$start}";
                 break;
             default:
                 $weight = "and weight>={$start} and weight<={$stop}";
         }
         $this->get['px'] = $this->get['px'] ? $this->get['px'] : 'agio';
         $this->get['orders'] = $this->get['orders'] ? $this->get['orders'] : 'asc';
         $ORDER = $this->get['px'] . ' ' . $this->get['orders'];
         $this->sma->assign('get', $this->get);
         $promotion_dot = $_SESSION['proxy']['is_offer'] == 'Y' ? 'promotion_dot' : $_SESSION['proxy']['rebate'];
         require_once BASEPATH . '../Class/page.php';
         $list = new page();
         $list->db = $this->db;
         $list->pageNS = 50;
         $list->NowPage = empty($this->get['page']) | $this->get['page'] < 1 | !is_numeric($this->get['page']) ? 1 : $this->get['page'];
         $list->SQL = "select id,ProID,shape,weight,color,clarity,cut,buffing,symmetry,Fent_Isity,scalar_value,diploma,diplomaNO,INTbid,(agio+baseAgio+{$promotion_dot}) as agio from product where  status='up' {$weight} and amount>0 and is_promotion='Y' and promotion_start<=UNIX_TIMESTAMP() and promotion_stop>=UNIX_TIMESTAMP() order by {$ORDER}";
         //$list->SQL = "select id,ProID,shape,weight,color,clarity,cut,buffing,symmetry,Fent_Isity,scalar_value,diploma,diplomaNO,INTbid,(agio+baseAgio+{$promotion_dot}) as agio from product where  status='up' {$weight} and amount>0 and proSource='self' order by {$ORDER}";
         $this->sma->assign('list_page', $list->getPage(true));
         $this->sma->assign('list_text', $list->getText());
     } else {
         $this->default_value();
         //$start = (float)$this->get['weight'] / 10;
         //$stop = $start + 0.09;
         //switch($this->get['weight'])
         //{
         //	case '03':$weight = "and weight<={$stop}";break;
         //	case '010':$weight = "and weight>={$start}";break;
         //	default:$weight = "and weight>={$start} and weight<={$stop}";
         //}
         $weight = "and weight>=0.3";
         $this->get['px'] = $this->get['px'] ? $this->get['px'] : 'agio';
         $this->get['orders'] = $this->get['orders'] ? $this->get['orders'] : 'asc';
         $ORDER = $this->get['px'] . ' ' . $this->get['orders'];
         $this->sma->assign('get', $this->get);
         $promotion_dot = $_SESSION['proxy']['is_offer'] == 'Y' ? 'promotion_dot' : $_SESSION['proxy']['rebate'];
         require_once BASEPATH . '../Class/page.php';
         $list = new page();
         $list->db = $this->db;
         $list->pageNS = 50;
         $list->NowPage = empty($this->get['page']) | $this->get['page'] < 1 | !is_numeric($this->get['page']) ? 1 : $this->get['page'];
         $list->SQL = "select id,ProID,shape,weight,color,clarity,cut,buffing,symmetry,Fent_Isity,scalar_value,diploma,diplomaNO,INTbid,(agio+baseAgio+{$promotion_dot}) as agio from product where  status='up' {$weight} and amount>0 and is_promotion='Y' and promotion_start<=UNIX_TIMESTAMP() and promotion_stop>=UNIX_TIMESTAMP() order by {$ORDER}";
         //$list->SQL = "select id,ProID,shape,weight,color,clarity,cut,buffing,symmetry,Fent_Isity,scalar_value,diploma,diplomaNO,INTbid,(agio+baseAgio+{$promotion_dot}) as agio from product where  status='up' {$weight} and amount>0 and proSource='self' order by {$ORDER}";
         $this->sma->assign('list_page', $list->getPage(true));
         $this->sma->assign('list_text', $list->getText());
     }
     $this->sma->display('SP');
 }
示例#16
0
 public function actionIndex()
 {
     $page = new page();
     $page->title = '系统管理中心';
     $page->body = array('class' => 'frame');
     $page->set('user', $this->user);
     $page->display();
 }
示例#17
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();
	}
示例#18
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());
 }
示例#19
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;
}
示例#20
0
 public function actionDetail($id)
 {
     $content = zotop::model('content.content');
     $content->read($id);
     $page = new page();
     $page->set('content', $content);
     $page->set('body', array('class' => 'detail'));
     $page->display($content->template);
 }
示例#21
0
function getSample_404()
{
    $content_page = new page("page not found in database");
    $content_page->setType("blank");
    $content_page->body = SAMPLE_404;
    $content_siteFileObj = OBJECTS_FOLDER . "/site/site.obj";
    $content_page->parent = $content_siteFileObj;
    return $content_page;
}
 private function addPageToDB($eid, $slug, $title)
 {
     $link = "podcast/" . $slug . "/" . $eid;
     $queryPodcast = new queryPodcast();
     $description = json_decode($queryPodcast->getPodcastData($slug), true);
     $description = $description["description"];
     $page = new page();
     $page->addPage($link, $title, $description, "Podcast", "Podcast");
 }
示例#23
0
 public function actionLocation($globalid)
 {
     $file = zotop::model('system.file');
     $images = $file->db()->where('type', '=', 'image')->where('globalid', '=', $globalid)->orderby('createtime', 'desc')->getAll();
     $page = new page();
     $page->set('title', '已上传图片');
     $page->set('globalid', $globalid);
     $page->set('images', $images);
     $page->display();
 }
示例#24
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();
 }
示例#25
0
 function index_action()
 {
     $this->set_search();
     if ($_GET['m'] == 'comnews') {
         if (trim($_GET['keyword'])) {
             if ($_GET['type']) {
                 if ($_GET['type'] == "1") {
                     $where .= " and b.`name` like '%" . $_GET['keyword'] . "%'";
                 } else {
                     $where .= " and a.`title` like '%" . $_GET['keyword'] . "%'";
                 }
                 $urlarr['type'] = $_GET['type'];
             }
             $urlarr['keyword'] = $_GET['keyword'];
         } elseif ($_GET['status']) {
             if ($_GET['status'] == "3") {
                 $where .= " and a.`status`='0'";
             } else {
                 $where .= " and a.`status`='" . $_GET['status'] . "'";
             }
             $urlarr['status'] = $_GET['status'];
         }
     }
     if ($_GET['time']) {
         if ($_GET['time'] == '1') {
             $where .= " and a.`ctime` >= '" . strtotime(date("Y-m-d 00:00:00")) . "'";
         } else {
             $where .= " and a.`ctime` >= '" . strtotime('-' . (int) $_GET['time'] . 'day') . "'";
         }
         $urlarr['time'] = $_GET['time'];
     }
     if ($_GET['order']) {
         $where .= " order by a.`" . $_GET['t'] . "` " . $_GET['order'];
         $urlarr['order'] = $_GET['order'];
         $urlarr['t'] = $_GET['t'];
     } else {
         $where .= " order by a.`id` desc";
     }
     $urlarr['order'] = $_GET['order'];
     include LIB_PATH . "page.class.php";
     $limit = $this->config['sy_listnum'];
     $page = $_GET['page'] < 1 ? 1 : $_GET['page'];
     $ststrsql = ($page - 1) * $limit;
     $urlarr['page'] = "{{page}}";
     $pageurl = Url($_GET['m'], $urlarr, 'admin');
     $count = $this->obj->DB_select_alls("company_news", "company", "a.`uid`=b.`uid` {$where}", "a.uid");
     $num = count($count);
     $page = new page($page, $limit, $num, $pageurl);
     $pagenav = $page->numPage();
     $rows = $this->obj->DB_select_alls("company_news", "company", "a.`uid`=b.`uid` {$where}  limit {$ststrsql},{$limit}", "b.name,a.*");
     $this->yunset("pagenav", $pagenav);
     $this->yunset("rows", $rows);
     $this->yunset("get_type", $_GET);
     $this->yuntpl(array('admin/admin_comnews'));
 }
示例#26
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();
     //показываем страницу
 }
示例#27
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());
 }
示例#28
0
 function contact()
 {
     global $__in, $__out;
     $page = new page($__in['id']);
     if ($page->send_contact_email($__in['contact']['name'], $__in['contact']['email'], $__in['contact']['subject'], $__in['contact']['message'])) {
         $__out['contact'] = $__in['contact'];
         return dispatcher::redirect(array("action" => "contact_thankyou"));
     } else {
         $__out['contact'] = $__in['contact'];
         return dispatcher::redirect(array("action" => "showonepage", "id" => $__in['id']));
     }
 }
示例#29
0
 function index_action()
 {
     $this->set_search();
     if ($_GET['status']) {
         if ($_GET['status'] == '3') {
             $where = " and a.`status`='0'";
             $urlarr['status'] = '0';
         } else {
             $where = " and a.`status`='" . $_GET['status'] . "'";
             $urlarr['status'] = $_GET['status'];
         }
     }
     if ($_GET['keyword']) {
         $where .= " and b.`name` like '%" . $_GET['keyword'] . "%'";
         $urlarr['keyword'] = $_GET['keyword'];
     }
     if ($_GET['status']) {
         if ($_GET['status'] == '3') {
             $where .= " and a.`status` ='0'";
         } else {
             $where .= " and a.`status` ='" . $_GET['status'] . "'";
         }
     }
     if ($_GET['end']) {
         if ($_GET['end'] == '1') {
             $where .= " and `ctime` >= '" . strtotime(date("Y-m-d 00:00:00")) . "'";
         } else {
             $where .= " and `ctime` >= '" . strtotime('-' . (int) $_GET['end'] . 'day') . "'";
         }
         $urlarr['end'] = $_GET['end'];
     }
     if ($_GET['order']) {
         $where .= " order by a.`" . $_GET['t'] . "` " . $_GET['order'];
         $urlarr['order'] = $_GET['order'];
         $urlarr['t'] = $_GET['t'];
     } else {
         $where .= " order by a.`id` desc";
     }
     include LIB_PATH . "page3.class.php";
     $limit = $this->config["sy_listnum"];
     $page = $_GET["page"] < 1 ? 1 : $_GET["page"];
     $ststrsql = ($page - 1) * $limit;
     $urlarr["page"] = "{{page}}";
     $pageurl = $this->url("index", $_GET["m"], $urlarr);
     $count = $this->obj->DB_select_alls("company_cert", "company", "a.`uid`=b.`uid` and a.`type`='3' {$where}", "a.uid");
     $num = count($count);
     $page = new page($page, $limit, $num, $pageurl);
     $pagenav = $page->numPage();
     $rows = $this->obj->DB_select_alls("company_cert", "company", "a.`uid`=b.`uid` and a.`type`='3' {$where} {$order} limit {$ststrsql},{$limit}", "b.name,a.*");
     $this->yunset("pagenav", $pagenav);
     $this->yunset("rows", $rows);
     $this->yuntpl(array('admin/admin_com_cert'));
 }
 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();
 }