isLoggedIn()) { http_response_code(403); die('You must be logged in to view this page.'); } if(!$sUserInfo->canApproveTorrents()) { http_response_code(403); die('You are not allowed to view this page.'); } $tPageTitle = 'Pending Torrents'; $pPageUrl = '/pending.php?'; $pStartAt = -1; $pTake = 20; if(isset($_GET['start'])) $pStartAt = (int)filter_input(INPUT_GET, 'start', FILTER_SANITIZE_NUMBER_INT); $pTorrents = SeriaTorrent::all($pdo, false, false, null, $pStartAt, $pTake); require_once __DIR__ . '/_header.php'; echo '
'; echo '
Pending Torrents
'; echo '
'; $pShowMore = false; $pLastId = 0; if(empty($pTorrents)) { echo '
There are no pending torrents!
'; } else { foreach($pTorrents as $torrent) { echo $torrent->toHTML($sUserInfo, 'downloads-item', true, $sVerification); $pLastId = $torrent->getId(); } $pShowMore = count($pTorrents) === $pTake; } echo '
'; if($pShowMore) echo '
View more
'; echo '
'; require_once __DIR__ . '/_footer.php';