// Values that can be used in other PHP code on the page
$paginate_num_pages = 28;
$paginate_num_sections = 168;
$paginate_page_selector = 'page';
$paginate_current_page = @$_GET['page'];
// Pin page selector to a valid number (or 'all')
if($paginate_current_page=='')
$paginate_current_page = '1';
if($paginate_current_page != 'all') {
if($paginate_current_page == 'first')
$paginate_current_page = 1;
elseif($paginate_current_page == 'last')
$paginate_current_page = 28;
elseif($paginate_current_page < 1)
$paginate_current_page = 1;
elseif($paginate_current_page > 28)
$paginate_current_page = 28;
$paginate_sections = array( 0
, 6, 12, 18, 24, 30, 36, 42, 48, 54, 60, 66, 72, 78, 84, 90, 96, 102, 108, 114, 120, 126, 132, 138, 144, 150, 156, 162, 168);
$paginate_top_section = $paginate_sections[$paginate_current_page-1]+1;
$paginate_bottom_section = $paginate_sections[$paginate_current_page];
} else {
$paginate_top_section = 1;
$paginate_bottom_section = 168;
}
if(isset($_SERVER['QUERY_STRING'])) {
$paginate_self = '&' . $_SERVER['QUERY_STRING'] . '&';
$paginate_self = preg_replace("/&page=[^&]*&/", "&", $paginate_self);
$paginate_self = substr($paginate_self, 1, strlen($paginate_self) - 1);
if($paginate_self == '&')
$paginate_self = '';
else
$paginate_self = htmlentities($paginate_self);
} else {
$paginate_self = '';
}
$paginate_self = basename($_SERVER['PHP_SELF']) . "?${paginate_self}page";
?>
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
全部読む