Ejemplo n.º 1
0
 public function processAnime()
 {
     if ($this->site->lookupanidb == 1) {
         $anidb = new AniDB($this->echooutput);
         $anidb->animetitlesUpdate();
         $anidb->processAnimeReleases();
     }
 }
Ejemplo n.º 2
0
<?php

require_once "config.php";
require_once WWW_DIR . "/lib/adminpage.php";
require_once WWW_DIR . "/lib/anidb.php";
$page = new AdminPage();
$AniDB = new AniDB();
$id = 0;
// set the current action
$action = isset($_REQUEST['action']) ? $_REQUEST['action'] : 'view';
switch ($action) {
    case 'submit':
        $AniDB->updateTitle($_POST["anidbID"], $_POST["title"], $_POST["type"], $_POST["startdate"], $_POST["enddate"], $_POST["related"], $_POST["creators"], $_POST["description"], $_POST["rating"], $_POST["categories"], $_POST["characters"], $_POST["epnos"], $_POST["airdates"], $_POST["episodetitles"]);
        if (isset($_POST['from']) && !empty($_POST['from'])) {
            header("Location:" . $_POST['from']);
            exit;
        }
        header("Location:" . WWW_TOP . "/anidb-list.php");
        break;
    case 'view':
    default:
        if (isset($_GET["id"])) {
            $page->title = "AniDB Edit";
            $AniDBAPIArray = $AniDB->getAnimeInfo($_GET["id"]);
            $page->smarty->assign('anime', $AniDBAPIArray);
        }
        break;
}
$page->title = "Edit AniDB Data";
$page->content = $page->smarty->fetch('anidb-edit.tpl');
$page->render();
Ejemplo n.º 3
0
     $music = new Musik(['Settings' => $page->settings]);
     $mus = $music->getMusicInfo($data['musicinfoid']);
 }
 $book = '';
 if ($data['bookinfoid'] != '') {
     $b = new Book();
     $book = $b->getBookInfo($data['bookinfoid']);
 }
 $con = '';
 if ($data['consoleinfoid'] != '') {
     $c = new Console();
     $con = $c->getConsoleInfo($data['consoleinfoid']);
 }
 $AniDBAPIArray = '';
 if ($data["anidbid"] > 0) {
     $AniDB = new AniDB(['Settings' => $releases->pdo]);
     $AniDBAPIArray = $AniDB->getAnimeInfo($data["anidbid"]);
 }
 $predbQuery = '';
 if ($data["preid"] > 0) {
     $PreDB = new PreDB();
     $predbQuery = $PreDB->getByID($data["preid"]);
 }
 $prehash = new PreHash();
 $pre = $prehash->getForRelease($data["prehashid"]);
 $rf = new ReleaseFiles();
 $releasefiles = $rf->get($data["id"]);
 $page->smarty->assign('releasefiles', $releasefiles);
 $page->smarty->assign('release', $data);
 $page->smarty->assign('reVideo', $reVideo);
 $page->smarty->assign('reAudio', $reAudio);
