<?php
/**
 * 
 * @author yzxh24
 *
 */
class IndexAction extends BaseAction
{
    public function run()
    {
        $groups = UserGroup::model()->findAll(array('order'=>'creditshigher ASC,groupid DESC'));
        $level = array();
        foreach ($groups as $group)
        {
            $level[$group['gptype']][] = $group;
        }
        
        $this->getController()->render('index', array(
                'level' => $level,
            )
        );
    }
}