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


PHP hasPrevPage函数代码示例

本文整理汇总了PHP中hasPrevPage函数的典型用法代码示例。如果您正苦于以下问题:PHP hasPrevPage函数的具体用法?PHP hasPrevPage怎么用?PHP hasPrevPage使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。


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

示例1: getOption

<?php

//TODO push those global variables under zin namespace
echo "var isAlbumPage = " . (AlbumUtil::isAlbumPage() ? "true" : "false") . ";\n" . "var maxImageIndex = " . AlbumUtil::getMaxImageIndex() . ", hasNextPage = " . (hasNextPage() ? "true" : "false") . ", hasPrevPage = " . (hasPrevPage() ? "true" : "false") . ", albumsPerPage = " . getOption('albums_per_page') . ", imagesPerPage = " . getOption('images_per_page') . ", enableFancybox = " . (getOption('simplicity2_enable_fancybox') ? 'true' : 'false') . ", enableUpDownKeys = " . (getOption('simplicity2_nav_enable_updown') ? 'true' : 'false') . ";\n";
?>

开发者ID:Imagenomad,项目名称:Unsupported,代码行数:5,代码来源:init.php

示例2: printPageListWithNav

		<?php 
        $c++;
        $mobilebreak = $c % 2;
        if ($c == $breakcount) {
            echo '<br class="clear clearforboth" />';
            $c = 0;
        } else {
            if ($mobilebreak == 0) {
                echo '<br class="clear clearformobile" />';
            }
        }
    }
}
?>

		<div class="sixteen columns">
<?php 
if (hasNextPage() || hasPrevPage()) {
    printPageListWithNav('«', '»', false, true, 'pagination', null, true, 5);
}
if ($numimages > 0) {
    printPPSlideShowLink(gettext('Slideshow'));
}
?>
		</div>
	</div>
</div>

<?php 
include "inc-bottom.php";
include "inc-footer.php";
开发者ID:ariep,项目名称:ZenPhoto20-DEV,代码行数:31,代码来源:search.php

示例3: count

<?php

global $_zp_themeroot, $_zp_current_album;
$albumCount = count($_zp_current_album->getSubalbums());
$isAlbumPage = $albumCount > 0;
?>
<div id="thumbs">
	<div id="thumbs-navigation" <?php 
echo hasNextPage() ? "next='" . getNextPageUrl() . "'" : "";
echo hasPrevPage() ? "prev='" . getPrevPageUrl() . "'" : "";
?>
>
		<div id='bar'>
			<div class="nav-cell filler"><span>&nbsp;</span></div>
			<?php 
AlbumUtil::printNavigation($prevText, $nextText, false, 7, true);
?>
			<div class="nav-cell filler end"><span>&nbsp;</span></div>
		</div>
	</div>