Ejemplo n.º 4
0
             if (!empty($r['country'])) {
                 $seriescountry[] = $r['country'];
             }
             if (!empty($r['genre'])) {
                 $seriesgenre[] = $r['genre'];
             }
             if (!empty($r['imgdata'])) {
                 $seriesimg[] = $r['imgdata'];
                 $seriesid[] = $r['id'];
             }
         }
         $rage = array('releasetitle' => array_shift($seriesnames), 'description' => array_shift($seriesdescription), 'country' => array_shift($seriescountry), 'genre' => array_shift($seriesgenre), 'imgdata' => array_shift($seriesimg), 'id' => array_shift($seriesid));
     }
 }
 if ($data['anidbid'] > 0) {
     $AniDB = new AniDB(['Settings' => $releases->pdo]);
     $ani = $AniDB->getAnimeInfo($data['anidbid']);
 }
 if ($data['imdbid'] != '' && $data['imdbid'] != 00) {
     $movie = new Movie(['Settings' => $page->settings]);
     $mov = $movie->getMovieInfo($data['imdbid']);
     $trakt = new TraktTv(['Settings' => $page->settings]);
     $traktSummary = $trakt->traktMoviesummary('tt' . $data['imdbid'], true);
     if ($traktSummary !== false && isset($traktSummary['trailer']) && $traktSummary['trailer'] !== '' && preg_match('/[\\/?]v[\\/\\=](\\w+)$/i', $traktSummary['trailer'], $youtubeM)) {
         $mov['trailer'] = '<embed width="480" height="345" src="' . 'https://www.youtube.com/v/' . $youtubeM[1] . '" type="application/x-shockwave-flash"></embed>';
     } else {
         $mov['trailer'] = nzedb\utility\imdb_trailers($data['imdbid']);
     }
     if ($mov && isset($mov['title'])) {
         $mov['title'] = str_replace(array('/', '\\'), '', $mov['title']);
         $mov['actors'] = $movie->makeFieldLinks($mov, 'actors');
Ejemplo n.º 5
0
 /**
  * Lookup anidb if enabled - always run before tvrage.
  *
  * @return void
  */
 public function processAnime()
 {
     if ($this->pdo->getSetting('lookupanidb') == 1) {
         $anidb = new \AniDB(['Echo' => $this->echooutput, 'Settings' => $this->pdo]);
         $anidb->animetitlesUpdate();
         $anidb->processAnimeReleases();
     }
 }
Ejemplo n.º 6
0
<?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;
            }
Ejemplo n.º 7
0
 /**
  * Process all TV related releases which will assign their series/episode/rage data
  */
 public function processTv()
 {
     if ($this->pdo->getSetting('lookupanidb') == 1) {
         $anidb = new AniDB($this->echooutput);
         $anidb->animetitlesUpdate();
         $anidb->processAnimeReleases();
     }
     if ($this->pdo->getSetting('lookuptvrage') == 1) {
         $tvrage = new TVRage($this->echooutput);
         $tvrage->processTvReleases($this->pdo->getSetting('lookuptvrage') == 1);
     }
     if ($this->pdo->getSetting('lookupthetvdb') == 1) {
         $thetvdb = new TheTVDB($this->echooutput);
         $thetvdb->processReleases();
     }
 }
Ejemplo n.º 8
0
<?php

require_once "config.php";
$page = new AdminPage();
$AniDB = new AniDB();
$page->title = "AniDB List";
$aname = "";
if (isset($_REQUEST['animetitle']) && !empty($_REQUEST['animetitle'])) {
    $aname = $_REQUEST['animetitle'];
}
$animecount = $AniDB->getAnimeCount($aname);
$offset = isset($_REQUEST["offset"]) ? $_REQUEST["offset"] : 0;
$asearch = $aname != "" ? 'animetitle=' . $aname . '&amp;' : '';
$page->smarty->assign('pagertotalitems', $animecount);
$page->smarty->assign('pageroffset', $offset);
$page->smarty->assign('pageritemsperpage', ITEMS_PER_PAGE);
$page->smarty->assign('pagerquerybase', WWW_TOP . "/anidb-list.php?" . $asearch . "&offset=");
$pager = $page->smarty->fetch("pager.tpl");
$page->smarty->assign('pager', $pager);
$page->smarty->assign('animetitle', $aname);
$anidblist = $AniDB->getAnimeRange($offset, ITEMS_PER_PAGE, $aname);
$page->smarty->assign('anidblist', $anidblist);
$page->content = $page->smarty->fetch('anidb-list.tpl');
$page->render();
 /**
  * Process all TV related releases which will assign their series/episode data
  */
 public function processTv()
 {
     if ($this->site->lookupanidb == 1) {
         $anidb = new AniDB($this->echooutput);
         $anidb->animetitlesUpdate();
         $anidb->processAnimeReleases();
     }
     $tvinfo = new TvInfo($this->echooutput);
     $tvinfo->processTvReleases($this->site);
 }
Ejemplo n.º 10
0
<?php

require_once "config.php";
$page = new AdminPage();
if (isset($_GET['id'])) {
    $AniDB = new AniDB();
    $AniDB->deleteTitle($_GET['id']);
}
$referrer = $_SERVER['HTTP_REFERER'];
header("Location: " . $referrer);