當前位置: 首頁>>代碼示例>>PHP>>正文


PHP Releases::getRange方法代碼示例

本文整理匯總了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();
開發者ID:RickDB,項目名稱:newznab-tmux,代碼行數:18,代碼來源:release-list.php

示例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 . '&amp;' : '';
$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();
開發者ID:scriptzteam,項目名稱:newzNZB-premium-indexer,代碼行數:25,代碼來源:release-list.php


注:本文中的Releases::getRange方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。