本文整理汇总了PHP中Movie::makeFieldLinks方法的典型用法代码示例。如果您正苦于以下问题:PHP Movie::makeFieldLinks方法的具体用法?PHP Movie::makeFieldLinks怎么用?PHP Movie::makeFieldLinks使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Movie
的用法示例。
在下文中一共展示了Movie::makeFieldLinks方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: array
$category = Category::CAT_PARENT_MOVIE;
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->getMovieCount($catarray, -1, $page->userdata["categoryexclusions"]);
$offset = isset($_REQUEST["offset"]) && ctype_digit($_REQUEST['offset']) ? $_REQUEST["offset"] : 0;
$ordering = $movie->getMovieOrdering();
$orderby = isset($_REQUEST["ob"]) && in_array($_REQUEST['ob'], $ordering) ? $_REQUEST["ob"] : '';
$results = $movies = array();
$results = $movie->getMovieRange($catarray, $offset, ITEMS_PER_PAGE, $orderby, -1, $page->userdata["categoryexclusions"]);
foreach ($results as $result) {
$result['genre'] = $movie->makeFieldLinks($result, 'genre');
$result['actors'] = $movie->makeFieldLinks($result, 'actors');
$result['director'] = $movie->makeFieldLinks($result, 'director');
$movies[] = $result;
}
$title = isset($_REQUEST['title']) && !empty($_REQUEST['title']) ? stripslashes($_REQUEST['title']) : '';
$page->smarty->assign('title', $title);
$actors = isset($_REQUEST['actors']) && !empty($_REQUEST['actors']) ? stripslashes($_REQUEST['actors']) : '';
$page->smarty->assign('actors', $actors);
$director = isset($_REQUEST['director']) && !empty($_REQUEST['director']) ? stripslashes($_REQUEST['director']) : '';
$page->smarty->assign('director', $director);
$ratings = range(1, 9);
$rating = isset($_REQUEST['rating']) && in_array($_REQUEST['rating'], $ratings) ? $_REQUEST['rating'] : '';
$page->smarty->assign('ratings', $ratings);
$page->smarty->assign('rating', $rating);
$genres = $movie->getGenres();
示例2: 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();
示例3: array
$imdbids = array();
$ourmovieimdbs = array();
if (count($rtdata) > 0) {
foreach ($rtdata as &$movie) {
if (isset($movie->alternate_ids) && isset($movie->alternate_ids->imdb)) {
$imdbids[] = $movie->alternate_ids->imdb;
}
$movie->source = $data["source"];
}
}
if (count($imdbids) > 0) {
$allmovies = $m->getMovieInfoMultiImdb($imdbids);
foreach ($allmovies as $ourmovie) {
if ($ourmovie["relimdb"] != "") {
$ourmovieimdbs[$ourmovie["imdbID"]] = $ourmovie;
$ourmovieimdbs[$ourmovie["imdbID"]]['actors'] = $m->makeFieldLinks($ourmovie, 'actors');
$ourmovieimdbs[$ourmovie["imdbID"]]['genre'] = $m->makeFieldLinks($ourmovie, 'genre');
$ourmovieimdbs[$ourmovie["imdbID"]]['director'] = $m->makeFieldLinks($ourmovie, 'director');
}
}
}
$userimdbs = array();
$usermovies = $um->getMovies($users->currentUserId());
foreach ($usermovies as $umovie) {
$userimdbs[$umovie["imdbID"]] = $umovie["imdbID"];
}
$page->smarty->assign('userimdbs', $userimdbs);
$page->smarty->assign('ourmovies', $ourmovieimdbs);
$page->smarty->assign('data', $rtdata);
$page->title = $data["title"] ? $data["title"] : "List";
}