function space_viewpro() { global $_MooClass, $dbTablePre, $userid, $timestamp, $user_arr, $val_arr, $style_user_arr, $diamond, $_MooCookie, $memcached; //$val_arr统计资料完善度 // $uid = $GLOBALS ['style_uid']; $uid = $_GET['other_uid']; $is_only_show = true; $status = array(); //验证是否合法成功登陆 $and_uuid = isset($_GET['uuid']) ? $_GET['uuid'] : ''; $userid = $_GET['uid'] = isset($_GET['uid']) ? $_GET['uid'] : ''; if ($userid) { $userid = $mem_uid = $memcached->get('uid_' . $userid); } $checkuuid = check_uuid($and_uuid, $userid); if (!$checkuuid) { $error = "uuid_error"; echo return_data($error, false); exit; } $user_arr = MooMembersData($userid); $user_oth = MooMembersData($uid); //note 判断被浏览的会员是否存在 $status = array_merge(MooMembersData($uid), MooGetData('members_login', 'uid', $uid)); $user_per_num = getUserinfo_per($user_arr); $error = array(); //*****************白名单******************* if ($uid != $userid) { $is_only_show = false; } //*****************白名单******************* if (empty($is_only_show)) { //if(MOOPHP_ALLOW_FASTDB && $status['is_lock'] != 1){//is_lock默认1不封锁用户,0则封锁 if ($status['is_lock'] != 1) { $error = "此会员已经找到真爱,关闭了个人资料"; echo return_data($error, false); exit; } if (!$status) { $error = "此会员已经找到真爱,关闭了个人资料"; echo return_data($error, false); exit; //note 判断被浏览的用户是否允许其他会员查看他的资料 } elseif (!$status['showinformation'] && $status['uid'] != $userid) { //showinformation默认1允许其他会员查看,0则不允许 switch ($status['showinformation_val']) { //showinformation_val用户关闭资料的理由 case 1: $error = "此会员已找到正在交往的对象,故资料未公开"; echo return_data($error, FALSE); exit; break; case 2: $error = "此会员已找到真爱,即将踏上红地毯,故资料未公开,转向我的真爱一生"; echo return_data($error, false); exit; break; case 3: $error = "此会员最近很忙,无法及时回复邮件,故资料未公开,转向我的真爱一生"; break; case 4: $error = "此会员资料未公开,原因可能是TA已经找到真爱了,转向我的真爱一生"; echo return_data($error, false); exit; break; } } } //note 浏览资料页面时候,写入谁浏览谁表,自己浏览自己的除外 if ($userid && $uid && $userid != $uid) { //note 不让屏蔽的会员查看 if (MooGetScreen($userid, $uid)) { $error = "由于特殊原因对方资料未公开,转向我的真爱一生"; echo return_data($error, false); exit; } if ($user_oth['gender'] != $user_arr['gender']) { //service_visitor 某某会员浏览某某会员记录表 $visitor = $_MooClass['MooMySQL']->getOne("SELECT vid FROM {$dbTablePre}service_visitor WHERE uid = '{$userid}' AND visitorid = '{$uid}'"); //note 再次浏览的,更新浏览时间 if ($visitor['vid']) { $_MooClass['MooMySQL']->query("UPDATE {$dbTablePre}service_visitor SET visitortime = '{$timestamp}' WHERE uid='{$userid}' AND visitorid = '{$uid}' limit 1"); } else { $_MooClass['MooMySQL']->query("INSERT INTO {$dbTablePre}service_visitor SET uid = '{$userid}',visitorid='{$uid}',visitortime = '{$timestamp}'"); } if (MooUserIsOnline($uid)) { $browser = $_MooClass['MooMySQL']->getOne("SELECT id FROM {$dbTablePre}service_browser WHERE uid = '{$userid}' AND browserid = '{$uid}'"); //note 再次浏览的,更新浏览时间 if ($browser['id']) { $_MooClass['MooMySQL']->query("UPDATE {$dbTablePre}service_browser SET browsertime = '{$timestamp}' WHERE uid='{$userid}' AND browserid = '{$uid}' limit 1"); } else { $_MooClass['MooMySQL']->query("INSERT INTO {$dbTablePre}service_browser SET uid = '{$userid}',browserid='{$uid}',browsertime = '{$timestamp}'"); } } } } //note 查看会员资料信息 $c = MooGetData('members_choice', 'uid', $uid) + MooGetData('members_introduce', 'uid', $uid); $user =& $status; /***创建浏览队列 ***/ if ($userid && $uid && $userid != $uid) { if ($user_oth['gender'] != $user_arr['gender'] && $user['uid'] != $userid) { if ($user['usertype'] == 3 && $user_arr['usertype'] != 3 && $user['showinformation'] == 1 && $user_arr['s_cid'] >= 40) { $iscan = $GLOBALS['fastdb']->get($userid . '_scan_space'); //浏览的全权会员列表 $iscan = empty($iscan) ? array() : json_decode($iscan, true); $iscan = in_array($uid, $iscan) ? $iscan : array_push($iscan, $uid); $GLOBALS['fastdb']->set($userid . '_scan_space', json_encode($iscan)); } if ($user['usertype'] != 3) { $scan_i = $GLOBALS['fastdb']->get('scan_space_' . $uid); //访问的记录列表 $scan_i = empty($scan_i) ? array() : json_decode($scan_i, true); if (!empty($scan_i)) { $scan_s = array(); foreach ($scan_i as $k => $scan) { $scan_s[$k] = $scan[0]; } if (in_array($userid, $scan_s)) { $scan_i[array_search($userid, $scan_s)] = array($userid, time()); } else { array_push($scan_i, array($userid, time())); } } else { array_push($scan_i, array($userid, time())); } $GLOBALS['fastdb']->set('scan_space_' . $uid, json_encode($scan_i)); } } } //note_显示相册中的普通照片 $user_pic = $_MooClass['MooMySQL']->getAll("SELECT imgurl,pic_date,pic_name FROM {$dbTablePre}pic WHERE syscheck=1 and isimage='0' and uid='{$uid}'"); $user['pic'] = $user_pic; $gender = $user_arr['gender'] == '0' ? '1' : '0'; //0为男,1为女 $agebegin = date("Y") - $user_arr['birthyear'] - 3; $ageend = date("Y") - $user_arr['birthyear'] + 3; $workprovince = $user_arr['province']; $workcity = $user_arr['city']; $search_url = MOOPHP_URL . "/index.php?n=search&h=quick&gender=" . $gender . "&age_start=" . $agebegin . "&age_end=" . $ageend . "&workprovince=" . $workprovince . "&workcity=" . $workcity . "&isphoto=1&imageField=&quick_search=搜索"; //note 您可能喜欢的人,匹配相同地区 $able_like = $userid ? youAbleLike(5) : array(); //note 获取会员认证证件 //note 当查看其他个人主页时,当前浏览的主页条件是否匹配 $user2 = false; if ($uid != "" && $uid != $user_arr['uid'] && $user['gender'] != $user_arr['gender']) { $c2 = MooGetData('members_choice', 'uid', $userid); $user2 = MooMembersData($userid); } //note 获得用户资料的完整度,以百分比显示makui $all_len = 0; if ($uid == $user_arr['uid']) { $all_len = (int) (getUserinfo_per($user_arr) * 100); } $user['all_len'] = $all_len; //note 匹配指数分数得出 $mark = 0; if ($uid && $uid != $user_arr['uid'] && $user['gender'] != $user_arr['gender']) { $cho = MooGetData('members_choice', 'uid', $user_arr['uid']); $year = isset($cho['birthyear']) ? $cho['birthyear'] : $user_arr['birthyear']; if ($year - 5 <= $user['birthyear'] && $user['birthyear'] <= $year + 5) { $mark_age = 9; $mark += 9; } else { $mark_age = 6; $mark += 6; } if ($cho['height1'] <= $user['height'] && $user['height'] <= $cho['height2']) { $mark_height = 7; $mark += 7; } else { $mark_height = 5; $mark += 5; } if ($cho['weight1'] <= $user['weight'] && $user['weight'] <= $cho['weight2']) { $mark_weight = 5; $mark += 5; } else { $mark_weight = 3; $mark += 3; } if ($cho['workprovince'] == $user['province']) { $mark_workprovince = 8; $mark += 8; } else { $mark_workprovince = 6; $mark += 6; } if ($cho['workcity'] == $user['city']) { $mark_workcity = 16; $mark += 16; } else { $mark_workcity = 5; $mark += 10; } if ($cho['education'] == $user['education']) { $mark_education = 8; $mark += 8; } else { $mark_education = 5; $mark += 5; } if ($cho['salary'] == $user['salary']) { $mark_salary = 9; $mark += 9; } else { $mark_salary = 7; $mark += 7; } if ($cho['marriage'] == $user['marriage']) { $mark_marriage = 8; $mark += 8; } else { $mark_marriage = 5; $mark += 5; } if ($cho['children'] == $user['children']) { $mark_children = 8; $mark += 8; } else { $mark_children = 6; $mark += 6; } if ($cho['drinking'] == $user['drinking']) { $mark_drinking = 5; $mark += 5; } else { $mark_drinking = 3; $mark += 3; } if ($cho['smoking'] == $user['smoking']) { $mark_smoking = 5; $mark += 5; } else { $mark_smoking = 2; $mark += 2; } if ($cho['body'] == $user['body']) { $mark_body = 6; $mark += 12; } else { $mark_body = 4; $mark += 8; } } $returnurl = 'index.php?' . $_SERVER['QUERY_STRING']; //返回的url //note 检查绑定是否过期 if ($user['isbind'] == 1) { $user['isbind'] = check_bind($user['bind_id']); } $activity = $_MooClass['MooMySQL']->getOne("SELECT uid,username,regtime,channel FROM {$dbTablePre}ahtv_reguser where uid='{$uid}' and isattend=1"); //鲜花发送语 if ($user_arr['gender'] == 0) { //boy $sql = "SELECT id,content FROM {$dbTablePre}members_sendinfo where type=2 and isShow=1"; } else { //girl $sql = "SELECT id,content FROM {$dbTablePre}members_sendinfo where type=1 and isShow=1"; } $sendinfo = $_MooClass['MooMySQL']->getAll($sql); $users = array(); $mainimg = MooGetphoto($status['uid'], $style = "com"); $status['mainimg'] = $mainimg; $users['material'] = $status; $users['mating'] = $c; //资料完整度 $users['inte'] = $user_per_num * 100; $users['inte'] = round($users['inte']); $users['material']['password'] = ''; $users['material']['regip'] = ''; $users['material']['qq'] = ''; $users['material']['msn'] = ''; $users['material']['telphone'] = ''; $users['material']['username'] = ''; if (empty($error)) { echo return_data($users); exit; } else { echo return_data($error, false); exit; } }
function sendcontact() { global $_MooClass, $dbTablePre, $timestamp, $user, $user_arr, $hzn, $serverid; $returnurl = 'index.php?' . $_SERVER['QUERY_STRING']; //返回的url $userid = $GLOBALS['MooUid']; //note 目前默认系统不审核 $contact_sys_check = '0'; //note 目前系统默认是委托真爱一生等待对方的回应 $contact_stat = '1'; $content = MooCutstr(safeFilter(MooGetGPC('content1', 'string')), 200, ''); $sendid = MooGetGPC('sendid', 'integer'); //客服不可模拟操作 /*if($hzn == "hongniangwang"){ MooMessage('对不起您不能模拟操作','javascript:history.go(-1);','04'); exit; }*/ if ($serverid) { MooMessage('对不起您不能模拟操作', 'javascript:history.go(-1);', '04'); exit; } //自己不可委托真爱一生联系自己 if ($sendid == $userid) { MooMessage('自己不可委托真爱一生联系自己', 'javascript:history.go(-1);', '02'); exit; } //note 双方屏蔽不给操作 if (MooGetScreen($userid, $sendid)) { MooMessage('因特殊原因,委托失败', "index.php?n=service&h=rose&t=getmorerose", '03'); exit; } $formsubmit1 = MooGetGPC('formsubmit1', 'string'); //委托联系人表 $checkuser = $_MooClass['MooMySQL']->getOne("SELECT mid,sendtime FROM {$dbTablePre}service_contact WHERE you_contact_other='{$sendid}' AND other_contact_you = '{$userid}' and receive_del=0 and send_del=0 and is_server=0"); //查今天委托次数 $checkuser2 = $user_arr; //note 委托也要做性别限制 if (MOOPHP_ALLOW_FASTDB) { $user_s = MooFastdbGet('members_search', 'uid', $sendid); } else { $user_s = $_MooClass['MooMySQL']->getOne("SELECT * FROM {$dbTablePre}members_search WHERE uid = '{$sendid}'", true); } //note 获得照片总数 $ret_count = $_MooClass['MooMySQL']->getOne("SELECT count(imgid) as c FROM {$dbTablePre}pic WHERE uid = '{$user_s['uid']}'"); $pic_total = $ret_count['c']; if ($checkuser2['gender'] == $user_s['gender']) { MooMessage('同性之间不可委托真爱一生', 'javascript:history.go(-1);', '02'); exit; } //note 检查绑定是否过期 if ($user_s['isbind'] == 1) { //note 如果被绑定,检测绑定是否到期 $user_s['isbind'] = check_bind($user_s['bind_id']); if ($user_s['isbind'] == 1) { MooMessage('不能向绑定中的会员发委托', 'javascript:history.go(-1);', '02'); exit; } } if ($user_s['showinformation'] != 1) { MooMessage('发起委托失败,该会员已经关闭资料!', 'javascript:history.go(-1);', '02'); exit; } //note 如果已经联系他就直接提示 if ($checkuser['mid']) { MooMessage("对不起,您已经委托真爱一生联系TA了", 'javascript:history.go(-1);', '02'); } //note 如果是今天超过3次就直接提示 $mtime = date("Ymd"); $contact_time_Ymd = date("Ymd", $checkuser2['contact_time']); if ($contact_time_Ymd == $mtime && $checkuser2['contact_num'] >= 3) { MooMessage("今天委托真爱一生已经超过3次", 'javascript:history.go(-1);', '02'); } //提交时 if ($formsubmit1 && $content && $sendid) { if (!$checkuser['mid']) { //发送短信和邮件 include_once "./module/crontab/crontab_config.php"; if (MOOPHP_ALLOW_FASTDB) { $res = MooFastdbGet('members_search', 'uid', $sendid); } else { $res = $_MooClass['MooMySQL']->getOne("select telphone,is_phone,username from {$dbTablePre}members_search where uid='{$sendid}'"); } if (MOOPHP_ALLOW_FASTDB) { $send_user_info = MooFastdbGet('members_search', 'uid', $userid); $send_user_info = array_merge($send_user_info, MooFastdbGet('members_choice', 'uid', $userid)); } else { $send_user_info = $_MooClass['MooMySQL']->getAll("select b.*,a.* from `{$dbTablePre}members_search` a left join {$dbTablePre}members_choice b on a.uid=b.uid where a.uid = '{$userid}'"); $send_user_info = $send_user_info['0']; } //头像路径 $path = thumbImgPath(2, $send_user_info['pic_date'], $send_user_info['pic_name'], $send_user_info['gender']); if (file_exists($path)) { $img_path = $path; } else { if ($send_user_info['gender'] == 1) { $img_path = "/public/images/service_nopic_woman.gif"; } else { $img_path = "/public/images/service_nopic_man.gif"; } } $send_username = $send_user_info['nickname'] ? $send_user_info['nickname'] : $send_user_info['uid']; //发送者用户名 $send_user_grade = $send_user_info['gender'] == 1 ? "女" : "男"; //发送者性别 $province = $provice_list[$send_user_info['province']]; //省 $city = $city_list[$send_user_info['city']]; //市 $height = $send_user_info['height'] ? $height_list[$send_user_info['height']] : "未知"; //身高 ob_start(); require_once MooTemplate('public/mail_space_commissiontpl', 'module'); //模板 $body = ob_get_clean(); MooSendMail($res['username'], "真爱一生网系统温馨提示", $body, "", false, $sendid); /*发送短信提醒 begin $week_time = 24*3600*7;//一周时间秒数 $interval_time = $timestamp - $user_arr['last_login_time'];//当前时间-最后登录时间 $date1 = date("Y-m-d",strtotime("last Monday")); $date2 = date("Y-m-d",strtotime("Sunday")); if($interval_time > $week_time){//不活跃用户每周发一条短信 $_MooClass['MooMySQL']->query("INSERT INTO {$dbTablePre}today_send SET uid = '".$sendid."', sid = '".$userid."',phone = '".$res['telphone']."',sendtime = '".date("Y-m-d")."'" ); $cos = $_MooClass['MooMySQL']->getOne("select count(*) as c from {$dbTablePre}today_send where uid='$sendtoid' and sendtime>='$date1' and sendtime<='$date2'"); if($cos['c'] <= 1){ //fanglin暂时屏蔽 Push_message_intab($sendid,$res['telphone'],"委托","真爱一生网 用户ID:".$send_user_info['uid'].",".$send_user_grade.",已委托真爱一生联系您,请及时把握您的缘分!4006780405",$send_user_info['uid']); } }else{ //每天该用户超过5条信息不发送短信 $cos = $_MooClass['MooMySQL']->getOne("select count(*) as c from {$dbTablePre}today_send where uid='$sendid' and sendtime='".date("Y-m-d")."'"); if($cos['c']<5){ $_MooClass['MooMySQL']->query("INSERT INTO {$dbTablePre}today_send SET uid = '".$sendid."', sid = '".$userid."',phone = '".$res['telphone']."',sendtime = '".date("Y-m-d")."'" ); //fanglin暂时屏蔽 Push_message_intab($sendid,$res['telphone'],"委托","真爱一生网 用户ID:".$send_user_info['uid'].",".$send_user_grade.",已委托真爱一生联系您,请及时把握您的缘分!4006780405",$send_user_info['uid']); } } end */ //note 今天提交委托真爱一生,表中的委托计数还是昨天的就 update为0 if ($contact_time_Ymd != $mtime) { $_MooClass['MooMySQL']->query("UPDATE {$dbTablePre}members_base SET contact_num = 0,contact_time = '{$timestamp}' WHERE uid = '{$userid}'"); if (MOOPHP_ALLOW_FASTDB) { $value = array(); $value['contact_num'] = 0; $value['contact_time'] = $timestamp; MooFastdbUpdate('members_base', 'uid', $userid, $value); } } //note 如果今天提交委托真爱一生次数超过3次不能再发起委托,否则更新次数 $today_contact_num = $_MooClass['MooMySQL']->getOne("SELECT contact_num FROM {$dbTablePre}members_base WHERE uid = '{$userid}'", true); //$today_contact_num = $checkuser2; $today_contact_num = $today_contact_num['contact_num']; //今天委托的次数 //if($user_arr['uid']=='20796965') $today_contact_num=0; if ($today_contact_num < 3) { //优质会员列表 $update_sql = ''; if (empty($user_arr['sid']) && $user_arr['usertype'] == 1) { $update_sql = ',is_well_user=1'; } $_MooClass['MooMySQL']->query("UPDATE {$dbTablePre}members_base SET contact_num = contact_num + 1,contact_time = '{$timestamp}' {$update_sql} WHERE uid = '{$userid}'"); if (MOOPHP_ALLOW_FASTDB) { $oldarr = MooFastdbGet('members_base', 'uid', $userid); $value = array(); $value['contact_num'] = $oldarr['contact_num'] + 1; $value['contact_time'] = $timestamp; if ($update_sql != '') { $value['is_well_user'] = 1; } MooFastdbUpdate('members_base', 'uid', $userid, $value); } //note 记录委托真爱一生的内容 $_MooClass['MooMySQL']->query("INSERT INTO {$dbTablePre}service_contact SET content = '{$content}',other_contact_you = '{$userid}',you_contact_other='{$sendid}',stat = '{$contact_stat}',syscheck='{$contact_sys_check}',sendtime = '{$timestamp}'"); //将新注册的会员更新为优质会员 if (in_array($user_arr['sid'], array(1, 52, 123)) && $user_arr['is_well_user'] != 1) { update_iswell_user($user_arr['uid']); } //if($user_arr['uid']=='20796965'){ //====发送委托彩信 begin ==== $sql = "SELECT uid,telphone FROM {$dbTablePre}members_search where uid='{$userid}' and mainimg!='' and images_ischeck=1 and pic_num>0"; $sendout_user_info = $_MooClass['MooMySQL']->getOne($sql); //发送人有照片 //echo $sendid."<br />".$userid; $sql = "SELECT s.telphone FROM {$dbTablePre}members_search as s\n\t left join {$dbTablePre}members_base as b on s.uid=b.uid\n\t where s.uid='{$sendid}' and b.is_phone=1 and s.telphone!='' and s.usertype=1"; $sendto_user_info = $_MooClass['MooMySQL']->getOne($sql, true); //发送条件:本站注册会员,有电话号码的,开启短信通知的会员发送 //print_r($sendout_user_info); //exit;$sendout_user_info['telphone'] if ($sendto_user_info['telphone'] && $sendout_user_info['uid']) { //SendMsg('18911883821',"真爱一生网 用户ID:".$user_arr['uid'].",".$gender.",已给委托真爱一生 委托您,请及时把握您的缘分!4006780405"); send_mms_commission($sendto_user_info['telphone'], 'contact', $sendout_user_info['uid']); } //====发送委托彩信 end ===== //} MooMessage("委托成功", 'index.php?n=service', '05'); } else { MooMessage("今天委托真爱一生已经 超过3次", 'javascript:history.go(-1);', '02'); } } else { MooMessage("对不起,您已经委托真爱一生联系TA了", 'javascript:history.go(-1);', '02'); } } //是否有手机号码 if (MOOPHP_ALLOW_FASTDB) { $status = MooFastdbGet('certification', 'uid', $userid); } else { $status = $_MooClass['MooMySQL']->getOne("SELECT telphone FROM {$dbTablePre}certification WHERE uid='{$userid}'", true); } if (!$status['telphone']) { MooMessage("对不起,您没有通过手机验证,请先通过验证再委托", 'index.php?n=myaccount&h=telphone', '02'); } else { $tel = $status['telphone']; } require MooTemplate('public/service_contact_sendcontact', 'module'); }
defined('ADMIN_KEKE') or exit('Access Denied'); kekezu::admin_check_role(66); include_once S_ROOT . '/keke_client/sms/d9.php'; $account_info = $kekezu->_sys_config; $mobile_u = $account_info['mobile_username']; $mobile_p = $account_info['mobile_password']; $op and $op = $op or $op = 'config'; $url = "index.php?do={$do}&view={$view}&op={$op}"; switch ($op) { case "config": if (!isset($sbt_edit)) { $bind_info = check_bind('mobile_username'); } else { foreach ($conf as $k => $v) { if (check_bind($k)) { $res .= db_factory::execute(" update " . TABLEPRE . "witkey_basic_config set v='{$v}' where k='{$k}'"); } else { $res .= db_factory::execute(" insert into " . TABLEPRE . "witkey_basic_config values('','{$k}','{$v}','mobile','','')"); } } $kekezu->_cache_obj->gc(); kekezu::admin_system_log($_lang['edit_mobile_log']); kekezu::admin_show_msg($_lang['binding_cellphone_account_successfully'], "index.php?do={$do}&view={$view}&op=config", 3, '', 'success'); } break; case "manage": if ($remain_fee) { if ($mobile_p && $mobile_u) { $msg = new sms_d9('', ''); $m = $msg->get_userinfo();
function space_viewpro() { global $_MooClass, $dbTablePre, $userid, $timestamp, $user_arr, $val_arr, $style_user_arr, $diamond, $_MooCookie, $memcached; //$val_arr统计资料完善度 $uid = MooGetGPC('uid', 'integer', 'G') ? MooGetGPC('uid', 'integer', 'G') : $userid; $skinName = MooGetGPC('skiname', 'string', 'G'); $is_only_show = true; $status = array(); //note 判断被浏览的会员是否存在 $status = array_merge(MooMembersData($uid), MooGetData('members_login', 'uid', $uid)); //*****************白名单******************* if ($uid != $userid) { $is_only_show = false; } if (empty($is_only_show)) { //if(MOOPHP_ALLOW_FASTDB && $status['is_lock'] != 1){//is_lock默认1不封锁用户,0则封锁 if ($status['is_lock'] != 1) { MooMessage('此会员已经找到真爱,关闭了个人资料,转向我的真爱一生,寻找自己的真爱吧!', 'index.php?n=service'); } if (!$status) { MooMessage('此会员已经找到真爱,关闭了个人资料,转向我的真爱一生,寻找自己的真爱吧!', 'index.php?n=service'); //note 判断被浏览的用户是否允许其他会员查看他的资料 } elseif (!$status['showinformation'] && $status['uid'] != $userid) { //showinformation默认1允许其他会员查看,0则不允许 switch ($status['showinformation_val']) { //showinformation_val用户关闭资料的理由 case 1: MooMessage('此会员已找到正在交往的对象,故资料未公开,转向我的真爱一生', 'index.php?n=service'); break; case 2: MooMessage('此会员已找到真爱,即将踏上红地毯,故资料未公开,转向我的真爱一生', 'index.php?n=service'); break; case 3: MooMessage('此会员最近很忙,无法及时回复邮件,故资料未公开,转向我的真爱一生', 'index.php?n=service'); break; case 4: MooMessage('此会员资料未公开,原因可能是TA已经找到真爱了,转向我的真爱一生', 'index.php?n=service'); break; } } } $serverid = Moo_is_kefu(); //后台管理员 if ($serverid) { $result = $_MooClass['MooMySQL']->getOne("select groupid from web_admin_user where uid='{$serverid}'"); $groupid = $result['groupid']; //系统管理员权限 $GLOBALS['system_admin'] = array(60); if (in_array($groupid, $GLOBALS['system_admin'])) { $serverid = null; } } //note 浏览资料页面时候,写入谁浏览谁表,自己浏览自己的除外 if ($userid && $uid && $userid != $uid) { //note 不让屏蔽的会员查看 if (MooGetScreen($userid, $uid)) { MooMessage('由于特殊原因对方资料未公开,转向我的真爱一生', 'index.php?n=service'); } if (empty($serverid)) { //service_visitor 某某会员浏览某某会员记录表 $visitor = $_MooClass['MooMySQL']->getOne("SELECT vid FROM {$dbTablePre}service_visitor WHERE uid = '{$userid}' AND visitorid = '{$uid}'"); //note 再次浏览的,更新浏览时间 if ($visitor['vid']) { $_MooClass['MooMySQL']->query("UPDATE {$dbTablePre}service_visitor SET visitortime = '{$timestamp}' WHERE uid='{$userid}' AND visitorid = '{$uid}' limit 1"); } else { $_MooClass['MooMySQL']->query("INSERT INTO {$dbTablePre}service_visitor SET uid = '{$userid}',visitorid='{$uid}',visitortime = '{$timestamp}'"); } //MemoryCache('visitor', $userid.'行78, space/index.php'); /* //===simulatereal if(MOOPHP_ALLOW_FASTDB){ $browsered = MooFastdbGet('members','uid',$uid); }else{ $sql="SELECT isOnline FROM {$dbTablePre}members where uid='$uid'"; $browsered=$_MooClass['MooMySQL']->getOne($sql); } */ if (MooUserIsOnline($uid)) { $browser = $_MooClass['MooMySQL']->getOne("SELECT id FROM {$dbTablePre}service_browser WHERE uid = '{$userid}' AND browserid = '{$uid}'"); //note 再次浏览的,更新浏览时间 if ($browser['id']) { $_MooClass['MooMySQL']->query("UPDATE {$dbTablePre}service_browser SET browsertime = '{$timestamp}' WHERE uid='{$userid}' AND browserid = '{$uid}' limit 1"); } else { $_MooClass['MooMySQL']->query("INSERT INTO {$dbTablePre}service_browser SET uid = '{$userid}',browserid='{$uid}',browsertime = '{$timestamp}'"); } } } } //note 查看会员资料信息 $c = MooGetData('members_choice', 'uid', $uid) + MooGetData('members_introduce', 'uid', $uid); $user =& $status; /***创建浏览队列 ***/ if (empty($serverid) && !empty($userid)) { if ($user['gender'] != $user_arr['gender'] && $user['uid'] != $userid) { if ($user['usertype'] == 3 && $user_arr['usertype'] != 3 && $user['showinformation'] == 1 && $user_arr['s_cid'] >= 40) { $iscan = $GLOBALS['fastdb']->get($userid . '_scan_space'); //浏览的全权会员列表 $iscan = empty($iscan) ? array() : json_decode($iscan, true); if (!empty($iscan)) { $iscan = in_array($uid, $iscan) ? $iscan : array_push($iscan, $uid); } $GLOBALS['fastdb']->set($userid . '_scan_space', json_encode($iscan)); } if ($user['usertype'] != 3) { $scan_i = $GLOBALS['fastdb']->get('scan_space_' . $uid); //访问的记录列表 $scan_i = empty($scan_i) ? array() : json_decode($scan_i, true); if (!empty($scan_i)) { $scan_s = array(); foreach ($scan_i as $k => $scan) { $scan_s[$k] = $scan[0]; } if (in_array($userid, $scan_s)) { $scan_i[array_search($userid, $scan_s)] = array($userid, time()); } else { array_push($scan_i, array($userid, time())); } } else { array_push($scan_i, array($userid, time())); } $GLOBALS['fastdb']->set('scan_space_' . $uid, json_encode($scan_i)); } } } //note_显示相册中的普通照片 $user_pic = $_MooClass['MooMySQL']->getAll("SELECT imgurl,pic_date,pic_name FROM {$dbTablePre}pic WHERE syscheck=1 and isimage='0' and uid='{$uid}'"); $gender = $user_arr['gender'] == '0' ? '1' : '0'; //0为男,1为女 $agebegin = date("Y") - $user_arr['birthyear'] - 3; $ageend = date("Y") - $user_arr['birthyear'] + 3; $workprovince = $user_arr['province']; $workcity = $user_arr['city']; $search_url = MOOPHP_URL . "/index.php?n=search&h=quick&gender=" . $gender . "&age_start=" . $agebegin . "&age_end=" . $ageend . "&workprovince=" . $workprovince . "&workcity=" . $workcity . "&isphoto=1&imageField=&quick_search=搜索"; //note 您可能喜欢的人,匹配相同地区 $able_like = $userid ? youAbleLike($l, 0) : array(); //note 获取会员认证证件 $usercer = certification($uid); //获取视频 /* $sql = "select toshoot_video_time,toshoot_video_url from {$dbTablePre}certification where uid='{$uid}' and toshoot_video_check=2"; $get_video = $_MooClass ['MooMySQL']->getOne ( $sql ); $cs_path = videoPathEncrypt ( MOOPHP_URL . '/' . $get_video ['toshoot_video_url'] . '/mov_' . $uid . '.flv' ); */ //获取录音 /* $sql_voi = "select toshoot_voice_time,toshoot_voice_url from {$dbTablePre}certification where uid='{$uid}' and toshoot_voice_check=2"; $get_voice = $_MooClass ['MooMySQL']->getOne ( $sql_voi ); $voice_path = MOOPHP_URL . '/' . $get_voice ['toshoot_voice_url'] . '/voi_' . $uid . '.flv'; */ //note 当查看其他个人主页时,当前浏览的主页条件是否匹配 $user2 = false; if ($uid != "" && $uid != $user_arr['uid'] && $user['gender'] != $user_arr['gender']) { $c2 = MooGetData('members_choice', 'uid', $userid); $user2 = MooMembersData($userid); } $skin_style = $_MooClass['MooMySQL']->getAll("select * from {$dbTablePre}members_skin"); $returnurl = 'index.php?' . $_SERVER['QUERY_STRING']; //返回的url //note 检查绑定是否过期 if ($user['isbind'] == 1) { $user['isbind'] = check_bind($user['bind_id']); } if ($diamond) { $Template = MooTemplate('space_viewpro', 'data'); } else { if (!empty($skinName)) { $Template = MooTemplate("public/space_{$skinName}", 'module'); } elseif ($user['skin']) { $Template = MooTemplate("public/space_" . $user['skin'], 'module'); } else { $Template = MooTemplate('public/space_viewpro', 'module'); } } //模拟动作 if (!empty($userid) && !empty($serverid) && $user['usertype'] == 1) { $urlArr = array("ajax.php?n=service&h=sendleer", "ajax.php?n=service&h=addLiker"); $key = array_rand($urlArr); $url = $urlArr[$key]; } //是否存在音乐 if (in_array($user_arr['s_cid'], array(10, 20, 30))) { $isMusic = false; $sql = "select musicName from web_vipmusic where uid='{$uid}'"; $music = $_MooClass['MooMySQL']->getOne($sql); if ($music['musicName']) { $music_url = "data/music/{$uid}/{$music['musicName']}"; if (file_exists($music_url)) { $isMusic = true; } } } require $Template; }