复制代码 代码如下:
<script>
$(.ajax_fpage).click(function(e){
var url = $(this).attr(href);
$.get(url,{},function(res){
$(#show_what_table).html(res);
});
event.preventDefault();
});
</script>
复制代码 代码如下:
function ContentList($id,$p=0)
{
$this->load->library(pagination);
$config[base_url] = site_url(qyadmin/ContentList/.$id./.$p);
$config[total_rows] = $this->admin->content_list($id,$p,1);
$config[per_page] = 5;
$config[uri_segment] = 5;
$config[first_link] = FALSE;
$config[last_link] = FALSE;
$config[full_tag_open] = <p>;
$config[full_tag_close] = </p>;
$config[display_pages] = FALSE;
$this->load->helper(url);
$skin_url = base_url().APPPATH . "views/templates";
$config[next_link] = <img src=".$skin_url./images/page_next.gif">;
$config[next_tag_open] = <li>;
$config[next_tag_close] = </li>;
$config[prev_link] = <img src=".$skin_url./images/page_prev.gif">;
$config[prev_tag_open] = <li>;
$config[prev_tag_close] = </li>;
$config[anchor_class] =;
$this->pagination->initialize($config);
$content = $this->admin->content_list($id,$p,0,$config[per_page],$this->uri->segment(5));
$fpage = $this->pagination->create_links();
$this->smarty->assign(fpage,$fpage);
$this->smarty->assign(content,$content);
$this->smarty->view(show.tpl);
}
新闻热点
疑难解答