public function save_user_info($user_info, $account, $ckb_cookie = 1, $login_type = 0, $auto_login = 0, $oauth_login = 0) { global $kekezu, $_K, $handlekey; global $_lang; $_SESSION['uid'] = $user_info['uid']; $_SESSION['username'] = $user_info['username']; $_SESSION['last_login_time'] = $user_info['last_login_time']; $this->add_login_time(0); $login_type = $this->_login_type; if ($auto_login == '1') { $c = array(); $c[0] = base64_encode($user_info['uid']); $c[1] = base64_encode($account); $c[2] = base64_encode($user_info['uid'] . '|' . $user_info['password'] . '|' . $account); setcookie('keke_auto_login', serialize($c), time() + 3600 * 24 * 30); } if ($_K['refer']) { //登录之后不同身份跳转到各自管理页面 $user_obj = new keke_user_class(); $user_type = $user_obj->get_user_type($user_info['uid']); if ($user_type['user_type'] == 2) { $r_url = '?do=user&view=wk'; } elseif ($user_type['user_type'] == 1) { $r_url = '?do=user&view=gz'; } $r = $_K['refer'] . $r_url; } else { $r = 'index.php'; } if ($login_type) { $r = 'index.php'; } if ($oauth_login) { $r = 'index.php'; } if ($this->_sys_config['user_intergration'] == 2) { $synhtml = keke_user_class::user_synlogin($user_info['uid'], $this->_password); } $synhtml = isset($synhtml) ? $synhtml : ""; $user_obj = new Keke_witkey_space_class(); $user_obj->setLast_login_time(time()); $user_obj->setWhere("uid = '{$user_info['uid']}'"); $user_obj->edit_keke_witkey_space(); $black_obj = new Keke_witkey_member_black_class(); $black_obj->setWhere("uid = '{$user_info['uid']}'"); $black_obj->del_keke_witkey_member_black(); db_factory::execute(sprintf("update %switkey_member_oltime set last_op_time=%d where uid = %d", TABLEPRE, time(), $user_info['uid'])); if (isset($_COOKIE['prom']) && $_COOKIE['prom']) { $prom_obj = keke_prom_class::get_instance(); $url_data = $prom_obj->extract_prom_cookie(); $url_data['p'] == 'reg' or $prom_obj->create_prom_relation($user_info['uid'], $user_info['username'], $url_data, '2'); } if ($login_type == 1) { if (strtolower($_SERVER['REQUEST_METHOD']) == 'post') { $this->show_msg($_lang['login_success'] . "{$synhtml}", 1, $r); } elseif (strtolower($_SERVER['REQUEST_METHOD']) == 'get') { echo "{$synhtml}<script>window.location.href='{$r}';</script>"; die; } } else { if ($login_type == 3 || $login_type == 4) { $info = $user_info; $return_info['uid'] = $info['uid']; $return_info['username'] = $info['username']; $return_info['balance'] = intval($info['balance']); $return_info['credit'] = intval($info['credit']); $return_info['pic'] = keke_user_class::get_user_pic($user_info['uid']); $return_info['syn'] = $synhtml; $user_info['uid'] == ADMIN_UID || $user_info['group_id'] > 0 and $return_info['is_admin'] = 1; $return_info['g_pic'] = unserialize($info['buyer_level']); $return_info['s_pic'] = unserialize($info['seller_level']); $this->show_msg($_lang['login_success'], 1, $return_info); die; } elseif ($login_type == 2) { return true; } else { $this->show_msg($_lang['login_success'] . "{$synhtml}", 1, $r); } } }
function register_login($userinfo, $is_oauth = null) { global $kekezu; global $_lang; global $_K; $_SESSION['uid'] = $userinfo['uid']; $_SESSION['username'] = $userinfo['username']; $c = $_COOKIE; if ($_K['refer']) { $r = $_K['refer']; } else { $r = 'index.php'; } if (isset($_COOKIE['prom'])) { $prom_obj = keke_prom_class::get_instance(); $url_data = $prom_obj->extract_prom_cookie(); $prom_obj->create_prom_relation($userinfo['uid'], $userinfo['username'], $url_data); $url_data['p'] == 'reg' and $obj_id = $userinfo['uid'] or $obj_id = $url_data['o']; $prom_obj->create_prom_event($url_data['p'], $userinfo['uid'], $obj_id); } $synhtml = keke_user_class::user_synlogin($userinfo['uid'], md5($this->_reg_pwd)); if ($userinfo['status'] == 3 && $this->_reg_type == 1) { if ($userinfo['email'] && !$is_oauth) { $arr = explode("@", $userinfo['email']); $mail_url = keke_user_class::getAllEmail('@' . $arr[1]); } if (!$userinfo['email'] || $is_oauth) { $this->show_msg("注册成功!", 1, "index.php?do=login"); } else { $_SESSION['uid'] = ''; $_SESSION['username'] = ''; $this->show_msg($_lang['register_success_and_excite'] . "{$synhtml}", 1, $mail_url); } } else { if ($this->_reg_type == 2) { $userinfo[pic] = keke_user_class::get_user_pic($userinfo['uid']); $r = $userinfo; db_factory::execute(sprintf(" update %switkey_space set status=1 where uid='%d'", TABLEPRE, $userinfo['uid'])); } $this->show_msg($_lang['register_success'] . "{$synhtml}", 1, 'index.php?do=user&view=account&op=basic'); } }
} ?> </div> <!-- nav-action end --> <div class="content-panel"> <div class="user-short"> <div class="media"> <div class="user-avatar"> <a href="index.php?do=seller&id=<?php echo $gUid; ?> "> <?php echo keke_user_class::get_user_pic($gUid, 'larger'); ?> </a> </div> <div class="media-body"> <div class="user-info"> <h2 class="media-heading username"><?php echo $username; ?> </h2> <div class="top-left"> <div class="p-row1">
?> </li> <li> <?php echo $_lang['suggest_hide_notice']; ?> </li> </ul> </div> </div>--> <div class="box user_quick clearfix"> <div class="detail pad10"> <ul> <li class="avatar"> <a href="#" title="admin"><?php echo keke_user_class::get_user_pic($admin_info['uid'], 'small'); ?> </a> </li> <li class="name"> <span><?php echo $_lang['good_morning']; ?> </span>,<?php echo $_lang['public_admin_uid']; ?> <b><?php echo $admin_info['username']; ?> </b> <span class="clock"> - <?php
if ($timeDesc) { echo $timeDesc; ?> 前<?php } else { ?> 刚刚<?php } ?> </span> <a href="<?php echo $v['feed_username']['url']; ?> "> <?php echo keke_user_class::get_user_pic($v['uid'], 'small'); echo $v['username']; ?> </a> </p> <p class="record-list-post"> <a href="<?php echo $v['event']['url']; ?> " title="<?php echo $v['event']['content']; ?> "><span class="money"><?php if ($v['event']['cash']) { ?> <sub>¥</sub><?php