Exemplo n.º 1
0
define('APPTYPEID', 0);
define('CURSCRIPT', 'member');
require './source/class/class_core.php';
require_once dirname(dirname(dirname(__FILE__))) . '/bigappjson.class.php';
$discuz = C::app();
$discuz->init();
$config = array('display_style' => 0);
if (isset($_G['setting']['bigapp_settings'])) {
    $_G['setting']['bigapp_settings'] = unserialize($_G['setting']['bigapp_settings']);
}
$config['display_style'] = strval(isset($_G['setting']['bigapp_settings']['display_style']) ? $_G['setting']['bigapp_settings']['display_style'] : 0);
///////////////////////////////////////////////////////
// add by mawentao
// check qqconnet
require_once dirname(__FILE__) . "/../../libs/appcfg.inc.php";
$appcfg = getAppConfigure();
//if(!$_G['setting']['connect']['allow']) {
if (!$appcfg["qq_login"]) {
    $config['qqlogin'] = "";
    $config['qqlogin_end'] = "";
} else {
    $siteurl = substr($_G["siteurl"], 0, -11);
    $qqloginurl = $siteurl . "source/plugin/bigapp/api/qqconnect/connect.php?mod=login&op=init&referer=forum.php&statfrom=login_simple";
    $qqlogin_end_url = $siteurl . "source/plugin/bigapp/api/qqconnect/connect.php?platform=qq";
    $config['qqlogin'] = $qqloginurl;
    $config['qqlogin_end'] = $qqlogin_end_url;
}
$config["wechat_login"] = $appcfg["wechat_login"];
$config["weibo_login"] = $appcfg["weibo_login"];
$config["weibo_login"] = 0;
// add appinfo
Exemplo n.º 2
0
<?php

if (!defined('IN_DISCUZ')) {
    exit('Access Denied');
}
define("FILE_PATH", dirname(__FILE__));
require_once FILE_PATH . '/libs/env.inc.php';
require_once FILE_PATH . '/libs/appcfg.inc.php';
if (isset($_REQUEST["ajax"]) && $_REQUEST['ajax'] == 1) {
    $paramRet = BIGAPPJSON::encode(array('request_id' => rand(1000000, 10000000000), 'error_code' => 100802, 'error_msg' => 'invalid param'));
    $authRet = BIGAPPJSON::encode(array('request_id' => rand(1000000, 10000000000), 'error_code' => 100803, 'error_msg' => 'auth failed'));
    $svrRet = BIGAPPJSON::encode(array('request_id' => rand(1000000, 10000000000), 'error_code' => 100800, 'error_msg' => 'internal server error'));
    if (!isset($_G['groupid']) || 1 != $_G['groupid']) {
        echo $authRet;
        die(0);
    }
    $params = array("qq_login" => $_POST["qq_login"], "wechat_login" => $_POST["wechat_login"], "weibo_login" => $_POST["weibo_login"]);
    saveAppConfigure($params);
    $ret = array("error_code" => 0, "setting" => BIGAPPJSON::encode($params));
    echo BIGAPPJSON::encode($ret);
    die(0);
}
require_once FILE_PATH . '/libs/menu.inc.php';
$params = getAppConfigure();
$params["ajaxurl"] = rtrim($_G['siteurl'], '/') . '/plugin.php?id=bigapp:appcfg&ajax=1';
$tplVars = array("plugin_path" => rtrim($_G['siteurl'], '/') . '/source/plugin/bigapp');
Utils::loadTemplate(FILE_PATH . '/view/appcfg.tpl', $params, $tplVars);
runlog('bigapp', 'show appcfg page succ');
// vim600: sw=4 ts=4 fdm=marker syn=php