<?php

namespace core_next;
global $core_next_set;
if (!$core_next_set['other_login_open']) {
    die('未开启第三方登录功能');
}
if (WordPress::isLogin()) {
    die('您已经登陆账户');
}
$auth_type = $_GET["auth_type"];
if (!isset($_GET["type"])) {
    die('参数错误');
}
$type = $_GET["type"] ?? 'login';
if ($type === 'login') {
    if ($auth_type == 'qq') {
        Theme::checkOtherLogin('qq');
        QQ::init();
        QQ::getAuthorizationCode();
    }
} else {
    if ($auth_type == 'qq') {
        Theme::checkOtherLogin('qq');
        QQ::init();
        QQ::loginReturn();
    }
}

