Beispiel #1
0
function API_Logout()
{
    include_once ONEZ_ROOT . './uc_client/client.php';
    $onez = uc_user_synlogout();
    $onez .= <<<ONEZ
<p align="center"><br /><br /><br /><br />
<a href="#" onclick="ReLoad()"><font size="2" color="#0000ff">正在同步退出中...</font></a>
</p>
<script type="text/javascript">
function ReLoad(){
  top.location.href='{$url}';
}
window.onload=ReLoad;
</script>
ONEZ;
    $GLOBALS['cookiepre'] = 'onez_';
    osetcookie('userid', '', -86400);
    osetcookie('username', '', -86400);
    return $onez;
}
Beispiel #2
0
function API_Logout()
{
    global $setting, $onlineip, $Block, $db_hash, $db_sitehash;
    $GLOBALS['db_hash'] = $db_hash;
    $GLOBALS['cookiepre'] = substr(md5($db_sitehash), 0, 5) . '_';
    osetcookie('winduser', '', -86400);
    $GLOBALS['cookiepre'] = 'onez_';
    osetcookie('userid', '', -86400);
    osetcookie('username', '', -86400);
    $onez .= <<<ONEZ
<p align="center"><br /><br /><br /><br />
<a href="#" onclick="ReLoad()"><font size="2" color="#0000ff">正在同步退出中...</font></a>
</p>
<script type="text/javascript">
function ReLoad(){
  top.location.href='{$url}';
}
window.onload=ReLoad;
</script>
ONEZ;
    return $onez;
}
Beispiel #3
0
        include_once ONEZ_ROOT . './include/db_mysql.class.php';
        db_local();
        $db = new onez_db();
    }
    if ($db->rows("users", "uid='{$uid}'") == 0) {
        //创建本地用户
        include_once '../uc_client/client.php';
        if ($data = uc_get_user($uid, 1)) {
            list($uid, $username, $email) = $data;
            $arr = array('uid' => $uid, 'username' => $username, 'email' => $email, 'infoip' => $onlineip, 'infotime' => $time);
            $db->insert('users', $arr);
        }
    }
    $GLOBALS['cookiepre'] = 'onez_';
    osetcookie('userid', $uid, 31536000);
    osetcookie('username', $username, 31536000);
    exit(API_RETURN_SUCCEED);
} elseif ($action == 'getcreditsettings') {
    //发送积分配置
    require_once '../include/common.inc.php';
    $credits = array();
    foreach ($extcredits as $id => $v) {
        if ($v[0]) {
            $credits[$id] = array($v[1], $v[2]);
        }
    }
    echo uc_serialize($credits);
} elseif ($action == 'updatecreditsettings') {
    //保存积分兑换比例
    require_once '../include/common.inc.php';
    $outextcredits = array();