<?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) {
?>
<span class="pagelink">
<div align="right" style="float:right">
<div class="black">
<span class="left3"><a href="<?=$paging_url_link ?>page_num=1"></a></span>
<?
if ($page_num > 10) {
	$prev_10 = $page_num - 10;
?>
	<span class="left2"><a href="<?=$paging_url_link ?>page_num=<?=$prev_10 ?>"></a></span>
<?
} else {
?>
	<span class="left2"><a href="#"></a></span>
<?
}
if ($page_num > 1) {
	$prev = $page_num - 1;
?>
	<span class="left1"><a href="<?=$paging_url_link ?>page_num=<?=$prev ?>"></a></span>
<?
} else {
?>
	<span class="left1"><a href="#"></a></span>
<?
}
?>
</div>
<div class="black2">
<?
	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>
<?
	}
}
?>
</div>
<div class="black">	
<?
	if ($page_num < $page_count) {
		$next = $page_num + 1;
?>
		<span class="right1"><a href="<?=$paging_url_link ?>page_num=<?=$next ?>"></a></span>
		
<?
	} else {
?>
		<span class="right1"><a href="#"></a></span>
<?
	}
	if ($page_num + 10 < $page_count) {
		$next_10 = $page_num + 10;
?>
		<span class="right2"><a href="<?=$paging_url_link ?>page_num=<?=$next_10 ?>"></a></span>
<?
	} else {
?>
		<span class="right2"><a href="#"></a></span>
<?
	}
?>
<span class="right3"><a href="<?=$paging_url_link ?>page_num=<?=$page_count ?>"></a></span>
</div>
</div>
</span>
<div style="clear:both"></div>
<?
}
?>
