total_res = $total_res; $this->res_per_page = $res_per_page; $this->cur_page = $cur_page; $this->str_par = $str_par; $this->main_url = $main_url; $this->base_dir = $base_dir; $this->total_pages = ceil($this->total_res / $this->res_per_page); } function get_first_res() { $first_res = ($this->res_per_page * $this->cur_page) - ($this->res_per_page - 1); return $first_res - 1; } function get_page_links() { if ($this->cur_page < 6) { $first_show_page = 1; $last_show_page = 10; } else { $first_show_page = $this->cur_page - 4; $last_show_page = $this->cur_page + 5; } if ($last_show_page > $this->total_pages) $last_show_page = $this->total_pages; if ($last_show_page - $first_show_page < 9) $first_show_page = $last_show_page - 9; if ($first_show_page < 1) $first_show_page = 1; //Previous $str_pages = '
'; if ($this->cur_page == 1) { //$str_pages .= ''; } else { $str_pages .= ''; $str_pages .= ''; } //Pages for ($i = $first_show_page; $i <= $last_show_page; $i ++) { if ($i == $this->cur_page) $str_pages .= ''; else $str_pages .= ''; } //Next if ($this->cur_page == $this->total_pages) { //$str_pages .= ''; } else { $str_pages .= ''; $str_pages .= ''; //$str_pages .= ''; } $str_pages .= "
FirstFirst<<'.$i.''.$i.'Last>>Last|   Page:
"; return $str_pages; } } ?> Unable to connect to database newrssblogs on host 66.154.11.248.