<?php 
if ($isAlbumPage) {
    $u = 0;
    while (next_album()) {
        $a = $_zp_current_album;
        $thumb = $a->getAlbumThumbImage();
        $title = $a->getTitle();
        $desc = $a->getDesc();
        $customThumb = $thumb->getCustomImage(NULL, 202, 56, 202, 56, NULL, NULL, false);
        $url = getAlbumURL();
        echo "\t<div class='thumb' index='{$u}' title='{$title}' location='{$customThumb}' url='{$url}'><description>{$desc}</description></div>\n";
开发者ID:Imagenomad,项目名称:Unsupported,代码行数:31,代码来源:fetch-thumbs.php

示例4: getGalleryTitle

		<div id="gallerytitle"><h2><?php 
echo getGalleryTitle();
?>
</h2></div>

		<div id="img_header_bg">
			<div id="img_header">&nbsp;</div>
		</div>
	</div>

	<div id="navigation">
	   <ul>
<?php 
$totalPages = getTotalPages();
$currentPage = getCurrentPage();
if (hasPrevPage()) {
    $link = getPrevPageURL();
} else {
    $link = "#";
}
echo "<li><a href=\"{$link}\" title=\"Previous Page\">&laquo;</a></li>\n";
for ($i = 1; $i <= $totalPages; $i++) {
    echo $i == $currentPage ? '<li class="current">' : '<li>';
    if ($i < 10) {
        $page = '0' . $i;
    } else {
        $page = $i;
    }
    printLinkHTML(getPageNumURL($i), $page, "Page {$page}");
    echo "</li>\n";
}
开发者ID:Imagenomad,项目名称:Unsupported,代码行数:31,代码来源:index.php

示例5: printRSSLink

}
?>
						<?php 
if (class_exists('RSS') && getOption('RSS_album_image')) {
    ?>
						<span><?php 
    printRSSLink('Gallery', '', gettext('Gallery RSS'), '', false);
    ?>
</span>
						<?php 
}
?>
					</div>
				</div>
				<?php 
if ((hasNextPage() || hasPrevPage()) && (getOption('zpbase_galhomeop') == 'albums' && $showall == false)) {
    $jumpclass = 'jump';
    $pagin = true;
} else {
    $jumpclass = 'jump center';
    $pagin = false;
}
?>
				<div id="page-nav">
					<div class="<?php 
echo $jumpclass;
?>
"><?php 
printBaseAlbumMenuJump('count', gettext('Gallery Index'));
?>
</div>
开发者ID:BimbaLaszlo,项目名称:zpbase,代码行数:31,代码来源:index-sdscroll.php

示例6: getPageNavList

/**
 * returns a page nav list.
 *
 * @param bool $_oneImagePage set to true if there is only one image page as, for instance, in flash themes
 * @param int $navlen Number of navigation links to show (0 for all pages). Works best if the number is odd.
 * @param bool $firstlast Add links to the first and last pages of you gallery
 * @param int $current the current page
 * @param int $total total number of pages
 *
 */
function getPageNavList($_oneImagePage, $navlen, $firstlast, $current, $total)
{
    $result = array();
    if (hasPrevPage()) {
        $result['prev'] = getPrevPageURL();
    } else {
        $result['prev'] = NULL;
    }
    if ($firstlast) {
        $result[1] = getPageNumURL(1, $total);
    }
    if ($navlen == 0) {
        $navlen = $total;
    }
    $extralinks = 2;
    if ($firstlast) {
        $extralinks = $extralinks + 2;
    }
    $len = floor(($navlen - $extralinks) / 2);
    $j = max(round($extralinks / 2), min($current - $len - (2 - round($extralinks / 2)), $total - $navlen + $extralinks - 1));
    $ilim = min($total, max($navlen - round($extralinks / 2), $current + floor($len)));
    $k1 = round(($j - 2) / 2) + 1;
    $k2 = $total - round(($total - $ilim) / 2);
    for ($i = $j; $i <= $ilim; $i++) {
        $result[$i] = getPageNumURL($i, $total);
    }
    if ($firstlast) {
        $result[$total] = getPageNumURL($total, $total);
    }
    if (hasNextPage()) {
        $result['next'] = getNextPageURL();
    } else {
        $result['next'] = NULL;
    }
    return $result;
}
开发者ID:IliyanGochev,项目名称:zenphoto,代码行数:46,代码来源:template-functions.php

示例7: printBaseAlbumMenuJump

						<?php 
            }
            ?>
					</div>
					<?php 
        }
        ?>
				</div>

				<div id="page-nav" class="clearfix">
					<div class="jump"><?php 
        printBaseAlbumMenuJump('count', gettext('Gallery Index'));
        ?>
</div>
					<?php 
        if ($showpag && (hasNextPage() || hasPrevPage())) {
            printPageListWithNav('« ' . gettext('prev'), gettext('next') . ' »', false, true, 'pagination');
        }
        ?>
				</div>

				<?php 
    }
    ?>
				
			<?php 
} else {
    ?>
			<p><?php 
    echo gettext('Search and archive functions have been disabled...');
    ?>
开发者ID:BimbaLaszlo,项目名称:zpbase,代码行数:31,代码来源:search.php

示例8: printGoogleMap

        }
    }
    ?>
					<?php 
    if (function_exists('printGoogleMap')) {
        ?>
<div id="map-wrap"><?php 
        printGoogleMap('Google Map', null, 'hide');
        ?>
</div><?php 
    }
    ?>
				</div>
				
				<?php 
    if ((hasNextPage() || hasPrevPage()) && $showall == false) {
        $jumpclass = 'jump';
        $pagin = true;
    } else {
        $jumpclass = 'jump center';
        $pagin = false;
    }
    ?>
				<div id="page-nav">
					<div class="<?php 
    echo $jumpclass;
    ?>
"><?php 
    printBaseAlbumMenuJump('count', gettext('Gallery Index'));
    ?>
</div>
开发者ID:BimbaLaszlo,项目名称:zpbase,代码行数:31,代码来源:album-sdscroll.php

示例9: printPrevPageLink

/**
 * Returns the URL of the previous page.
 *
 * @param string $text The linktext that should be printed as a link
 * @param string $title The text the html-tag "title" should contain
 * @param string $class Insert here the CSS-class name you want to style the link with
 * @param string $id Insert here the CSS-ID name you want to style the link with
 */
function printPrevPageLink($text, $title = NULL, $class = NULL, $id = NULL)
{
    if (hasPrevPage()) {
        printLink(getPrevPageURL(), $text, $title, $class, $id);
    } else {
        echo "<span class=\"disabledlink\">{$text}</span>";
    }
}
开发者ID:hatone,项目名称:zenphoto-1.4.1.4,代码行数:16,代码来源:template-functions.php


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