Beispiel #1
0
     $mov = $movie->getMovieInfo($data['imdbid']);
     if ($mov && isset($mov['title'])) {
         $mov['title'] = str_replace(['/', '\\'], '', $mov['title']);
         $mov['actors'] = $movie->makeFieldLinks($mov, 'actors');
         $mov['genre'] = $movie->makeFieldLinks($mov, 'genre');
         $mov['director'] = $movie->makeFieldLinks($mov, 'director');
         if ($page->settings->getSetting('trailers_display')) {
             $trailer = !isset($mov['trailer']) || empty($mov['trailer']) || $mov['trailer'] == '' ? $movie->getTrailer($data['imdbid']) : $mov['trailer'];
             if ($trailer) {
                 $mov['trailer'] = sprintf("<iframe width=\"%d\" height=\"%d\" src=\"%s\"></iframe>", $page->settings->getSetting('trailers_size_x'), $page->settings->getSetting('trailers_size_y'), $trailer);
             }
         }
     }
 }
 if ($data['xxxinfo_id'] != '' && $data['xxxinfo_id'] != 0) {
     $XXX = new XXX(['Settings' => $page->settings]);
     $xxx = $XXX->getXXXInfo($data['xxxinfo_id']);
     if ($xxx && isset($xxx['title'])) {
         $xxx['title'] = str_replace(['/', '\\'], '', $xxx['title']);
         $xxx['actors'] = $XXX->makeFieldLinks($xxx, 'actors');
         $xxx['genre'] = $XXX->makeFieldLinks($xxx, 'genre');
         $xxx['director'] = $XXX->makeFieldLinks($xxx, 'director');
         if (isset($xxx['trailers'])) {
             $xxx['trailers'] = $XXX->insertSwf($xxx['classused'], $xxx['trailers']);
         }
     } else {
         $xxx = false;
     }
 }
 $user = $page->users->getById($page->users->currentUserId());
 $re = new ReleaseExtra($page->settings);
Beispiel #2
0
<?php

require_once './config.php';
use nzedb\XXX;
$page = new AdminPage();
$xxxmovie = new XXX(['Settings' => $page->settings]);
$page->title = "XXX Movie List";
$xxxcount = $xxxmovie->getCount();
$offset = isset($_REQUEST["offset"]) ? $_REQUEST["offset"] : 0;
$page->smarty->assign('pagertotalitems', $xxxcount);
$page->smarty->assign('pageroffset', $offset);
$page->smarty->assign('pageritemsperpage', ITEMS_PER_PAGE);
$page->smarty->assign('pagerquerybase', WWW_TOP . "/xxx-list.php?offset=");
$pager = $page->smarty->fetch("pager.tpl");
$page->smarty->assign('pager', $pager);
$xxxmovielist = $xxxmovie->getRange($offset, ITEMS_PER_PAGE);
foreach ($xxxmovielist as $key => $mov) {
    $xxxmovielist[$key]['hastrailer'] = !empty($mov['trailers']) ? 1 : 0;
}
$page->smarty->assign('xxxmovielist', $xxxmovielist);
$page->content = $page->smarty->fetch('xxx-list.tpl');
$page->render();
Beispiel #3
0
<?php

