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


PHP Page::show方法代码示例

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


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

示例1: caseList

 public function caseList()
 {
     if ($this->isLogin()) {
         import('ORG.Util.Page');
         //导入分页类
         $Page = new Page($count, 5);
         if (!$this->isPost()) {
             $count = $this->model->where()->count();
             $show = $Page->show();
             $data = $this->model->where()->order('createtime desc')->limit($Page->firstRow . ',' . $Page->listRows)->select();
             $this->assign('page', $show);
             $this->assign('data', $data);
             $this->display();
         } else {
             $decoration = getRequest("decoration");
             $style = getRequest("style");
             $where = array('decoration_style' => $decoration, 'style' => $style);
             if (!$where) {
                 $this->error('请填写查询条件');
             } else {
                 $count = $this->model->where($where)->count();
                 $show = $Page->show();
                 $data = $this->model->where($where)->order('createtime desc')->limit($Page->firstRow . ',' . $Page->listRows)->select();
                 if ($data) {
                     $this->assign('page', $show);
                     $this->assign('data', $data);
                     $this->display();
                 } else {
                     $this->error('没有查到符合内容!', $_SERVER['HTTP_REFERER']);
                 }
             }
         }
     }
 }
开发者ID:noikiy,项目名称:yisheji,代码行数:34,代码来源:CaseAction.class.php

示例2: index

 function index()
 {
     $classify = $this->_get('classify');
     //$classid = $this->_get('classid');
     //if($classify){
     $db = D('Img');
     $where['classname'] = $classify;
     $where['classid'] = $classid;
     $_SESSION['classname'] = $classify;
     $_SESSION['classid'] = $classid;
     $count = $db->where($where)->count();
     $page = new Page($count, 25);
     $info = $db->where($where)->order('statdate DESC,id DESC')->limit($page->firstRow . ',' . $page->listRows)->select();
     $this->assign('page', $page->show());
     $this->assign('info', $info);
     $info2 = M('Function')->where(array('name' => $classify))->find();
     $this->assign('classify', $info2['funtype']);
     $this->assign('classify2', $classify);
     $this->assign('token', session('token'));
     $this->display('Img:index');
     //}
     //else{
     //	$this->error('没有找到该分类!');
     //}
 }
开发者ID:dalinhuang,项目名称:website-of-huai,代码行数:25,代码来源:MyClassifyAction.class.php

示例3: index

 public function index()
 {
     if ($this->open_sign == 0) {
         //未开启活动提示
     }
     $set_id = M('sign_set')->where(array('token' => session('token')))->getField('id');
     // $where 		= array('set_id'=>$set_id);
     $where = array();
     $user_name = $this->_post('user_name', 'htmlspecialchars,trim');
     $sort = $this->_post('sort', 'trim');
     $startdate = strtotime($this->_post('startdate', 'trim'));
     $enddate = strtotime($this->_post('enddate', 'trim'));
     if ($startdate && $enddate) {
         $where['time'] = array(array('gt', $startdate), array('lt', $enddate), 'and');
     }
     if ($user_name) {
         $where['user_name'] = array('like', '%' . $user_name . '%');
     }
     if (empty($sort)) {
         $order = 'time desc';
     } else {
         $order = 'time ' . $sort;
     }
     $count = $this->sign_db->where($where)->count();
     $Page = new Page($count, 12);
     $list = $this->sign_db->where($where)->order($order)->limit($Page->firstRow . ',' . $Page->listRows)->select();
     $this->assign('search', array('startdate' => $startdate, 'enddate' => $enddate, 'sort' => $sort));
     $this->assign('page', $Page->show());
     $this->assign('list', $list);
     $this->assign('listinfo', 1);
     $this->display();
 }
开发者ID:d0oo0b,项目名称:wechatcms,代码行数:32,代码来源:SigninAction.class.php

