Exemplo n.º 1
0
    }
    if ($page->users->getApiRequests($uid) > $maxRequests) {
        header('X-nZEDb: ERROR: You have reached your daily limit for API requests!');
        $page->show503();
    } else {
        $page->users->addApiRequest($uid, $_SERVER['REQUEST_URI']);
    }
    // Valid or logged in user, get them the requested feed.
    $userRage = $userAnidb = -1;
    if (isset($_GET["rage"])) {
        $userRage = $_GET["rage"] == 0 ? -1 : $_GET["rage"] + 0;
    } elseif (isset($_GET["anidb"])) {
        $userAnidb = $_GET["anidb"] == 0 ? -1 : $_GET["anidb"] + 0;
    }
    $userCat = isset($_GET['t']) ? $_GET['t'] == 0 ? -1 : $_GET['t'] : -1;
    $userNum = isset($_GET["num"]) && is_numeric($_GET['num']) ? abs($_GET['num']) : 100;
    $userAirDate = isset($_GET["airdate"]) && is_numeric($_GET['airdate']) ? abs($_GET["airdate"]) : -1;
    $page->smarty->assign(['dl' => isset($_GET['dl']) && $_GET['dl'] == '1' ? '1' : '0', 'del' => isset($_GET['del']) && $_GET['del'] == '1' ? '1' : '0', 'uid' => $uid, 'rsstoken' => $rssToken]);
    if ($userCat == -3) {
        $relData = $releases->getShowsRss($userNum, $uid, $page->users->getCategoryExclusion($uid), $userAirDate);
    } elseif ($userCat == -4) {
        $relData = $releases->getMyMoviesRss($userNum, $uid, $page->users->getCategoryExclusion($uid));
    } else {
        $relData = $releases->getRss(explode(',', $userCat), $userNum, $userRage, $userAnidb, $uid, $userAirDate);
    }
    $page->smarty->assign('releases', $relData);
    $response = trim($page->smarty->fetch('rss.tpl'));
    header("Content-type: text/xml");
    header('Content-Length: ' . strlen($response));
    echo $response;
}
Exemplo n.º 2
0
    if (isset($_GET["rage"])) {
        $userrage = $_GET["rage"] == 0 ? -1 : $_GET["rage"] + 0;
    } elseif (isset($_GET["anidb"])) {
        $useranidb = $_GET["anidb"] == 0 ? -1 : $_GET["anidb"] + 0;
    }
    $usernum = 100;
    if (isset($_GET["num"])) {
        $usernum = $_GET["num"] + 0;
    }
    if (isset($_GET["del"]) && $_GET["del"] == "1") {
        $page->smarty->assign("del", "1");
    }
    $userairdate = -1;
    if (isset($_GET["airdate"])) {
        $userairdate = $_GET["airdate"] + 0;
    }
    $page->smarty->assign('uid', $uid);
    $page->smarty->assign('rsstoken', $rsstoken);
    if ($usercat == -3) {
        $catexclusions = $page->users->getCategoryExclusion($uid);
        $reldata = $releases->getShowsRss($usernum, $uid, $catexclusions, $userairdate);
    } elseif ($usercat == -4) {
        $catexclusions = $page->users->getCategoryExclusion($uid);
        $reldata = $releases->getMyMoviesRss($usernum, $uid, $catexclusions);
    } else {
        $reldata = $releases->getRss(explode(",", $usercat), $usernum, $userrage, $useranidb, $uid, $userairdate);
    }
    $page->smarty->assign('releases', $reldata);
    header("Content-type: text/xml");
    echo trim($page->smarty->fetch('rss.tpl'));
}