<?php
/* 
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

/**
 * Description of DeleteAction
 *
 * @author yzxh24
 */
class DeleteAction extends BaseAction
{
    public function run()
    {
        if(Yii::app()->request->isPostRequest)
		{
			$model = new Pmlink();
            $model->findByPk($_GET['id'])->delete();

			if(!isset($_GET['ajax']))
            {
				$this->getController()->redirect(array('list'));
            }
		}
		else
        {
			throw new CHttpException(400,'Invalid request. Please do not repeat this request again.');
        }
    }
}