示例4: cate

 private function cate()
 {
     require APP_ROOT_PATH . 'app/Lib/page.php';
     $cate_id = 6;
     $GLOBALS['tmpl']->caching = true;
     $cache_id = md5(MODULE_NAME . ACTION_NAME . "cate" . $cate_id . intval($_REQUEST['p']));
     if (!$GLOBALS['tmpl']->is_cached('page/usagetip_index.html', $cache_id)) {
         $cate_item = $GLOBALS['db']->getRow("select * from " . DB_PREFIX . "article_cate where id = {$cate_id} and is_effect = 1 and is_delete = 0");
         if ($cate_id > 0 && !$cate_item) {
             app_redirect(APP_ROOT . "/");
         }
         $cate_tree = get_acate_tree();
         $GLOBALS['tmpl']->assign("acate_tree", $cate_tree);
         //分页
         $page = intval($_REQUEST['p']);
         if ($page == 0) {
             $page = 1;
         }
         $limit = ($page - 1) * app_conf("PAGE_SIZE") . "," . app_conf("PAGE_SIZE");
         $result = get_article_list($limit, $cate_id, '', '');
         $GLOBALS['tmpl']->assign("list", $result['list']);
         $page = new Page($result['count'], app_conf("PAGE_SIZE"));
         //初始化分页对象
         $p = $page->show();
         $GLOBALS['tmpl']->assign('pages', $p);
         //使用技巧
         $use_tech_list = get_article_list(6, 6);
         $GLOBALS['tmpl']->assign("use_tech_list", $use_tech_list);
         $GLOBALS['tmpl']->assign("page_title", $cate_item['title']);
         $GLOBALS['tmpl']->assign("page_keyword", $cate_item['title'] . ",");
         $GLOBALS['tmpl']->assign("page_description", $cate_item['title'] . ",");
     }
     $GLOBALS['tmpl']->display("page/usagetip_index.html", $cache_id);
 }
开发者ID:workplayteam,项目名称:P2P,代码行数:34,代码来源:usagetipModule.class.php

示例5: index

 public function index()
 {
     if (!$GLOBALS['user_info']) {
         app_redirect(url("user#login"));
     }
     $all = intval($_REQUEST['all']);
     $page_size = 20;
     $page = intval($_REQUEST['p']);
     if ($page == 0) {
         $page = 1;
     }
     $limit = ($page - 1) * $page_size . "," . $page_size;
     if ($all == 0) {
         $cond = " and is_read = 0 ";
     } else {
         $cond = " and 1=1 ";
     }
     $GLOBALS['tmpl']->assign("all", $all);
     $sql = "select * from " . DB_PREFIX . "user_notify  where user_id = " . intval($GLOBALS['user_info']['id']) . " {$cond}  order by log_time desc limit " . $limit;
     $sql_count = "select count(*) from " . DB_PREFIX . "user_notify  where user_id = " . intval($GLOBALS['user_info']['id']) . " {$cond}  ";
     $notify_list = $GLOBALS['db']->getAll($sql);
     $notify_count = $GLOBALS['db']->getOne($sql_count);
     foreach ($notify_list as $k => $v) {
         $notify_list[$k]['url'] = parse_url_tag("u:" . $v['url_route'] . "|" . $v['url_param']);
     }
     $GLOBALS['tmpl']->assign("notify_list", $notify_list);
     require APP_ROOT_PATH . 'app/Lib/page.php';
     $page = new Page($notify_count, $page_size);
     //初始化分页对象
     $p = $page->show();
     $GLOBALS['tmpl']->assign('pages', $p);
     $GLOBALS['tmpl']->display("notify.html");
 }
开发者ID:noikiy,项目名称:yisheji,代码行数:33,代码来源:notifyModule.class.php

