本文整理汇总了PHP中getNumPages函数的典型用法代码示例。如果您正苦于以下问题:PHP getNumPages函数的具体用法?PHP getNumPages怎么用?PHP getNumPages使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了getNumPages函数的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: printZDSearchShowMoreLink
/**
* Prints the "Show more results link" for search results for Zenpage items
*
* @param string $option "news" or "pages"
* @param int $number_to_show how many search results should be shown initially
*/
function printZDSearchShowMoreLink($option, $number_to_show)
{
$option = strtolower($option);
$number_to_show = sanitize_numeric($number_to_show);
switch ($option) {
case "news":
$num = getNumNews();
break;
case "pages":
$num = getNumPages();
break;
}
if ($num > $number_to_show) {
?>
<a class="<?php
echo $option;
?>
_showmore"href="javascript:toggleExtraElements('<?php
echo $option;
?>
',true);"><?php
echo gettext('Show more results');
?>
</a>
<a class="<?php
echo $option;
?>
_showless" style="display: none;" href="javascript:toggleExtraElements('<?php
echo $option;
?>
',false);"><?php
echo gettext('Show fewer results');
?>
</a>
<?php
}
}
示例2: zp_apply_filter
<?php
zp_apply_filter('theme_body_open');
?>
<div id="main">
<div id="header">
<h1><?php
printGalleryTitle();
?>
</h1>
<?php
$zenpage = extensionEnabled('zenpage');
$numimages = getNumImages();
$numalbums = getNumAlbums();
$total = $numimages + $numalbums;
if ($zenpage && !isArchive()) {
$numpages = getNumPages();
$numnews = getNumNews();
$total = $total + $numnews + $numpages;
} else {
$numpages = $numnews = 0;
}
if ($total == 0) {
$_zp_current_search->clearSearchWords();
}
if (getOption('Allow_search')) {
$categorylist = $_zp_current_search->getCategoryList();
if (is_array($categorylist)) {
$catlist = array('news' => $categorylist, 'albums' => '0', 'images' => '0', 'pages' => '0');
printSearchForm(NULL, 'search', NULL, gettext('Search category'), NULL, NULL, $catlist);
} else {
$albumlist = $_zp_current_search->getAlbumList();
示例3: gettext
?>
"><?php
echo gettext('Album index');
?>
</a>
</li>
</ul>
</div>
<?php
}
}
?>
<?php
if (extensionEnabled('zenpage') && ZP_PAGES_ENABLED) {
if (getNumPages(true)) {
?>
<div class="menu">
<h3><?php
echo gettext("Pages");
?>
</h3>
<?php
printPageMenu("list", "", "menu-active", "submenu", "menu-active");
?>
<div class="menu_rule"></div>
</div>
<?php
}
}
?>
示例4: getPage
case "getPage":
getPage();
break;
case "doSearch":
doSearch();
break;
case "getDrinkInfo":
getDrinkInfo();
break;
}
}
} else {
switch ($_POST["action"]) {
case "getAllDrinks":
getAllDrinks();
break;
case "getNumPages":
getNumPages();
break;
case "getPage":
getPage();
break;
case "doSearch":
doSearch();
break;
case "getDrinkInfo":
getDrinkInfo();
break;
}
}
}
示例5: gettext
?>
<h3><?php
echo gettext("Gallery");
?>
</h3>
<?php
}
printAlbumMenu("list", "count", "", "menu-active", "submenu", "menu-active", '');
?>
</div>
<?php
}
?>
<?php
if (extensionEnabled('zenpage') && getNumPages(true)) {
?>
<div class="menu">
<h3><?php
echo gettext("Pages");
?>
</h3>
<?php
printPageMenu("list", "", "menu-active", "submenu", "menu-active");
?>
</div>
<?php
}
}
// custom menu check end
?>
示例6: rem_context
<?php
// force UTF-8 Ø
rem_context(ZP_ALBUM | ZP_IMAGE);
$archivlinktext = gettext('Gallery');
if (extensionEnabled('zenpage')) {
if ($news = getNumNews(true)) {
$archivlinktext = gettext('Gallery and News');
}
$pages = getNumPages(true);
} else {
$news = $pages = NULL;
}
if (function_exists('printCustomMenu') && ($menu = getOption('effervescence_menu'))) {
?>
<div class="menu">
<?php
printCustomMenu($menu, 'list', '', "menu-active", "submenu", "menu-active", 2);
?>
</div>
<?php
} else {
// "standard zenpage sidebar menus
if ($news) {
?>
<div class="menu">
<h3><?php
echo gettext("News articles");
?>
</h3>
<?php