AdminAction::index PHP Méthode

index() public méthode

微吧列表
public index ( )
    public function index()
    {
        // 初始化微吧列表管理菜单
        $this->_initWeibaListAdminMenu();
        // 设置列表主键
        $this->_listpk = 'weiba_id';
        $this->pageButton[] = array('title' => '搜索微吧', 'onclick' => "admin.fold('search_form')");
        $this->pageButton[] = array('title' => '解散微吧', 'onclick' => 'admin.delWeiba()');
        $this->searchKey = array('weiba_id', 'weiba_name', 'weiba_cate', 'uid', 'admin_uid', 'recommend');
        $this->opt['recommend'] = array('0' => L('PUBLIC_SYSTEMD_NOACCEPT'), '1' => '是', '2' => '否');
        $weibacate = D('weiba_category')->findAll();
        $cids = array();
        foreach ($weibacate as $c) {
            $cids[$c['id']] = $c['name'];
        }
        $this->opt['weiba_cate'] = $cids;
        $this->pageKeyList = array('weiba_id', 'weiba_name', 'weiba_cate', 'logo', 'uid', 'ctime', 'admin_uid', 'follower_count/thread_count', 'DOACTION');
        // 数据的格式化与listKey保持一致
        $listData = D('Weiba', 'weiba')->getWeibaList(20);
        $this->displayList($listData);
    }