示例6: index

 public function index()
 {
     if (IS_POST) {
         $this->all_insert('Recognition');
     } else {
         $db = D('Recognition');
         $where = array('token' => session('token'));
         $count = $db->where($where)->count();
         $page = new Page($count, 25);
         $wechat_group_db = M('Wechat_group');
         $list = $db->where($where)->limit($page->firstRow . ',' . $page->listRows)->order('id desc')->select();
         foreach ($list as $key => $value) {
             $list[$key]['group'] = $wechat_group_db->where(array('token' => $this->token, 'wechatgroupid' => $value['groupid']))->getField('name');
         }
         $groups = $wechat_group_db->where(array('token' => $this->token))->order('id ASC')->select();
         $this->assign('groups', $groups);
         $this->assign('page', $page->show());
         $this->assign('list', $list);
         if (ALI_FUWU_GROUP) {
             $fuwu = 'yes';
         } else {
             $fuwu = 'no';
         }
         $this->assign('fuwu', $fuwu);
         $this->display();
     }
 }
开发者ID:node-rookie,项目名称:bdg,代码行数:27,代码来源:RecognitionAction.class.php

示例7: index

 public function index()
 {
     parent::userauth2(60);
     $sid = I('get.sid', '');
     $menu = D('Dmenu');
     import('ORG.Util.Page');
     // 导入分页类
     if ($sid != '') {
         $where['Sid'] = $sid;
     } else {
         $where['Sid'] = 0;
     }
     $count = $menu->where($where)->count();
     //总记录数
     $Page = new Page($count, 15);
     //实例化分页类 传入总记录数和每页显示的记录数
     $Page->setConfig('header', '条记录');
     $Page->setConfig('prev', '<img src="__IMAGE__/prev.gif" border="0" title="上一页" />');
     $Page->setConfig('next', '<img src="__IMAGE__/next.gif" border="0" title="下一页" />');
     $Page->setConfig('first', '<img src="__IMAGE__/first.gif" border="0" title="第一页" />');
     $Page->setConfig('last', '<img src="__IMAGE__/last.gif" border="0" title="最后一页" />');
     $show = $Page->show();
     //分页显示输出
     $volist = $menu->relation(true)->where($where)->order('Sortid asc')->limit($Page->firstRow . ',' . $Page->listRows)->select();
     $list = $menu->where('Sid = 0')->order('Sortid asc')->select();
     $this->assign('volist', $volist);
     $this->assign('list', $list);
     $this->assign('sid', $sid);
     $this->assign('page', $show);
     //输出分页
     $this->co = $count;
     $this->display('System/dmenu');
 }
开发者ID:argen77,项目名称:OA,代码行数:33,代码来源:DmenuAction.class.php

