Beispiel #1
0
function register_steptel()
{
    global $_MooClass, $dbTablePre, $_MooCookie;
    $uid = $_MooCookie['uid'];
    $password = $_MooCookie['password'];
    $telphone = $_MooCookie['telphone'];
    $telphonecheck = MooGetGPC('telphonecheck', 'string');
    if (MooSubmit('register')) {
        $telcheck = MoogetGPC('telcheck', 'string');
        $truetelphone = MoogetGPC('truetelphone', 'string');
        $telphonemack = md5(md5(MoogetGPC('telphonemack', 'string', 'P')));
        $web_rand = $_MooCookie['rand'];
        if ($telcheck != '' && $web_rand == $telphonemack) {
            certification("telphone", $truetelphone, $uid);
            $md5 = md5($uid . MOOPHP_AUTHKEY);
            $apiurl = "http://tg.zhenaiyisheng.cc/hongniang/hongniang_telephone_import.php?uid=" . $uid . "&md5=" . $md5;
            if (@file_get_contents($apiurl) != "ok") {
                $dateline = time();
                $sql = "INSERT INTO {$GLOBALS['dbTablePre']}do_url VALUES('','{$apiurl}','{$dateline}',0,0)";
                $GLOBALS['_MooClass']['MooMySQL']->query($sql);
            }
            if (MOOPHP_ALLOW_FASTDB) {
                MooFastdbUpdate('members_search', 'uid', $uid);
            }
            MooSetCookie('auth', MooAuthCode("{$uid}\t{$password}", 'ENCODE'), 86400 * 7);
            $message = "恭喜您,您已经通过手机验证!进入下一步!";
            MooMessage($message, 'index.php?n=register&h=steptwo');
        } elseif (MoogetGPC('telphonemack', 'string', 'P') == '' && $telcheck != '') {
            MooMessage("请填写您收到的手机验证码!", "index.php?n=register&h=steptel");
        } else {
            if ($telcheck != '' && $web_rand != $telphonemack) {
                $message = "您输入的短信验证码不正确";
                MooMessage($message, 'index.php?n=register&h=steptel');
            }
        }
    }
    include MooTemplate('public/register_steptel', 'module');
}
Beispiel #2
0
function getcontactdata2()
{
    global $_MooClass, $dbTablePre, $userid, $user_arr;
    $uid = MooGetGPC('uid', 'integer');
    //note 查询目前委托真爱一生联系对方表
    $user4 = $_MooClass['MooMySQL']->getOne("SELECT * FROM `{$dbTablePre}service_contact` WHERE `other_contact_you` = '{$userid}' AND `you_contact_other` = '{$uid}' and send_del=0 and is_server=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 择偶条件
    if (MOOPHP_ALLOW_FASTDB) {
        $c = MooFastdbGet('members_choice', 'uid', $uid);
    } else {
        $c = $_MooClass['MooMySQL']->getOne("SELECT * FROM `{$dbTablePre}members_choice` WHERE uid = {$uid}");
    }
    //note 实现查看下一个会员功能
    $user5 = $_MooClass['MooMySQL']->getAll("SELECT you_contact_other FROM `{$dbTablePre}service_contact` WHERE `other_contact_you` = '{$userid}' and send_del=0 and is_server=0");
    //note 显示相册中的普通照片
    $user_pic = $_MooClass['MooMySQL']->getAll("SELECT * FROM {$dbTablePre}pic WHERE syscheck=1 and  uid='{$user1['uid']}'");
    //会员已认证证件
    $MSG = certification($user1['uid']);
    $total = count($user5);
    foreach ($user5 as $k => $v) {
        if ($user5[$k]['you_contact_other'] == $uid) {
            $up = $k - 1 <= 0 ? '0' : $k - 1;
            $next = $k + 1 >= $total ? $total - 1 : $k + 1;
            $upid = $user5[$up]['you_contact_other'];
            $nextid = $user5[$next]['you_contact_other'];
        }
    }
    //note 查询普通图片
    //$user6 = $_MooClass['MooMySQL']->getAll("SELECT * FROM {$dbTablePre}pic WHERE uid='$uid' AND syscheck = 1");
    require MooTemplate('public/service_contact_getcontactdata2', 'module');
}
Beispiel #3
0
                 echo return_data($error, false);
                 exit;
             }
         }
     }
 } else {
     if ($userid) {
         $error = "您现在是登陆状态";
         echo return_data($error, false);
         exit;
     }
     register_stepone();
 }
 if (empty($error) && $uid) {
     global $uuid;
     certification("telphone", $telphone, $uid);
     $uuid = user_md5_id($uid);
     $memcached->set('uuid_' . $uid, $uuid, 0, 0);
     $memcached->set('uid_' . $uid, $uid, 0, 0);
     $user['uuid'] = $uuid;
     $return = array();
     $return = array('uuid' => $uuid, 'uid' => $uid);
     echo return_data($return);
     exit;
 } else {
     $error = "注册失败,请重新注册";
     echo return_data($error, FALSE);
     exit;
 }
 break;
 //	     default :
