public function index() { if (mc_user_id()) { if (mc_is_admin()) { if ($_POST['weixin_appid'] && $_POST['weixin_appsecret'] && $_POST['weixin_token']) { mc_update_option('weixin_appid', I('param.weixin_appid')); mc_update_option('weixin_appsecret', I('param.weixin_appsecret')); mc_update_option('weixin_token', I('param.weixin_token')); $this->success('更新成功'); } else { $this->theme('admin')->display('Control/weixin'); } } else { $this->error('您没有权限访问此页面!'); } } else { $this->success('请先登陆', U('User/login/index')); } }
public function paytools() { if (mc_user_id()) { if (mc_is_admin()) { if ($_POST['update_paytools']) { mc_update_option('alipay2_seller', I('param.alipay2_seller')); mc_update_option('alipay2_partner', I('param.alipay2_partner')); mc_update_option('alipay2_key', I('param.alipay2_key')); mc_update_option('alipay_seller', I('param.alipay_seller')); mc_update_option('alipay_partner', I('param.alipay_partner')); mc_update_option('alipay_key', I('param.alipay_key')); mc_update_option('alipay_wap_seller', I('param.alipay_wap_seller')); mc_update_option('alipay_wap_partner', I('param.alipay_wap_partner')); mc_update_option('alipay_wap_key', I('param.alipay_wap_key')); mc_update_option('tenpay_seller', I('param.tenpay_seller')); mc_update_option('tenpay_key', I('param.tenpay_key')); mc_update_option('huodaofukuan', I('param.huodaofukuan')); $this->success('更新成功'); } else { $this->theme(mc_option('theme'))->display('Control/paytools'); } } else { $this->error('您没有权限访问此页面!'); } } else { $this->success('请先登陆', U('User/login/index')); } }
public function site_control() { if (mc_is_admin()) { if ($_POST['home_control']) { mc_update_option('home_title', I('param.home_title')); mc_update_option('home_keywords', I('param.home_keywords')); mc_update_option('home_description', I('param.home_description')); mc_update_option('pro_close', I('param.pro_close')); mc_update_option('baobei_close', I('param.baobei_close')); mc_update_option('group_close', I('param.group_close')); mc_update_option('article_close', I('param.article_close')); mc_update_option('home_mode', I('param.home_mode')); $this->success('保存成功', U('Home/index/index')); } elseif ($_POST['pro_control']) { mc_update_option('pro_title', I('param.pro_title')); mc_update_option('pro_keywords', I('param.pro_keywords')); mc_update_option('pro_description', I('param.pro_description')); $this->success('保存成功', U('Pro/index/index')); } elseif ($_POST['group_control']) { mc_update_option('group_title', I('param.group_title')); mc_update_option('group_keywords', I('param.group_keywords')); mc_update_option('group_description', I('param.group_description')); mc_update_option('paixu', I('param.paixu')); mc_update_option('shehe_post', I('param.shehe_post')); $this->success('保存成功', U('Post/Group/index')); } elseif ($_POST['article_control']) { mc_update_option('article_title', I('param.article_title')); mc_update_option('article_keywords', I('param.article_keywords')); mc_update_option('article_description', I('param.article_description')); $this->success('保存成功', U('Article/index/index')); } else { $this->error('提交参数错误!'); } } else { $this->success('请先登陆', U('User/login/index')); } }
public function site_control() { if (mc_is_admin()) { if ($_POST['the_control']) { mc_update_option('home_title', I('param.home_title')); mc_update_option('home_keywords', I('param.home_keywords')); mc_update_option('home_description', I('param.home_description')); //商品 mc_update_option('pro_title', I('param.pro_title')); mc_update_option('pro_keywords', I('param.pro_keywords')); mc_update_option('pro_description', I('param.pro_description')); //社区 mc_update_option('group_title', I('param.group_title')); mc_update_option('group_keywords', I('param.group_keywords')); mc_update_option('group_description', I('param.group_description')); mc_update_option('paixu', I('param.paixu')); mc_update_option('shenhe_post', I('param.shenhe_post')); //文章 mc_update_option('article_title', I('param.article_title')); mc_update_option('article_keywords', I('param.article_keywords')); mc_update_option('article_description', I('param.article_description')); $this->success('保存成功'); } else { $this->error('提交参数错误!'); } } else { $this->success('请先登陆', U('User/login/index')); } }