- 01
- 02
- 03
- 04
- 05
- 06
- 07
- 08
- 09
- 10
- 11
- 12
- 13
- 14
- 15
- 16
if($pnumber < $max)
{
if ($number > 5) $start="<a class='guest' href=goods.php?page=".$page."&n=1 title=Первая страница>1</a> ";
if ($number < $pages-4) $last=" <a class='guest' href=goods.php?page=".$page."&n=".$pages." title=Последняя страница>".$pages."</a>";
if ($number > 4) $pointleft="... ";
if ($number <= $pages-4) $pointright=" ...";
if ($number != 1) $prevpage="<a class='guest' href=goods.php?page=".$page."&n=".($number-1)." title=Назад><<</a> ";
if ($number != $pages) $nextpage=" <a class='guest' href=goods.php?page=".$page."&n=".($number+1)." title=Вперед>>></a>";
if ($number-3 > 0) $page3left="<a class='guest' href=goods.php?page=".$page."&n=".($number-3)." title=Страница ".($number-3).">".($number-3)."</a> | ";
if ($number-2 > 0) $page2left="<a class='guest' href=goods.php?page=".$page."&n=".($number-2)." title=Страница ".($number-2).">".($number-2)."</a> | ";
if ($number-1 > 0) $page1left="<a class='guest' href=goods.php?page=".$page."&n=".($number-1)." title=Страница ".($number-1).">".($number-1)."</a> | ";
if ($number+1 <= $pages) $page1right=" | <a class='guest' href=goods.php?page=".$page."&n=".($number+1)." title=Страница ".($number+1).">".($number+1)."</a>";
if ($number+2 <= $pages) $page2right=" | <a class='guest' href=goods.php?page=".$page."&n=".($number+2)." title=Страница ".($number+2).">".($number+2)."</a>";
if ($number+3 <= $pages) $page3right=" | <a class='guest' href=goods.php?page=".$page."&n=".($number+3)." title=Страница ".($number+3).">".($number+3)."</a>";
echo "<tr><td colspan='2'><p style='text-align:center;'><font class='guest'>".$prevpage.$start.$pointleft.$page3left.$page2left.$page1left.$number."/".$pages.$page1right.$page2right.$page3right.$pointright.$last.$nextpage."</font></p></td></tr>";
}