<?php
/**
 * Created by JetBrains PhpStorm.
 * User: yzxh24
 * Date: 11-10-8
 * Time: 下午5:22
 * To change this template use File | Settings | File Templates.
 */
class ViewAction extends BaseAction
{
    public function run()
    {
        $id = Yii::app()->request->getQuery('id');
        $soft = SoftContent::model()->findByPk($id);

        $softList = SoftPcontent::model()->findAll(array('condition'=>'isdelete=0 AND cid='.$id));

        $this->getController()->addBreadcrumb(array($soft->name));
        $platForms = SoftPlatform::model()->findAll();
        
        $this->getController()->render('view', array(
                'soft' => $soft,
                'softList' => $softList,
                'platForms' => $platForms,
            )
        );
    }
}
