<?php
/**
 * 完整的章节列表模式
 * @author yzxh24
 */
class AlistAction extends BaseAction
{
    public function run()
    {
        $bookId = Yii::app()->request->getQuery('id');
        $book = Books::model()->findByPk($bookId);
        $chapters = Chapters::model()->findAll(array('condition'=>'bookid='.$bookId,'order'=>'sort ASC'));
        
        $this->getController()->render('alist', array('chapters'=>$chapters,'book'=>$book));
    }
}