本文整理汇总了PHP中pagination::render方法的典型用法代码示例。如果您正苦于以下问题:PHP pagination::render方法的具体用法?PHP pagination::render怎么用?PHP pagination::render使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类pagination
的用法示例。
在下文中一共展示了pagination::render方法的10个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: actionLibrary
public function actionLibrary($globalid, $field, $image = '')
{
if (empty($image)) {
//zotop::redirect('zotop/image/upload',array('globalid'=>$globalid, 'field'=>$field, 'image'=>url::encode($image)));
}
$file = zotop::model('zotop.image');
$images = $file->db()->where('type', '=', 'image')->where('globalid', '=', $globalid)->orderby('createtime', 'desc')->getPage();
$pagination = new pagination();
$pagination->page = $images['page'];
$pagination->pagesize = $images['pagesize'];
$pagination->total = $images['total'];
$p = $pagination->render();
$page = new dialog();
$page->set('title', '图片库');
$page->set('globalid', $globalid);
$page->set('field', $field);
$page->set('navbar', $this->navbar($globalid, $field, $image));
$page->set('image', $image);
$page->set('page', $images['page']);
$page->set('pagesize', $images['pagesize']);
$page->set('total', $images['total']);
$page->set('images', $images['data']);
$page->set('pagination', $p);
$page->display();
}
示例2: actionIndex
public function actionIndex($categoryid = 0, $status = null)
{
$where = array();
if (!empty($categoryid)) {
$where[] = 'AND';
$where[] = array('categoryid', '=', $categoryid);
}
if (isset($status)) {
$where[] = 'AND';
$where[] = array('status', '=', $status);
}
$where = array_slice($where, 1);
$blog = zotop::model('blog.blog');
$blogs = $blog->db()->where($where)->orderby('order', 'desc')->orderby('updatetime', 'desc')->getPage();
$blogstatus = $blog->status();
$category = zotop::model('blog.category');
$categorys = $category->getAll();
$categorys = arr::hashmap($categorys, 'id');
$pagination = new pagination();
$pagination->page = $blogs['page'];
$pagination->pagesize = $blogs['pagesize'];
$pagination->total = $blogs['total'];
$p = $pagination->render();
$page = new page();
$page->set('title', '日志管理');
$page->set('navbar', $this->navbar($categoryid));
$page->set('blogs', $blogs);
$page->set('status', $status);
$page->set('blogstatus', $blogstatus);
$page->set('pagination', $p);
$page->set('categoryid', $categoryid);
$page->set('categorys', $categorys);
$page->display();
}
示例3: actionIndex
public function actionIndex($type = '')
{
$file = zotop::model('zotop.file');
if (!empty($type)) {
$where = array('type', '=', $type);
}
$files = $file->db()->where($where)->orderby('createtime', 'desc')->getPage();
$pagination = new pagination();
$pagination->page = $files['page'];
$pagination->pagesize = $files['pagesize'];
$pagination->total = $files['total'];
$p = $pagination->render();
$totalsize = $file->totalsize();
$totalcount = $file->count();
$page = new page();
$page->set('title', zotop::t('文件管理'));
$page->set('navbar', $this->navbar());
$page->set('page', $files['page']);
$page->set('pagesize', $files['pagesize']);
$page->set('total', $files['total']);
$page->set('files', $files['data']);
$page->set('totalsize', $totalsize);
$page->set('totalcount', $totalcount);
$page->set('pagination', $p);
$page->display();
}
示例4: output
public static function output($total, $page = 0, $pagesize = 0, $url = '')
{
if (is_array($total)) {
$page = $total['page'];
$pagesize = $total['pagesize'];
$url = $total['url'];
$total = $total['total'];
}
$pagination = new pagination();
$pagination->total = $total;
$pagination->page = $page;
$pagination->pagesize = $pagesize;
$pagination->url = $url;
$p = $pagination->render();
return $p;
}
示例5: actionIndex
public function actionIndex($type = 'all', $folderid = 0)
{
$file = zotop::model('system.file');
$folder = zotop::model('system.folder');
if (!empty($type) && $type != 'all') {
$where = array('file.type', '=', $type);
}
$files = $file->db()->select('file.*', 'user.name as user_name', 'user.username as user_username')->join('user', 'user.id', 'file.userid')->where($where)->orderby('file.createtime', 'desc')->getPage();
//zotop::dump($file->db()->Sql());
$types = $file->types();
$pagination = new pagination();
$pagination->page = $files['page'];
$pagination->pagesize = $files['pagesize'];
$pagination->total = $files['total'];
$p = $pagination->render();
$totalsize = $file->totalsize($where);
$totalcount = $file->count();
$folders = $folder->getAll();
$tree = new tree($folders, 0);
$position = $tree->getPosition($folderid);
foreach ($position as $p) {
$pos[zotop::url('system/file/index/' . $type . '/' . $p['id'])] = $p['title'];
}
$page = new page();
$page->set('title', zotop::t('文件管理'));
$page->set('position', array(zotop::url('system/file') => zotop::t('文件管理'), zotop::url('system/file/' . $type . '/0') => zotop::t('全部文件')) + (array) $pos + array('列表'));
$page->set('navbar', $this->navbar());
$page->set('page', $files['page']);
$page->set('pagesize', $files['pagesize']);
$page->set('total', $files['total']);
$page->set('files', $files['data']);
$page->set('totalsize', $totalsize);
$page->set('totalcount', $totalcount);
$page->set('pagination', $p);
$page->set('types', $types);
$page->set('type', $type);
$page->set('folderid', $folderid);
$page->display();
}
示例6: actionIndex
public function actionIndex($categoryid = 0, $status = null)
{
$blog = zotop::model('blog.blog');
$blogs = $blog->getPage($categoryid, $status);
$blogstatus = $blog->status();
$category = zotop::model('blog.category');
$categorys = $category->getAll();
$pagination = new pagination();
$pagination->page = $blogs['page'];
$pagination->pagesize = $blogs['pagesize'];
$pagination->total = $blogs['total'];
$p = $pagination->render();
$page = new page();
$page->set('title', '日志管理');
$page->set('navbar', $this->navbar($categoryid));
$page->set('blogs', $blogs);
$page->set('status', $status);
$page->set('blogstatus', $blogstatus);
$page->set('pagination', $p);
$page->set('categoryid', $categoryid);
$page->set('categorys', $categorys);
$page->display();
}
示例7: actionBrowser
public function actionBrowser($folderid = 0)
{
$file = zotop::model('system.file');
if ($folderid == 0) {
$images = $file->db()->where('type', '=', 'image')->orderby('createtime', 'desc')->getPage();
} else {
$images = $file->db()->where('type', '=', 'image')->where('folderid', '=', $folderid)->orderby('createtime', 'desc')->getPage();
}
$pagination = new pagination();
$pagination->page = $images['page'];
$pagination->pagesize = $images['pagesize'];
$pagination->total = $images['total'];
$p = $pagination->render();
$page = new page();
$page->set('title', '图片库');
$page->set('image', $image);
$page->set('page', $images['page']);
$page->set('pagesize', $images['pagesize']);
$page->set('total', $images['total']);
$page->set('images', $images['data']);
$page->set('pagination', $p);
$page->display();
}
示例8: limitmot
.html" id="link">
<p class="titactp"><?php
echo $row->titre;
?>
</p>
<p id="datact" class="datact"><?php
echo $row->dat;
?>
</p>
<P class="contact"><?php
echo limitmot($row->content, 25) . '.....' . '<span class="suit">' . lg('SUIT') . '</span>';
?>
</P>
</a>
</div><!--End act-->
<?php
}
?>
</div>
<?php
// render the pagination links
$pagination->render();
} else {
header('location:./');
}
?>
示例9: controller_news_index
function controller_news_index()
{
$NewsPage = new pagination();
return "<ul class=\"pagination pagination-sm\">" . $NewsPage->render() . "</ul>";
}
示例10: actionIndex
public function actionIndex($categoryid = 0, $status = null)
{
$content = zotop::model('content.content');
//获取模型信息
$model = zotop::model('content.model');
$models = $model->cache();
//获取栏目信息
$category = zotop::model('content.category');
$categories = $category->cache();
$db = $content->db()->select('content.*,user.username,user.name,user.email')->join('user', 'user.id', 'content.userid', 'left')->orderby('content.order', 'desc')->orderby('content.updatetime', 'desc');
if ($categoryid) {
if (isset($categories[$categoryid])) {
$childids = explode(',', $categories[$categoryid]['childids']);
if (is_array($childids)) {
$db->where('content.categoryid', 'in', $childids);
}
}
}
if (is_numeric($status)) {
$db->where('content.status', '=', $status);
} else {
//默认不显示回收站的内容
$db->where('content.status', '>=', -50);
}
if ($keywords = zotop::get('keywords')) {
$db->where(array(array('content.title', 'like', $keywords), 'or', array('content.keywords', 'like', $keywords), 'or', array('user.name', 'like', $keywords), 'or', array('user.username', 'like', $keywords)));
}
$contents = $db->getPage();
$position = array(zotop::url('content') => zotop::t('内容管理'), zotop::url('content/content') => zotop::t('内容库'));
if ($categoryid) {
$pos = $category->getPosition($categoryid);
foreach ($pos as $p) {
$position[zotop::url('content/content/index/' . $p['id'])] = $p['title'];
}
}
if ($keywords) {
$position[] = zotop::t('搜索结果');
} else {
$position[] = zotop::t('内容列表');
}
$pagination = new pagination();
$pagination->page = $contents['page'];
$pagination->pagesize = $contents['pagesize'];
$pagination->total = $contents['total'];
$p = $pagination->render();
$statuses = $content->status();
$page = new page();
$page->set('title', zotop::t('内容管理'));
$page->set('position', $position);
$page->set('navbar', $this->navbar($categoryid));
$page->set('categoryid', $categoryid);
$page->set('contents', $contents['data']);
$page->set('pagesize', $contents['pagesize']);
$page->set('total', $contents['total']);
$page->set('page', $contents['page']);
$page->set('pagination', $p);
$page->set('categories', $categories);
$page->set('models', $models);
$page->set('statuses', $statuses);
$page->display();
}