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


PHP Releases::searchbyRageId方法代码示例

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


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

示例1: Releases

if (!$page->users->isLoggedIn()) {
    $page->show403();
}
$releases = new Releases();
$tvrage = new TvRage();
$cat = new Category();
$us = new UserSeries();
if (isset($_GET["id"]) && ctype_digit($_GET['id'])) {
    $category = -1;
    if (isset($_REQUEST["t"]) && ctype_digit($_REQUEST["t"])) {
        $category = $_REQUEST["t"];
    }
    $catarray = [];
    $catarray[] = $category;
    $rel = $releases->searchbyRageId($_GET["id"], '', '', 0, 1000, "", $catarray, -1);
    $rage = $tvrage->getByRageID($_GET['id']);
    if (!$rage) {
        $page->smarty->assign('nodata', 'No tvrage information for this series.');
    } elseif (!$rel) {
        $page->smarty->assign('nodata', 'No releases for this series.');
    } else {
        $myshows = $us->getShow($page->users->currentUserId(), $rage[0]['rageid']);
        // Sort releases by season, episode, date posted.
        $season = $episode = $posted = [];
        foreach ($rel as $rlk => $rlv) {
            $season[$rlk] = $rlv['season'];
            $episode[$rlk] = $rlv['episode'];
            $posted[$rlk] = $rlv['postdate'];
        }
        array_multisort($season, SORT_DESC, $episode, SORT_DESC, $posted, SORT_DESC, $rel);
开发者ID:RickDB,项目名称:newznab-tmux,代码行数:30,代码来源:series.php

示例2: showApiError

     if (isset($_GET["season"]) && $_GET["season"] == "") {
         showApiError(200);
     }
     if (isset($_GET["ep"]) && $_GET["ep"] == "") {
         showApiError(200);
     }
     $users->addApiRequest($uid, $_SERVER['REQUEST_URI']);
     $limit = 100;
     if (isset($_GET["limit"]) && is_numeric($_GET["limit"]) && $_GET["limit"] < 100) {
         $limit = $_GET["limit"];
     }
     $offset = 0;
     if (isset($_GET["offset"]) && is_numeric($_GET["offset"])) {
         $offset = $_GET["offset"];
     }
     $reldata = $releases->searchbyRageId(isset($_GET["rid"]) ? $_GET["rid"] : "-1", isset($_GET["season"]) ? $_GET["season"] : "", isset($_GET["ep"]) ? $_GET["ep"] : "", $offset, $limit, isset($_GET["q"]) ? $_GET["q"] : "", $categoryId, $maxage);
     if ($outputtype == "xml") {
         $page->smarty->assign('offset', $offset);
         $page->smarty->assign('releases', $reldata);
         header("Content-type: text/xml");
         echo trim($page->smarty->fetch('apiresult.tpl'));
     } else {
         echo json_encode($reldata);
         //TODO:make that a more specific array of data to return rather than resultset
     }
     break;
     //
     // search movie releases
     //
 //
 // search movie releases
开发者ID:ehsanguru,项目名称:nnplus,代码行数:31,代码来源:api.php

示例3: printOutput

             $relData[0]['_totalrows'] = $totalRows;
         }
     }
     printOutput($relData, $outputXML, $page, $offset);
     break;
     // Search tv releases.
 // Search tv releases.
 case 'tv':
     verifyEmptyParameter('q');
     verifyEmptyParameter('rid');
     verifyEmptyParameter('season');
     verifyEmptyParameter('ep');
     $maxAge = maxAge();
     $page->users->addApiRequest($uid, $_SERVER['REQUEST_URI'], $hosthash);
     $offset = offset();
     $relData = $releases->searchbyRageId(isset($_GET['rid']) ? $_GET['rid'] : '-1', isset($_GET['season']) ? $_GET['season'] : '', isset($_GET['ep']) ? $_GET['ep'] : '', $offset, limit(), isset($_GET['q']) ? $_GET['q'] : '', categoryid(), $maxAge);
     addLanguage($relData, $page->settings);
     printOutput($relData, $outputXML, $page, $offset);
     break;
     //
     // get nfo
     //
 //
 // get nfo
 //
 case "gn":
     if (!isset($_GET["id"])) {
         showApiError(200);
     }
     $page->users->addApiRequest($uid, $_SERVER['REQUEST_URI'], $hosthash);
     $reldata = $releases->getByGuid($_GET["id"]);
开发者ID:engine9-,项目名称:newznab-tmux,代码行数:31,代码来源:api.php


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