Example #1
0
function choice_user($id)
{
    global $_MooClass, $dbTablePre;
    $choice = MooGetData('members_choice', 'uid', $id);
    $introduce = MooGetData('members_introduce', 'uid', $id);
    $user = array_merge($choice, $introduce);
    return $user;
}
Example #2
0
function to_send_message()
{
    global $_MooClass, $dbTablePre, $userid, $pagesize, $user_arr, $timestamp, $serverid;
    //print_r($_POST);
    //note s_cid 发送者的权限(回复时才有)
    $s_cid = MooGetGPC('s_cid', 'integer', 'P');
    //echo $s_cid;exit;
    //收件人id
    $sid = MooGetGPC('s_id', 'integer', 'P');
    //发件人id
    $mid = MooGetGPC('m_id', 'integer', 'P');
    ///echo $sid;exit;
    $s_title = MooGetGPC('s_title', 'string', 'P');
    $s_title = rtrim($s_title);
    //对主题字数限制
    $s_title = MooStrReplace(MooCutstr($s_title, 30, $dot = ''));
    $s_content = MooGetGPC('s_content', 'string', 'P');
    //note 特殊字符
    $s_content = rtrim(MooStrReplace(safeFilter($s_content)));
    $send_mymessage = MooGetGPC('send_mymessage', 'integer', 'P');
    $message_back = MooGetGPC('message_back', 'integer', 'P');
    //note 双方屏蔽不给操作
    if (MooGetScreen($mid, $sid)) {
        MooMessage('因特殊原因,消息发送失败', "index.php?n=service&h=rose&t=getmorerose", '01');
        exit;
    }
    if ($mid && $sid && $s_title && $s_content) {
        $m_level = get_userrank($userid);
        //会员等级
        if ($m_level == 2 && $user_arr['usertype'] != 3) {
            //普通会员需要审核(除采集会员之外)
            //if($user_arr['gender'] == 0){	//如果是男方发的,需要审核,0表示
            $send_status = $_MooClass['MooMySQL']->query("insert into {$dbTablePre}services (s_cid,s_uid,s_fromid,s_title,s_content,s_time,sid,flag) values ('{$s_cid}','{$sid}','{$mid}','{$s_title}','{$s_content}'," . time() . ",'{$user_arr['sid']}','0')");
        } else {
            $send_status = $_MooClass['MooMySQL']->query("insert into {$dbTablePre}services (s_cid,s_uid,s_fromid,s_title,s_content,s_time,sid,flag) values ('{$s_cid}','{$sid}','{$mid}','{$s_title}','{$s_content}'," . time() . ",'{$user_arr['sid']}','1')");
        }
        //发送短信和邮件
        include_once "./module/crontab/crontab_config.php";
        $res = MooMembersData($sid);
        //	   $send_user_info = $_MooClass['MooMySQL']->getAll("select * from `{$dbTablePre}members_search` a  left join  {$dbTablePre}members_choice b  on a.uid=b.uid  where a.uid = '$userid'");
        $send_user_info = array_merge(MooGetData("members_choice", 'uid', $userid), MooMembersData($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 = $send_user_info['province'] ? $provice_list[$send_user_info['province']] : '';
        //省
        $city = $send_user_info['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_messagetpl', 'module');
        //模板
        $body = ob_get_clean();
        MooSendMail($res['username'], "真爱一生网系统温馨提示", $body, "", false, $sid);
        $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 = '" . $sid . "', sid = '" . $userid . "',phone = '" . $res['telphone'] . "',sendtime = '" . date("Y-m-d") . "'");
            $cos = $_MooClass['MooMySQL']->getOne("select count(*) as c from {$dbTablePre}today_send where uid='{$sid}' and sendtime>='{$date1}' and sendtime<='{$date2}'", true);
            if ($cos['c'] <= 1) {
                //fanglin暂时屏蔽
                Push_message_intab($sid, $res['telphone'], "邮件", "用户ID:" . $userid . "," . $send_user_grade . ",已给您发送电子邮件,请登录www.zhenaiyisheng.cc查看!4008787920【真爱一生网】", $userid);
            }
        } else {
            //活跃用户每天一条
            //每天该用户超过5条信息不发送短信
            $cos = $_MooClass['MooMySQL']->getOne("select count(*) as c from {$dbTablePre}today_send where uid='{$sid}' and sendtime='" . date("Y-m-d") . "'", true);
            if ($cos['c'] < 5) {
                $_MooClass['MooMySQL']->query("INSERT INTO {$dbTablePre}today_send SET uid = '" . $sid . "', sid = '" . $userid . "',phone = '" . $res['telphone'] . "',sendtime = '" . date("Y-m-d") . "'");
                //fanglin暂时屏蔽
                Push_message_intab($sid, $res['telphone'], '邮件', "用户ID:" . $userid . "," . $send_user_grade . ",已给您发送电子邮件,请登录www.zhenaiyisheng.cc!4008787920【真爱一生网】", $userid);
            }
        }
        //note 发送资料给接收方
        if ($send_mymessage) {
        }
        //note 备份邮件操作
        if ($message_back) {
            //note 发送MAIL时所需信息
            $user = $_MooClass['MooMySQL']->getOne("select username,nickname from {$dbTablePre}members_search where uid='{$mid}'");
            //note 发送MAIL时收信人的邮箱
            $ToAddress = $user['username'];
            //note 发送MAIL时主题
            $ToSubject = '提示:您在真爱一生网所发的消息备份';
            //note 发送MAIL时Body内容所需信息
            $username = $user['nickname'];
            //note 发送MAIL时Body内容所需信息
            $toname = $_MooClass['MooMySQL']->getOne("select nickname from {$dbTablePre}members_search where uid='{$sid}'");
            if ($username) {
                $ToBody = $username;
            } else {
                $ToBody = 'ID号为' . $mid . '的会员<br>';
            }
            if ($toname['nickname']) {
                $ToBody .= ':您好,您于' . date('Y-m-d H:i:s', time()) . ',在真爱一生网发送电子邮件给' . $toname['nickname'] . ',内容如下:<br>';
            } else {
                $ToBody .= ':您好,您于' . date('Y-m-d H:i:s', time()) . ',在真爱一生网发送电子邮件给ID号为' . $sid . '的会员,内容如下:<br>';
            }
            if ($username) {
                $ToBody .= '&nbsp;&nbsp;&nbsp;&nbsp;发件人:' . $username . '<br>';
            } else {
                $ToBody .= '&nbsp;&nbsp;&nbsp;&nbsp;发件人:ID号为' . $mid . '<br>';
            }
            if ($toname['nickname']) {
                $ToBody .= '&nbsp;&nbsp;&nbsp;&nbsp;收件人:' . $toname['nickname'] . '<br>';
            } else {
                $ToBody .= '&nbsp;&nbsp;&nbsp;&nbsp;收件人:ID号为' . $sid . '<br>';
            }
            $ToBody .= '&nbsp;&nbsp;&nbsp;&nbsp;主题:' . $s_title . '<br>';
            $ToBody .= '&nbsp;&nbsp;&nbsp;&nbsp;正文:<br>&nbsp;&nbsp;&nbsp;&nbsp;' . $s_content;
            MooSendMail($ToAddress, $ToSubject, $ToBody, $is_template = true, $sid);
        }
        //添加成功提示信息
        if ($send_status) {
            /*普通会员对全权会员反馈白名单*/
            if ($res['usertype'] == '3' && $user_arr['usertype'] != '3' && !$serverid) {
                white_list($res['uid'], $user_arr['uid']);
            }
            /*客服模拟全权记录*/
            if ($user_arr['usertype'] == '3' && $serverid && $res['usertype'] != '3') {
                $action = '站内信';
                fulllog($user_arr['uid'], $serverid, $action, $res);
            }
            //提醒所属客服
            $usid = $user_arr['sid'];
            $title = '您的会员 ' . $mid . ' 向 ' . $sid . ' 发送了邮件';
            $awoketime = $timestamp + 3600;
            $sql_remark = "insert into {$dbTablePre}admin_remark set sid='{$usid}',title='{$title}',content='{$title}',awoketime='{$awoketime}',dateline='{$timestamp}'";
            $res = $_MooClass['MooMySQL']->query($sql_remark);
            if ($user_arr['gender'] == 0) {
                //男方发的
                MooMessage('发送成功,真爱一生审核后对方即可以收到。', 'index.php?n=service&h=message&t=sendmessage', '05');
            } else {
                MooMessage('发送成功', 'index.php?n=service&h=message&t=sendmessage', '05');
            }
        } else {
            MooMessage('发送失败', 'index.php?n=service&h=message&t=send&sendtoid=' . $sid, '03');
        }
    } else {
        MooMessage('数据填写不完整', 'index.php?n=service&h=message&t=send&sendtoid=' . $sid, '02');
    }
}
Example #3
0
File: ajax.php Project: noikiy/zays
function simulateSend()
{
    global $userid, $_MooClass, $timestamp;
    $user = array_merge(MooGetData('members_login', 'uid', $userid), MooMembersData($userid));
    //ob_clean();
    $json = array();
    //=======================模拟发送秋波,关注,鲜花===========================
    //男女匹配
    if ($user['gender'] == 1) {
        // 年龄段分析
        $start_year = $user['birthyear'] - 2;
        $end_year = $user['birthyear'] + 10;
        $index = 'members_man';
        $gender = 0;
    } else {
        // 年龄段分析
        $start_year = $user['birthyear'] - 10;
        $end_year = $user['birthyear'] + 2;
        $index = 'members_women';
        $gender = 1;
    }
    //在sphinx中搜索
    $sp = searchApi($index);
    //满足省市
    $sp->getResultOfReset(array(array("is_lock", 1), array("images_ischeck", 1), array("province", $user['province']), array("city", $user['city']), array("gender", $gender), array("usertype", 3), array("birthyear", array($start_year, $end_year))), array("offset" => 0, "limit" => 20));
    $member_list = $sp->getIds();
    $member_key = array_rand($member_list, rand(1, 5));
    $member_list_ = array();
    foreach ($member_key as $v) {
        $member_list_[] = $member_list[$v];
    }
    $last_login_time = $user['last_login_time'] ? $user['last_login_time'] : $timestamp;
    $opaction = array('1' => '礼物', '2' => '秋波', '3' => '关注');
    $_uidlist_ = '';
    $_result_ = array();
    $_uidlist_ = implode(',', $member_list_);
    if ($_uidlist_) {
        $_result_ = $_MooClass['MooMySQL']->getAll("SELECT screenid FROM web_screen WHERE mid='{$userid}' and uid in ({$_uidlist_})");
    }
    if (count($_result_) > 0) {
        exit;
    }
    foreach ($member_list_ as $senduid) {
        $key = array_rand($opaction, 1);
        $sendtime = $last_login_time - rand(1000, 259200);
        $json[$senduid] = $key . ',' . $opaction[$key];
        if ($key == '1') {
            //$rosenum_check =  $_MooClass['MooMySQL']->getOne("SELECT rosenumber FROM web_members_base  WHERE `uid`='{$userid}'  LIMIT 1",true);
            //if($rosenum_check['rosenumber'] > 0) {
            $rose = $_MooClass['MooMySQL']->getOne("SELECT rid FROM web_service_rose WHERE receiveuid = '{$userid}' AND senduid = '{$senduid}' ORDER BY rid DESC LIMIT 1");
            if (isset($rose['rid'])) {
                $rid = $rose['rid'];
                //note 如果已经发送过玫瑰,就增加发送玫瑰的次数
                $_MooClass['MooMySQL']->query("UPDATE web_service_rose SET  receivenum = receivenum + 1,sendtime = '{$sendtime}',receivetime='{$timestamp}',receive_del=0,send_del=0 WHERE rid = '{$rid}'");
            } else {
                //note 发送新的玫瑰,写入数据库 发送者,接受者,发送时间
                $_MooClass['MooMySQL']->query("INSERT INTO web_service_rose SET receivenum = 1, sendtime = '{$sendtime}',receivetime='{$timestamp}',senduid  = '{$senduid}',receiveuid = '{$userid}' ");
            }
            //note 发送一朵玫瑰,自己就要减少一朵玫瑰
            //$_MooClass['MooMySQL']->query("UPDATE web_members_base SET rosenumber = rosenumber - 1 WHERE uid = '{$userid}'");
            //if(MOOPHP_ALLOW_FASTDB){
            //	$user_rosenum =  $_MooClass['MooMySQL']->getOne("SELECT rosenumber FROM web_members_base  WHERE `uid`='{$userid}'  LIMIT 1",true);
            //	$value['rosenumber']= $user_rosenum['rosenumber'];
            //	MooFastdbUpdate('members_base','uid',$userid,$value);
            //}
            //}
        } elseif ($key == '2') {
            $leer = $_MooClass['MooMySQL']->getOne("SELECT lid FROM web_service_leer WHERE receiveuid = '{$userid}' AND senduid = '{$senduid}' ", true);
            if (isset($leer['lid'])) {
                //已经发送过秋波
                $lid = $leer['lid'];
                //增加发送秋波的次数
                $_MooClass['MooMySQL']->query("UPDATE web_service_leer SET receivenum = receivenum + 1,`stat`='0',sendtime = '{$sendtime}',receivetime = '{$timestamp}',receive_del =0,is_read=0 WHERE lid = '{$lid}'");
            } else {
                //note 发送新的秋波,写入数据库 发送者,接受者,发送时间
                $_MooClass['MooMySQL']->query("INSERT INTO web_service_leer SET sendtime = '{$sendtime}',receivetime = '{$timestamp}',receivenum = '1', num = '1', senduid  = '{$senduid}',receiveuid = '{$userid}'");
            }
        } elseif ($key == '3') {
            //note 加为意中人,新插入一行记录
            $friend = $_MooClass['MooMySQL']->getOne("SELECT fid FROM web_service_friend WHERE friendid = '{$userid}' AND  uid= '{$senduid}' ", true);
            if (isset($friend['fid'])) {
                $fid = $friend['fid'];
                $_MooClass['MooMySQL']->query("update web_service_friend SET friendid  = '{$userid}',uid = '{$senduid}',sendtime='{$sendtime}' where fid='{$fid}'");
            } else {
                $_MooClass['MooMySQL']->query("Insert INTO web_service_friend SET friendid  = '{$userid}',uid = '{$senduid}',sendtime='{$sendtime}'");
            }
        }
    }
    //$json=array('30000027'=>'2,秋波','30000007'=>'1,鲜花','30000008'=>'3,关注');
    echo json_encode($json);
    exit;
}
Example #4
0
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;
    }
}
Example #5
0
function register_steptwo()
{
    global $_MooClass, $dbTablePre, $uid, $user_arr, $_MooCookie;
    $userinfo = $user_arr;
    $password = isset($_MooCookie['password2']) ? $_MooCookie['password2'] : '';
    MooSetCookie('password2', '');
    $userchoice = MooGetData('members_choice', 'uid', $uid);
    $telphonecheck = MooGetGPC('telphonecheck', 'string');
    if (MooSubmit('register_submittwo')) {
        // note members表字段
        $members_search['nickname'] = safeFilter(rtrim(MoogetGPC('nickname', 'string', 'P')));
        $members_search['marriage'] = MoogetGPC('marriage1', 'integer', 'P');
        // update1_arr
        $members_search['height'] = MoogetGPC('height', 'integer', 'P');
        $members_search['salary'] = MoogetGPC('salary', 'integer', 'P');
        $members_search['education'] = MoogetGPC('education1', 'integer', 'P');
        $members_search['children'] = MoogetGPC('children1', 'integer', 'P');
        $members_search['house'] = MoogetGPC('house', 'integer', 'P');
        $members_search['updatetime'] = time();
        $members_base['oldsex'] = MoogetGPC('oldsex', 'integer', 'P');
        $gender = $_MooClass['MooMySQL']->getOne("select gender from {$dbTablePre}members_search WHERE uid='{$uid}'", true);
        if ($gender['gender'] == 0) {
            $members_choice['gender'] = 1;
        } else {
            $members_choice['gender'] = 0;
        }
        $members_choice['age1'] = MoogetGPC('age1', 'integer', 'P');
        // $update2_arr
        $members_choice['age2'] = MoogetGPC('age2', 'integer', 'P');
        $members_choice['workprovince'] = MoogetGPC('workProvince', 'integer', 'P');
        $members_choice['workCity'] = MoogetGPC('workCity', 'integer', 'P');
        if (in_array($members_choice['workprovince'], array(10101201, 10101002))) {
            $members_choice['workcity'] = $members_choice['workprovince'];
            $members_choice['workprovince'] = 10101000;
        }
        $members_choice['marriage'] = MoogetGPC('marriage2', 'integer', 'P');
        $members_choice['education'] = MoogetGPC('education2', 'integer', 'P');
        $members_choice['children'] = MoogetGPC('children2', 'integer', 'P');
        $members_choice['salary'] = MoogetGPC('salary1', 'integer', 'P');
        $members_choice['height1'] = MoogetGPC('height1', 'integer', 'P');
        $members_choice['height2'] = MoogetGPC('height2', 'integer', 'P');
        $members_choice['hasphoto'] = MoogetGPC('hasphoto', 'integer', 'P');
        $members_choice['nature'] = MoogetGPC('nature2', 'integer', 'P');
        $members_choice['body'] = MoogetGPC('body2', 'integer', 'P');
        $members_choice['weight1'] = MoogetGPC('weight1', 'integer', 'P');
        $members_choice['weight2'] = MoogetGPC('weight2', 'integer', 'P');
        $members_choice['occupation'] = MoogetGPC('occupation2', 'integer', 'P');
        $members_choice['nation'] = MoogetGPC('stock2', 'integer', 'P');
        $members_choice['hometownprovince'] = MoogetGPC('hometownProvince2', 'integer', 'P');
        $members_choice['hometowncity'] = MoogetGPC('hometownCity2', 'integer', 'P');
        $members_choice['updatetime'] = time();
        if (in_array($members_choice['hometownprovince'], array(10101201, 10101002))) {
            $members_choice['hometowncity'] = $members_choice['hometownprovince'];
            $members_choice['hometownprovince'] = 10101000;
        }
        $members_choice['wantchildren'] = MoogetGPC('wantchildren2', 'integer', 'P');
        $members_choice['smoking'] = MoogetGPC('issmoking', 'integer', 'P');
        $members_choice['drinking'] = MoogetGPC('isdrinking', 'integer', 'P');
        // *********内心独白处理**********//
        $members_introduce['introduce'] = MoogetGPC('introduce', 'string', 'P');
        // $update2_arr
        $members_introduce['introduce_check'] = safeFilter(rtrim(MoogetGPC('introduce', 'string', 'P')));
        $telcheck = MoogetGPC('telcheck', 'string');
        $truetelphone = MoogetGPC('truetelphone', 'string');
        $telphonemack = md5(md5(MoogetGPC('telphonemack', 'string', 'P')));
        $web_rand = $_MooCookie['rand'];
        // wxmtest********************************************
        // SQL条件
        $where_arr = array('uid' => $uid);
        if ($members_search || $members_choice) {
            // 会员基本信息
            //if ($members_search) {
            // 判断昵称
            if (rtrim($members_search['nickname']) != '') {
                if (preg_match('/^((1[345]\\d{9})|(18[024-9]\\d{8})|(010-?\\d{8})|(02)[012345789]-?\\d{8}|(0[3-9]\\d{2,2}-?\\d{7,8})|(.*@.*))$/', $members_search['nickname'])) {
                    MooMessage("昵称不符合规范!", "index.php?n=register&h=steptwo");
                }
                // note 昵称截取
                $members_search['nickname'] = MooCutstr($members_search['nickname'], 12, $dot = '');
                // 更新数据
                updatetable('members_search', $members_search, $where_arr);
                updatetable('members_base', $members_base, $where_arr);
                if (MOOPHP_ALLOW_FASTDB) {
                    MooFastdbUpdate('members_search', 'uid', $uid, $members_search);
                    MooFastdbUpdate('members_base', 'uid', $uid, $members_base);
                }
                // searchApi("members_man
                // members_women")->updateAttr(array('nickname','marriage','height','salary','education','children','house'),array(9888888888=>$search));
            } else {
                MooMessage("昵称必填!", "index.php?n=register&h=steptwo");
            }
            //}
            if ($members_choice) {
                updatetable('members_choice', $members_choice, $where_arr);
                if (MOOPHP_ALLOW_FASTDB) {
                    MooFastdbUpdate('members_choice', 'uid', $uid, $members_choice);
                }
            }
            if ($members_introduce) {
                // 内心独白必填
                // if($update2_arr['introduce_check'] != ''){
                $members_introduce['introduce'] = '';
                $members_introduce['introduce_pass'] = '******';
                updatetable('members_introduce', $members_introduce, $where_arr);
                if (MOOPHP_ALLOW_FASTDB) {
                    MooFastdbUpdate('members_introduce', 'uid', $uid, $members_introduce);
                }
                // }else{
                // MooMessage("内心独白必填!", "index.php?n=register&h=steptwo");
                // }
            }
            MooMessage("进入下一步!", "index.php?n=register&h=stepthree");
        }
    }
    include MooTemplate('public/register_steptwo', 'module');
}
Example #6
0
File: leer.php Project: noikiy/zays
function sendnewfl()
{
    global $_MooClass, $dbTablePre, $timestamp, $user_arr, $serverid, $memcached, $_MooCookie, $GLOBALS;
    //是否合法登录
    $and_uuid = isset($_GET['uuid']) ? $_GET['uuid'] : '';
    $uid = $_GET['uid'] = isset($_GET['uid']) ? $_GET['uid'] : '';
    if ($uid) {
        $userid = $mem_uid = $memcached->get('uid_' . $uid);
    }
    $checkuuid = check_uuid($and_uuid, $userid);
    if (!$checkuuid) {
        $error = "uuid_error";
        echo return_data($error, false);
        exit;
    }
    $sendtoid = MooGetGPC('sendtoid', 'integer', 'P');
    //
    $user_arr = MooMembersData($userid);
    $uid = $userid;
    $return = array();
    $is_first_send = true;
    $query = $_MooClass['MooMySQL']->getOne("SELECT count(1) as c FROM {$dbTablePre}pic WHERE uid = '{$sendtoid}'");
    $pic_total = $query['c'];
    //note 自己不能给自己发送秋波,直接转到秋波列表页面
    if ($sendtoid == $userid) {
        $error = "自己不可以给自己发过送鲜花";
        echo return_data($error, false);
        exit;
    }
    $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;
    }
    if ($serverid && $user_arr['usertype'] != 3) {
        //只能模拟全权会员
        $error = "对不起您不能模拟操作";
        echo return_data($error, false);
        exit;
    }
    //note 双方屏蔽不给操作
    if (MooGetScreen($userid, $sendtoid)) {
        $error = "因特殊原因,送鲜花失败";
        echo return_data($error, false);
        exit;
    }
    //note 要做性别过滤,异性的发送秋波,直接转到秋波列表页面
    $send_user1 = leer_send_user1($sendtoid);
    $user = leer_send_user1($userid);
    if ($send_user1['gender'] == $user['gender']) {
        $error = "同性之间不可互发鲜花";
        echo return_data($error, false);
        exit;
        exit;
    }
    if ($user['rosenumber'] <= 0) {
        $error = '您没有鲜花了,获取更多鲜花';
        echo return_data($error, false);
        exit;
    }
    //
    //发送短信和邮件
    include_once "./module/crontab/crontab_config.php";
    $res = MooMembersData($sendtoid);
    $send_user_info = array_merge(MooGetData('members_choice', 'uid', $userid), MooMembersData($userid));
    //头像路径
    $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 = $send_user_info['province'] ? $provice_list[$send_user_info['province']] : '';
    //省
    $city = $send_user_info['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_rosetpl', 'module'); //模板
    $body = ob_get_clean();
    if ($res['usertype'] != 3) {
        MooSendMail($res['username'], "真爱一生网系统温馨提示", $body, "", false, $sendtoid);
    }
    if (empty($GLOBALS['MooUid'])) {
        list($uid, $password) = explode("\t", MooAuthCode($_MooCookie['auth'], 'DECODE'));
        $uid = intval($uid);
    } else {
        $uid = $GLOBALS['MooUid'];
    }
    //if(empty($uid)){
    //	MooMessage('您还没有登录','index.php?n=login');
    //}
    $leer = $_MooClass['MooMySQL']->getOne("SELECT * FROM {$dbTablePre}service_rose WHERE receiveuid = '{$sendtoid}' AND senduid = '{$userid}' ORDER BY rid DESC LIMIT 1");
    //库中验证鲜花数
    //$rosenum_check =  $GLOBALS['_MooClass']['MooMySQL']->getOne("SELECT rosenumber FROM {$GLOBALS['dbTablePre']}members_base  WHERE `uid`='{$uid}'  LIMIT 1",true);
    //if($rosenum_check['rosenumber'] > 0) {
    if ($leer['rid']) {
        $is_first_send = false;
        $rid = $leer['rid'];
        //note 如果已经发送过玫瑰,就增加发送玫瑰的次数
        $_MooClass['MooMySQL']->query("UPDATE {$dbTablePre}service_rose SET num = num + 1, receivenum = receivenum + 1,sendtime = '{$timestamp}',receivetime='{$timestamp}',receive_del=0,send_del=0 WHERE rid = '{$rid}'");
    } else {
        //note 发送新的玫瑰,写入数据库 发送者,接受者,发送时间
        $_MooClass['MooMySQL']->query("INSERT INTO {$dbTablePre}service_rose SET num = 1, receivenum = 1, sendtime = '{$timestamp}',receivetime='{$timestamp}',senduid  = '{$uid}',receiveuid = '{$sendtoid}' ");
    }
    //note 发送一朵玫瑰,自己就要减少一朵玫瑰
    $_MooClass['MooMySQL']->query("UPDATE {$dbTablePre}members_base SET rosenumber = rosenumber - 1 WHERE uid = '{$uid}'");
    if (MOOPHP_ALLOW_FASTDB) {
        $user_rosenum = $GLOBALS['_MooClass']['MooMySQL']->getOne("SELECT rosenumber FROM {$GLOBALS['dbTablePre']}members_base  WHERE `uid`='{$uid}'  LIMIT 1", true);
        $value['rosenumber'] = $user_rosenum['rosenumber'];
        MooFastdbUpdate('members_base', 'uid', $userid, $value);
    }
    //}
    //将新注册的会员更新为优质会员
    if (in_array($user_arr['sid'], array(0, 52, 123)) && $user_arr['is_well_user'] != 1) {
        update_iswell_user($user_arr['uid']);
    }
    //每天向同一用户发送多次,短信记录数表只记一次
    $send_rose_date = isset($leer['sendtime']) ? date("Y-m-d", $leer['sendtime']) : date("Y-m-d");
    //
    $today_rose_count = isset($leer['rid']) ? $leer['num'] + 1 : 1;
    if (date("Y-m-d") > $send_rose_date) {
        $today_rose_count = 1;
    }
    $sendinfo = MooGetGPC('sendinfo', 'string', 'G');
    if (!empty($sendinfo)) {
        $sendinfo = ",对您说:" . $sendinfo;
    }
    if ($res['usertype'] != 3) {
        if ($serverid) {
            //客服模拟会员登录可以选择发送短信或彩信
            $SMStype = MooGetGPC('selectSMSorCMS', 'string', 'G');
            if ($SMStype == 'SMS' && $res['is_phone']) {
                Push_message_intab($sendtoid, $res['telphone'], "鲜花", "真爱一生网 用户ID:" . $userid . "," . $send_user_grade . ",已给您发送鲜花" . $sendinfo . "     请及时把握您的缘分!4006780405", $userid);
            } elseif ($SMStype == 'CMS' && $res['is_phone']) {
                //====发送彩信   begin  ====
                //发送人有照片
                $sql = "SELECT uid,telphone FROM {$dbTablePre}members_search where uid='{$userid}' and images_ischeck=1 and pic_num>0";
                $sendfrom_user_info = $_MooClass['MooMySQL']->getOne($sql, true);
                //发送条件:本站注册会员,有电话号码的,开启短信通知的会员发送
                /* $sql="SELECT telphone FROM {$dbTablePre}members where uid='{$sendtoid}'";// and is_phone=1 and telphone!='' and usertype=1";
                   $sendto_user_info=$_MooClass['MooMySQL']->getOne($sql);*/
                if ($sendfrom_user_info['uid']) {
                    $sendedMMSCount = $memcached->get('hznsimulate' . $serverid);
                    if (empty($sendedMMSCount)) {
                        $sendedMMSCount = 0;
                    }
                    //if($sendedMMSCount > 10){
                    //	MooMessage('您今天累计已经发过10条彩信','index.php?n=service&h=rose');
                    //}
                    send_mms_commission($res['telphone'], 'rose', $userid);
                    $memcached->set('hznsimulate' . $serverid, ++$sendedMMSCount, 0, 28800);
                }
                //====发送彩信 end =====
            }
        } else {
            //真实会员登录
            if ($res['is_phone'] && $is_first_send && $res['s_cid'] != 40) {
                //第一次发才短信提示
                // SendMsg($res['telphone'],"真爱一生网 用户ID:".$userid.",".$send_user_grade.",已给您发送鲜花".$sendinfo."     请及时把握您的缘分!4006780405");
                Push_message_intab($sendtoid, $res['telphone'], "鲜花", "真爱一生网 用户ID:" . $userid . "," . $send_user_grade . ",已给您发送鲜花" . $sendinfo . "     请及时把握您的缘分!4006780405", $userid);
            }
        }
    }
    /*
    	$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"));
    	
    	//echo "interval_time:".$interval_time . ' and '.'week:'.$week_time;exit;
    
    	if($interval_time > $week_time){//不活跃用户每周发一条短信
    		 $_MooClass['MooMySQL']->query("INSERT INTO {$dbTablePre}today_send SET uid = '".$sendtoid."', 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($sendtoid,$res['telphone'],"鲜花","真爱一生网 用户ID:".$userid.",".$send_user_grade.",已给您发送鲜花,请及时把握您的缘分!4006780405",$userid);
    		 }
    	}else{
    		  //echo $today_rose_count;exit;
    		  if($send_rose_date==date("Y-m-d") && $today_rose_count == 1){	//每天同一个用户发送多次秋波,短信只记一次
    			   $cos = $_MooClass['MooMySQL']->getOne("select count(*) as c from {$dbTablePre}today_send where uid='$sendtoid' and sendtime='".date("Y-m-d")."'");
    			   
               //print_r($cos);exit;
    			   if($cos[c]<5){
    				  $_MooClass['MooMySQL']->query("INSERT INTO {$dbTablePre}today_send SET uid = '".$sendtoid."', sid = '".$userid."',phone = '".$res['telphone']."',sendtime = '".date("Y-m-d")."'" );
    				  //fanglin暂时屏蔽
    				  Push_message_intab($sendtoid,$res['telphone'],"鲜花","真爱一生网 用户ID:".$userid.",".$send_user_grade.",已给您发送鲜花,请及时把握您的缘分!4006780405",$userid);
    			   }
    		}
    	}
    */
    /*
    	//发送彩信
    	$sql="SELECT uid FROM {$dbTablePre}members where uid='{$uid}' and mainimg!='' and images_ischeck=1 and pic_num>0";
    	//$sql="SELECT uid FROM {$dbTablePre}members where uid='{$uid}'";
    	$sendout_user_info=$_MooClass['MooMySQL']->getOne($sql);
    	//发送人有照片
    	$sql="SELECT telphone FROM {$dbTablePre}members where uid='{$sendtoid}' and is_phone=1 and telphone!='' and usertype=1";
    	$sendto_user_info=$_MooClass['MooMySQL']->getOne($sql);
    	//发送条件:本站注册会员,有电话号码的,开启短信通知的会员发送
        
    	//echo $sendto_user_info['telphone'].' and '.$sendout_user_info['uid'];exit;
    	if($sendto_user_info['telphone']&&$sendout_user_info['uid']){
    		//echo 'ffff';exit;
    		if(send_mms_commission($sendto_user_info['telphone'],'rose',$sendout_user_info['uid'])){
    			$note="。";
    		}else{
    			$note="!";
    		}
    	}
    */
    /*普通会员对全权会员反馈白名单*/
    if ($res['usertype'] == '3' && $user_arr['usertype'] != '3' && !$serverid) {
        white_list($res['uid'], $user_arr['uid']);
    }
    /*客服模拟全权记录*/
    if ($user_arr['usertype'] == '3' && $serverid && $res['usertype'] != '3') {
        $action = '鲜花';
        fulllog($user_arr['uid'], $serverid, $action, $res);
    }
    //提醒所属客服
    $sid = $user_arr['sid'];
    $title = '您的会员 ' . $user_arr['uid'] . ' 向 ' . $sendtoid . ' 发送了鲜花';
    $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);
    $return = "发送鲜花成功";
    echo return_data($return);
    exit;
    //MooMessage('发送鲜花成功',"index.php?n=service&h=rose&t=isendrose","05");
    //require MooTemplate('public/service_rose_sendrose', 'module');
}
Example #7
0
function send_mms_commission($tel, $type, $uid)
{
    global $_MooClass, $dbTablePre, $timestamp, $user_arr;
    include "ework/include/crontab_config.php";
    $pic_path = "./data/upload/userimg/";
    $file_path = "data/mmstmp/";
    if ($type == 'rose') {
        $mes = "真爱一生网 ID为" . $uid . "的会员给您发送了鲜花,赶快访问www.zhenaiyisheng.cc 登录您的账户了解ta的详细信息吧,同时可以搜索您的意中人,给TA送出自己的鲜花,希望您在茫茫人海中早日找寻到属于自己的幸福。";
        $title = "真爱一生网鲜花提醒";
    } elseif ($type == 'leer') {
        $mes = "真爱一生网 ID为" . $uid . "的会员给您发送了秋波,赶快访问www.zhenaiyisheng.cc 登录您的账户了解ta的详细信息吧,同时可以搜索您的意中人,给TA送出自己的秋波,希望您在茫茫人海中早日找寻到属于自己的幸福。";
        $title = "真爱一生网秋波提醒";
    } else {
        $mes = "真爱一生网 ID为" . $uid . "的会员给您发送了委托,赶快访问www.zhenaiyisheng.cc 登录您的账户了解ta的详细信息吧,同时可以搜索您的意中人,给TA送出自己的委托,希望您在茫茫人海中早日找寻到属于自己的幸福。";
        $title = "真爱一生网委托提醒";
    }
    $mes_gb = iconv("UTF-8", "gb2312", "{$mes}");
    // $tel=$sendto_user_info['telphone'];
    $mkdirs = MooAutoLoad('MooFiles');
    $image = MooAutoLoad('MooImage');
    $sql = "SELECT pic_date,pic_name FROM {$GLOBALS['dbTablePre']}pic where uid='{$uid}' and isimage=0 and syscheck=1 limit 5";
    $user_image_arr = $_MooClass['MooMySQL']->getAll($sql);
    $userinfo = array_merge(MooGetData('members_choice', 'uid', $uid), MooMembersData($uid));
    $file_name_smil = 'temp' . time() . rand(10000, 99999);
    $file_array = $file_path . $file_name_smil . ".smil," . $file_path . $file_name_smil . ".txt";
    $file_name = 'temp' . time() . rand(10000, 99999);
    $nickname1 = "昵称:" . $userinfo['nickname'];
    $nickname = iconv("UTF-8", "gb2312", "{$nickname1}");
    $txt = " ID:" . $userinfo['uid'] . "(" . (gmdate('Y', time()) - $userinfo['birthyear']) . "岁),居住在" . ($provice_list[$userinfo['province']] || $city_list[$userinfo['city']] ? $provice_list[$userinfo['province']] . $city_list[$userinfo['city']] : "未填") . "的" . ($userinfo['gender'] ? '女士' : '男士') . "寻找一位年龄在" . $userinfo['age1'] . "-" . $userinfo['age2'] . "岁,居住" . ($provice_list[$userinfo['workprovince']] || $city_list[$userinfo['workcity']] ? $provice_list[$userinfo['workprovince']] . $city_list[$userinfo['workcity']] : "未填") . "的" . ($userinfo['gender'] ? '男士' : '女士');
    $txt1 = iconv("UTF-8", "gb2312", "{$txt}");
    $txt = $nickname . $txt1;
    $mkdirs->fileWrite($file_path . $file_name . ".txt", $txt);
    $pic_name_old = MooGetphoto($userinfo['uid'], 'medium');
    $pic_only_name = $userinfo['uid'] * 3 . "_medium.gif";
    $pic_name_file = $file_path . '/' . $pic_only_name;
    $pic = 'http://www.zhenaiyisheng.cc/' . $pic_name_old;
    $pic = file_get_contents($pic);
    file_put_contents($pic_name_file, $pic);
    $image->config(array('thumbDir' => $file_path . '/', 'thumbStatus' => '1', 'saveType' => '0', 'thumbName' => $pic_only_name, 'waterMarkMinWidth' => '100', 'waterMarkMinHeight' => '125', 'waterMarkStatus' => 9));
    $image->thumb('100', '125', $pic_name_old);
    // $pic_name_file=$file_path.'/'.$pic_only_name;
    // $pic_name="5226417_mid.jpg";
    $par = '<par dur="50000ms"><img src="' . $pic_only_name . '" region="Image" /><text src="' . $file_name . '.txt" region="Text" /></par>';
    $file_array = $file_array . "," . $file_path . $file_name . ".txt," . $pic_name_file;
    foreach ($user_image_arr as $key => $user_image_name) {
        $user_image = thumbImgPath("2", $user_image_name['pic_date'], $user_image_name['pic_name']);
        $image_name_arr = explode('.', $user_image_name['pic_name']);
        if (file_exists("." . $user_image) && $image_name_arr[1] != 'bmp') {
            $image_only_name = $file_name . $key . ".gif";
            list($width, $height) = getimagesize('.' . $user_image);
            $d = $width / $height;
            $c = 85 / 100;
            if ($d < $c) {
                $thumb1_width = 85;
                $b = $width / $thumb1_width;
                $thumb1_height = $height / $b;
            } else {
                $thumb1_height = 100;
                $b = $height / $thumb1_height;
                $thumb1_width = $width / $b;
            }
            $image->config(array('thumbDir' => $file_path, 'thumbStatus' => '1', 'saveType' => '0', 'thumbName' => $image_only_name, 'waterMarkMinWidth' => '82', 'waterMarkMinHeight' => '114', 'waterMarkStatus' => 9));
            $image->thumb($thumb1_height, $thumb1_width, '.' . $user_image);
            $need_product_img[] = $file_path . $image_only_name;
            $file_array = $file_array . "," . $file_path . $image_only_name;
            $par = $par . '<par dur="50000ms"><img src="' . $image_only_name . '" region="Image" /></par>';
        }
    }
    $mkdirs->fileWrite($file_path . $file_name_smil . ".txt", $mes_gb);
    $smil = '<smil xmlns="http://www.w3.org/2000/SMIL20/CR/Language"><head><layout><root-layout width="208" height="176" /><region id="Image" left="0" top="0" width="128" height="128" fit="hidden" /><region id="Text" left="0" top="50" width="128" height="128" fit="hidden" /></layout></head><body><par dur="50000ms"><text src="' . $file_name_smil . '.txt" region="Text" /></par>' . $par . '</body></smil>';
    $mkdirs->fileWrite($file_path . $file_name_smil . ".smil", $smil);
    require 'ework/include/pclzip_new.lib.php';
    $archive = new PclZip($file_path . $file_name_smil . '.zip');
    $v_list = $archive->create($file_array, PCLZIP_OPT_REMOVE_ALL_PATH);
    if ($v_list == 0) {
        die("Error : " . $archive->errorInfo(true));
    }
    $ret = send_mms_yimei_up($title, $tel, $file_name_smil . '.zip');
    $ret_ok = substr($ret, 0, 2);
    if ($ret_ok == "OK") {
        $dateline = time();
        $sql = "INSERT INTO {$GLOBALS['dbTablePre']}mmslog(sid,uid,title,content,sendtime,id_list) VALUES('000','{$uid}','{$title}','system','{$dateline}','{$uid}')";
        $sid = $GLOBALS['_MooClass']['MooMySQL']->query($sql);
        $result = "OK";
    } else {
        $result = false;
    }
    $mkdirs->fileDelete($file_path . $file_name_smil . '.zip');
    $mkdirs->fileDelete($file_path . $file_name_smil . '.txt');
    $mkdirs->fileDelete($file_path . $file_name_smil . '.smil');
    $mkdirs->fileDelete($file_path . $file_name . '.txt');
    $mkdirs->fileDelete($pic_name_file);
    if ($need_product_img) {
        foreach ($need_product_img as $del_img) {
            $mkdirs->fileDelete($del_img);
        }
    }
    return $result;
}
Example #8
0
/**
 * 获得用户信息
 * @return array
 *
 */