use nzedb\Category;
use nzedb\XXX;
use nzedb\DnzbFailures;
if (!$page->users->isLoggedIn()) {
    $page->show403();
}
$movie = new XXX(['Settings' => $page->settings]);
$cat = new Category(['Settings' => $page->settings]);
$fail = new DnzbFailures(['Settings' => $page->settings]);
$moviecats = $cat->getChildren(Category::CAT_PARENT_XXX);
$mtmp = array();
foreach ($moviecats as $mcat) {
    $mtmp[$mcat['id']] = $mcat;
}
$category = Category::CAT_PARENT_XXX;
if (isset($_REQUEST['t']) && array_key_exists($_REQUEST['t'], $mtmp)) {
    $category = $_REQUEST['t'] + 0;
}
$catarray = array();
$catarray[] = $category;
$page->smarty->assign('catlist', $mtmp);
$page->smarty->assign('category', $category);
$browsecount = $movie->getXXXCount($catarray, -1, $page->userdata['categoryexclusions']);
$offset = isset($_REQUEST['offset']) && ctype_digit($_REQUEST['offset']) ? $_REQUEST["offset"] : 0;
$ordering = $movie->getXXXOrdering();
$orderby = isset($_REQUEST['ob']) && in_array($_REQUEST['ob'], $ordering) ? $_REQUEST['ob'] : '';
$results = $movies = array();
$results = $movie->getXXXRange($catarray, $offset, ITEMS_PER_COVER_PAGE, $orderby, -1, $page->userdata['categoryexclusions']);
foreach ($results as $result) {
Beispiel #4
0
<?php

//This script will update all records in the xxxinfo table where there is no cover
require_once realpath(dirname(dirname(dirname(__DIR__))) . DIRECTORY_SEPARATOR . 'indexer.php');
use nzedb\XXX;
use nzedb\db\Settings;
$pdo = new Settings();
$movie = new XXX(['Echo' => true, 'Settings' => $pdo]);
$movies = $pdo->queryDirect("SELECT title FROM xxxinfo WHERE cover = 0");
if ($movies instanceof \Traversable) {
    echo $pdo->log->primary("Updating " . number_format($movies->rowCount()) . " movie covers.");
    foreach ($movies as $mov) {
        $starttime = microtime(true);
        echo $pdo->log->primaryOver("Looking up: " . $pdo->log->headerOver($mov['title'])) . "\n";
        $mov = $movie->updateXXXInfo($mov['title']);
        if ($mov > 0) {
            if (file_exists(nZEDb_COVERS . 'xxx' . DS . $mov . '-cover.jpg')) {
                $pdo->queryExec(sprintf('UPDATE xxxinfo SET cover = 1 WHERE id = %d', $mov));
            }
        }
        // sleep so that it's not ddos' the site
        $diff = floor((microtime(true) - $starttime) * 1000000);
        if (333333 - $diff > 0) {
            echo "\nsleeping\n";
            usleep(333333 - $diff);
        }
    }
    echo "\n";
}
Beispiel #5
0
<?php

use nzedb\XXX;
if (!$page->users->isLoggedIn()) {
    $page->show403();
}
if (isset($_GET['modal']) && isset($_GET["id"]) && ctype_digit($_GET["id"])) {
    $movie = new XXX(['Settings' => $page->settings]);
    $mov = $movie->getXXXInfo($_GET['id']);
    if (!$mov) {
        $page->show404();
    }
    $mov['actors'] = $movie->makeFieldLinks($mov, 'actors');
    $mov['genre'] = $movie->makeFieldLinks($mov, 'genre');
    $mov['director'] = $movie->makeFieldLinks($mov, 'director');
    $page->smarty->assign(['movie' => $mov, 'modal' => true]);
    $page->title = "Info for " . $mov['title'];
    $page->meta_title = "";
    $page->meta_keywords = "";
    $page->meta_description = "";
    $page->smarty->registerPlugin('modifier', 'ss', 'stripslashes');
    if (isset($_GET['modal'])) {
        $page->content = $page->smarty->fetch('viewxxx.tpl');
        $page->smarty->assign('modal', true);
        echo $page->content;
    } else {
        $page->content = $page->smarty->fetch('viewxxxfull.tpl');
        $page->render();
    }
} else {
    $page->render();
Beispiel #6
0
<?php

require_once './config.php';
use nzedb\Category;
use nzedb\Genres;
use nzedb\XXX;
$page = new AdminPage();
$xxxmovie = new XXX(['Settings' => $page->settings]);
$gen = new Genres(['Settings' => $page->settings]);
$id = 0;
// Set the current action.
$action = isset($_REQUEST['action']) ? $_REQUEST['action'] : 'view';
if (isset($_REQUEST["id"])) {
    $id = $_REQUEST["id"];
    $xxx = $xxxmovie->getXXXInfo($id);
    if (!$xxx) {
        $page->show404();
    }
    switch ($action) {
        case 'submit':
            $coverLoc = nZEDb_COVERS . "xxx/" . $id . '-cover.jpg';
            $backdropLoc = nZEDb_COVERS . "xxx/" . $id . '-backdrop.jpg';
            if ($_FILES['cover']['size'] > 0) {
                $tmpName = $_FILES['cover']['tmp_name'];
                $file_info = getimagesize($tmpName);
                if (!empty($file_info)) {
                    move_uploaded_file($_FILES['cover']['tmp_name'], $coverLoc);
                }
            }
            if ($_FILES['backdrop']['size'] > 0) {
                $tmpName = $_FILES['backdrop']['tmp_name'];