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


PHP Misc::genSmallPage方法代码示例

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


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

示例1: index

 public function index()
 {
     $post = array('alert' => '');
     Model::load('admincp/comments');
     if ($match = Uri::match('\\/comments\\/(\\w+)')) {
         if (method_exists("controlComments", $match[1])) {
             $method = $match[1];
             $this->{$method}();
             die;
         }
     }
     $curPage = 0;
     if ($match = Uri::match('\\/page\\/(\\d+)')) {
         $curPage = $match[1];
     }
     if (Request::has('btnAction')) {
         actionProcess();
     }
     if (Request::has('btnSearch')) {
         filterProcess();
     } else {
         $post['pages'] = Misc::genSmallPage('admincp/comments', $curPage);
         $filterPending = '';
         if (Uri::has('\\/status\\/pending')) {
             $filterPending = " AND c.status='0' ";
         }
         $post['theList'] = Comments::get(array('limitShow' => 20, 'limitPage' => $curPage, 'query' => "select c.*,p.title from " . Database::getPrefix() . "post p," . Database::getPrefix() . "comments c where c.postid=p.postid order by c.commentid desc", 'cacheTime' => 1));
     }
     System::setTitle('Comments list - ' . ADMINCP_TITLE);
     View::make('admincp/head');
     self::makeContents('commentsList', $post);
     View::make('admincp/footer');
 }
开发者ID:neworldwebsites,项目名称:noblessecms,代码行数:33,代码来源:controlComments.php

示例2: index

 public function index()
 {
     $post = array('alert' => '');
     Model::load('admincp/pages');
     if ($match = Uri::match('\\/pages\\/(\\w+)')) {
         if (method_exists("controlPages", $match[1])) {
             $method = $match[1];
             $this->{$method}();
             die;
         }
     }
     $curPage = 0;
     if ($match = Uri::match('\\/page\\/(\\d+)')) {
         $curPage = $match[1];
     }
     if (Request::has('btnAction')) {
         actionProcess();
     }
     if (Request::has('btnSearch')) {
         filterProcess();
     } else {
         $post['pages'] = Misc::genSmallPage('admincp/pages', $curPage);
         $filterPending = '';
         $post['theList'] = Pages::get(array('limitShow' => 20, 'limitPage' => $curPage, 'cacheTime' => 1));
     }
     System::setTitle('Pages list - ' . ADMINCP_TITLE);
     View::make('admincp/head');
     self::makeContents('pagesList', $post);
     View::make('admincp/footer');
 }
开发者ID:neworldwebsites,项目名称:noblessecms,代码行数:30,代码来源:controlPages.php

示例3: index

 public function index()
 {
     $post = array('alert' => '');
     Model::load('admincp/users');
     if ($match = Uri::match('\\/users\\/(\\w+)')) {
         if (method_exists("controlUsers", $match[1])) {
             $method = $match[1];
             $this->{$method}();
             die;
         }
     }
     $curPage = 0;
     if ($match = Uri::match('\\/page\\/(\\d+)')) {
         $curPage = $match[1];
     }
     if (Request::has('btnAction')) {
         actionProcess();
     }
     if (Request::has('btnSearch')) {
         filterProcess();
     } else {
         $post['pages'] = Misc::genSmallPage('admincp/users', $curPage);
         $prefix = '';
         $prefixall = Database::isPrefixAll();
         if ($prefixall != false || $prefixall == 'no') {
             $prefix = Database::getPrefix();
         }
         $post['theList'] = Users::get(array('limitShow' => 20, 'limitPage' => $curPage, 'query' => "select u.*,ug.*,a.* from " . $prefix . "users u," . $prefix . "usergroups ug,address a where u.groupid=ug.groupid AND u.userid=a.userid order by u.userid desc", 'cacheTime' => 1));
     }
     System::setTitle('User list - ' . ADMINCP_TITLE);
     View::make('admincp/head');
     self::makeContents('userList', $post);
     View::make('admincp/footer');
 }
开发者ID:neworldwebsites,项目名称:noblessecms,代码行数:34,代码来源:controlUsers.php

示例4: index

 public function index()
 {
     if ($match = Uri::match('\\/jsonCategory')) {
         $keyword = String::encode(Request::get('keyword', ''));
         $loadData = Categories::get(array('where' => "where title LIKE '%{$keyword}%'", 'orderby' => 'order by title asc'));
         $total = count($loadData);
         $li = '';
         for ($i = 0; $i < $total; $i++) {
             $li .= '<li><span data-method="category" data-id="' . $loadData[$i]['catid'] . '" >' . $loadData[$i]['title'] . '</span></li>';
         }
         echo $li;
         die;
     }
     $post = array('alert' => '');
     Model::load('admincp/categories');
     $curPage = 0;
     if ($match = Uri::match('\\/page\\/(\\d+)')) {
         $curPage = $match[1];
     }
     if (Request::has('btnAction')) {
         actionProcess();
     }
     if (Request::has('btnAdd')) {
         try {
             insertProcess();
             $post['alert'] = '<div class="alert alert-success">Add new category success.</div>';
         } catch (Exception $e) {
             $post['alert'] = '<div class="alert alert-warning">' . $e->getMessage() . '</div>';
         }
     }
     if (Request::has('btnSave')) {
         $match = Uri::match('\\/edit\\/(\\d+)');
         try {
             updateProcess($match[1]);
             $post['alert'] = '<div class="alert alert-success">Update category success.</div>';
         } catch (Exception $e) {
             $post['alert'] = '<div class="alert alert-warning">' . $e->getMessage() . '</div>';
         }
     }
     if (Request::has('btnSearch')) {
         filterProcess();
     } else {
         $post['pages'] = Misc::genSmallPage('admincp/categories', $curPage);
         $post['theList'] = Categories::get(array('limitShow' => 20, 'limitPage' => $curPage, 'orderby' => 'order by catid desc', 'cache' => 'no'));
     }
     if ($match = Uri::match('\\/edit\\/(\\d+)')) {
         $loadData = Categories::get(array('where' => "where catid='" . $match[1] . "'", 'cache' => 'no'));
         $post['edit'] = $loadData[0];
     }
     System::setTitle('Categories list - ' . ADMINCP_TITLE);
     View::make('admincp/head');
     self::makeContents('categoriesList', $post);
     View::make('admincp/footer');
 }