示例8: index

 public function index()
 {
     global $tmpl;
     $rel_table = addslashes(trim($_REQUEST['act']));
     $message_type = $GLOBALS['db']->getRow("select * from " . DB_PREFIX . "message_type where type_name='" . $rel_table . "' and type_name <> 'supplier'");
     if (!$message_type || $message_type['is_fix'] == 0) {
         app_redirect(APP_ROOT . "/");
     }
     $rel_table = $message_type['type_name'];
     $condition = '';
     $id = intval($_REQUEST['id']);
     if ($rel_table == 'deal') {
         $deal = get_deal($id);
         if ($deal['buy_type'] != 1) {
             $GLOBALS['tmpl']->assign("deal", $deal);
         }
         $id = $deal['id'];
     }
     require APP_ROOT_PATH . 'app/Lib/side.php';
     if ($id > 0) {
         $condition = "rel_table = '" . $rel_table . "' and rel_id = " . $id;
     } else {
         $condition = "rel_table = '" . $rel_table . "'";
     }
     if (app_conf("USER_MESSAGE_AUTO_EFFECT") == 0) {
         $condition .= " and user_id = " . intval($GLOBALS['user_info']['id']);
     } else {
         if ($message_type['is_effect'] == 0) {
             $condition .= " and user_id = " . intval($GLOBALS['user_info']['id']);
         }
     }
     $condition .= " and is_buy = " . intval($_REQUEST['is_buy']);
     //message_form 变量输出
     $GLOBALS['tmpl']->assign("post_title", $message_type['show_name']);
     $GLOBALS['tmpl']->assign("page_title", $message_type['show_name']);
     $GLOBALS['tmpl']->assign('rel_id', $id);
     $GLOBALS['tmpl']->assign('rel_table', $rel_table);
     $GLOBALS['tmpl']->assign('is_buy', intval($_REQUEST['is_buy']));
     if (intval($_REQUEST['is_buy']) == 1) {
         $GLOBALS['tmpl']->assign("post_title", $GLOBALS['lang']['AFTER_BUY']);
         $GLOBALS['tmpl']->assign("page_title", $GLOBALS['lang']['AFTER_BUY']);
     }
     if (!$GLOBALS['user_info']) {
         $GLOBALS['tmpl']->assign("message_login_tip", sprintf($GLOBALS['lang']['MESSAGE_LOGIN_TIP'], url("shop", "user#login"), url("shop", "user#register")));
     }
     //分页
     $page = intval($_REQUEST['p']);
     if ($page == 0) {
         $page = 1;
     }
     $limit = ($page - 1) * app_conf("PAGE_SIZE") . "," . app_conf("PAGE_SIZE");
     $message = get_message_list($limit, $condition);
     $page = new Page($message['count'], app_conf("PAGE_SIZE"));
     //初始化分页对象
     $p = $page->show();
     $GLOBALS['tmpl']->assign('pages', $p);
     $GLOBALS['tmpl']->assign("message_list", $message['list']);
     $GLOBALS['tmpl']->assign("user_auth", get_user_auth());
     $GLOBALS['tmpl']->display("message.html");
 }
开发者ID:YouthAndra,项目名称:huaitaoo2o,代码行数:60,代码来源:messageModule.class.php

示例9: index

 public function index()
 {
     $form_id = intval(I('get.form_id'));
     $map = array('id' => $form_id, 'is_del' => 0);
     $form_one = D('form')->where($map)->find();
     if (!$form_one) {
         $this->error('未找到表单,请返回重试!');
     }
     $list = array();
     $map = array('form_id' => $form_id, 'is_del' => 0);
     $count = D('foreign_test')->where($map)->count('id');
     if ($count > 0) {
         import("@.Org.Util.Page");
         $p = new \Page($count, 5);
         //分页跳转的时候保证查询条件
         foreach ($_GET as $key => $val) {
             if (!is_array($val)) {
                 $p->parameter .= $key . '=' . urlencode($val) . '&';
             }
         }
         //分页显示
         $page = $p->show();
         $list = D('foreign_test')->field('id,name,updatetime,dateline')->where($map)->order('id desc')->limit($p->firstRow . ',' . $p->listRows)->select();
     }
     $this->assign('form_one', $form_one);
     $this->assign('page', $page);
     $this->assign('list', $list);
     $this->display();
 }
开发者ID:dlpc,项目名称:formdesign,代码行数:29,代码来源:DemodataController.class.php

示例10: M

 function index2()
 {
     $items_mod = M('items');
     $items_comments_mod = M('items_comments');
     import("ORG.Util.Page");
     $prex = C('DB_PREFIX');
     //搜索
     $where = '1=1';
     if (isset($_GET['keyword']) && trim($_GET['keyword'])) {
         $where .= " AND (" . $prex . "info.name LIKE '%" . $_GET['keyword'] . "%' or title LIKE '%" . $_GET['keyword'] . "%')";
         $this->assign('keyword', $_GET['keyword']);
     }
     $count = $mod->where($where)->count();
     $p = new Page($count, 20);
     $list = $mod->where($where)->field($prex . 'user_comments.*,' . $prex . 'items.title as title')->join('LEFT JOIN ' . $prex . 'items ON ' . $prex . 'user_comments.items_id = ' . $prex . 'items.id ')->limit($p->firstRow . ',' . $p->listRows)->order($prex . 'user_comments.add_time DESC')->select();
     echo $mod->getlastSQL();
     exit;
     $key = 1;
     foreach ($list as $k => $val) {
         $list[$k]['key'] = ++$p->firstRow;
     }
     $big_menu = array('javascript:window.top.art.dialog({id:\'add\',iframe:\'?m=items_comments&a=add\', title:\'' . L('add_flink') . '\', width:\'450\', height:\'250\', lock:true}, function(){var d = window.top.art.dialog({id:\'add\'}).data.iframe;var form = d.document.getElementById(\'dosubmit\');form.click();return false;}, function(){window.top.art.dialog({id:\'add\'}).close()});void(0);', L('add_flink'));
     $page = $p->show();
     $this->assign('page', $page);
     $this->assign('big_menu', $big_menu);
     $this->assign('list', $list);
     $this->display();
 }
