/** * 删除幻灯 */ public function actionDel() { $msg = $this->msgcode(); $id = Yii::app()->getRequest()->getParam("id", 0); //用户名 if ($id != 0) { if (AppBsWj::model()->deleteByPk($id)) { $this->msgsucc($msg); } else { $msg['msg'] = "数据删除失败"; } } else { $msg['msg'] = "id不能为空"; } echo json_encode($msg); }
public function actionTk() { $msg = $this->msgcode(); $id = Yii::app()->getRequest()->getParam("id", ""); //违纪条款 if (!empty($id)) { $allList = AppBsWj::model()->find("wj_tk=:wp", array(":wp" => $id)); if (!empty($allList) && !empty($allList->wj_zj)) { $arr = explode("\r\n", $allList->wj_zj); $str = ""; foreach ($arr as $k => $val) { if (!empty($val)) { $str .= sprintf('<input type="checkbox" name="order_zj[]" value="%s"/>%s、%s<br>', $k + 4, $k + 4, $val); } } $this->msgsucc($msg); $msg['data'] = $str; } else { $msg['msg'] = "获取证据列表失败"; } } else { $msg['msg'] = "违纪条款不能为空"; } echo json_encode($msg); }