<?php $data = array(); $data['title'] = "Hỗ trợ trực tuyến"; $data['template'] = "sup/list_sup"; $db = new libraries_sup(); $pager = new libraries_pager(); $limit = 10; $pager->set_link("index.php?mod=support&act=list"); $total = $db->total_sup(); $start = $pager->start(); $pages = $pager->page($total, $limit); $data['listpage'] = $pager->listpage($pages, $start, $limit); $data['list'] = $db->list_sup($start, $limit); loadview("layout", $data);
<?php $data = array(); $data['title'] = "Danh sách tin tức"; $data['template'] = "news/list_news"; $data['act'] = 5; $news = new libraries_news(); $pager = new libraries_pager(); $limit = 10; $pager->set_link("index.php?mod=news&act=list"); $total = $news->total_news(); $start = $pager->start(); $pages = $pager->page($total, $limit); $data['pagelist'] = $pager->listpage($pages, $start, $limit); $data['news'] = $news->list_news($start, $limit); loadview("layout", $data);
<?php $data = array(); $id = $_GET['cid']; $data['template'] = "news/news_cago_view"; $db = new model_mnews(); $data['cago_detail'] = $db->get_cago($id); //debug($data['cago_detail']); $pager = new libraries_pager(); $pager->set_link("index.php?page=news&act=list_cago&cid=" . $id . ""); $limit = 5; $total = $db->total_cago($id); $start = $pager->start(); $pages = $pager->page($total, $limit, $id); $data['cate'] = $db->list_cate(); $data['title'] = $data['cago_detail']['cago_name']; $data['pagelist'] = $pager->listpage($pages, $start, $limit); $data['listnews'] = $db->list_cago($start, $limit, $id); //debug($data['listnews']); loadview("layout", $data);