<?php /** * [Discuz!] (C)2001-2099 Comsenz Inc. * This is NOT a freeware, use is subject to license terms * * $Id: menu_setting.inc.php 35201 2015-02-04 06:32:12Z nemohou $ */ if (!defined('IN_DISCUZ') || !defined('IN_ADMINCP')) { exit('Access Denied'); } $setting = C::t('common_setting')->fetch_all(array('wechatmenu')); $setting = (array) unserialize($setting['wechatmenu']); require_once DISCUZ_ROOT . './source/plugin/wechat/wechat.lib.class.php'; require_once DISCUZ_ROOT . './source/plugin/wechat/setting.class.php'; WeChatSetting::menu(); if (!$_G['wechat']['setting']['wechat_appId'] || !$_G['wechat']['setting']['wechat_appsecret']) { cpmsg(lang('plugin/wechat', 'wsq_menu_at_error'), '', 'error'); } if (!submitcheck('menusubmit') && !submitcheck('pubsubmit')) { $wechat_client = new WeChatClient($_G['wechat']['setting']['wechat_appId'], $_G['wechat']['setting']['wechat_appsecret']); if (in_array('plugin', $_G['setting']['rewritestatus'])) { $url = $_G['siteurl'] . rewriteoutput('plugin', 1, 'wechat', 'access', '', 'op=access'); } else { $url = $_G['siteurl'] . 'plugin.php?id=wechat:access'; } showtips(lang('plugin/wechat', 'menu_tips', array('url' => $url))); showformheader('plugins&operation=config&do=' . $pluginid . '&identifier=wechat&pmod=menu_setting'); showtableheader(); echo '<tr class="header"><th class="td25"></th><th>' . $lang['display_order'] . '</th><th style="width:350px">' . lang('plugin/wechat', 'wsq_menu_name') . '</th><th>' . lang('plugin/wechat', 'wsq_menu_keyurl') . '</th></tr>'; foreach ($setting['button'] as $k => $button) {