$id]); Setting::agentsetting_save($community , 'community'); show_json(1); } //社群添加 function communityAdd() { global $_W , $_GPC; $id = $_GPC['id']; $community = pdo_get('wlmerchant_community' , ['id' => $id]); if ($_W['ispost']) { $data = $_GPC['community']; if ($id) { if ($community['communqrcode'] != $data['communqrcode']) { $data['media_id'] = ''; $data['media_endtime'] = 0; } $res = pdo_update('wlmerchant_community' , $data , ['id' => $id]); } else { $data['uniacid'] = $_W['uniacid']; $data['aid'] = $_W['aid']; $data['createtime'] = time(); $res = pdo_insert(PDO_NAME . 'community' , $data); } if ($res) { wl_message('操作成功!' , web_url('agentset/agentSetCommunity/communityList')); } else { wl_message('操作失败,请重试!'); } } include wl_template('agentset/communityAdd'); } //删除社群 function deletecommunity() { global $_W , $_GPC; $id = $_GPC['id']; $res = pdo_delete('wlmerchant_community' , ['id' => $id]); if ($res) { show_json(1); } else { show_json(0 , '删除失败,请重试'); } } }