Ejemplo n.º 1
0
    updatecache('setting');
    if ($_GET['setting']['wsq_allow']) {
        WeChatHook::updateResponse(array('receiveMsg::text' => array('plugin' => 'wechat', 'include' => 'response.class.php', 'class' => 'WSQResponse', 'method' => 'text'), 'receiveEvent::click' => array('plugin' => 'wechat', 'include' => 'response.class.php', 'class' => 'WSQResponse', 'method' => 'click'), 'receiveEvent::subscribe' => array('plugin' => 'wechat', 'include' => 'response.class.php', 'class' => 'WSQResponse', 'method' => 'subscribe'), 'receiveEvent::scan' => array('plugin' => 'wechat', 'include' => 'response.class.php', 'class' => 'WSQResponse', 'method' => 'scan')));
        WeChatHook::updateRedirect(array('plugin' => 'wechat', 'include' => 'response.class.php', 'class' => 'WSQResponse', 'method' => 'redirect'));
        WeChatHook::updateAPIHook(array(array('wsqindex_variables' => array('plugin' => 'wechat', 'include' => 'wsqapi.class.php', 'class' => 'WSQAPI', 'method' => 'forumdisplay_variables')), array('forumdisplay_variables' => array('plugin' => 'wechat', 'include' => 'wsqapi.class.php', 'class' => 'WSQAPI', 'method' => 'forumdisplay_variables')), array('viewthread_variables' => array('plugin' => 'wechat', 'include' => 'wsqapi.class.php', 'class' => 'WSQAPI', 'method' => 'viewthread_variables'))));
        WeChatHook::updateViewPluginId('wechat');
        if (!in_array('mobile', $_G['setting']['plugins']['available'])) {
            $plugin = C::t('common_plugin')->fetch_by_identifier('mobile');
            if (!$plugin) {
                cpmsg(lang('plugin/wechat', 'wsq_mobile_plugin_error'), '', 'error');
            }
            C::t('common_plugin')->update($plugin['pluginid'], array('available' => 1));
            updatecache(array('plugin', 'setting'));
        }
    } else {
        $wechatredirect = WeChatHook::getRedirect();
        if ($wechatredirect['plugin'] == 'wechat') {
            $wechatredirect = array();
        }
        WeChatHook::updateRedirect($wechatredirect);
        WeChatHook::updateViewPluginId('');
    }
    if (function_exists('domain_create') && $_G['setting']['domain']['root']['forum']) {
        if ($_GET['setting']['wsq_domain']) {
            domain_create('wechat', $_GET['setting']['wsq_domain'], $_G['setting']['domain']['root']['forum']);
        } else {
            domain_delete('wechat');
        }
    }
    cpmsg('setting_update_succeed', 'action=plugins&operation=config&do=' . $pluginid . '&identifier=wechat&pmod=wsq_setting', 'succeed');
}
Ejemplo n.º 2
0
    exit;
}
if (isset($_GET["domains-list"])) {
    domains_list();
    exit;
}
if (isset($_POST["reverse"])) {
    domain_reverse();
    exit;
}
if (isset($_POST["enabled"])) {
    domain_enabled();
    exit;
}
if (isset($_POST["delete"])) {
    domain_delete();
    exit;
}
js();
function js()
{
    $t = $_GET["t"];
    $tpl = new templates();
    $page = CurrentPageName();
    header("content-type: application/x-javascript");
    $title = $tpl->_ENGINE_parse_body("{squid_parent_proxy}::{domains}");
    $html = "\n\tYahooWin5('564','{$page}?popup=yes&t={$t}&servername={$_GET["servername"]}','{$title}');";
    echo $html;
}
function domains_save()
{