开发者ID:nexteee,项目名称:php,代码行数:28,代码来源:items_commentsAction.class.php

示例11: M

 function notice_management($flag = null)
 {
     $a = M('notice');
     import('ORG.Util.Date');
     // 导入日期类
     import('ORG.Util.Page');
     // 导入分页类
     $count = $a->where($where)->count();
     //获取数据的总数
     $page = new Page($count, 15);
     //
     $page->setConfig('header', '条信息');
     $show = $page->show();
     //返回分页信息
     $arr = $a->where($where)->order('istop desc,createtime desc')->limit($page->firstRow . ',' . $page->listRows)->select();
     for ($i = 0; $i < sizeof($arr); $i++) {
         $arr[$i]['createtime'] = $arr[$i]['createtime'];
         $Date = new Date($arr[$i]['createtime']);
         $time = $Date->dateDiff(time(), 'd');
         // 比较日期差
         $arr[$i]['lefttop'] = round($arr[$i]['topday'] - $time);
     }
     $this->assign('show', $show);
     $this->assign("notice", $arr);
     if (!$flag) {
         $this->display();
     }
 }
开发者ID:IreneHui,项目名称:shoppingmall,代码行数:28,代码来源:Item_publishAction.class.php

示例12: index

 public function index()
 {
     $user_id = $GLOBALS['user_info']['id'];
     $page = intval($_REQUEST['p']);
     if ($page == 0) {
         $page = 1;
     }
     $limit = ($page - 1) * app_conf("PAGE_SIZE") . "," . app_conf("PAGE_SIZE");
     $status = $_REQUEST['status'];
     if (!$status) {
         $condition = "";
     } elseif ($status == 3) {
         $condition = " and status = 0";
         //未审核
     } elseif ($status == 1) {
         $condition = " and status = 1";
         //已通过
     } elseif ($status == 2) {
         $condition = " and status = 2";
         //未通过
     }
     $GLOBALS['tmpl']->assign('status', $status);
     $result = get_deal_quota_list($limit, $user_id, $condition);
     $GLOBALS['tmpl']->assign("list", $result['list']);
     $page = new Page($result['count'], app_conf("PAGE_SIZE"));
     //初始化分页对象
     $p = $page->show();
     $GLOBALS['tmpl']->assign('pages', $p);
     $GLOBALS['tmpl']->assign("page_title", "授信额度申请");
     $GLOBALS['tmpl']->assign("inc_file", "inc/uc/uc_deal_quota.html");
     $GLOBALS['tmpl']->display("page/uc.html");
 }
开发者ID:norain2050,项目名称:fanwei_xindai_3.2,代码行数:32,代码来源:uc_deal_quotaModule.class.php

