<?php use nzedb\Books; use nzedb\Category; use nzedb\DnzbFailures; if (!$page->users->isLoggedIn()) { $page->show403(); } $book = new Books(['Settings' => $page->settings]); $cat = new Category(['Settings' => $page->settings]); $fail = new DnzbFailures(['Settings' => $page->settings]); $boocats = $cat->getChildren(Category::CAT_PARENT_BOOKS); $btmp = array(); foreach ($boocats as $bcat) { $btmp[$bcat['id']] = $bcat; } $category = Category::CAT_PARENT_BOOKS; if (isset($_REQUEST["t"]) && array_key_exists($_REQUEST['t'], $btmp)) { $category = $_REQUEST["t"] + 0; } $catarray = array(); $catarray[] = $category; $page->smarty->assign('catlist', $btmp); $page->smarty->assign('category', $category); $browsecount = $book->getBookCount($catarray, -1, $page->userdata["categoryexclusions"]); $offset = isset($_REQUEST["offset"]) && ctype_digit($_REQUEST['offset']) ? $_REQUEST["offset"] : 0; $ordering = $book->getBookOrdering(); $orderby = isset($_REQUEST["ob"]) && in_array($_REQUEST['ob'], $ordering) ? $_REQUEST["ob"] : ''; $results = $books = array(); $results = $book->getBookRange($catarray, $offset, ITEMS_PER_COVER_PAGE, $orderby, $page->userdata["categoryexclusions"]); $maxwords = 50;
} } if ($data['musicinfoid'] != '') { $music = new Music(['Settings' => $page->settings]); $mus = $music->getMusicInfo($data['musicinfoid']); } if ($data['consoleinfoid'] != '') { $c = new Console(['Settings' => $page->settings]); $con = $c->getConsoleInfo($data['consoleinfoid']); } if ($data['gamesinfo_id'] != '') { $g = new Games(['Settings' => $page->settings]); $game = $g->getgamesInfo($data['gamesinfo_id']); } if ($data['bookinfoid'] != '') { $b = new Books(['Settings' => $page->settings]); $boo = $b->getBookInfo($data['bookinfoid']); } $rf = new ReleaseFiles($page->settings); $releasefiles = $rf->get($data['id']); $predb = new PreDb(['Settings' => $page->settings]); $pre = $predb->getForRelease($data['preid']); $user = $page->users->getById($page->users->currentUserId()); $page->smarty->assign('cpapi', $user['cp_api']); $page->smarty->assign('cpurl', $user['cp_url']); $page->smarty->assign('releasefiles', $releasefiles); $page->smarty->assign('release', $data); $page->smarty->assign('reVideo', $reVideo); $page->smarty->assign('reAudio', $reAudio); $page->smarty->assign('reSubs', $reSubs); $page->smarty->assign('nfo', $nfo);