<?php
/**
 * 后台用户列表
 * @author yzxh24
 */
class ListAction extends BaseAction
{
    public function run()
    {
        $criteria = $this->_buildCriteria(new CDbCriteria());
        $criteria->addCondition('deleted=0');
        $dataProvider = new CActiveDataProvider('Manager',array('criteria'=>$criteria,'sort' => array('defaultOrder' => 'id DESC'),'pagination' => array('pageSize' => 20)));
        
        $this->getController()->render('list',array('dataprovider'=>$dataProvider));
    }

    private function _buildCriteria(CDbCriteria $criteria)
    {
        return Helper::buildCriteria($criteria, $_GET);
    }
}