7 ) { $init_page_max = ( $total_pages > 3 ) ? 3 : $total_pages; for($i = 1; $i < $init_page_max + 1; $i++) { $page_string .= ( $i == $on_page ) ? '' . $i . '' : '' . $i . ''; if ( $i < $init_page_max ) { $page_string .= ", "; } } if ( $total_pages > 3 ) { if ( $on_page > 1 && $on_page < $total_pages ) { $page_string .= ( $on_page > 5 ) ? ' ... ' : ', '; $init_page_min = ( $on_page > 4 ) ? $on_page : 5; $init_page_max = ( $on_page < $total_pages - 4 ) ? $on_page : $total_pages - 4; for($i = $init_page_min - 1; $i < $init_page_max + 2; $i++) { $page_string .= ($i == $on_page) ? '' . $i . '' : '' . $i . ''; if ( $i < $init_page_max + 1 ) { $page_string .= ', '; } } $page_string .= ( $on_page < $total_pages - 4 ) ? ' ... ' : ', '; } else { $page_string .= ' ... '; } for($i = $total_pages - 2; $i < $total_pages + 1; $i++) { $page_string .= ( $i == $on_page ) ? '' . $i . '' : '' . $i . ''; if( $i < $total_pages ) { $page_string .= ", "; } } } } else { for($i = 1; $i < $total_pages + 1; $i++) { $page_string .= ( $i == $on_page ) ? '' . $i . '' : '' . $i . ''; if ( $i < $total_pages ) { $page_string .= ', '; } } } if ( $add_prevnext_text ) { if ( $on_page > 1 ) { $page_string = 'Пред.  ' . $page_string; } if ( $on_page < $total_pages ) { $page_string = 'Cлед. ' . $page_string; } } return $page_string; } ?>

80s toys - Atari. I still have