zhangjingyu
global.php
“/**
* 获取用户信息
*/
function User_info() {
global $db, $timestamp, $db_onlinetime, $winduid, $windpwd, $bday, $safecv, $db_ifonlinetime, $c_oltime, $onlineip, $db_ipcheck, $tdtime, $montime, $db_ifsafecv, $db_ifpwcache, $uc_server,$db_md_ifopen;
PwNewDB();
$detail = getUserByUid($winduid);
if (empty($detail) && $uc_server) {
require_once (R_P . 'require/ucuseradd.php');
}
$loginout = 0;
if ($db_ipcheck && strpos($detail['onlineip'], $onlineip) === false) {
$iparray = explode('.', $onlineip);
strpos($detail['onlineip'], $iparray[0] . '.' . $iparray[1]) === false && $loginout = 1;
}
if (!$detail || PwdCode($detail['password']) != $windpwd || ($db_ifsafecv && $safecv != $detail['safecv']) || $loginout || $detail['yz'] > 1) {
$GLOBALS['groupid'] = 'guest';
require_once (R_P . 'require/checkpass.php');
Loginout();
if ($detail['yz'] > 1) {
$GLOBALS['jihuo_uid'] = $detail['uid'];
Showmsg('login_jihuo');
}
Showmsg('ip_change');
} else {
list($detail['shortcut'], $detail['appshortcut']) = explode("\t", $detail['shortcut']);
unset($detail['password']);
$detail['honor'] = substrs($detail['honor'], 90);
$distime = $timestamp - $detail['lastvisit'];
if ($distime > $db_onlinetime || $distime > 3600) {
/*--- element update ---start*/
if ($db_ifpwcache & 1 && SCR != 'post' && SCR != 'thread') {
L::loadClass('elementupdate', '', false);
$elementupdate = new ElementUpdate();
$elementupdate->userSortUpdate($detail);
}
/*--- element update ---end*/
if (!GetCookie('hideid')) {
$userService = L::loadClass('UserService', 'user'); /* @var $userService PW_UserService */
$updateMemberData = $updateByIncrementMembe