<?php
/**
 * Descriptions
 * @author yzxh24
 * @email yzxh24@gmail.com
 * @created 2010-06-05 18:49:09
 */
class UpdateAction extends BaseAction
{
    public function run()
    {
        //put your code here
        $model = $this->getController()->loadModel();

		// Uncomment the following line if AJAX validation is needed
		// $this->performAjaxValidation($model);

		if(isset($_POST['BookPostComplaint']))
		{
			$model->attributes = $_POST['BookPostComplaint'];
			if($model->save())
            {
				$this->getController()->redirect(array('view','id' => $model->id));
            }
		}

		$this->getController()->render('update',array(
			'model' => $model,
		));
    }
}