本文整理汇总了PHP中Releases::getRange方法的典型用法代码示例。如果您正苦于以下问题:PHP Releases::getRange方法的具体用法?PHP Releases::getRange怎么用?PHP Releases::getRange使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Releases
的用法示例。
在下文中一共展示了Releases::getRange方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: AdminPage
<?php
require_once "config.php";
$page = new AdminPage();
$releases = new Releases();
$page->title = "Release List";
$releasecount = $releases->getCount();
$offset = isset($_REQUEST["offset"]) ? $_REQUEST["offset"] : 0;
$page->smarty->assign('pagertotalitems', $releasecount);
$page->smarty->assign('pageroffset', $offset);
$page->smarty->assign('pageritemsperpage', ITEMS_PER_PAGE);
$page->smarty->assign('pagerquerybase', WWW_TOP . "/release-list.php?offset=");
$pager = $page->smarty->fetch("pager.tpl");
$page->smarty->assign('pager', $pager);
$releaselist = $releases->getRange($offset, ITEMS_PER_PAGE);
$page->smarty->assign('releaselist', $releaselist);
$page->content = $page->smarty->fetch('release-list.tpl');
$page->render();
示例2: AdminPage
<?php
require_once "config.php";
require_once WWW_DIR . "/lib/adminpage.php";
require_once WWW_DIR . "/lib/releases.php";
$page = new AdminPage();
$releases = new Releases();
$page->title = "Release List";
$offset = isset($_REQUEST["offset"]) ? $_REQUEST["offset"] : 0;
$activeonly = isset($_REQUEST['active']) && $_REQUEST['active'] == "1" ? 1 : 0;
$releasecount = $releases->getCount($activeonly);
$page->smarty->assign('active', $activeonly);
$page->smarty->assign('pagertotalitems', $releasecount);
$page->smarty->assign('pageroffset', $offset);
$page->smarty->assign('pageritemsperpage', ITEMS_PER_PAGE);
$releasesearch = $activeonly != "" ? 'active=' . $activeonly . '&' : '';
$page->smarty->assign('pagerquerybase', WWW_TOP . "/release-list.php?" . $releasesearch . "offset=");
$pager = $page->smarty->fetch("pager.tpl");
$page->smarty->assign('pager', $pager);
$page->smarty->assign('active_ids', array(1, 0));
$page->smarty->assign('active_names', array('Awaiting Post-processing', 'All'));
$releaselist = $releases->getRange($offset, ITEMS_PER_PAGE, $activeonly);
$page->smarty->assign('releaselist', $releaselist);
$page->content = $page->smarty->fetch('release-list.tpl');
$page->render();