コード例 #1
0
ファイル: bind.inc.php プロジェクト: MCHacker/docker-discuz
            setloginstatus($member, 1296000);
            dsetcookie('wechat_ticket', '', -1);
            $echostr = 'done';
        } else {
            $echostr = '1';
            //json_encode($authcode);
        }
    } else {
        $echostr = '-1';
    }
    if (!ob_start($_G['gzipcompress'] ? 'ob_gzhandler' : null)) {
        ob_start();
    }
    if ($echostr === 'done') {
        C::t('#wechat#mobile_wechat_authcode')->delete($authcode['sid']);
    }
    include template('common/header_ajax');
    echo $echostr;
    include template('common/footer_ajax');
    exit;
}
if ($_G['cookie']['qrauth']) {
    $qrauth = authcode(base64_decode($_G['cookie']['qrauth']), 'DECODE', $_G['config']['security']['authkey']);
}
if (!$_G['wechat']['setting']['wechat_qrtype']) {
    require_once DISCUZ_ROOT . './source/plugin/wechat/wechat.lib.class.php';
    require_once DISCUZ_ROOT . './source/plugin/wechat/wsq.class.php';
    list($isqrapi, $qrcodeurl, $codeenc, $code) = WeChat::getqrcode();
    wsq::report('siteqrshow');
}
include_once template('wechat:wechat_qrcode');