} $eyes_regest_count = array(); $eyes_regest_counts = $_MooClass['MooMySQL']->getAll('SELECT count(`id`) AS count ,`gender` FROM `web_ahtv_reguser` WHERE `uid`!=0 and `channel`=6 group by `gender`'); //对人数的修改 foreach ($eyes_regest_counts as $value) { $eyes_regest_count[$value['gender']] = $value['count'] + 40; } $man_eyes_regest = $_MooClass['MooMySQL']->getAll('SELECT a.`uid`,b.`nickname`,b.`education`,b.`birthyear` FROM `web_ahtv_reguser` as a left join web_members as b on a.`uid`=b.`uid` WHERE a.`uid`!=0 and a.`channel`=6 and a.`gender`=0 and b.nickname!=\'\' order by a.`regtime` desc limit 9 '); $woman_eyes_regest = $_MooClass['MooMySQL']->getAll('SELECT a.`uid`,b.`nickname`,b.`education`,b.`birthyear` FROM `web_ahtv_reguser` as a left join web_members as b on a.`uid`=b.`uid` WHERE a.`uid`!=0 and a.`channel`=6 and a.`gender`=1 and b.nickname!=\'\' order by a.`regtime` desc limit 9 '); require MooTemplate('public/service_eyes', 'module'); exit; case "zyzhuodong": require MooTemplate('public/service_zyzhuodong', 'module'); exit; } $serverid = Moo_is_kefu(); if (!$userid) { header("location:index.php?n=login&back_url=" . urlencode($back_url)); } list($hzn, $adminid) = explode("\t", MooAuthCode($_MooCookie['kefu'], 'DECODE')); switch ($_GET['h']) { //note 短消息功能 case "message": require 'message.php'; break; //note 委托真爱一生功能 //note 委托真爱一生功能 case "commission": require 'commission.php'; break; //note 您的意中人
/** * 客服模拟登录 没有权限修改删除 会员资料 */ function checkAuthMod($url) { global $dbTablePre, $_MooClass; $serverid = Moo_is_kefu(); $sql = "select groupid from {$dbTablePre}admin_user where uid='{$serverid}'"; $result = $_MooClass['MooMySQL']->getOne($sql); if (empty($result)) { return; } if (!in_array($result['groupid'], array(60, 61, 76, 75, 82, 84, 67, 70)) && !empty($serverid)) { MooMessage("sorry,您没有操作权限", $url); return; } }
function public_showmsg($uid) { header("Expires: Mon, 26 Jul 1970 05:00:00 GMT"); header("Cache-Control:no-cache, must-revalidate"); header("Pragma:no-cache"); $serverid = Moo_is_kefu(); global $_MooClass, $dbTablePre, $timestamp, $memcached, $user_arr; // 会员ID // $uid = MooGetGPC('uid','integer'); // 初始化显示数据 $str = ''; $n = 0; // 未读消息条数 // $msg = $_MooClass['MooMySQL']->getOne("select count(*) from // {$dbTablePre}services where s_uid={$uid} and s_status='0' and flag = '1' // and s_uid_del='0'"); // $msg_count = $msg['count(*)']; $msg_count = header_show_total($uid); // 前台显示 if ($msg_count) { // 3个发件人的ID $user_msg_id = $_MooClass['MooMySQL']->getAll("select distinct s_fromid from {$dbTablePre}services where s_uid={$uid} and s_status='0' and s_uid_del='0' order by s_time desc limit 3"); $inidArr = array(); foreach ($user_msg_id as $v) { if ($v['s_fromid'] == 0) { $from_kefu = 1; } else { $inidArr[] = $v['s_fromid']; } } $inid = implode(',', $inidArr); // 提示信息 $user_msg = array(); if (MOOPHP_ALLOW_FASTDB) { foreach ($inidArr as $arruid) { $user_msg[] = MooFastdbGet('members_search', 'uid', $arruid); } } else { $user_msg = $_MooClass['MooMySQL']->getAll("select uid,nickname,s_cid from {$dbTablePre}members_search where uid in ({$inid})"); } $str .= '<p>您有<a href="index.php?n=service&h=message">' . $msg_count . '条新消息</a></p>'; foreach ($user_msg as $vv) { // 设置不同链接 if ($vv) { // $nickname=$vv['nickname2']?$vv['nickname2']:$vv['nickname']; $nickname = $vv['nickname']; if ($nickname) { $str .= '<p>查看<a href="index.php?n=service&h=message&t=membermessage">' . $nickname . '给您发的新邮件</a></p>'; } else { $str .= '<p>查看<a href="index.php?n=service&h=message&t=membermessage">会员ID ' . $vv['uid'] . '给您发的新邮件</a></p>'; } } } if ($from_kefu) { $str .= '<p>查看<a href="index.php?n=service&h=message&t=hlmessage">真爱一生网发新邮件</a></p>'; } $n++; } // 提示被哪些用户访问主页 if ($user_arr['regdate'] < time() - 7200) { // 注册时间超过2个小时的会员 if ($user_arr['showinformation']) { // 信息公开的会员 $visitor_msg = public_showmsg_two($uid); // 删除对应的浏览会员 if ($uid && $visitor_msg['uid']) { $sql = "DELETE FROM web_service_browser where browserid='{$uid}' and uid={$visitor_msg['uid']}"; $_MooClass['MooMySQL']->query($sql); } } // $nickname=$visitor_msg['nickname2']?$visitor_msg['nickname2']:$visitor_msg['nickname']; if (!empty($visitor_msg)) { $nickname = $visitor_msg['nickname']; $nc = $nickname ? $nickname : 'ID:' . $visitor_msg['uid']; // 伪造查看共多少秒,存memcached $makevisit_sec = $memcached->get('makevisit' . $visitor_msg['uid'] . '_' . $uid); if ($makevisit_sec) { $sec = $makevisit_sec + 1; $memcached->set('makevisit' . $visitor_msg['uid'] . '_' . $uid, $sec); } else { $sec = rand(30, 300); $memcached->set('makevisit' . $visitor_msg['uid'] . '_' . $uid, $sec); } //$img = MooGetphoto ( $visitor_msg ['uid'], 'page' ); // 显示访问者的头像 $img = MooGetphoto($visitor_msg['uid'], 'mid'); // 显示访问者的头像 $mid_img = MooGetphoto($visitor_msg['uid'], 'mid'); if (MOOPHP_ALLOW_FASTDB && $visitor_msg['uid']) { $msg2 = MooFastdbGet('members_search', 'uid', $visitor_msg['uid']); $msg_b = MooFastdbGet('members_base', 'uid', $visitor_msg['uid']); $msg2 = array_merge($msg2, $msg_b); } elseif ($visitor_msg['uid']) { $sql = "SELECT * FROM {$dbTablePre}members_search s left join {$dbTablePre}members_base b on s.uid=b.uid where s.uid='{$visitor_msg['uid']}'"; $msg2 = $_MooClass['MooMySQL']->query($sql); } if ($sec) { if ($sec < 60) { $showsec = $sec . "秒"; } if ($sec == 60) { $showsec = "一分钟"; } if ($sec > 60) { $secOne = intval($sec / 60); $secTwo = $sec - $secOne * 60; $mod = $sec % 60; if (empty($mod)) { $showsec = $secOne . '分钟'; } else { $showsec = $secOne . '分钟' . $secTwo . '秒'; } } } $photo = null; if ($msg2['mainimg'] && $visitor_msg['uid']) { $photo = "<a target='_blank' href='index.php?n=space&h=viewpro&uid=" . $visitor_msg['uid'] . "'><img src=" . $img . " class='u-photo'></a>"; if ($user_arr['s_cid'] < 40) { $str .= '<div class="c-line"></div>' . $photo . '<p><a target="_blank" href="index.php?n=space&h=viewpro&uid=' . $visitor_msg['uid'] . '">' . $nc . '</a>也许适合您哦,</p><p>为了您的幸福,请把握缘分。</p><p><a target="_blank" href="index.php?n=space&h=viewpro&uid=' . $visitor_msg['uid'] . '">关注Ta的资料</a></p><div style="clear:both"></div>'; } else { $str .= '<div class="c-line"></div>' . $photo . '<p><a target="_blank" href="index.php?n=space&h=viewpro&uid=' . $visitor_msg['uid'] . '">' . $nc . '</a>关注了您,</p><p>查看了' . $showsec . ',</p><p><a target="_blank" href="index.php?n=space&h=viewpro&uid=' . $visitor_msg['uid'] . '">关注Ta的资料</a></p><div style="clear:both"></div>'; } } elseif ($visitor_msg['uid']) { if ($user_arr['s_cid'] < 40) { $str .= '<p>' . $photo . '<a target="_blank" href="index.php?n=space&h=viewpro&uid=' . $visitor_msg['uid'] . '">' . $nc . '</a>关注了您,查看了' . $showsec . ',<a target="_blank" href="index.php?n=space&h=viewpro&uid=' . $visitor_msg['uid'] . '">查看Ta的资料</a></p>'; } else { $str .= '<p>' . $photo . '<a target="_blank" href="index.php?n=space&h=viewpro&uid=' . $visitor_msg['uid'] . '">' . $nc . '</a>也许适合您哦,为了您的幸福,请把握缘分。<a target="_blank" href="index.php?n=space&h=viewpro&uid=' . $visitor_msg['uid'] . '">关注Ta的资料</a></p>'; } } $n++; } } // 提示当前会员有未读在线聊天消息 $chat_msg = public_showmsg_three($uid); //print_r($chat_msg); $new_message = ''; if ($chat_msg) { //$num = count($chat_msg); //$t_arr = array_keys($chat_msg); //普通会员可以接受来自高级会员的聊天信息 $str .= '<p>您有<a style="cursor:pointer" onclick="javascript:window.open(\'index.php?n=chat&h=inline_chat&c=1&fid=' . $user_arr['uid'] . '&tid=' . $chat_msg['fromid'] . '&sid=' . $serverid . '\',\'' . $user_arr['uid'] . '_' . $chat_msg['fromid'] . '\',\'scrollbars=no,resizable=no,status=no,width=497, height=440\');setTimeout(function(){public_showmsg(1);},1000);void(0);">新的在线消息</a></p>'; $new_message = '|new_message'; $n++; } // 委托真爱一生联系TA消息提醒,十五天后自动消失 $expires_time = time() - 3600 * 24 * 15; $sql_contact = "SELECT count(*) as yc_count,other_contact_you,you_contact_other FROM {$dbTablePre}service_contact WHERE is_read=0 and you_contact_other = '{$uid}' AND syscheck = '1' AND stat = '1' AND sendtime > " . $expires_time; $ret = $_MooClass['MooMySQL']->getOne($sql_contact, true); if ($uid == $ret['you_contact_other']) { $you_contact_other_msg_count = $ret['yc_count']; if ($you_contact_other_msg_count > 0) { $str .= '<p><a style="cursor:pointer" onclick="javascript:window.open(\'index.php?n=space&h=viewpro&uid=' . $ret['other_contact_you'] . '\', \'newwindow\', \'height=480, width=680, toolbar =no, menubar=no, scrollbars=yes, resizable=yes, location=no, status=no\'),update_read(type=2,uid=' . $uid . ')">ID为' . $ret['other_contact_you'] . '</a>委托真爱一生联系您</p>'; $n++; } } // 秋波发送提醒,十五天后自动消失 $sql_leer = "SELECT receiveuid,senduid FROM web_service_leer WHERE is_read=0 and receiveuid = '" . $uid . "' AND receivetime > " . $expires_time; $ret_leer = $_MooClass['MooMySQL']->getOne($sql_leer); if (!empty($ret_leer) && $uid == $ret_leer['receiveuid']) { $str .= '<p><a style="cursor:pointer" onclick="javascript:window.open(\'index.php?n=space&h=viewpro&uid=' . $ret_leer['senduid'] . '\', \'newwindow\', \'height=480, width=680, toolbar =no, menubar=no, scrollbars=yes, resizable=yes, location=no, status=no\'),update_read(type=0,uid=' . $uid . ')">ID为' . $ret_leer['senduid'] . '</a>向您送出了一个秋波</p>'; $n++; } // 鲜花发送提醒 $sql_rose = "SELECT receiveuid,senduid,num FROM web_service_rose WHERE is_read=0 and receiveuid = '" . $uid . "' AND receivetime > " . $expires_time; $ret_rose = $_MooClass['MooMySQL']->getOne($sql_rose); if (!empty($ret_rose) && $uid == $ret_rose['receiveuid']) { $str .= '<p><a style="cursor:pointer" onclick="javascript:window.open(\'index.php?n=space&h=viewpro&uid=' . $ret_rose['senduid'] . '\', \'newwindow\', \'height=480, width=680, toolbar =no, menubar=no, scrollbars=yes, resizable=yes, location=no, status=no\'),update_read(type=1,uid=' . $uid . ')">ID为' . $ret_rose['senduid'] . '</a>向您送出了鲜花</p>'; $n++; } // 意中人提醒 $sql_liker = "SELECT * FROM web_service_friend WHERE is_read=0 and friendid = '" . $uid . "' AND sendtime > " . $expires_time; $ret_liker = $_MooClass['MooMySQL']->getAll($sql_liker); $count_liker = count($ret_liker); if ($count_liker >= 1) { if ($count_liker > 1 && $_MooCookie['uid_liker'] == $ret_liker[0]['uid']) { MooSetCookie('uid_liker', $ret_liker[0]['uid'], 86400); shuffle($ret_liker); $rand = rand(1, $count_liker); $ret_liker['friendid'] = $ret_liker[$rand]['friendid']; $ret_liker['uid'] = $ret_liker[$rand]['uid']; } elseif (isset($ret_liker[0])) { MooSetCookie('uid_liker', $ret_liker[0]['uid'], 86400); $ret_liker['friendid'] = $ret_liker[0]['friendid']; $ret_liker['uid'] = $ret_liker[0]['uid']; } if (empty($ret_liker['friendid'])) { $ret_liker['friendid'] = 0; } if ($uid == $ret_liker['friendid']) { $str .= '<p><a style="cursor:pointer" onclick="javascript:window.open(\'index.php?n=space&h=viewpro&uid=' . $ret_liker['uid'] . '\', \'newwindow\', \'height=480, width=680, toolbar =no, menubar=no, scrollbars=yes, resizable=yes, location=no, status=no\'),update_read(type=3,uid=' . $uid . ')">ID为' . $ret_liker['uid'] . '</a>将您添加为意中人了</p>'; $n++; } } // 输出 if ($str) { $str .= "|最新提醒({$n}){$new_message}"; echo $str; } else { // $n = 0; $n = ''; echo $n; } }
function sendEmail() { global $_MooClass, $dbTablePre, $timestamp, $user_arr, $timestamp, $memcached; $sendtouid = MooGetGPC('uid', 'integer', 'P'); $userid = $user_arr['uid']; $title = MooGetGPC('title', 'string', 'P'); $content = MooGetGPC('content', 'string', 'P'); $serverid = Moo_is_kefu(); if ($serverid && $user_arr['usertype'] != 3) { exit('simulate'); } if (empty($sendEmailCount)) { $sendEmailCount = 0; } $sendEmailCount = $memcached->get('sendEmail' . $userid); if ($sendEmailCount > 3) { exit('limited'); } if ($sendtouid == $userid) { exit('sameone'); } if (MooGetScreen($userid, $sendtouid)) { exit('shield'); } if (!in_array($user_arr['s_cid'], array(10, 20, 30))) { exit('upgrade'); } $sendToUser = MooMembersData($sendtouid); if (isset($sendToUser['gender']) && $sendToUser['gender'] == $user_arr['gender']) { exit('gender'); } if (isset($sendToUser['showinformation']) && $sendToUser['showinformation'] != 1) { exit('closeInfo'); } //是否有手机号码 if (MOOPHP_ALLOW_FASTDB) { $_R_ = MooFastdbGet('certification', 'uid', $userid); } else { $sql = "SELECT telphone FROM {$dbTablePre}certification WHERE uid='{$userid}'"; $_R_ = $_MooClass['MooMySQL']->getOne($sql, true); } if (empty($_R_['telphone']) && empty($serverid)) { exit('telNo'); } $sql = "select count(s_id) as cnt from web_members_search where s_fromid='{$userid}' and s_uid='{$sendtouid}' and s_type=1"; $_S_ = $_MooClass['MooMySQL']->getOne($sql, true); if (isset($_S_['cnt']) && $_S_['cnt'] > 3) { exit('已经超出了发送邮件的数量!'); } $gender = $user_arr['gender'] == 1 ? "美女" : "帅哥"; $data['s_content'] = trim(safeFilter($content)); $data['s_title'] = $title; $data['s_fromid'] = $userid; $data['s_uid'] = $sendtouid; $data['s_time'] = time(); $data['sid'] = $user_arr['sid']; if ($user_arr['usertype'] != 3) { $data['flag'] = 0; } else { $data['flag'] = 1; } inserttable('services', $data); $memcached->set('sendEmail' . $userid, ++$sendEmailCount, 0, 86400); //************提醒所属客服************** $sid = $user_arr['sid']; $title = '您的会员 ' . $userid . ' 发送邮件到' . $sendtouid; $awoketime = $timestamp + 3600; $sql_remark = "insert into {$dbTablePre}admin_remark set sid='{$sid}',title='发邮件',content='{$title}',awoketime='{$awoketime}',dateline='{$timestamp}'"; $res = $_MooClass['MooMySQL']->query($sql_remark); $pattern = '/^((1[345]\\d{9})|(18[0-9]\\d{8}))$/'; if (isset($sendToUser['usertype']) && $sendToUser['usertype'] == 1 && preg_match($pattern, $sendToUser['telphone'])) { Push_message_intab($sendtouid, $sendToUser['telphone'], "站内信", "尊敬的会员您好!ID:{$userid}给您发送了邮件!幸福热线:4008787920", $userid); } }
/** * 客服模拟登录 没有权限修改删除 会员资料 */ function checkAuthMod($url) { global $dbTablePre, $_MooClass; $serverid = Moo_is_kefu(); $sql = "select groupid from {$dbTablePre}admin_user where uid='{$serverid}'"; $result = $_MooClass['MooMySQL']->getOne($sql); if (!in_array($result['groupid'], array('60', '61', '76', '75', '65', '66', '68', '69', '82', '81')) && !empty($serverid)) { //MooMessage ( "sorry,您没有操作权限", $url ); $error = "sorry,您没有操作权限"; echo return_data($error, true); exit; return; } }
function report($uid) { global $_MooClass, $dbTablePre, $userid, $user_arr, $timestamp; $serverid = Moo_is_kefu(); if ($serverid && $user_arr['usertype'] != 3) { MooMessage('对不起您不能模拟操作', 'javascript:history.go(-1);', '04'); exit; } //处理会员提交了数据 if (MooGetGPC('reportbutton', 'string', 'P')) { $u_id = safeFilter(MooGetGPC('uid', 'string', 'P')); $ruid = safeFilter(MooGetGPC('ruid', 'string', 'P')); $forwhy = MooGetGPC('forwhy', 'integer', 'P'); $umail = safeFilter(MooGetGPC('umail', 'string', 'P')); $content = safeFilter(MooGetGPC('content', 'string', 'P')); if ($forwhy == '0') { MooMessage('请选择您的举报原因', 'javascript:history.go(-1);'); exit; } if (rtrim($content) == '') { MooMessage('请选择您的举报内容', 'javascript:history.go(-1);'); exit; } //note 上传图片 if ($_FILES['pic']['size'] <= 5242880 && !empty($_FILES['pic']['size'])) { $extname = strtolower(substr($_FILES['pic']['name'], strrpos($_FILES['pic']['name'], '.') + 1)); //note 判断上传的文件类型 $flag = ''; $images = array('jpg', 'jpeg', 'gif', 'png', 'bmp', 'JPG', 'JPEG', 'GIF', 'PNG', 'BMP'); //foreach($images as $v) { //if(preg_match("/$v/",$_FILES['pic']['type'])) { $img_type = explode("/", $_FILES['pic']['type']); if (in_array($img_type[1], $images) && in_array($extname, $images)) { $flag = 1; } //} if ($flag != 1) { $notice = "照片必须为BMP,JPG,PNG或GIF格式"; MooMessage($notice, 'javascript:history.go(-1);'); exit; } //note 上传到指定目录,并且获得上传后的文件描述 $upload = MooAutoLoad('MooUpload'); $upload->config(array('targetDir' => REPORT_IMG_PATH, 'saveType' => '0')); $files = $upload->saveFiles('pic'); $report_picname = $files[0]['name'] . "." . $files[0]['extension']; //note 提交举报数据 $_MooClass['MooMySQL']->query("insert into {$dbTablePre}report (uid,ruid,forwhy,umail,content,pic,addtime) values ('{$u_id}','{$ruid}','{$forwhy}','{$umail}','{$content}','{$report_picname}','" . time() . "')"); //note 没有上传图片 } else { if ($_FILES['pic']['size'] > 5242880) { MooMessage('上传图片大小不能超过5M', 'javascript:history.go(-1);'); } else { MooMessage('必须上传图片作为举报证据', 'javascript:history.go(-1);'); } //note 提交举报数据 //$_MooClass['MooMySQL']->query("insert into {$dbTablePre}report (uid,ruid,forwhy,umail,content,addtime) values ('$u_id','$ruid','$forwhy','$umail','$content','".time()."')"); } //************提醒所属客服************** $sid = $user_arr['sid']; $title = '您的会员 ' . $user_arr['uid'] . ' 举报了 ' . $ruid; $awoketime = $timestamp + 3600; $sql_remark = "insert into {$dbTablePre}admin_remark set sid='{$sid}',title='{$title}',content='{$title}',awoketime='{$awoketime}',dateline='{$timestamp}'"; $res = $_MooClass['MooMySQL']->query($sql_remark); MooMessage('举报成功', 'javascript:history.go(-2);'); exit; } //note 两天内对同一位会员投诉只限一次 $reportcount1 = $_MooClass['MooMySQL']->getOne("select id from {$dbTablePre}report where uid='{$userid}' and ruid='{$uid}' and addtime>" . mktime(0, 0, 0, date('m', time() - 86400), date('d', time() - 86400), date('Y', time() - 86400))); if ($reportcount1) { MooMessage('对不起,您两天内对同一位会员投诉只限一次', 'javascript:history.go(-1);', '02'); exit; } else { //note 第天只能投诉5位会员 $reportcount = $_MooClass['MooMySQL']->getOne("select count(*) from {$dbTablePre}report where uid='{$userid}' and addtime>" . mktime(0, 0, 0, date('m', time()), date('d', time()), date('Y', time()))); if ($reportcount['count(*)'] >= 5) { MooMessage('对不起,您每天只能对5位不同的会员进行投诉', 'javascript:history.go(-1);', '02'); exit; } } //被投诉人不可能是自己 if ($userid == $uid) { MooMessage('不可以举报自己', 'javascript:history.go(-1);', '03'); } //被投诉人信息 if (MOOPHP_ALLOW_FASTDB) { $userinfo = MooFastdbGet('members_search', 'uid', $uid); } else { $userinfo = $_MooClass['MooMySQL']->getOne("select * from {$dbTablePre}members_search as s left join {$dbTablePre}members_base as b on s.uid=b.uid where uid='{$uid}'"); } $sql = "select count(*) as c from {$dbTablePre}pic where uid='{$uid}' and isimage=0"; $pic_num = $_MooClass['MooMySQL']->getOne($sql); if (!$userinfo) { MooMessage('无此用户', 'javascript:history.go(-1);', '03'); exit; } include MooTemplate('public/profile_index', 'module'); }
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; }