예제 #1
0
파일: rss.php 프로젝트: Atmos01/nZEDb
// If no content id provided then show user the rss selection page.
if (!isset($_GET["t"]) && !isset($_GET["rage"]) && !isset($_GET["anidb"])) {
    // User has to either be logged in, or using rsskey.
    if (!$page->users->isLoggedIn()) {
        if ($page->settings->getSetting('registerstatus') != Settings::REGISTER_STATUS_API_ONLY) {
            header('X-nZEDb: ERROR: You must be logged in or provide a valid User ID and API key!');
            $page->show403();
        } else {
            header("Location: " . $page->settings->getSetting('code'));
        }
    }
    $page->title = "Rss Feeds";
    $page->meta_title = "Rss Nzb Feeds";
    $page->meta_keywords = "view,nzb,description,details,rss,atom";
    $page->meta_description = "View available Rss Nzb feeds.";
    $page->smarty->assign(['categorylist' => $category->get(true, $page->userdata["categoryexclusions"]), 'parentcategorylist' => $category->getForMenu($page->userdata["categoryexclusions"])]);
    $page->content = $page->smarty->fetch('rssdesc.tpl');
    $page->render();
} else {
    $rssToken = $uid = -1;
    // User requested a feed, ensure either logged in or passing a valid token.
    if ($page->users->isLoggedIn()) {
        $uid = $page->userdata["id"];
        $rssToken = $page->userdata["rsstoken"];
        $maxRequests = $page->userdata['apirequests'];
    } else {
        if ($page->settings->getSetting('registerstatus') == Settings::REGISTER_STATUS_API_ONLY) {
            $res = $page->users->getById(0);
        } else {
            if (!isset($_GET["i"]) || !isset($_GET["r"])) {
                header('X-nZEDb: ERROR: Both the User ID and API key are required for viewing the RSS!');
예제 #2
0
파일: rss.php 프로젝트: sebst3r/nZEDb
// If no content id provided then show user the rss selection page.
if (!isset($_GET["t"]) && !isset($_GET["rage"]) && !isset($_GET["anidb"])) {
    // User has to either be logged in, or using rsskey.
    if (!$page->users->isLoggedIn()) {
        if ($page->settings->getSetting('registerstatus') != Settings::REGISTER_STATUS_API_ONLY) {
            header('X-nZEDb: ERROR: You must be logged in or provide a valid User ID and API key!');
            $page->show403();
        } else {
            header("Location: " . $page->settings->getSetting('code'));
        }
    }
    $page->title = "Rss Feeds";
    $page->meta_title = "Rss Nzb Feeds";
    $page->meta_keywords = "view,nzb,description,details,rss,atom";
    $page->meta_description = "View available Rss Nzb feeds.";
    $categorylist = $category->get(true, $page->userdata["categoryexclusions"]);
    $page->smarty->assign('categorylist', $categorylist);
    $parentcategorylist = $category->getForMenu($page->userdata["categoryexclusions"]);
    $page->smarty->assign('parentcategorylist', $parentcategorylist);
    $page->content = $page->smarty->fetch('rssdesc.tpl');
    $page->render();
} else {
    $rsstoken = $uid = -1;
    // User requested a feed, ensure either logged in or passing a valid token.
    if ($page->users->isLoggedIn()) {
        $uid = $page->userdata["id"];
        $rsstoken = $page->userdata["rsstoken"];
        $maxrequests = $page->userdata['apirequests'];
    } else {
        if ($page->settings->getSetting('registerstatus') == Settings::REGISTER_STATUS_API_ONLY) {
            $res = $page->users->getById(0);