示例13: get_user

 public function get_user($url, $name = '', $schoolName = '')
 {
     $page = new Page();
     $listRows = 1;
     //产品每页显示的信息条数
     $field = 'name, addr, phone, s_name, point';
     // $url=__URL__.'?p={page}';//分页基准网址
     $cur_page = $page->getCurPage($url);
     $limit_start = ($cur_page - 1) * $listRows;
     $limit = $limit_start . ',' . $listRows;
     $con = '';
     if (!empty($schoolName)) {
         $con = 's_id=\'' . $schoolName . '\'';
     }
     if (!empty($name)) {
         if (empty($con)) {
             $con = 'name like \'%' . $name . '%\'';
         } else {
             $con .= ' and name like \'%' . $name . '%\'';
         }
     }
     if (empty($con)) {
         $count = $this->model->table($this->config['info_person'])->count();
         $sql = $this->model->table($this->config['info_person'])->field($field)->limit($limit)->select();
     } else {
         $count = $this->model->table($this->config['info_person'])->where($con)->count();
         $sql = $this->model->table($this->config['info_person'])->field($field)->where($con)->limit($limit)->select();
     }
     return array('data' => $sql, 'page' => $page->show($url, $count, $listRows));
 }
开发者ID:heYeCheng,项目名称:manager,代码行数:30,代码来源:sql_userMod.class.php

示例14: searchuser

 public function searchuser()
 {
     $searchcondition = I('searchcondition', '');
     $searchcontent = I('searchcontent', '');
     if ($searchcondition == 'sclass') {
         switch ($searchcontent) {
             case '店铺':
                 $searchcontent = 1;
                 break;
             case '管理':
                 $searchcontent = 2;
                 break;
             case '供应商':
                 $searchcontent = 3;
                 break;
         }
     }
     if (!empty($searchcondition) && !empty($searchcontent)) {
         import('ORG.Util.Page');
         $condition[$searchcondition] = array('like', '%' . $searchcontent . '%');
         $count = M('shop')->where($condition)->count();
         $page = new Page($count, 10);
         $limit = $page->firstRow . ',' . $page->listRows;
         $shop = M('shop')->where($condition)->order('sclass')->limit($limit)->select();
         $this->page = $page->show();
         $this->shop = $shop;
         $this->display('index');
     }
 }
开发者ID:lq97206120,项目名称:HighYan,代码行数:29,代码来源:ShopAction.class.php

示例15: sp_sql_qiushis_paged

function sp_sql_qiushis_paged($tag = "", $pagesize = 20, $pagetpl = '{first}{prev}{liststart}{list}{listend}{next}{last}')
{
    $tag = sp_param_lable($tag);
    $field = !empty($tag['field']) ? $tag['field'] : 'b.*';
    $limit = !empty($tag['limit']) ? $tag['limit'] : '';
    $order = !empty($tag['order']) ? $tag['order'] : 'createtime desc';
    $field = "a.cat_name,c.user_login,c.user_nicename," . $field;
    $qiushi_cat_model = M("QiushiCat");
    $join = C('DB_PREFIX') . 'qiushi as b on a.id =b.cid';
    $join2 = C('DB_PREFIX') . 'users as c on c.id =b.uid';
    $where = array("b.status" => 1, "a.status" => 1);
    if (isset($tag['cid'])) {
        $where['cid'] = array('in', $tag['cid']);
    }
    $totalsize = $qiushi_cat_model->alias("a")->join($join)->where($where)->count();
    import('Page');
    $PageParam = C("VAR_PAGE");
    $page = new \Page($totalsize, $pagesize);
    $page->setLinkWraper("li");
    $page->__set("PageParam", $PageParam);
    $pagetpl = '{first}{prev}{liststart}{list}{listend}{next}{last}';
    $page->SetPager('default', $pagetpl, array("listlong" => "6", "first" => "首页", "last" => "尾页", "prev" => "上一页", "next" => "下一页", "list" => "*", "disabledclass" => ""));
    $qiushis = $qiushi_cat_model->field($field)->alias("a")->join($join)->join($join2)->where($where)->order($order)->limit($page->firstRow . ',' . $page->listRows)->select();
    $return['count'] = $totalsize;
    $return['items'] = $qiushis;
    $return['page'] = $page->show('default');
    return $return;
}
开发者ID:lvxiaolin,项目名称:thinkcfm,代码行数:28,代码来源:function.php


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