当前位置: 首页>>代码示例>>PHP>>正文


PHP Movie::getMovieInfo方法代码示例

本文整理汇总了PHP中Movie::getMovieInfo方法的典型用法代码示例。如果您正苦于以下问题:PHP Movie::getMovieInfo方法的具体用法?PHP Movie::getMovieInfo怎么用?PHP Movie::getMovieInfo使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Movie的用法示例。


在下文中一共展示了Movie::getMovieInfo方法的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: AdminPage

<?php

require_once "config.php";
$page = new AdminPage();
$movie = new Movie(['Settings' => $page->settings]);
$id = 0;
$page->title = "Movie Add";
if (isset($_REQUEST['id']) && ctype_digit($_REQUEST['id']) && strlen($_REQUEST['id']) == 7) {
    $id = $_REQUEST['id'];
    $movCheck = $movie->getMovieInfo($id);
    if (!$movCheck || isset($_REQUEST['update']) && $_REQUEST['update'] == 1) {
        if ($movie->updateMovieInfo($id)) {
            header("Location:" . WWW_TOP . "/movie-list.php");
            die;
        }
    }
}
$page->content = $page->smarty->fetch('movie-add.tpl');
$page->render();
开发者ID:RickDB,项目名称:newznab-tmux,代码行数:19,代码来源:movie-add.php

