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


PHP Movie::getCount方法代码示例

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


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

示例1: 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();
$page->title = "Movie List";
$tname = "";
if (isset($_REQUEST['moviename']) && !empty($_REQUEST['moviename'])) {
    $tname = $_REQUEST['moviename'];
}
$movcount = $movie->getCount($tname);
$offset = isset($_REQUEST["offset"]) ? $_REQUEST["offset"] : 0;
$tsearch = $tname != "" ? 'moviename=' . $tname . '&amp;' : '';
$page->smarty->assign('pagertotalitems', $movcount);
$page->smarty->assign('pageroffset', $offset);
$page->smarty->assign('pageritemsperpage', ITEMS_PER_PAGE);
$page->smarty->assign('pagerquerybase', WWW_TOP . "/movie-list.php?" . $tsearch . "&offset=");
$pager = $page->smarty->fetch("pager.tpl");
$page->smarty->assign('pager', $pager);
$movielist = $movie->getRange($offset, ITEMS_PER_PAGE, $tname);
$page->smarty->assign('movielist', $movielist);
$page->content = $page->smarty->fetch('movie-list.tpl');
$page->render();
开发者ID:scriptzteam,项目名称:newzNZB-premium-indexer,代码行数:25,代码来源:movie-list.php

示例2: AdminPage

<?php

require_once "config.php";
$page = new AdminPage();
$movie = new Movie(['Settings' => $page->settings]);
$page->title = "Movie List";
$movcount = $movie->getCount();
$offset = isset($_REQUEST["offset"]) ? $_REQUEST["offset"] : 0;
$page->smarty->assign('pagertotalitems', $movcount);
$page->smarty->assign('pageroffset', $offset);
$page->smarty->assign('pageritemsperpage', ITEMS_PER_PAGE);
$page->smarty->assign('pagerquerybase', WWW_TOP . "/movie-list.php?offset=");
$pager = $page->smarty->fetch("pager.tpl");
$page->smarty->assign('pager', $pager);
$movielist = $movie->getRange($offset, ITEMS_PER_PAGE);
$page->smarty->assign('movielist', $movielist);
$page->content = $page->smarty->fetch('movie-list.tpl');
$page->render();
开发者ID:RickDB,项目名称:newznab-tmux,代码行数:18,代码来源:movie-list.php


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