Beispiel #4
0
function space_viewpro()
{
    global $_MooClass, $dbTablePre, $userid, $timestamp, $user_arr, $val_arr, $style_user_arr, $diamond, $_MooCookie, $memcached;
    //$val_arr统计资料完善度
    $uid = MooGetGPC('uid', 'integer', 'G') ? MooGetGPC('uid', 'integer', 'G') : $userid;
    $skinName = MooGetGPC('skiname', 'string', 'G');
    $is_only_show = true;
    $status = array();
    //note 判断被浏览的会员是否存在
    $status = array_merge(MooMembersData($uid), MooGetData('members_login', 'uid', $uid));
    //*****************白名单*******************
    if ($uid != $userid) {
        $is_only_show = false;
    }
    if (empty($is_only_show)) {
        //if(MOOPHP_ALLOW_FASTDB && $status['is_lock'] != 1){//is_lock默认1不封锁用户,0则封锁
        if ($status['is_lock'] != 1) {
            MooMessage('此会员已经找到真爱,关闭了个人资料,转向我的真爱一生,寻找自己的真爱吧!', 'index.php?n=service');
        }
        if (!$status) {
            MooMessage('此会员已经找到真爱,关闭了个人资料,转向我的真爱一生,寻找自己的真爱吧!', 'index.php?n=service');
            //note 判断被浏览的用户是否允许其他会员查看他的资料
        } elseif (!$status['showinformation'] && $status['uid'] != $userid) {
            //showinformation默认1允许其他会员查看,0则不允许
            switch ($status['showinformation_val']) {
                //showinformation_val用户关闭资料的理由
                case 1:
                    MooMessage('此会员已找到正在交往的对象,故资料未公开,转向我的真爱一生', 'index.php?n=service');
                    break;
                case 2:
                    MooMessage('此会员已找到真爱,即将踏上红地毯,故资料未公开,转向我的真爱一生', 'index.php?n=service');
                    break;
                case 3:
                    MooMessage('此会员最近很忙,无法及时回复邮件,故资料未公开,转向我的真爱一生', 'index.php?n=service');
                    break;
                case 4:
                    MooMessage('此会员资料未公开,原因可能是TA已经找到真爱了,转向我的真爱一生', 'index.php?n=service');
                    break;
            }
        }
    }
    $serverid = Moo_is_kefu();
    //后台管理员
    if ($serverid) {
        $result = $_MooClass['MooMySQL']->getOne("select groupid from web_admin_user where uid='{$serverid}'");
        $groupid = $result['groupid'];
        //系统管理员权限
        $GLOBALS['system_admin'] = array(60);
        if (in_array($groupid, $GLOBALS['system_admin'])) {
            $serverid = null;
        }
    }
    //note 浏览资料页面时候,写入谁浏览谁表,自己浏览自己的除外
    if ($userid && $uid && $userid != $uid) {
        //note 不让屏蔽的会员查看
        if (MooGetScreen($userid, $uid)) {
            MooMessage('由于特殊原因对方资料未公开,转向我的真爱一生', 'index.php?n=service');
        }
        if (empty($serverid)) {
            //service_visitor 某某会员浏览某某会员记录表
            $visitor = $_MooClass['MooMySQL']->getOne("SELECT vid FROM {$dbTablePre}service_visitor WHERE uid = '{$userid}' AND visitorid = '{$uid}'");
            //note 再次浏览的,更新浏览时间
            if ($visitor['vid']) {
                $_MooClass['MooMySQL']->query("UPDATE {$dbTablePre}service_visitor SET visitortime = '{$timestamp}' WHERE uid='{$userid}' AND visitorid = '{$uid}' limit 1");
            } else {
                $_MooClass['MooMySQL']->query("INSERT INTO {$dbTablePre}service_visitor SET uid = '{$userid}',visitorid='{$uid}',visitortime = '{$timestamp}'");
            }
            //MemoryCache('visitor', $userid.'行78, space/index.php');
            /*
            //===simulatereal
            if(MOOPHP_ALLOW_FASTDB){
            	$browsered = MooFastdbGet('members','uid',$uid);
            }else{
            	$sql="SELECT isOnline FROM {$dbTablePre}members where uid='$uid'";
                            $browsered=$_MooClass['MooMySQL']->getOne($sql);
            }
            */
            if (MooUserIsOnline($uid)) {
                $browser = $_MooClass['MooMySQL']->getOne("SELECT id FROM {$dbTablePre}service_browser WHERE uid = '{$userid}' AND browserid = '{$uid}'");
                //note 再次浏览的,更新浏览时间
                if ($browser['id']) {
                    $_MooClass['MooMySQL']->query("UPDATE {$dbTablePre}service_browser SET browsertime = '{$timestamp}' WHERE uid='{$userid}' AND browserid = '{$uid}' limit 1");
                } else {
                    $_MooClass['MooMySQL']->query("INSERT INTO {$dbTablePre}service_browser SET uid = '{$userid}',browserid='{$uid}',browsertime = '{$timestamp}'");
                }
            }
        }
    }
    //note 查看会员资料信息
    $c = MooGetData('members_choice', 'uid', $uid) + MooGetData('members_introduce', 'uid', $uid);
    $user =& $status;
    /***创建浏览队列 ***/
    if (empty($serverid) && !empty($userid)) {
        if ($user['gender'] != $user_arr['gender'] && $user['uid'] != $userid) {
            if ($user['usertype'] == 3 && $user_arr['usertype'] != 3 && $user['showinformation'] == 1 && $user_arr['s_cid'] >= 40) {
                $iscan = $GLOBALS['fastdb']->get($userid . '_scan_space');
                //浏览的全权会员列表
                $iscan = empty($iscan) ? array() : json_decode($iscan, true);
                if (!empty($iscan)) {
                    $iscan = in_array($uid, $iscan) ? $iscan : array_push($iscan, $uid);
                }
                $GLOBALS['fastdb']->set($userid . '_scan_space', json_encode($iscan));
            }
            if ($user['usertype'] != 3) {
                $scan_i = $GLOBALS['fastdb']->get('scan_space_' . $uid);
                //访问的记录列表
                $scan_i = empty($scan_i) ? array() : json_decode($scan_i, true);
                if (!empty($scan_i)) {
                    $scan_s = array();
                    foreach ($scan_i as $k => $scan) {
                        $scan_s[$k] = $scan[0];
                    }
                    if (in_array($userid, $scan_s)) {
                        $scan_i[array_search($userid, $scan_s)] = array($userid, time());
                    } else {
                        array_push($scan_i, array($userid, time()));
                    }
                } else {
                    array_push($scan_i, array($userid, time()));
                }
                $GLOBALS['fastdb']->set('scan_space_' . $uid, json_encode($scan_i));
            }
        }
    }
    //note_显示相册中的普通照片
    $user_pic = $_MooClass['MooMySQL']->getAll("SELECT imgurl,pic_date,pic_name FROM {$dbTablePre}pic WHERE syscheck=1 and isimage='0' and uid='{$uid}'");
    $gender = $user_arr['gender'] == '0' ? '1' : '0';
    //0为男,1为女
    $agebegin = date("Y") - $user_arr['birthyear'] - 3;
    $ageend = date("Y") - $user_arr['birthyear'] + 3;
    $workprovince = $user_arr['province'];
    $workcity = $user_arr['city'];
    $search_url = MOOPHP_URL . "/index.php?n=search&h=quick&gender=" . $gender . "&age_start=" . $agebegin . "&age_end=" . $ageend . "&workprovince=" . $workprovince . "&workcity=" . $workcity . "&isphoto=1&imageField=&quick_search=搜索";
    //note 您可能喜欢的人,匹配相同地区
    $able_like = $userid ? youAbleLike($l, 0) : array();
    //note 获取会员认证证件
    $usercer = certification($uid);
    //获取视频
    /* $sql = "select toshoot_video_time,toshoot_video_url from {$dbTablePre}certification where uid='{$uid}' and toshoot_video_check=2";
    	$get_video = $_MooClass ['MooMySQL']->getOne ( $sql );
    	$cs_path = videoPathEncrypt ( MOOPHP_URL . '/' . $get_video ['toshoot_video_url'] . '/mov_' . $uid . '.flv' ); */
    //获取录音
    /* $sql_voi = "select toshoot_voice_time,toshoot_voice_url from {$dbTablePre}certification where uid='{$uid}' and toshoot_voice_check=2";
    	$get_voice = $_MooClass ['MooMySQL']->getOne ( $sql_voi );
    	$voice_path = MOOPHP_URL . '/' . $get_voice ['toshoot_voice_url'] . '/voi_' . $uid . '.flv'; */
    //note 当查看其他个人主页时,当前浏览的主页条件是否匹配
    $user2 = false;
    if ($uid != "" && $uid != $user_arr['uid'] && $user['gender'] != $user_arr['gender']) {
        $c2 = MooGetData('members_choice', 'uid', $userid);
        $user2 = MooMembersData($userid);
    }
    $skin_style = $_MooClass['MooMySQL']->getAll("select * from {$dbTablePre}members_skin");
    $returnurl = 'index.php?' . $_SERVER['QUERY_STRING'];
    //返回的url
    //note 检查绑定是否过期
    if ($user['isbind'] == 1) {
        $user['isbind'] = check_bind($user['bind_id']);
    }
    if ($diamond) {
        $Template = MooTemplate('space_viewpro', 'data');
    } else {
        if (!empty($skinName)) {
            $Template = MooTemplate("public/space_{$skinName}", 'module');
        } elseif ($user['skin']) {
            $Template = MooTemplate("public/space_" . $user['skin'], 'module');
        } else {
            $Template = MooTemplate('public/space_viewpro', 'module');
        }
    }
    //模拟动作
    if (!empty($userid) && !empty($serverid) && $user['usertype'] == 1) {
        $urlArr = array("ajax.php?n=service&h=sendleer", "ajax.php?n=service&h=addLiker");
        $key = array_rand($urlArr);
        $url = $urlArr[$key];
    }
    //是否存在音乐
    if (in_array($user_arr['s_cid'], array(10, 20, 30))) {
        $isMusic = false;
        $sql = "select musicName from web_vipmusic where uid='{$uid}'";
        $music = $_MooClass['MooMySQL']->getOne($sql);
        if ($music['musicName']) {
            $music_url = "data/music/{$uid}/{$music['musicName']}";
            if (file_exists($music_url)) {
                $isMusic = true;
            }
        }
    }
    require $Template;
}
Beispiel #5
0
function myaccount_arch()
{
    global $_MooClass, $uid, $user_arr, $_MooCookie, $last_login_time;
    global $dbTablePre;
    $a = $_MooCookie['tmp_order'];
    $pic = MooGetGPC('pic', 'integer', 'G');
    if (!$a && $pic) {
        //ajax判断照片数
        //在线拍照的照片数目
        $now_pic = $_MooClass['MooMySQL']->getOne("select count(*) as a from {$dbTablePre}tmp where uid='{$uid}' and staus=0");
        //当前已经上传的照片数目
        if ($now_pic) {
            $user_pic = $_MooClass['MooMySQL']->getOne("SELECT count(*) as c FROM {$dbTablePre}pic WHERE isimage='0' and uid='{$uid}'");
            $num_pic = $user_pic['c'] + $now_pic['a'];
            echo $num_pic > 20 ? $num_pic : '';
            exit;
        } else {
            MooMessage("您还没有要转存的相册", "index.php?n=myaccount&h=videoindex", "03");
        }
    } else {
        //ajax判断照片数
        if ($pic) {
            //在线拍照的照片数目
            $now_pic = $_MooClass['MooMySQL']->getOne("select count(*) as a from {$dbTablePre}tmp where uid='{$uid}' and staus=0");
            //当前已经上传的照片数目
            $user_pic = $_MooClass['MooMySQL']->getOne("SELECT count(*) as c FROM {$dbTablePre}pic WHERE isimage='0' and uid='{$uid}'");
            $num_pic = $user_pic['c'] + $now_pic['a'];
            echo $num_pic > 20 ? $num_pic : '';
            exit;
        }
        //$sql="SELECT * FROM {$dbTablePre}tmp WHERE uid='$uid' and staus='0' and tmp_order='$a' ";
        $sql = "SELECT * FROM {$dbTablePre}tmp WHERE uid='{$uid}' and staus='0'";
        //echo $sql;
        $rs = $_MooClass['MooMySQL']->getAll($sql);
        //print_r($rs);
        if ($rs) {
            $sqld = " insert into {$dbTablePre}pic (uid,imgurl,pic_date,pic_name) values ";
            foreach ($rs as $val) {
                $arr[] = " ({$uid},'{$val['pic_url']}','{$val['pic_date']}','{$val['pic_name']}') ";
            }
            $sqlx = join(',', $arr);
            $sql = $sqld . $sqlx;
            //echo $sql;
            //exit;
            $_MooClass['MooMySQL']->query($sql);
            //$_MooClass['MooMySQL']->query("update {$dbTablePre}tmp set staus='1' where uid='$uid' and tmp_order='$a' ");
            $_MooClass['MooMySQL']->query("update {$dbTablePre}tmp set staus='1' where uid='{$uid}'");
            $r3 = $_MooClass['MooMySQL']->getOne("select count(*) as c from {$dbTablePre}certification where uid='{$uid}' and video_check=3");
            if (!$r3[c]) {
                certification("video", $rs[0][pic_url]);
                $_MooClass['MooMySQL']->query("update {$dbTablePre}certification set video_check=2 where uid='{$uid}'");
                if (MOOPHP_ALLOW_FASTDB) {
                    $value = array();
                    $value['video_check'] = 2;
                    MooFastdbUpdate('certification', 'uid', $uid, $value);
                    //!!
                }
            }
            MooSetCookie('tmp_order', '');
        }
        MooMessage("操作成功", "index.php?n=myaccount&h=videoindex", "05");
    }
}