$set['notice']['newtype'] = implode(",", $set['notice']['newtype']); } plog('sysset.save.notice', '修改系统设置-模板消息通知设置'); } elseif ($op == 'trade') { $set['trade'] = is_array($_GPC['trade']) ? $_GPC['trade'] : array(); if (!$_W['isfounder']) { unset($set['trade']['receivetime']); } else { file_put_contents(IA_ROOT . '/addons/ewei_shop/data/receive_time', $set['trade']['receivetime']); } plog('sysset.save.trade', '修改系统设置-交易设置'); } elseif ($op == 'pay') { $set['pay'] = is_array($_GPC['pay']) ? $_GPC['pay'] : array(); $sec['cert'] = upload_cert('weixin_cert_file'); $sec['key'] = upload_cert('weixin_key_file'); $sec['root'] = upload_cert('weixin_root_file'); if (empty($sec['cert']) || empty($sec['key']) || empty($sec['root'])) { } pdo_update('ewei_shop_sysset', array('sec' => iserializer($sec)), array('uniacid' => $_W['uniacid'])); plog('sysset.save.pay', '修改系统设置-支付设置'); } elseif ($op == 'template') { $shop = is_array($_GPC['shop']) ? $_GPC['shop'] : array(); $set['shop']['style'] = save_media($shop['style']); $datapath = IA_ROOT . "/addons/ewei_shop/data/template"; if (!is_dir($datapath)) { load()->func('file'); @mkdirs($datapath, "777"); } file_put_contents($datapath . "/shop_" . $_W['uniacid'], $set['shop']['style']); plog('sysset.save.pay', '修改系统设置-模板设置'); } elseif ($op == 'member') {
unset($set['trade']['receivetime']); } else { file_put_contents(IA_ROOT . '/addons/ewei_shop/data/receive_time', $set['trade']['receivetime']); } plog('sysset.save.trade', '修改系统设置-交易设置'); } elseif ($op == 'pay') { $set['pay'] = is_array($_GPC['pay']) ? $_GPC['pay'] : array(); $weixin_cert = upload_cert('weixin_cert_file'); if (!empty($weixin_cert)) { $set['pay']['weixin_cert'] = $weixin_cert; } $weixin_key = upload_cert('weixin_key_file'); if (!empty($weixin_key)) { $set['pay']['weixin_key'] = $weixin_key; } $weixin_root = upload_cert('weixin_root_file'); if (!empty($weixin_root)) { $set['pay']['weixin_root'] = $weixin_root; } plog('sysset.save.pay', '修改系统设置-支付设置'); } elseif ($op == 'template') { $shop = is_array($_GPC['shop']) ? $_GPC['shop'] : array(); $set['shop']['style'] = save_media($shop['style']); $datapath = IA_ROOT . "/addons/ewei_shop/data/template"; if (!is_dir($datapath)) { load()->func('file'); @mkdirs($datapath, "777"); } file_put_contents($datapath . "/shop_" . $_W['uniacid'], $set['shop']['style']); plog('sysset.save.pay', '修改系统设置-模板设置'); } elseif ($op == 'member') {