예제 #1
0
파일: details.php 프로젝트: nubzzz/newznab
require_once WWW_DIR . "/lib/tvrage.php";
if (!$users->isLoggedIn()) {
    $page->show403();
}
if (isset($_GET["id"])) {
    $releases = new Releases();
    $tvrage = new TvRage();
    $data = $releases->getByGuid($_GET["id"]);
    if (!$data) {
        $page->show404();
    }
    if ($page->isPostBack()) {
        $releases->addComment($data["ID"], $_POST["txtAddComment"], $users->currentUserId(), $_SERVER['REMOTE_ADDR']);
    }
    $nfo = $releases->getReleaseNfo($data["ID"], false);
    $comments = $releases->getComments($data["ID"]);
    $similars = $releases->searchSimilar($data["ID"], $data["searchname"], 6, $page->userdata["categoryexclusions"]);
    $rage = '';
    if ($data["rageID"] != '') {
        $rageinfo = $tvrage->getByRageID($data["rageID"]);
        if (count($rageinfo) > 0) {
            $seriesnames = $seriesdescription = $seriescountry = $seriesgenre = $seriesimg = $seriesid = array();
            foreach ($rageinfo as $r) {
                $seriesnames[] = $r['releasetitle'];
                if (!empty($r['description'])) {
                    $seriesdescription[] = $r['description'];
                }
                if (!empty($r['country'])) {
                    $seriescountry[] = $r['country'];
                }
                if (!empty($r['genre'])) {