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


PHP Releases::getBrowseOrdering方法代码示例

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


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

示例1: Releases

             $page->smarty->assign('from', $_REQUEST['from']);
         }
         $page->content = $page->smarty->fetch('myshows-add.tpl');
         $page->render();
     }
     break;
 case 'browse':
     $page->title = "Browse My Shows";
     $page->meta_title = "My Shows";
     $page->meta_keywords = "search,add,to,cart,nzb,description,details";
     $page->meta_description = "Browse Your Shows";
     $shows = $us->getShows($users->currentUserId());
     $releases = new Releases();
     $browsecount = $releases->getShowsCount($shows, -1, $page->userdata["categoryexclusions"]);
     $offset = isset($_REQUEST["offset"]) && ctype_digit($_REQUEST['offset']) ? $_REQUEST["offset"] : 0;
     $ordering = $releases->getBrowseOrdering();
     $orderby = isset($_REQUEST["ob"]) && in_array($_REQUEST['ob'], $ordering) ? $_REQUEST["ob"] : '';
     $results = array();
     $results = $releases->getShowsRange($shows, $offset, ITEMS_PER_PAGE, $orderby, -1, $page->userdata["categoryexclusions"]);
     $page->smarty->assign('pagertotalitems', $browsecount);
     $page->smarty->assign('pageroffset', $offset);
     $page->smarty->assign('pageritemsperpage', ITEMS_PER_PAGE);
     $page->smarty->assign('pagerquerybase', WWW_TOP . "/myshows/browse?ob=" . $orderby . "&offset=");
     $page->smarty->assign('pagerquerysuffix', "#results");
     $pager = $page->smarty->fetch($page->getCommonTemplate("pager.tpl"));
     $page->smarty->assign('pager', $pager);
     foreach ($ordering as $ordertype) {
         $page->smarty->assign('orderby' . $ordertype, WWW_TOP . "/myshows/browse?ob=" . $ordertype . "&offset=0");
     }
     $page->smarty->assign('lastvisit', $page->userdata['lastlogin']);
     $page->smarty->assign('results', $results);
开发者ID:ehsanguru,项目名称:nnplus,代码行数:31,代码来源:myshows.php

示例2: Groups

<?php

if (!$page->users->isLoggedIn()) {
    $page->show403();
}
$groups = new Groups(['Settings' => $page->settings]);
$releases = new Releases(['Groups' => $groups, 'Settings' => $page->settings]);
$page->meta_title = "Search Nzbs";
$page->meta_keywords = "search,nzb,description,details";
$page->meta_description = "Search for Nzbs";
$results = [];
$searchType = "basic";
if (isset($_REQUEST["search_type"]) && $_REQUEST["search_type"] == "adv") {
    $searchType = "advanced";
}
$ordering = $releases->getBrowseOrdering();
$orderBy = isset($_REQUEST["ob"]) && in_array($_REQUEST['ob'], $ordering) ? $_REQUEST["ob"] : '';
$offset = isset($_REQUEST["offset"]) && ctype_digit($_REQUEST['offset']) ? $_REQUEST["offset"] : 0;
$page->smarty->assign(['subject' => '', 'search' => '', 'category' => [0], 'pagertotalitems' => 0, 'pageritemsperpage' => 1, 'pageroffset' => 1, 'covgroup' => '']);
if ((isset($_REQUEST["id"]) || isset($_REQUEST["subject"])) && !isset($_REQUEST["searchadvr"]) && $searchType == "basic") {
    $searchString = '';
    switch (true) {
        case isset($_REQUEST["subject"]):
            $searchString = (string) $_REQUEST["subject"];
            $page->smarty->assign('subject', $searchString);
            break;
        case isset($_REQUEST["id"]):
            $searchString = (string) $_REQUEST["id"];
            $page->smarty->assign('search', $searchString);
            break;
    }
开发者ID:engine9-,项目名称:newznab-tmux,代码行数:31,代码来源:search.php


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