function UserInfo()
{
    global $GLOBALS, $_MooClass, $dbTablePre;
    $user = array();
    if (isset($GLOBALS['USER_MSG']) && $GLOBALS['USER_MSG']) {
        $user = $GLOBALS['USER_MSG'];
    } elseif (isset($GLOBALS['MooUid']) && $GLOBALS['MooUid']) {
        $uid = $GLOBALS['MooUid'];
        $user = MooMembersData($uid);
        $user += MooGetData('members_login', 'uid', $uid);
        $GLOBALS['USER_MSG'] = $user;
        $GLOBALS['MooUserName'] = addslashes($user['username']);
    }
    return $user;
}
Example #9
0
function ajax_sellsendactive()
{
    $type = MooGetGPC('type', 'string', 'G');
    $sendid = MooGetGPC('from', 'integer', 'G');
    $receiveuid = MooGetGPC('to', 'integer', 'G');
    if ($type == '' || $sendid == '' || $receiveuid == '' || $sendid == 0 || $receiveuid == 0) {
        echo 'errors';
    }
    $nowtime = time();
    $user = MooMembersData($receiveuid);
    $senduser = MooMembersData($sendid);
    /*if(MOOPHP_ALLOW_FASTDB){
          $user = MooFastdbGet('members','uid',$receiveuid);
          $senduser = MooFastdbGet('members','uid',$sendid);
      }else{
          $sql = "SELECT username,telphone FROM {$GLOBALS['dbTablePre']}members WHERE `uid`='".$receiveuid."'";
          $user=$GLOBALS['_MooClass']['MooMySQL']->getOne($sql);
          $sql = "SELECT gender FROM {$GLOBALS['dbTablePre']}members WHERE `uid`='".$sendid."'";
          $senduser=$GLOBALS['_MooClass']['MooMySQL']->getOne($sql);
      }*/
    $gender = $senduser['gender'] == 1 ? "女" : "男";
    switch ($type) {
        case 'commission':
            //$sql = "SELECT mid,sendtime FROM {$GLOBALS['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";
            $sql = "SELECT * FROM {$GLOBALS['dbTablePre']}service_contact WHERE you_contact_other = '{$receiveuid}' AND other_contact_you = '{$sendid}' ";
            $com = $GLOBALS['_MooClass']['MooMySQL']->getOne($sql, true);
            if (empty($com)) {
                $sql = "INSERT INTO {$GLOBALS['dbTablePre']}service_contact SET `you_contact_other`='" . $receiveuid . "',`other_contact_you`='" . $sendid . "',`stat`=1,`syscheck`=1,`sendtime`='" . $nowtime . "',`is_server`=1";
                $result = $GLOBALS['_MooClass']['MooMySQL']->query($sql);
                echo 'ok';
                exit;
            } else {
                echo 'having';
                exit;
            }
            //更改最后活动时间,上线
            $sql = "UPDATE {$GLOBALS['dbTablePre']}members_login SET lastvisit='{$GLOBALS['timestamp']}' WHERE uid='{$sendid}'";
            $GLOBALS['_MooClass']['MooMySQL']->query($sql);
            if (MOOPHP_ALLOW_FASTDB) {
                $value['lastvisit'] = $GLOBALS['timestamp'];
                MooFastdbUpdate('members_login', 'uid', $sendid, $value);
            }
            //发e-mail提醒(委托)-------开始////////////////////////////////////////////
            include_once "./include/crontab_config.php";
            $send_user_info = array_merge(MooGetData('members_choice', 'uid', $sendid), MooMembersData($sendid));
            /*$send_user_info = $GLOBALS['_MooClass']['MooMySQL']->getAll("select * from `{$GLOBALS['dbTablePre']}members` a  left join  {$GLOBALS['dbTablePre']}choice b  on a.uid=b.uid  where a.uid = '$sendid'");
              $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 adminTemplate('mail/mail_space_commissiontpl');
            $body = ob_get_clean();
            MooSendMail($user['username'], "真爱一生网系统温馨提示", $body, "", false, $receiveuid);
            //--------->发送邮件提醒  结束///////////////////////////////////////////
            //fangin暂时屏蔽
            Push_message_intab($receiveuid, $user['telphone'], "委托", "尊敬的会员您好!" . $sendid . "," . $gender . ",委托我们联系您,请及时登录www.zhenaiyisheng.cc查收,把握您的缘分。【真爱一生网】", $sendid);
            //写日志
            serverlog(3, $GLOBALS['dbTablePre'] . 'service_contact', "{$GLOBALS['adminid']}号客服{$GLOBALS['username']}在后台以会员{$sendid}的身份向{$receiveuid}会员发送委托", $GLOBALS['adminid'], $receiveuid);
            echo 'ok';
            exit;
            break;
        case 'leer':
            $sql = "SELECT * FROM {$GLOBALS['dbTablePre']}service_leer WHERE senduid = '{$sendid}' AND receiveuid= '{$receiveuid}' ";
            $leer = $GLOBALS['_MooClass']['MooMySQL']->getOne($sql, true);
            if (!empty($leer)) {
                $lid = $leer['lid'];
                //note 如果已经发送过秋波,就增加发送秋波的次数
                $sql = "UPDATE {$GLOBALS['dbTablePre']}service_leer SET fakenum = fakenum + 1,num = num + 1,receivenum = receivenum + 1,sendtime = '{$nowtime}',receivetime = '{$nowtime}',receive_del = '0' WHERE lid = '{$lid}'";
                $GLOBALS['_MooClass']['MooMySQL']->query($sql);
                //note 如果已经收到这个人的秋波,已经拒绝,现在改变注意,又发送秋波给这个人,拒绝状态2更改为0
                if ($leer['receive_del'] == 1 || $leer['stat'] == 2) {
                    $sql = "UPDATE {$GLOBALS['dbTablePre']}service_leer SET stat = '0',receive_del = 0 WHERE senduid = '{$sendid}' AND receiveuid = '{$receiveuid}' AND stat = '2'";
                    $GLOBALS['_MooClass']['MooMySQL']->query($sql);
                }
            } else {
                //note 发送新的秋波,写入数据库 发送者,接受者,发送时间
                $sql = "INSERT INTO {$GLOBALS['dbTablePre']}service_leer SET sendtime = '{$nowtime}',receivetime = '{$nowtime}',fakenum = '1', receivenum = '1', num = '1', senduid  = '{$sendid}',receiveuid = '{$receiveuid}',is_server=1";
                $GLOBALS['_MooClass']['MooMySQL']->query($sql);
            }
            //更改最后活动时间,上线
            $sql = "UPDATE {$GLOBALS['dbTablePre']}members_login SET lastvisit='{$GLOBALS['timestamp']}' WHERE uid='{$sendid}'";
            $GLOBALS['_MooClass']['MooMySQL']->query($sql);
            if (MOOPHP_ALLOW_FASTDB) {
                $value['lastvisit'] = $GLOBALS['timestamp'];
                MooFastdbUpdate('members_login', 'uid', $sendid, $value);
            }
            //发e-mail提醒(委托)-------开始////////////////////////////////////////////
            include_once "./include/crontab_config.php";
            $send_user_info = array_merge(MooGetData('members_choice', 'uid', $sendid), MooMembersData($sendid));
            /*$send_user_info = $GLOBALS['_MooClass']['MooMySQL']->getAll("select * from `{$GLOBALS['dbTablePre']}members` a  left join  {$GLOBALS['dbTablePre']}choice b  on a.uid=b.uid  where a.uid = '$sendid'");
              $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 adminTemplate('mail/mail_space_leertpl');
            $body = ob_get_clean();
            MooSendMail($user['username'], "真爱一生网系统温馨提示", $body, "", false, $receiveuid);
            //--------->发送邮件提醒  结束///////////////////////////////////////////
            //fangin暂时屏蔽
            Push_message_intab($receiveuid, $user['telphone'], "秋波", "尊敬的会员您好!ID" . $sendid . "," . $gender . ",给您发送秋波,请及时登录www.zhenaiyisheng.cc查收,把握您的缘分。【真爱一生网】", $sendid);
            //写日志
            serverlog(3, $GLOBALS['dbTablePre'] . 'service_leer', "{$GLOBALS['adminid']}号客服{$GLOBALS['username']}在后台以会员{$sendid}的身份向{$receiveuid}会员发送秋波", $GLOBALS['adminid'], $receiveuid);
            echo 'ok';
            exit;
            break;
        case 'rose':
            $sql = "SELECT * FROM {$GLOBALS['dbTablePre']}service_rose WHERE senduid = '{$sendid}' AND receiveuid= '{$receiveuid}' ";
            $rose = $GLOBALS['_MooClass']['MooMySQL']->getOne($sql, true);
            if (!empty($rose)) {
                $rid = $rose['rid'];
                //note 如果已经发送过鲜花,就增加发送鲜花的次数
                $sql = "UPDATE {$GLOBALS['dbTablePre']}service_rose SET fakenum = fakenum + 1,num = num + 1,receivenum = receivenum + 1,sendtime = '{$nowtime}',receivetime = '{$nowtime}',receive_del = '0' WHERE rid = '{$rid}'";
                $GLOBALS['_MooClass']['MooMySQL']->query($sql);
                //note 如果用户已经将该鲜花记录删除,则要改变删除状态,不然鲜花不会在前台显示
                if ($rose['receive_del'] == 1) {
                    $sql = "UPDATE {$GLOBALS['dbTablePre']}service_leer SET receive_del = 0 WHERE senduid = '{$sendid}' AND receiveuid = '{$receiveuid}'";
                    $GLOBALS['_MooClass']['MooMySQL']->query($sql);
                }
            } else {
                //note 发送新的鲜花,写入数据库 发送者,接受者,发送时间
                $sql = "INSERT INTO {$GLOBALS['dbTablePre']}service_rose SET sendtime = '{$nowtime}',receivetime = '{$nowtime}',fakenum = '1', receivenum = '1', num = '1', senduid  = '{$sendid}',receiveuid = '{$receiveuid}',is_server=1";
                $GLOBALS['_MooClass']['MooMySQL']->query($sql);
            }
            //更改最后活动时间,上线
            $sql = "UPDATE {$GLOBALS['dbTablePre']}members_login SET lastvisit='{$GLOBALS['timestamp']}' WHERE uid='{$sendid}'";
            $GLOBALS['_MooClass']['MooMySQL']->query($sql);
            if (MOOPHP_ALLOW_FASTDB) {
                $value['lastvisit'] = $GLOBALS['timestamp'];
                MooFastdbUpdate('members_login', 'uid', $sendid, $value);
            }
            //发e-mail提醒--->开始///////////////////////////////////
            include_once "./include/crontab_config.php";
            $send_user_info = array_merge(MooGetData('members_choice', 'uid', $sendid), MooMembersData($sendid));
            /*$send_user_info = $GLOBALS['_MooClass']['MooMySQL']->getAll("select * from `{$GLOBALS['dbTablePre']}members` a  left join  {$GLOBALS['dbTablePre']}choice b  on a.uid=b.uid  where a.uid = '$sendid'");
              $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 adminTemplate('mail/mail_space_rosetpl');
            $body = ob_get_clean();
            MooSendMail($user['username'], "真爱一生网系统温馨提示", $body, "", false, $receiveuid);
            //----->发送email-->结束/////////////////////////
            //fangin暂时屏蔽
            Push_message_intab($receiveuid, $user['telphone'], "鲜花", "尊敬的会员您好!ID" . $sendid . "," . $gender . ",给您发送鲜花,请及时登录www.zhenaiyisheng.cc查收,把握您的缘分。【真爱一生网】", $sendid);
            //写日志
            serverlog(3, $GLOBALS['dbTablePre'] . 'service_rose', "{$GLOBALS['adminid']}号客服{$GLOBALS['username']}在后台以会员{$sendid}的身份向{$receiveuid}会员发送鲜花", $GLOBALS['adminid'], $receiveuid);
            echo 'ok';
            exit;
            break;
        default:
            echo "errors";
            break;
    }
    exit;
}
Example #10
0
/**
 * 登录表单处理
 * 描述:
 */
function login_submit()
{
    global $_MooClass, $dbTablePre, $_MooCookie;
    //noet 对提交的数据过滤
    if ($_POST) {
        $username = trim($_POST['username']);
        $md5_password = md5($_POST['password']);
        $cookietime = intval(isset($_POST['cookietime']) ? $_POST['cookietime'] : '');
        $remember_username = MooGetGPC('remember', 'integer', 'P');
    }
    /*****设置回转的页面*****/
    $returnurl = MooGetGPC('returnurl', 'string', "P");
    //echo $returnurl;
    //exit;
    //note 要填写用户和密码
    if (empty($_POST['username']) && empty($_POST['password'])) {
        //note 转至邮箱验证页
        if ($returnurl) {
            $returnurl = $returnurl;
            MooMessage("请填写用户名和密码", "{$returnurl}", '03');
        } else {
            MooMessage("请填写用户名和密码", "index.php?n=login", '03');
        }
        exit;
    }
    //note 用户名不能为空
    if (empty($_POST['username'])) {
        //note 转至邮箱验证页
        if ($returnurl) {
            $returnurl = $returnurl;
            MooMessage("用户名不能为空", "{$returnurl}", '03');
        } else {
            MooMessage("用户名不能为空", "index.php?n=login", '03');
        }
        exit;
    }
    //note 密码不能为空
    if (empty($_POST['password'])) {
        //note 转至邮箱验证页
        if ($returnurl) {
            $returnurl = $returnurl;
            MooMessage("密码不能为空", "{$returnurl}", '03');
        } else {
            MooMessage("密码不能为空", "index.php?n=login", '03');
        }
        exit;
    }
    $userid = 0;
    $sp = searchApi('members_man members_women');
    $limit = array(0, 1);
    //note 验证用户名,密码     enky
    if (is_numeric($username)) {
        if (strlen($username) == 11) {
            //判断手机号是否存在
            $filter = array();
            $filter[] = array('telphone', $username);
            if ($sp->getResultOfReset($filter, $limit)) {
                $ids = $sp->getIds();
                if (isset($ids[0])) {
                    $userid = $ids[0];
                }
            }
        }
        if (!$userid) {
            //判断uid是否存在
            $filter = array();
            $filter[] = array('@id', $username);
            if ($sp->getResultOfReset($filter, $limit)) {
                $ids = $sp->getIds();
                if (isset($ids[0])) {
                    $userid = $ids[0];
                }
            }
        }
        if (!$userid) {
            if ($user_one = $_MooClass['MooMySQL']->getOne("SELECT uid from `{$dbTablePre}members_base` where qq='{$username}'")) {
                $userid = $user_one['uid'];
            }
        }
        /*if(strlen($username)==11){
        		   $sql_where = " s.telphone='{$username}'";
                   $user = $_MooClass['MooMySQL']->getOne("SELECT s.uid,s.username,s.password,s.birthyear,s.gender,s.province,s.city,b.automatic,s.is_lock,b.is_awoke,s.sid,l.last_login_time,l.lastip FROM `{$dbTablePre}members_search` as s left join `{$dbTablePre}members_base` as b on s.uid=b.uid left join `{$dbTablePre}members_login` as l on s.uid=l.uid   WHERE $sql_where");
        		}else{
        			$sql_where = " s.uid = '{$username}'";
        			$user = $_MooClass['MooMySQL']->getOne("SELECT s.uid,s.username,s.password,s.birthyear,s.gender,s.province,s.city,b.automatic,s.is_lock,b.is_awoke,s.sid,l.last_login_time,l.lastip FROM `{$dbTablePre}members_search` as s left join `{$dbTablePre}members_base` as b on s.uid=b.uid left join `{$dbTablePre}members_login` as l on s.uid=l.uid   WHERE $sql_where");
        			if(empty($user)){
        			   $sql_where = "b.qq='{$username}'";
        			   //$user = $_MooClass['MooMySQL']->getOne("SELECT a.uid,username,password,birthyear,gender,province,city,automatic,is_lock,is_awoke,sid,last_login_time,lastip FROM `{$dbTablePre}members` a ,`{$dbTablePre}memberfield` b WHERE a.uid=b.uid and $sql_where");
        				$user = $_MooClass['MooMySQL']->getOne("SELECT s.uid,s.username,s.password,s.birthyear,s.gender,s.province,s.city,b.automatic,s.is_lock,b.is_awoke,s.sid,l.last_login_time,l.lastip FROM `{$dbTablePre}members_search` as s left join `{$dbTablePre}members_base` as b on s.uid=b.uid left join `{$dbTablePre}members_login` as l on s.uid=l.uid   WHERE $sql_where");
        			}
        		}*/
    } else {
        $filter = array();
        $filter[] = array('username', $username);
        if ($sp->getResultOfReset($filter, $limit)) {
            $ids = $sp->getIds();
            if (isset($ids[0])) {
                $userid = $ids[0];
            }
        }
        /*$sql_where = "s.username = '******'";
        		//$user = $_MooClass['MooMySQL']->getOne("SELECT uid,username,password,birthyear,gender,province,city,automatic,is_lock,is_awoke,sid,last_login_time,lastip FROM `{$dbTablePre}members` WHERE $sql_where");
        		$user = $_MooClass['MooMySQL']->getOne("SELECT s.uid,s.username,s.password,s.birthyear,s.gender,s.province,s.city,b.automatic,s.is_lock,b.is_awoke,s.sid,l.last_login_time,l.lastip FROM `{$dbTablePre}members_search` as s left join `{$dbTablePre}members_base` as b on s.uid=b.uid left join `{$dbTablePre}members_login` as l on s.uid=l.uid   WHERE $sql_where");*/
    }
    //note 用户名找不到
    if (!$userid) {
        $login_where = is_numeric($username) ? "uid='{$username}' or telphone='{$username}'" : "username='******'";
        $user_one = $_MooClass['MooMySQL']->getOne("SELECT uid from `{$dbTablePre}members_search` where {$login_where}");
        if ($user_one) {
            $userid = $user_one['uid'];
        } else {
            //note 转至邮箱验证页
            if ($returnurl) {
                MooMessage("用户名不存在", "{$returnurl}", '01');
            } else {
                MooMessage("用户名不存在", "index.php?n=login", '01');
            }
        }
    }
    //获取
    $user = array_merge(MooGetData('members_login', 'uid', $userid), MooMembersData($userid));
    echo $user['is_lock'];
    exit;
    if ($user['is_lock'] != '1') {
        MooMessage("很抱歉您的用户名已经被锁定!<br>请联系真爱一生网客服:<b>400-678-0405</b>", "{$returnurl}", '01', 6);
    }
    //note 用户密码错误
    if ($user['uid'] && $user['password'] != $md5_password) {
        //note 转至邮箱验证页
        if ($returnurl) {
            $returnurl = $returnurl;
            MooMessage("用户密码错误", "{$returnurl}", '01');
        } else {
            MooMessage("用户密码错误", "index.php?n=login", '01');
        }
        exit;
    }
    //note 验证通过
    if ($user['uid'] && $user['password'] == $md5_password) {
        if ($user['automatic'] == 1) {
            MooSetCookie('auth', MooAuthCode("{$user['uid']}\t{$user['password']}", 'ENCODE'), 86400 * 7);
        } else {
            MooSetCookie('auth', MooAuthCode("{$user['uid']}\t{$user['password']}", 'ENCODE'), 86400);
        }
        $time = time();
        $_MooClass['MooMySQL']->query("update {$dbTablePre}members_login set last_login_time = '{$time}',login_meb = login_meb+1,lastvisit='{$time}' where uid = '{$user['uid']}'");
        //更新最后登录时间
        //会员最后登录时间
        MooSetCookie('last_login_time', $time, 86400);
        //note 客服提醒
        if ($user['is_awoke'] == '1') {
            $awoketime = time() + 120;
            $sql = "INSERT INTO `{$dbTablePre}admin_remark` SET sid='{$user['sid']}',title='会员上线',content='ID:{$user['uid']}会员刚刚通过pc机上线,请联系',awoketime='{$awoketime}',dateline='{$GLOBALS['timestamp']}'";
            $_MooClass['MooMySQL']->query($sql);
        }
        //note 记住用户名
        if ($remember_username == 1) {
            MooSetCookie('username', $username, time() + 3600);
        } else {
            MooSetCookie('username', $username, -1200);
        }
        //		echo print_r($_MooCookie);die;
        MooPlugins('ipdata');
        $online_ip = GetIP();
        if ($online_ip != $user['lastip']) {
            $user_address = convertIp($online_ip);
            include "./module/crontab/crontab_config.php";
            foreach ($provice_list as $key => $provice_arr) {
                if (strstr($user_address, $provice_arr) !== false) {
                    //if(){
                    $province = $key;
                    break;
                }
            }
            if (empty($province)) {
                $province = $current_user['province'];
            }
            //得到市对应的城市代号
            foreach ($city_list as $city_key => $city_val) {
                if (strstr($user_address, $city_val) !== false) {
                    $city = $city_key;
                    break;
                }
            }
        }
        MooSetCookie('province', $user['province'], 86400);
        MooSetCookie('city', $user['city'], 86400);
        $lastactive = time();
        $uid = $user['uid'];
        //note 更新用户的最近登录ip和最近登录时间
        $updatesqlarr = array('lastip' => $online_ip);
        $wheresqlarr = array('uid' => $uid);
        updatetable("members_login", $updatesqlarr, $wheresqlarr);
        if (MOOPHP_ALLOW_FASTDB) {
            $val = array();
            $val['lastip'] = $online_ip;
            //$val['client']=0;
            $val['last_login_time'] = $time;
            $val['lastvisit'] = $time;
            //$val['isOnline']=1;
            MooFastdbUpdate('members_login', 'uid', $uid, $val);
            //!!
        }
        //记录本次登录ip及上次的ip,及真实的最后访问时间
        $sql_ip = "SELECT last_ip,finally_ip FROM {$GLOBALS['dbTablePre']}member_admininfo WHERE uid='{$uid}'";
        $member_admin_info = $GLOBALS['_MooClass']['MooMySQL']->getOne($sql_ip);
        if (!empty($member_admin_info)) {
            $sql_ip = "UPDATE {$GLOBALS['dbTablePre']}member_admininfo SET last_ip='{$member_admin_info['finally_ip']}',finally_ip='{$online_ip}',real_lastvisit='{$lastactive}' WHERE uid='{$uid}'";
        } else {
            $sql_ip = "INSERT INTO {$GLOBALS['dbTablePre']}member_admininfo SET finally_ip='{$online_ip}',uid='{$uid}',real_lastvisit='{$lastactive}'";
        }
        $GLOBALS['_MooClass']['MooMySQL']->query($sql_ip);
        //note 先删除表里面已存在对应用户的session
        //$_MooClass['MooMySQL']->query("DELETE FROM `{$dbTablePre}membersession` WHERE `uid` = '$uid'");
        //删除过期SESSION
        //$date=time()-1200;
        //$_MooClass['MooMySQL']->query("DELETE FROM `{$dbTablePre}membersession` WHERE lastactive<'$date'");
        //$_MooClass['MooMySQL']->query("REPLACE INTO `{$dbTablePre}membersession` SET `username`= '$user[username]',`password`='$user[password]',`ip` = '$online_ip',`lastactive` = '$lastactive',`uid` = '$uid'");
        //发送短信提醒关注的会员上线了
        //fanglin暂时屏蔽
        /*if($_MooCookie['iscontact'] != "yes"){
        		   MooSend_Contact($uid,$user['gender'],"system");
        		}
        		
        
        		//note 伪造用户访问
        		$selectuser=selectuser($user['province'],$user['city'],$user['birthyear'],$user['gender']);
        		$time=strtotime(date('Y-m-d'))-24*60*60;
        		for($i=0;$i<count($selectuser);$i++){
        		      $result=$_MooClass['MooMySQL']->getOne("SELECT `uid` FROM `".$dbTablePre."service_visitor` WHERE `uid`='".$selectuser[$i]['uid']."' AND `visitorid`='".$user['uid']."' AND `who_del`!=2");
        		      if($result['uid']==''){
        		              $_MooClass['MooMySQL']->query("INSERT INTO `".$dbTablePre."service_visitor` SET `uid`='".$selectuser[$i]['uid']."',`visitorid`='".$user['uid']."',`visitortime`='".$time."',`who_del`=1");
        		      }else $_MooClass['MooMySQL']->query("UPDATE `".$dbTablePre."service_visitor` SET `visitortime`='".$time."' WHERE `uid`='".$selectuser[$i]['uid']."' AND `visitorid`='".$user['uid']."'");
        		      
        		}*/
        //note 转至邮箱验证页
        if ($returnurl) {
            $returnurl = $returnurl;
            header("Location:" . $returnurl);
        } else {
            header("Location:index.php?n=service");
        }
        exit;
    }
}
Example #11
0
/**
 * 登录表单处理
 * 描述:
 */
function login_submit()
{
    global $_MooClass, $dbTablePre, $_MooCookie, $uuid, $memcached;
    $error = array();
    //noet 对提交的数据过滤
    if ($_POST) {
        $username = trim($_POST['username']);
        //		$username = "******";
        $md5_password = md5($_POST['password']);
        //		$md5_password = md5(123456);
        $cookietime = intval(isset($_POST['cookietime']) ? $_POST['cookietime'] : '');
        $remember_username = MooGetGPC('remember', 'integer', 'P');
    }
    /*****设置回转的页面*****/
    if (empty($_POST['username']) && empty($_POST['password'])) {
        //note 转至邮箱验证页
        $error = "用户名和密码为空";
        echo return_data($error, false);
        exit;
    }
    //note 用户名不能为空
    if (empty($_POST['username'])) {
        //note 转至邮箱验证页
        $error = "用户名为空";
        echo return_data($error, false);
        exit;
    }
    //note 密码不能为空
    if (empty($_POST['password'])) {
        //note 转至邮箱验证页
        $error = "密码为空";
        echo return_data($error, false);
        exit;
    }
    if (empty($error)) {
        $userid = 0;
        $sp = searchApi('members_man members_women');
        $limit = array(0, 1);
        //note 验证用户名,密码     enky
        if (is_numeric($username)) {
            if (strlen($username) == 11) {
                //判断手机号是否存在
                $filter = array();
                $filter[] = array('telphone', $username);
                if ($sp->getResultOfReset($filter, $limit)) {
                    $ids = $sp->getIds();
                    if (isset($ids[0])) {
                        $userid = $ids[0];
                    }
                }
            }
            if (!$userid) {
                //判断uid是否存在
                $filter = array();
                $filter[] = array('@id', $username);
                if ($sp->getResultOfReset($filter, $limit)) {
                    $ids = $sp->getIds();
                    if (isset($ids[0])) {
                        $userid = $ids[0];
                    }
                }
            }
            if (!$userid) {
                if ($user_one = $_MooClass['MooMySQL']->getOne("SELECT uid from `{$dbTablePre}members_base` where qq='{$username}'", true)) {
                    $userid = $user_one['uid'];
                }
            }
        } else {
            $filter = array();
            $filter[] = array('username', $username);
            if ($sp->getResultOfReset($filter, $limit)) {
                $ids = $sp->getIds();
                if (isset($ids[0])) {
                    $userid = $ids[0];
                }
            }
        }
        //note 用户名找不到
        if (!$userid) {
            $login_where = is_numeric($username) ? "uid='{$username}' or telphone='{$username}'" : "username='******'";
            $user_one = $_MooClass['MooMySQL']->getOne("SELECT uid from `{$dbTablePre}members_search` where {$login_where}", true);
            if ($user_one) {
                $userid = $user_one['uid'];
            } else {
                $error = "用户名不存在";
                echo return_data($error, false);
                exit;
            }
        }
        //获取
        $user = array_merge(MooGetData('members_login', 'uid', $userid), MooMembersData($userid));
        if ($user['is_lock'] != '1') {
            $error = "用户已经被锁定";
            echo return_data($error, false);
            exit;
        }
        //note 用户密码错误
        if ($user['uid'] && $user['password'] != $md5_password) {
            //note 转至邮箱验证页
            $error = "密码错误";
            echo return_data($error, FALSE);
            exit;
        }
        if (empty($error)) {
            //note 验证通过
            if ($user['uid'] && $user['password'] == $md5_password) {
                //生成随机唯一id,andriod用
                $userid = $user['uid'];
                $uuid = user_md5_id($user['uid']);
                $memcached->set('uuid_' . $userid, $uuid, 0, 0);
                $memcached->set('uid_' . $userid, $userid, 0, 0);
                $user['uuid'] = $uuid;
                if ($user['automatic'] == 1) {
                    MooSetCookie('auth', MooAuthCode("{$user['uid']}\t{$user['password']}", 'ENCODE'), 86400 * 7);
                } else {
                    MooSetCookie('auth', MooAuthCode("{$user['uid']}\t{$user['password']}", 'ENCODE'), 86400);
                }
                $user_sha = $_MooClass['MooMySQL']->getOne("SELECT lastvisit from `{$dbTablePre}members_login` where uid='{$userid}'");
                $s_time = $user_sha['lastvisit'];
                $ret_count = $_MooClass['MooMySQL']->getOne("SELECT count(uid) as c FROM {$dbTablePre}service_visitor WHERE uid >0 and visitorid = '{$userid}' AND who_del !=2 and visitortime > '{$s_time}' ");
                $shadow_numb = $ret_count['c'] ? $ret_count['c'] : 0;
                // MooSetCookie('auth','SDFSFGAFGD\AHFGHGHJ',86400);
                $time = time();
                $_MooClass['MooMySQL']->query("update {$dbTablePre}members_login set last_login_time = '{$time}',login_meb = login_meb+1,lastvisit='{$time}' where uid = '{$user['uid']}'");
                //更新最后登录时间
                //会员最后登录时间
                MooSetCookie('last_login_time', $time, 86400);
                //note 客服提醒
                if ($user['is_awoke'] == '1') {
                    $awoketime = time() + 120;
                    $sql = "INSERT INTO `{$dbTablePre}admin_remark` SET sid='{$user['sid']}',title='会员上线',content='ID:{$user['uid']}会员刚刚通过pc机上线,请联系',awoketime='{$awoketime}',dateline='{$GLOBALS['timestamp']}'";
                    $_MooClass['MooMySQL']->query($sql);
                }
                MooPlugins('ipdata');
                $online_ip = GetIP();
                if ($online_ip != $user['lastip']) {
                    $user_address = convertIp($online_ip);
                    include "./module/crontab/crontab_config.php";
                    foreach ($provice_list as $key => $provice_arr) {
                        if (strstr($user_address, $provice_arr) !== false) {
                            //if(){
                            $province = $key;
                            break;
                        }
                    }
                    if (empty($province)) {
                        $province = $current_user['province'];
                    }
                    //得到市对应的城市代号
                    foreach ($city_list as $city_key => $city_val) {
                        if (strstr($user_address, $city_val) !== false) {
                            $city = $city_key;
                            break;
                        }
                    }
                }
                MooSetCookie('province', $user['province'], 86400);
                MooSetCookie('city', $user['city'], 86400);
                $lastactive = time();
                $uid = $user['uid'];
                //note 更新用户的最近登录ip和最近登录时间
                $updatesqlarr = array('lastip' => $online_ip);
                $wheresqlarr = array('uid' => $uid);
                updatetable("members_login", $updatesqlarr, $wheresqlarr);
                if (MOOPHP_ALLOW_FASTDB) {
                    $val = array();
                    $val['lastip'] = $online_ip;
                    //$val['client']=0;
                    $val['last_login_time'] = $time;
                    $val['lastvisit'] = $time;
                    //$val['isOnline']=1;
                    MooFastdbUpdate('members_login', 'uid', $uid, $val);
                    //!!
                }
                //记录本次登录ip及上次的ip,及真实的最后访问时间
                $sql_ip = "SELECT last_ip,finally_ip FROM {$GLOBALS['dbTablePre']}member_admininfo WHERE uid='{$uid}'";
                $member_admin_info = $GLOBALS['_MooClass']['MooMySQL']->getOne($sql_ip);
                if (!empty($member_admin_info)) {
                    $sql_ip = "UPDATE {$GLOBALS['dbTablePre']}member_admininfo SET last_ip='{$member_admin_info['finally_ip']}',finally_ip='{$online_ip}',real_lastvisit='{$lastactive}' WHERE uid='{$uid}'";
                } else {
                    $sql_ip = "INSERT INTO {$GLOBALS['dbTablePre']}member_admininfo SET finally_ip='{$online_ip}',uid='{$uid}',real_lastvisit='{$lastactive}'";
                }
                $GLOBALS['_MooClass']['MooMySQL']->query($sql_ip);
            }
        }
    }
    //资料完善度
    $all_len = 0;
    $user_arr = MooMembersData($uid);
    if ($uid) {
        $all_len = (int) (getUserinfo_per($user_arr) * 100);
    }
    $user['all_len'] = $all_len;
    $user['choice'] = MooGetData('members_choice', 'uid', $uid);
    if (MooGetphoto($user['uid'], 'com')) {
        $mainimg = MooGetphoto($user['uid'], 'com');
    }
    $user_sha = $_MooClass['MooMySQL']->getOne("SELECT telphone from `{$dbTablePre}certification` where uid='{$userid}'");
    if (empty($error)) {
        $user['telphonesha'] = isset($user_sha['telphone']) ? $user_sha['telphone'] : 0;
        $user['mainimg'] = $mainimg;
        $user['password'] = '';
        $user['regip'] = '';
        $user['qq'] = '';
        $user['msn'] = '';
        $user['telphone'] = '';
        $user['username'] = '';
        $user['numofvis'] = $shadow_numb;
        $ret_count1 = $_MooClass['MooMySQL']->getOne("SELECT count(s_uid) as c FROM {$dbTablePre}services WHERE s_uid = '{$userid}' and flag = '1' and s_uid_del='0' and s_status = '0' ", true);
        $total1 = $ret_count1['c'];
        //2009-11-22日修改(得到总数)
        $user['nummail'] = $total1;
        echo return_data($user, true);
        exit;
        //            echo "<pre>$return</pre>";exit;
    } else {
        $error = "用户名或密码错误";
        echo return_data($error, false);
        exit;
    }
}
Example #12
0
function to_send_message()
{
    global $_MooClass, $dbTablePre, $userid, $user_arr, $memcached, $timestamp, $serverid;
    $and_uuid = isset($_GET['uuid']) ? $_GET['uuid'] : '';
    $uid = isset($_GET['uid']) ? $_GET['uid'] : '';
    if ($uid) {
        $userid = $mem_uid = $memcached->get('uid_' . $uid);
    }
    $uuid = $memcached->get('uuid_' . $userid);
    //$error[] = array("getand_uuid"=>$and_uuid,"getuid"=>$uid,"userid"=>$userid,"mem_uuid"=>$uuid);
    $checkuuid = check_uuid($and_uuid, $userid);
    if (!$checkuuid) {
        $error = "uuid_error";
        echo return_data($error, false);
        exit;
    }
    $user_arr = MooMembersData($userid);
    $contentid = MooGetGPC('s_id', 'integer', 'P');
    //不可给同性别发送消息
    $receive_info = MooMembersData($contentid);
    $receive_gender = $receive_info['gender'];
    if ($user_arr['gender'] == $receive_gender) {
        $err = "不可给同性别发送消息";
        echo return_data($err, false);
        exit;
    }
    //系统管理员权限
    /*$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;
      }*/
    $result = $_MooClass['MooMySQL']->getOne("select groupid from web_admin_user where uid='{$serverid}'");
    $groupid = $result['groupid'];
    if ($serverid && $user_arr['usertype'] != 3) {
        $err = "对不起您不能模拟操作";
        echo return_data($err, false);
        exit;
    }
    if ($serverid && $user_arr['usertype'] == 3 && !in_array($groupid, $GLOBALS['admin_aftersales'])) {
        $err = "对不起您不能模拟操作";
        echo return_data($err, false);
        exit;
    }
    //如果是本站注册会员
    if ($user_arr['usertype'] == 1) {
        $m_level = get_userrank($userid);
        //会员等级
        if ($m_level != 1) {
            //不是高级会员
            if (!checkIsMobileCertical($userid)) {
                //没有通过了手机验证
                $err = "您还没有进行手机验证,请先认证";
                echo return_data($err, false);
                exit;
            } else {
                //if(!checkIsOver($userid)){ //过了试用期
                $err = "只有钻石或高级会员才可以发送电子邮件给对方";
                echo return_data($err, false);
                exit;
                //}
            }
        }
    }
    //print_r($_POST);
    //note s_cid 发送者的权限(回复时才有)
    $s_cid = MooGetGPC('s_cid', 'integer', 'P');
    //echo $s_cid;exit;
    //收件人id
    $sid = $contentid;
    //发件人id
    $mid = $userid;
    ///echo $sid;exit;
    $s_title = MooGetGPC('s_title', 'string', 'P');
    $s_title = rtrim($s_title);
    //对主题字数限制
    $s_title = MooStrReplace(MooCutstr($s_title, 30, $dot = ''));
    $s_content = MooGetGPC('s_content', 'string', 'P');
    //note 特殊字符
    $s_content = rtrim(MooStrReplace(safeFilter($s_content)));
    $send_mymessage = MooGetGPC('send_mymessage', 'integer', 'P');
    $message_back = MooGetGPC('message_back', 'integer', 'P');
    //note 双方屏蔽不给操作
    if (MooGetScreen($mid, $sid)) {
        $err = "因特殊原因,消息发送失败";
        echo return_data($err, false);
        exit;
    }
    if ($mid && $sid && $s_title && $s_content) {
        $m_level = get_userrank($userid);
        //会员等级
        if ($m_level == 2 && $user_arr['usertype'] != 3) {
            //普通会员需要审核(除采集会员之外)
            //if($user_arr['gender'] == 0){	//如果是男方发的,需要审核,0表示
            $send_status = $_MooClass['MooMySQL']->query("insert into {$dbTablePre}services (s_cid,s_uid,s_fromid,s_title,s_content,s_time,sid,flag) values ('{$s_cid}','{$sid}','{$mid}','{$s_title}','{$s_content}'," . time() . ",'{$user_arr['sid']}','0')");
        } else {
            $send_status = $_MooClass['MooMySQL']->query("insert into {$dbTablePre}services (s_cid,s_uid,s_fromid,s_title,s_content,s_time,sid,flag) values ('{$s_cid}','{$sid}','{$mid}','{$s_title}','{$s_content}'," . time() . ",'{$user_arr['sid']}','1')");
        }
        //发送短信和邮件
        include_once "./module/crontab/crontab_config.php";
        $res = MooMembersData($sid);
        //	   $send_user_info = $_MooClass['MooMySQL']->getAll("select * from `{$dbTablePre}members_search` a  left join  {$dbTablePre}members_choice b  on a.uid=b.uid  where a.uid = '$userid'");
        $send_user_info = array_merge(MooGetData("members_choice", 'uid', $userid), MooMembersData($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 = $send_user_info['province'] ? $provice_list[$send_user_info['province']] : '';
        //省
        $city = $send_user_info['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_messagetpl', 'module');
        //模板
        $body = ob_get_clean();
        MooSendMail($res['username'], "真爱一生网系统温馨提示", $body, "", false, $sid);
        $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 = '" . $sid . "', sid = '" . $userid . "',phone = '" . $res['telphone'] . "',sendtime = '" . date("Y-m-d") . "'");
            $cos = $_MooClass['MooMySQL']->getOne("select count(*) as c from {$dbTablePre}today_send where uid='{$sid}' and sendtime>='{$date1}' and sendtime<='{$date2}'", true);
            if ($cos['c'] <= 1) {
                //fanglin暂时屏蔽
                Push_message_intab($sid, $res['telphone'], "邮件", "真爱一生网 用户ID:" . $userid . "," . $send_user_grade . ",已给您发送电子邮件,请及时到真爱一生网查看!4006780405", $userid);
            }
        } else {
            //活跃用户每天一条
            //每天该用户超过5条信息不发送短信
            $cos = $_MooClass['MooMySQL']->getOne("select count(*) as c from {$dbTablePre}today_send where uid='{$sid}' and sendtime='" . date("Y-m-d") . "'", true);
            if ($cos['c'] < 5) {
                $_MooClass['MooMySQL']->query("INSERT INTO {$dbTablePre}today_send SET uid = '" . $sid . "', sid = '" . $userid . "',phone = '" . $res['telphone'] . "',sendtime = '" . date("Y-m-d") . "'");
                //fanglin暂时屏蔽
                Push_message_intab($sid, $res['telphone'], '邮件', "真爱一生网 用户ID:" . $userid . "," . $send_user_grade . ",已给您发送电子邮件,请及时到真爱一生网查看!4006780405", $userid);
            }
        }
        //note 发送资料给接收方
        if ($send_mymessage) {
        }
        //note 备份邮件操作
        if ($message_back) {
            //note 发送MAIL时所需信息
            $user = $_MooClass['MooMySQL']->getOne("select username,nickname from {$dbTablePre}members_search where uid='{$mid}'");
            //note 发送MAIL时收信人的邮箱
            $ToAddress = $user['username'];
            //note 发送MAIL时主题
            $ToSubject = '提示:您在真爱一生网所发的消息备份';
            //note 发送MAIL时Body内容所需信息
            $username = $user['nickname'];
            //note 发送MAIL时Body内容所需信息
            $toname = $_MooClass['MooMySQL']->getOne("select nickname from {$dbTablePre}members_search where uid='{$sid}'");
            if ($username) {
                $ToBody = $username;
            } else {
                $ToBody = 'ID号为' . $mid . '的会员<br>';
            }
            if ($toname['nickname']) {
                $ToBody .= ':您好,您于' . date('Y-m-d H:i:s', time()) . ',在真爱一生网发送电子邮件给' . $toname['nickname'] . ',内容如下:<br>';
            } else {
                $ToBody .= ':您好,您于' . date('Y-m-d H:i:s', time()) . ',在真爱一生网发送电子邮件给ID号为' . $sid . '的会员,内容如下:<br>';
            }
            if ($username) {
                $ToBody .= '&nbsp;&nbsp;&nbsp;&nbsp;发件人:' . $username . '<br>';
            } else {
                $ToBody .= '&nbsp;&nbsp;&nbsp;&nbsp;发件人:ID号为' . $mid . '<br>';
            }
            if ($toname['nickname']) {
                $ToBody .= '&nbsp;&nbsp;&nbsp;&nbsp;收件人:' . $toname['nickname'] . '<br>';
            } else {
                $ToBody .= '&nbsp;&nbsp;&nbsp;&nbsp;收件人:ID号为' . $sid . '<br>';
            }
            $ToBody .= '&nbsp;&nbsp;&nbsp;&nbsp;主题:' . $s_title . '<br>';
            $ToBody .= '&nbsp;&nbsp;&nbsp;&nbsp;正文:<br>&nbsp;&nbsp;&nbsp;&nbsp;' . $s_content;
            MooSendMail($ToAddress, $ToSubject, $ToBody, $is_template = true, $sid);
        }
        //添加成功提示信息
        if ($send_status) {
            /*普通会员对全权会员反馈白名单*/
            if ($res['usertype'] == '3' && $user_arr['usertype'] != '3' && !$serverid) {
                white_list($res['uid'], $user_arr['uid']);
            }
            /*客服模拟全权记录*/
            if ($user_arr['usertype'] == '3' && $serverid && $res['usertype'] != '3') {
                $action = '站内信';
                fulllog($user_arr['uid'], $serverid, $action, $res);
            }
            //提醒所属客服
            $usid = $user_arr['sid'];
            $title = '您的会员 ' . $mid . ' 向 ' . $sid . ' 发送了邮件';
            $awoketime = $timestamp + 3600;
            $sql_remark = "insert into {$dbTablePre}admin_remark set sid='{$usid}',title='{$title}',content='{$title}',awoketime='{$awoketime}',dateline='{$timestamp}'";
            $res = $_MooClass['MooMySQL']->query($sql_remark);
            if ($user_arr['gender'] == 0) {
                //男方发的
                $suc = "发送成功,真爱一生审核后对方即可以收到。";
                echo return_data($suc, true);
                exit;
            } else {
                $suc = "发送成功";
                echo return_data($suc, true);
                exit;
            }
        } else {
            $err = "发送失败";
            echo return_data($err, false);
            exit;
        }
    } else {
        $err = "数据填写不完整";
        echo return_data($err, false);
        exit;
    }
}
Example #13
0
function sendcontact()
{
    global $_MooClass, $dbTablePre, $timestamp, $user, $user_arr, $hzn, $serverid, $memcached;
    //是否合法登录
    $and_uuid = isset($_GET['uuid']) ? $_GET['uuid'] : '';
    $uid = $_GET['uid'] = isset($_GET['uid']) ? $_GET['uid'] : '';
    if ($uid) {
        $userid = $mem_uid = $memcached->get('uid_' . $uid);
    }
    $checkuuid = check_uuid($and_uuid, $userid);
    if (!$checkuuid) {
        $error = "uuid_error";
        echo return_data($error, false);
        exit;
    }
    $sendid = MooGetGPC('sendid', 'integer', 'P');
    $user_arr = MooMembersData($userid);
    $uid = $userid;
    $returnurl = 'index.php?' . $_SERVER['QUERY_STRING'];
    //返回的url
    //note 目前默认系统不审核
    $contact_sys_check = '0';
    //note 目前系统默认是委托真爱一生等待对方的回应
    $contact_stat = '1';
    $content = MooCutstr(safeFilter(MooGetGPC('content', 'string', 'P')), 200, '');
    //客服不可模拟操作
    /*if($hzn == "hongniangwang"){
          MooMessage('对不起您不能模拟操作','javascript:history.go(-1);','04');
          exit;
      }*/
    if ($serverid && $user_arr['usertype'] != 3) {
        // MooMessage('对不起您不能模拟操作','javascript:history.go(-1);','04');
        $error = '对不起您不能模拟操作';
        echo return_data($error, false);
        exit;
    }
    //自己不可委托真爱一生联系自己
    if ($sendid == $userid) {
        //MooMessage('自己不可委托真爱一生联系自己','javascript:history.go(-1);','02');
        $error = '自己不可委托真爱一生联系自己';
        echo return_data($error, false);
        exit;
    }
    //note 双方屏蔽不给操作
    if (MooGetScreen($userid, $sendid)) {
        //MooMessage('因特殊原因,委托失败',"index.php?n=service&h=rose&t=getmorerose",'03');
        $error = '因特殊原因,委托失败';
        echo return_data($error, false);
        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 委托也要做性别限制
    $user_s = array_merge(MooMembersData($sendid), MooGetData('members_login', 'uid', $sendid));
    //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');
        $error = '同性之间不可委托真爱一生';
        echo return_data($error, false);
        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');
            $error = '不能向绑定中的会员发委托';
            echo return_data($error, false);
            exit;
        }
    }
    if ($user_s['showinformation'] != 1) {
        //MooMessage('发起委托失败,该会员已经关闭资料!','javascript:history.go(-1);','02');
        $error = '发起委托失败,该会员已经关闭资料!';
        echo return_data($error, false);
        exit;
    }
    //note 如果已经联系他就直接提示
    if ($checkuser['mid']) {
        //MooMessage("对不起,您已经委托真爱一生联系TA了",'javascript:history.go(-1);','02');
        $error = '对不起,您已经委托真爱一生联系TA了';
        echo return_data($error, false);
        exit;
    }
    //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');
        $error = '今天委托真爱一生已经超过3次';
        echo return_data($error, false);
        exit;
    }
    //提交时
    if ($content && $sendid) {
        if (!$checkuser['mid']) {
            //发送短信和邮件
            include_once "./module/crontab/crontab_config.php";
            $res = MooMembersData($sendid);
            if (MOOPHP_ALLOW_FASTDB) {
                $send_user_info = MooMembersData($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(0, 52, 123)) && $user_arr['is_well_user'] != 1) {
                update_iswell_user($user_arr['uid']);
            }
            //if($user_arr['uid']=='20796965'){
            //====发送委托彩信   begin  ====
            //发送人有照片
            $sendout_user_info = MooMembersData($userid);
            if (!($sendout_user_info['mainimg'] != '' && $sendout_user_info['images_ischeck'] == 1 && $sendout_user_info['pic_num'] > 0)) {
                $sendout_user_info['uid'] = false;
            }
            //发送条件:本站注册会员,有电话号码的,开启短信通知的会员发送
            //echo $sendid."<br />".$userid;
            $sendto_user_info = MooMembersData($sendid);
            if (!($sendto_user_info['is_phone'] == 1 && $sendto_user_info['telphone'] != '' && $sendto_user_info['usertype'] == 1)) {
                $sendto_user_info['telphone'] = false;
            }
            //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 =====
            //}
            //*********提醒所属客服**********
            $sid = $user_arr['sid'];
            $title = '您的会员 ' . $user_arr['uid'] . ' 向 ' . $sendid . ' 发送了委托';
            $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);
            /*普通会员对全权会员反馈白名单*/
            if ($user_s['usertype'] == '3' && $user_arr['usertype'] != '3' && !$serverid) {
                white_list($user_s['uid'], $user_arr['uid']);
            }
            /*客服模拟全权记录*/
            if ($user_arr['usertype'] == '3' && $serverid && $user_s['usertype'] != 3) {
                $action = '站内信';
                fulllog($user_arr['uid'], $serverid, $action, $user_s);
            }
            //MooMessage("委托成功",'index.php?n=service','05');
            $error = '委托成功';
            echo return_data($error, true);
            exit;
            //} else {
            //MooMessage("今天委托真爱一生已经 超过3次",'javascript:history.go(-1);','02');
            //     $error = '今天委托真爱一生已经 超过3次';
            //	echo return_data($error,false);exit;
            // }
        } else {
            //MooMessage("对不起,您已经委托真爱一生联系TA了",'javascript:history.go(-1);','02');
            $error = '对不起,您已经委托真爱一生联系TA了';
            echo return_data($error, false);
            exit;
        }
    }
    //是否有手机号码
    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');
        $error = '对不起,您没有通过手机验证';
        echo return_data($error, false);
        exit;
    } else {
        $tel = $status['telphone'];
    }
    //require MooTemplate('public/service_contact_sendcontact', 'module');
}
Example #14
0
function space_match()
{
    global $_MooClass, $dbTablePre, $userid, $user_arr, $style_user_arr, $diamond, $last_login_time;
    $uid = MooGetGPC('uid', 'integer', 'G');
    //print_r($user_arr);
    //note 查看会员资料信息
    $c = MooGetData('members_choice', 'uid', $uid);
    $user = MooMembersData($uid);
    //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';
    $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 匹配指数分数得出
    if ($uid != "" && $uid != $user_arr['uid'] && $user['gender'] != $user_arr['gender']) {
        $mark = 0;
        $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;
        }
    }
    $able_like = youAbleLike($l, 5);
    require MooTemplate('public/space_match', 'module');
}
Example #15
0
function getcontactdata1()
{
    global $_MooClass, $dbTablePre, $userid, $user_arr;
    $uid = MooGetGPC('uid', 'integer');
    //note 查询目前委托真爱一生联系对方表
    $user4 = $_MooClass['MooMySQL']->getOne("SELECT * FROM `{$dbTablePre}service_contact` WHERE `other_contact_you` = '{$uid}' AND `you_contact_other` = '{$userid}' and receive_del=0", true);
    if (!$user4) {
        MooMessage('对不起,您查看的不属于您的委托', 'javascript:history.go(-1)', '04');
    }
    //note 查询用户主表
    $user1 = leer_send_user1($uid);
    //note 查询用户择偶表
    //$user2 = leer_send_user2($uid);
    //note 查询用户附加表
    $user3 = service_user3($uid);
    //note 择偶条件
    $c = MooGetData('members_choice', 'uid', $uid) + MooGetData('members_introduce', 'uid', $uid);
    //note 显示相册中的普通照片
    $user_pic = $_MooClass['MooMySQL']->getAll("SELECT * FROM {$dbTablePre}pic WHERE  syscheck=1 and uid='{$user1['uid']}'");
    //会员已认证证件
    $MSG = certification($user1['uid']);
    //note 实现查看下一个会员功能
    $user5 = $_MooClass['MooMySQL']->getAll("SELECT other_contact_you FROM `{$dbTablePre}service_contact` WHERE `you_contact_other` = '{$userid}' and receive_del=0");
    $total = count($user5);
    foreach ($user5 as $k => $v) {
        if ($user5[$k]['other_contact_you'] == $uid) {
            $up = $k - 1 <= 0 ? '0' : $k - 1;
            $next = $k + 1 >= $total ? $total - 1 : $k + 1;
            $upid = $user5[$up]['other_contact_you'];
            $nextid = $user5[$next]['other_contact_you'];
        }
    }
    require MooTemplate('public/service_contact_getcontactdata1', 'module');
}