<?php
/**
 * Descriptions
 * @author yzxh24
 * @email yzxh24@gmail.com
 * @created 2010-06-28 19:11:33
 */
class BookController extends BackendController
{
    /**
     * action路径前缀
     */
	protected $actionPrefix = 'admin.controllers.Book.';

    /**
     * action对应表
     */
    protected $actionMap = array(
        'list' => 'ListAction',
        'create' => 'CreateAction',
        'update' => 'UpdateAction',
        'delete' => 'DeleteAction',
        'view' => 'ViewAction',
        'changestatus' => 'ajax.ChangeStatusAction',
        'changeview' => 'ajax.ChangeViewAction',
        'changetype' => 'ajax.ChangeTypeAction',
        'originallist' => 'OriginalListAction',
    );

	/**
	 * Performs the AJAX validation.
	 * @param CModel the model to be validated
	 */
	protected function performAjaxValidation($model)
	{
		if(isset($_POST['ajax']) && $_POST['ajax'] === 'book-form')
		{
			echo CActiveForm::validate($model);
			Yii::app()->end();
		}
	}

    public function s()
    {
        echo 'sdf';
    }
}