getMainMenu(); $serviceCertPaths = $this->getServiceCertPaths($_W['uniacid']); $certfile = $serviceCertPaths[0]; $keyfile = $serviceCertPaths[1]; $item = pdo_get('cjdc_service_pay', array('uniacid' => $_W['uniacid'])); if (checksubmit('submit')) { if ($_GPC['apiclient_cert']) { file_put_contents($certfile, trim($_GPC['apiclient_cert'])); $data['apiclient_cert'] = $_GPC['apiclient_cert']; } if ($_GPC['apiclient_key']) { file_put_contents($keyfile, trim($_GPC['apiclient_key'])); $data['apiclient_key'] = $_GPC['apiclient_key']; } $data['mchid']=trim($_GPC['mchid']); $data['appid']=trim($_GPC['appid']); $data['wxkey']=trim($_GPC['wxkey']); $data['uniacid']=trim($_W['uniacid']); $data['is_open']=$_GPC['is_open']; if('' == $_GPC['id']) { $res = pdo_insert('cjdc_service_pay',$data); if($res || $res2){ message('添加成功',$this->createWebUrl('servicepay',array()),'success'); } else { message('添加失败','','error'); } } else { $res = pdo_update('cjdc_service_pay', $data, array('id' => $_GPC['id'])); if ($res || $res2) { message('编辑成功',$this->createWebUrl('servicepay',array()),'success'); } else { message('编辑失败','','error'); } } } include $this->template('web/servicepay');