page_common.inc 1.17 KB
<?php
/**
 * ページング共通ページ require_once("page_common.inc")で使う
 * $Id: page_common.inc 81358 2015-03-29 11:19:35Z iimuro $
 * @author zhouz
 * @access public
 * @package client.templates
 */
global $page_count;

$tmp_list = explode("?", $paging_url_link);
if (count($tmp_list) > 1) {
	$paging_url_link .= "&";
} else {
	$paging_url_link .= "?";
}
?>

<?
	if ($page_count > 1) {
	?>
	<div align="middle" class="page_footer" >
	<?
	if($page_num > 1) {
		$prev = $page_num - 1;
	?>
		<a href="<?=$paging_url_link ?>page_num=1">首页</a>&nbsp;
	<?
	} else {
	?>
		首页&nbsp;
	<?
	}
	?>
	<?
		for ($i=$page_first; $i<=$page_end; $i++) {
			if($i == $page_num) {
	?>
		<?=$i ?>&nbsp;
	<?
			} else {
	?>
		<a href="<?=$paging_url_link ?>page_num=<?=$i ?>"><?=$i ?></a>&nbsp;
	<?
		}
	}
	?>
	<?
	if($page_end < $page_count - $show_page_num) {
	?>
			。。。&nbsp;<a href="<?=$paging_url_link ?>page_num=<?=$page_count ?>"><?=$page_count?></a>&nbsp;
	<?
		}
	?>
	
	
	<?
		if($page_num < $page_count) {
			$next = $page_num + 1;
	?>
			<a href="<?=$paging_url_link ?>page_num=<?=$page_count ?>">尾页</a>&nbsp;
	<?
		} else {
	?>
			尾页&nbsp;
	<?
		}
	?>
	</div>
	<?
	}
	?>