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


PHP Releases::searchbyAnidbId方法代码示例

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


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

示例1: Releases

<?php

require_once WWW_DIR . '/lib/releases.php';
require_once WWW_DIR . '/lib/anidb.php';
$Releases = new Releases();
$AniDB = new AniDB();
if (!$users->isLoggedIn()) {
    $page->show403();
}
if (isset($_GET['id']) && ctype_digit($_GET['id'])) {
    $release = $Releases->searchbyAnidbId($_GET['id'], '', 0, 1000, '', -1);
    $AniDBAPIArray = $AniDB->getAnimeInfo($_GET['id']);
    if (!$release || !$AniDBAPIArray) {
        $page->show404();
    }
    $animeEpisodeTitle = $postdate = array();
    foreach ($release as $rlk => $rlv) {
        $animeEpisodeTitle[$rlk] = $rlv['tvtitle'];
        $postdate[$rlk] = $rlv['postdate'];
    }
    $animeEpisodeTitles = array();
    foreach ($release as $r) {
        $animeEpisodeTitles[$r['tvtitle']][] = $r;
    }
    $page->smarty->assign('animeEpisodeTitles', $animeEpisodeTitles);
    $page->smarty->assign('animeAnidbID', $AniDBAPIArray['anidbID']);
    $page->smarty->assign('animeTitle', $AniDBAPIArray['title']);
    $page->smarty->assign('animeType', $AniDBAPIArray['type']);
    $page->smarty->assign('animePicture', $AniDBAPIArray['picture']);
    $page->smarty->assign('animeStartDate', $AniDBAPIArray['startdate']);
    $page->smarty->assign('animeEndDate', $AniDBAPIArray['enddate']);
开发者ID:ehsanguru,项目名称:nnplus,代码行数:31,代码来源:anime.php

示例2: Releases

<?php

if (!$page->users->isLoggedIn()) {
    $page->show403();
}
$Releases = new Releases(['Settings' => $page->settings]);
$AniDB = new AniDB(['Settings' => $page->settings]);
if (isset($_GET['id']) && ctype_digit($_GET['id'])) {
    # force the category to 5070 as it should be for anime, as $catarray was NULL and we know the category for sure for anime
    $releases = $Releases->searchbyAnidbId($_GET['id'], '', 0, 1000, '', array('5070'), -1);
    $anidb = $AniDB->getAnimeInfo($_GET['id']);
    if (!$releases && !$anidb) {
        $page->show404();
    } else {
        if (!$anidb) {
            $page->smarty->assign('nodata', 'No AniDB information for this series.');
        } elseif (!$releases) {
            $page->smarty->assign('nodata', 'No releases for this series.');
        } else {
            // Sort releases by season, episode, date posted.
            $season = $episode = $posted = [];
            foreach ($releases as $rlk => $rlv) {
                $season[$rlk] = $rlv['season'];
                $episode[$rlk] = $rlv['episode'];
                $posted[$rlk] = $rlv['postdate'];
            }
            array_multisort($episode, SORT_DESC, $posted, SORT_DESC, $releases);
            $seasons = [];
            foreach ($releases as $r) {
                $seasons[$r['season']][$r['episode']][] = $r;
            }
开发者ID:RickDB,项目名称:newznab-tmux,代码行数:31,代码来源:anime.php

示例3: Releases

<?php

if (!$page->users->isLoggedIn()) {
    $page->show403();
}
$Releases = new Releases(['Settings' => $page->settings]);
$AniDB = new AniDB(['Settings' => $page->settings]);
if (isset($_GET["id"]) && ctype_digit($_GET['id'])) {
    # force the category to 5070 as it should be for anime, as $catarray was NULL and we know the category for sure for anime
    $release = $Releases->searchbyAnidbId($_GET["id"], '', 0, 1000, "", array("5070"), -1);
    $AniDBAPIArray = $AniDB->getAnimeInfo($_GET['id']);
    if (!$release && !$AniDBAPIArray) {
        $page->show404();
    }
    $animeEpisodeTitle = $postdate = array();
    foreach ($release as $rlk => $rlv) {
        $animeEpisodeTitle[$rlk] = $rlv['tvtitle'];
        $postdate[$rlk] = $rlv['postdate'];
    }
    $animeEpisodeTitles = array();
    foreach ($release as $r) {
        $animeEpisodeTitles[$r['tvtitle']][] = $r;
    }
    $page->smarty->assign('animeEpisodeTitlesSize', count($animeEpisodeTitles));
    $page->smarty->assign('animeEpisodeTitles', $animeEpisodeTitles);
    $page->smarty->assign('animeAnidbID', $AniDBAPIArray['anidbid']);
    # case is off on old variable this resolves that, I do not think the other is ever used, but left if anyways
    $page->smarty->assign('animeAnidbid', $AniDBAPIArray['anidbid']);
    $page->smarty->assign('animeTitle', $AniDBAPIArray['title']);
    $page->smarty->assign('animeType', $AniDBAPIArray['type']);
    $page->smarty->assign('animePicture', $AniDBAPIArray['picture']);
开发者ID:Jay204,项目名称:nZEDb,代码行数:31,代码来源:anime.php


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