示例2: showApiError

     //
     // get individual nzb details
     //
 //
 // get individual nzb details
 //
 case "d":
     if (!isset($_GET["id"])) {
         showApiError(200);
     }
     $users->addApiRequest($uid, $_SERVER['REQUEST_URI'], $hosthash);
     $data = $releases->getByGuid($_GET["id"]);
     if ($data) {
         $mov = '';
         if ($data['imdbID'] != '') {
             $mov = $movie->getMovieInfo($data['imdbID']);
             $page->smarty->assign('mov', $mov);
         }
         $reldata[] = $data;
     } else {
         $reldata = array();
     }
     $page->smarty->assign('releases', $reldata);
     $page->smarty->assign('rsshead', $page->smarty->fetch('rssheader.tpl'));
     $content = trim($page->smarty->fetch('apidetail.tpl'));
     if ($outputtype == "xml") {
         header("Content-type: text/xml");
         echo $content;
     } else {
         header('Content-type: application/json');
         echo json_encode(responseXmlToObject($content));
开发者ID:scriptzteam,项目名称:newzNZB-premium-indexer,代码行数:31,代码来源:api.php

示例3: AdminPage

<?php

require_once "config.php";
require_once WWW_DIR . "/lib/adminpage.php";
require_once WWW_DIR . "/lib/movie.php";
$page = new AdminPage();
$movie = new Movie();
$id = 0;
// set the current action
$action = isset($_REQUEST['action']) ? $_REQUEST['action'] : 'view';
if (isset($_REQUEST["id"])) {
    $id = $_REQUEST["id"];
    $mov = $movie->getMovieInfo($id);
    if (!$mov) {
        $page->show404();
    }
    switch ($action) {
        case 'submit':
            $coverLoc = WWW_DIR . "covers/movies/" . $id . '-cover.jpg';
            $backdropLoc = WWW_DIR . "covers/movies/" . $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'];
                $file_info = getimagesize($tmpName);
                if (!empty($file_info)) {
开发者ID:nubzzz,项目名称:newznab,代码行数:31,代码来源:movie-edit.php

示例4: Movie

<?php

require_once WWW_DIR . "/lib/movie.php";
$movie = new Movie();
if (!$users->isLoggedIn()) {
    $page->show403();
}
if (isset($_GET["id"]) && ctype_digit($_GET["id"])) {
    $mov = $movie->getMovieInfo($_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);
    $page->title = "Info for " . $mov['title'];
    $page->meta_title = "";
    $page->meta_keywords = "";
    $page->meta_description = "";
    $page->smarty->registerPlugin('modifier', 'ss', 'stripslashes');
    $modal = false;
    if (isset($_GET['modal'])) {
        $modal = true;
        $page->smarty->assign('modal', true);
    }
    $page->content = $page->smarty->fetch('viewmovie.tpl');
    if ($modal) {
        echo $page->content;
    } else {
        $page->render();
开发者ID:scriptzteam,项目名称:newzNZB-premium-indexer,代码行数:31,代码来源:movie.php

示例5: UserMovies

require_once WWW_DIR . "/lib/usermovies.php";
if (!$users->isLoggedIn()) {
    $page->show403();
}
$um = new UserMovies();
if (isset($_REQUEST["del"])) {
    $usermovies = $um->delMovie($users->currentUserId(), $_REQUEST["del"]);
} elseif (isset($_REQUEST["add"])) {
    //
    // derive cats from user preferences
    //
    $cats = array();
    $cats[] = "2030";
    $cats[] = "2040";
    $m = new Movie(false);
    $mi = $m->getMovieInfo($_REQUEST["add"]);
    if (!$mi) {
        $m->updateMovieInfo($_REQUEST["add"]);
    }
    $usermovies = $um->addMovie($users->currentUserId(), $_REQUEST["add"], $cats);
} else {
    if (!isset($_REQUEST["id"])) {
        $page->show404();
    }
    $m = new Movie(false);
    if (is_numeric($_REQUEST["id"])) {
        $prop = $m->fetchTmdbProperties($_REQUEST["id"]);
        if ($prop !== false) {
            $res = array($prop);
        }
    } else {
开发者ID:scriptzteam,项目名称:newzNZB-premium-indexer,代码行数:31,代码来源:ajax_mymovies.php

示例6: UserMovies

require_once nZEDb_LIBS . 'TMDb.php';
if (!$page->users->isLoggedIn()) {
    $page->show403();
}
$um = new UserMovies(['Settings' => $page->settings]);
if (isset($_REQUEST['del'])) {
    $usermovies = $um->delMovie($page->users->currentUserId(), $_REQUEST['del']);
} else {
    if (isset($_REQUEST['add'])) {
        // Derive cats from user preferences.
        $cats = array();
        $cats[] = '2030';
        $cats[] = '2040';
        $m = new Movie(['Settings' => $page->settings]);
        $mi = $m->getMovieInfo($_REQUEST['add']);
        if (!$mi) {
            $m->updateMovieInfo($_REQUEST['add']);
        }
        $usermovies = $um->addMovie($page->users->currentUserId(), $_REQUEST['add'], $cats);
    } else {
        if (!isset($_REQUEST['id'])) {
            $page->show404();
        }
        $tmdb = new TMDb($page->settings->getSetting('tmdbkey'), $page->settings->getSetting('imdblanguage'));
        $m = new Movie(['Settings' => $page->settings, 'TMDb' => $tmdb]);
        if (is_numeric($_REQUEST['id'])) {
            $movie = $m->fetchTMDBProperties($_REQUEST['id']);
            if ($movie !== false) {
                $obj = array($movie);
            }
开发者ID:Jay204,项目名称:nZEDb,代码行数:30,代码来源:ajax_mymovies.php

示例7: header

        $releases->update($_POST["id"], $_POST["name"], $_POST["searchname"], $_POST["fromname"], $_POST["category"], $_POST["totalpart"], $_POST["grabs"], $_POST["size"], $_POST["postdate"], $_POST["adddate"], $_POST["rageid"], $_POST["seriesfull"], $_POST["season"], $_POST["episode"], $_POST['imdbid'], $_POST['anidbid'], $_POST['tvdbid'], $_POST['consoleinfoid']);
        if (isset($_POST['from']) && !empty($_POST['from'])) {
            header("Location:" . $_POST['from']);
            exit;
        }
        header("Location:" . WWW_TOP . "/release-list.php");
        break;
    case 'view':
    default:
        if (isset($_GET["id"])) {
            $page->title = "Release Edit";
            $id = $_GET["id"];
            $release = $releases->getByID($id);
            if ($release && $release["imdbid"] != "") {
                $movie = new Movie();
                $mov = $movie->getMovieInfo($release['imdbid']);
                $page->smarty->assign('updatename', $mov["title"]);
            }
            if ($release && $release["musicinfoid"] != "") {
                $music = new Music();
                $mus = $music->getMusicInfo($release['musicinfoid']);
                $page->smarty->assign('updatename', $mus["artist"] . " - " . $mus["title"] . ($mus["year"] != "" ? " - " . $mus["year"] : ""));
            }
            $page->smarty->assign('release', $release);
        }
        break;
}
$page->smarty->assign('yesno_ids', array(1, 0));
$page->smarty->assign('yesno_names', array('Yes', 'No'));
$page->smarty->assign('catlist', $category->getForSelect(false));
$page->content = $page->smarty->fetch('release-edit.tpl');
开发者ID:engine9-,项目名称:newznab-tmux,代码行数:31,代码来源:release-edit.php

示例8: processNfoFiles

 public function processNfoFiles($processImdb = 1, $processTvrage = 1)
 {
     $ret = 0;
     $db = new DB();
     $nntp = new Nntp();
     $res = $db->queryDirect(sprintf("SELECT rn.*, r.searchname FROM releasenfo rn left outer join releases r ON r.ID = rn.releaseID WHERE rn.nfo IS NULL AND rn.attempts < 5"));
     if (mysql_num_rows($res) > 0) {
         if ($this->echooutput) {
             echo "Processing " . mysql_num_rows($res) . " nfos\n";
         }
         $nntp->doConnect();
         while ($arr = mysql_fetch_assoc($res)) {
             $fetchedBinary = $nntp->getBinary($arr['binaryID'], true);
             if ($fetchedBinary !== false) {
                 //insert nfo into database
                 $db->query(sprintf("UPDATE releasenfo SET nfo = compress(%s) WHERE ID = %d", $db->escapeString($fetchedBinary), $arr["ID"]));
                 $ret++;
                 $imdbId = $this->parseImdb($fetchedBinary);
                 if ($imdbId !== false) {
                     //update release with imdb id
                     $db->query(sprintf("UPDATE releases SET imdbID = %s WHERE ID = %d", $db->escapeString($imdbId), $arr["releaseID"]));
                     //if set scan for imdb info
                     if ($processImdb == 1) {
                         $movie = new Movie($this->echooutput);
                         //check for existing movie entry
                         $movCheck = $movie->getMovieInfo($imdbId);
                         if ($movCheck === false || isset($movCheck['updateddate']) && time() - strtotime($movCheck['updateddate']) > 2592000) {
                             $movieId = $movie->updateMovieInfo($imdbId);
                         }
                     }
                 }
                 $rageId = $this->parseRageId($fetchedBinary);
                 if ($rageId !== false) {
                     //if set scan for tvrage info
                     if ($processTvrage == 1) {
                         $tvrage = new Tvrage($this->echooutput);
                         $show = $tvrage->parseNameEpSeason($arr['searchname']);
                         if (is_array($show) && $show['name'] != '') {
                             // update release with season, ep, and airdate info (if available) from releasetitle
                             $tvrage->updateEpInfo($show, $arr['releaseID']);
                             $rid = $tvrage->getByRageID($rageId);
                             if (!$rid) {
                                 $tvrShow = $tvrage->getRageInfoFromService($rageId);
                                 $tvrage->updateRageInfo($rageId, $show, $tvrShow, $arr['releaseID']);
                             }
                         }
                     }
                 }
             } else {
                 if ($this->echooutput) {
                     echo "NFO download failed - release " . $arr['releaseID'] . " on attempt " . $arr["attempts"]++ . "\n";
                 }
                 //nfo download failed, increment attempts
                 $db->query(sprintf("UPDATE releasenfo SET attempts = attempts+1 WHERE ID = %d", $arr["ID"]));
             }
             if ($ret != 0 && $this->echooutput && $ret % 5 == 0) {
                 echo "-processed " . $ret . " nfos\n";
             }
         }
         $nntp->doQuit();
     }
     //remove nfo that we cant fetch after 5 attempts
     $db->query("DELETE FROM releasenfo WHERE nfo IS NULL AND attempts >= 5");
     if ($this->echooutput) {
         echo $ret . " nfo files processed\n";
     }
     return $ret;
 }
开发者ID:nubzzz,项目名称:newznab,代码行数:68,代码来源:nfo.php


注:本文中的Movie::getMovieInfo方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。