total_count = $total_count; $this->total_page = $total_page; $this->cur_page = $cur_page; $this->page_count = $page_count; $this->point = 0; $first_page = $cur_page - (int)($page_count/2); if($first_page<1) $first_page = 1; $last_page = $total_page; if($last_page>$total_page) $last_page = $total_page; $this->first_page = $first_page; $this->last_page = $last_page; if($total_page < $this->page_count) $this->page_count = $total_page; } /** * @brief 다음 페이지 요청 **/ function getNextPage() { $page = $this->first_page+$this->point++; if($this->point > $this->page_count || $page > $this->last_page) $page = 0; return $page; } } ?>