开发者ID:neworldwebsites,项目名称:noblessecms,代码行数:54,代码来源:controlCategories.php

示例5: index

 public function index()
 {
     $post = array('alert' => '');
     Model::load('admincp/links');
     $curPage = 0;
     if ($match = Uri::match('\\/page\\/(\\d+)')) {
         $curPage = $match[1];
     }
     if (Request::has('btnAction')) {
         actionProcess();
     }
     if (Request::has('btnAdd')) {
         try {
             insertProcess();
             $post['alert'] = '<div class="alert alert-success">Add new link success.</div>';
         } catch (Exception $e) {
             $post['alert'] = '<div class="alert alert-warning">' . $e->getMessage() . '</div>';
         }
     }
     if (Request::has('btnSave')) {
         $match = Uri::match('\\/edit\\/(\\d+)');
         try {
             updateProcess($match[1]);
             $post['alert'] = '<div class="alert alert-success">Update link success.</div>';
         } catch (Exception $e) {
             $post['alert'] = '<div class="alert alert-warning">' . $e->getMessage() . '</div>';
         }
     }
     if (Request::has('btnSearch')) {
         filterProcess();
     } else {
         $post['pages'] = Misc::genSmallPage('admincp/links', $curPage);
         $post['theList'] = Links::get(array('limitShow' => 20, 'limitPage' => $curPage, 'orderby' => 'order by sort_order asc', 'cache' => 'no'));
     }
     if ($match = Uri::match('\\/edit\\/(\\d+)')) {
         $loadData = Links::get(array('where' => "where id='" . $match[1] . "'", 'cache' => 'no'));
         $post['edit'] = $loadData[0];
     }
     $post['listLinks'] = Links::get(array('orderby' => 'order by sort_order asc', 'cache' => 'no'));
     System::setTitle('Links list - ' . ADMINCP_TITLE);
     View::make('admincp/head');
     self::makeContents('linksList', $post);
     View::make('admincp/footer');
 }
开发者ID:neworldwebsites,项目名称:noblessecms,代码行数:44,代码来源:controlLinks.php

示例6: index

 public function index()
 {
     if ($match = Uri::match('\\/jsonCategory')) {
         $keyword = String::encode(Request::get('keyword', ''));
         $loadData = Categories::get(array('where' => "where title LIKE '%{$keyword}%'", 'orderby' => 'order by title asc'));
         $total = count($loadData);
         $li = '';
         for ($i = 0; $i < $total; $i++) {
             $li .= '<li><span data-method="category" data-id="' . $loadData[$i]['catid'] . '" >' . $loadData[$i]['title'] . '</span></li>';
         }
         echo $li;
         die;
     }
     $post = array('alert' => '');
     Model::load('admincp/post');
     if ($match = Uri::match('\\/post\\/(\\w+)')) {
         if (method_exists("controlPost", $match[1])) {
             $method = $match[1];
             $this->{$method}();
             die;
         }
     }
     $curPage = 0;
     if ($match = Uri::match('\\/page\\/(\\d+)')) {
         $curPage = $match[1];
     }
     if (Request::has('btnAction')) {
         actionProcess();
     }
     if (Request::has('btnSearch')) {
         filterProcess();
     } else {
         $post['pages'] = Misc::genSmallPage('admincp/post', $curPage);
         $filterPending = '';
         if (Uri::has('\\/status\\/pending')) {
             $filterPending = " WHERE p.status='0' ";
         }
         $post['theList'] = Post::get(array('limitShow' => 20, 'limitPage' => $curPage, 'query' => "select p.*,u.username,c.title as cattitle from " . Database::getPrefix() . "post p left join users u on p.userid=u.userid join " . Database::getPrefix() . "categories c on p.catid=c.catid {$filterPending} order by p.postid desc", 'cache' => 'no'));
     }
     System::setTitle('Post list - ' . ADMINCP_TITLE);
     View::make('admincp/head');
     self::makeContents('postList', $post);
     View::make('admincp/footer');
 }
开发者ID:neworldwebsites,项目名称:noblessecms,代码行数:44,代码来源:controlPost.php


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