public function actionDelete() { $data = $_POST; if (!empty($data)) { ApplicationPointPersons::model()->deleteByPk(array('application_id' => (int) $data['application_id'], 'username' => (string) $data['username'])); echo CJSON::encode(array('type' => 'success', 'data' => '')); } else { echo CJSON::encode(array('type' => 'error', 'data' => 'CSRF_ERROR: CSRF Token did not match')); } }
public function actionDelete() { $data = $_POST; if (!empty($data)) { Applications::model()->deleteByPk($data['application_id']); ApplicationServers::model()->deleteAll('application_id=:application_id', array(':application_id' => $data['application_id'])); ApplicationPointPersons::model()->deleteAll('application_id=:application_id', array(':application_id' => $data['application_id'])); Notes::model()->deleteAll('application_id=:application_id', array(':application_id' => $data['application_id'])); echo CJSON::encode(array('type' => 'success', 'data' => '')); } else { echo CJSON::encode(array('type' => 'error', 'data' => 'CSRF_ERROR: CSRF Token did not match')); } }