$instance
$instance : object
Reference to the CI singleton
专题列表
This class object is the super class that every library in CodeIgniter will be assigned to.
<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');
/**
* 专题列表
* @author zwx
*/
class Topic extends CI_Controller
{
private static $data = array();
public function __construct()
{
parent::__construct();
$this->load->model('Apparticle_model','article');
$this->load->model('Appcate_model','cate');
$this->load->model('User_model','user');
$this->load->model('Userinfo_model','userinfo');
$this->load->model('Appnotice_model','notice');
$this->load->model('Public_model', 'public');
$this->load->model('Usercount_model','usercount');//用户统计表
$this->load->model('Userpoints_model','userpoints');//积分流水表
self::$data['header'] = $this->public->header('审核管理');
self::$data['left'] = $this->public->leftmenu('topic');
self::$data['footer'] = $this->public->footer();
$this->load->library('Session');
$this->public->authentication();
}
/**
* 专题列表
*/
public function index(){
$start = $this->uri->segment(4);
$start = !empty($start) ? $start : 0;
$limit = 10;
$count = 0;
$searchparam['cateName'] = trim($this->input->get_post('cateName'));
$count = $this->cate->getCateCount($searchparam);
$this->public->create_page('/admincp/appcate/index', $count, $limit, 4);
$pageparam = $this->public->dealparam($searchparam);
//获取专题列表
$topicList = $this->cate->getTopicList($searchparam,$limit,$start);
echo '<pre>';
printr($topicList);
echo '<pre>';exit;
// echo $this->db->last_query();exit;
$menuList = $this->config->item('menuList');
foreach($cateList as $key=>$value)
{
$menuId = $value['menuId'];
$cateList[$key]['menuName'] = empty($menuList[$menuId])?'':$menuList[$menuId];
}
$backurl = '/admincp/appcate/index/' . $start . '?' . $pageparam;
self::$data['cateList'] = $cateList;
self::$data['searchparam'] = $searchparam;
self::$data['backurl'] = base64_encode($backurl);
self::$data['pageparam'] = $pageparam;
self::$data['pageCount'] = ceil($count / $limit);
self::$data['pageNo'] = $start / $limit;
self::$data['limit'] = $limit;
$this->load->view('admincp/appcate/catelist', self::$data);
}
/**
* 创建专题
*/
public function createtopic(){
}
/**
* 修改专题
*/
public function edittopic(){
}
/**
* 删除专题
*/
public function deltopic(){}
/**
* 专题统计
*/
public function topicStatistics(){
}
}