本文整理汇总了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']);
示例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;
}
示例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']);