Exemplo n.º 1
0
function hnintro_index()
{
    if (empty($_GET['hnid'])) {
        $hnid = '';
    } else {
        $hnid = (int) $_GET['hnid'];
    }
    if ($hnid < 1 || $hnid > 14) {
        $hnid = 1;
    }
    include MooTemplate('public/hnintroduce_index', 'module');
}
Exemplo n.º 2
0
function loveing_hntesta()
{
    //$test_lists = get_test_lists(1);
    $test = get_test_one(1);
    if ($test['num'] == $test['count']) {
        $tc_id = $test['tc_id'];
        unset($test);
        loveing_result($tc_id);
        exit;
    }
    //echo 'aaaaaaaaaaaaaaaaa';
    include MooTemplate('public/loveing_hntesta', 'module');
}
Exemplo n.º 3
0
function company()
{
    global $cooperation_config, $user_arr, $userid, $memcached;
    $cooperation = MooGetGPC('cooptype', 'integer', 'G');
    $cooperation = empty($cooperation) ? 5 : $cooperation;
    $cooperation = array_key_exists($cooperation, $cooperation_config) ? $cooperation : 5;
    $disabled = '';
    $user_arr = array();
    $seccode = md5(uniqid(rand(), true));
    MooSetCookie('seccode', $seccode, 3600, '');
    $session_seccode = $memcached->set($seccode, '', 0, 300);
    require MooTemplate('public/cooperation', 'module');
}
Exemplo n.º 4
0
/**
 * 提示信息
 * 描述:例如用户在登录的用户名为空就进入一个提示页面
 * @param string $str 提示页面显示的内容
 * @param string $url 提示信息返回网址
 */
function show_message($str, $url)
{
    if (!empty($str)) {
        $notice = $str;
    } else {
        $notice = "没有提示信息";
    }
    //notice 如果url为空返回首页
    if (empty($url)) {
        $notice = "返回地址为空";
        $url = "index.php";
    }
    require MooTemplate("public/index_showmessage", 'module');
    exit;
}
Exemplo n.º 5
0
Arquivo: ajax.php Projeto: noikiy/zays
function video_show()
{
    global $_MooClass, $_MooCookie, $dbTablePre, $userid;
    $val = MooGetGPC('val', 'integer', 'G');
    $tmp_order = isset($_MooCookie['tmp_order']) ? $_MooCookie['tmp_order'] : null;
    if (!empty($tmp_order)) {
        $tmporder_sql = "and tmp_order={$tmp_order}";
    } else {
        $tmporder_sql = null;
    }
    $user_pic = $_MooClass['MooMySQL']->getOne("SELECT count(*) as c FROM {$dbTablePre}pic WHERE isimage='0' and uid='{$userid}'");
    $sql = "SELECT * FROM {$dbTablePre}tmp WHERE uid='{$userid}' and staus='0' " . $tmporder_sql . " order by tmp_id desc ";
    $rs = $_MooClass['MooMySQL']->getAll($sql);
    $flash_pic = $rs ? $rs : "";
    $acc_pic = $_MooClass['MooMySQL']->getOne("select  mainimg from {$dbTablePre}members_base where uid='{$userid}'", true);
    //取出形象照 改变形象照的操作状态
    $acc_pic = $acc_pic['mainimg'];
    include MooTemplate('public/myaccount_video_ajax', 'module');
}
Exemplo n.º 6
0
function index_index()
{
    global $_MooClass, $dbTablePre, $userid, $memcached;
    $uid = MooGetGPC('uid', 'integer');
    $puid = MooGetGPC('puid', 'integer');
    if (!$uid) {
        if (!$userid) {
            MooMessage('没有找到此会员', 'register.html');
        } else {
            MooMessage('没有找到此会员', 'index.php?n=search');
        }
    }
    if (MOOPHP_ALLOW_FASTDB) {
        $user = MooFastdbGet('members', 'uid', $uid);
        $user = array_merge($user, MooFastdbGet('memberfield', 'uid', $uid));
        $c = MooFastdbGet('choice', 'uid', $uid);
    } else {
        $user = $_MooClass['MooMySQL']->getOne("SELECT * FROM {$dbTablePre}members where uid='{$uid}'");
        $user2 = $_MooClass['MooMySQL']->getOne("SELECT * FROM {$dbTablePre}memberfield where uid='{$uid}'");
        $user = array_merge($user, $user2);
        unset($user2);
        $c = $_MooClass['MooMySQL']->getOne("SELECT * FROM {$dbTablePre}choice as mf WHERE uid='{$uid}'");
    }
    //$tuijian=$_MooClass['MooMySQL']->getAll("select * from {$dbTablePre}members where gender='$user[gender]' and is_vote='1' order by uid limit 7");
    $en_year = $user['birthyear'];
    $st_year = $en_year - 2;
    $en_year += 2;
    $sql_new = "SELECT uid,nickname,gender,birthyear,mainimg,images_ischeck FROM {$dbTablePre}members where birthyear between {$st_year} and {$en_year} and gender='{$user['gender']}' and images_ischeck=1 and is_lock=1 order by regdate desc limit 6";
    $tuijian = $_MooClass['MooMySQL']->getAll($sql_new);
    if (!$user) {
        if (!$userid) {
            MooMessage('没有您查看的会员', 'register.html');
        } else {
            MooMessage('没有您查看的会员', 'index.php?n=search');
        }
    } else {
        MooSetCookie('puid', $puid, time() + 3600, '');
        include MooTemplate('public/recommend_index', 'module');
    }
}
Exemplo n.º 7
0
function black_member()
{
    global $_MooClass, $dbTablePre, $timestamp, $user_arr;
    $is_action = MooGetGPC("is_post", "string", 'G');
    if ($is_action == "add") {
        $black_uid = MooGetGPC("black_uid", 'integer', 'P');
        $uid = 0;
        if ($user_arr['uid'] != $black_uid) {
            if ($black_uid) {
                $uid = $_MooClass['MooMySQL']->getOne("SELECT uid FROM {$dbTablePre}members WHERE uid='{$black_uid}' LIMIT 1 ");
                $uid = $uid['uid'];
            } else {
                $msg = '没有此会员,请确保您输入的会员ID存在。';
            }
            if ($uid) {
                $_MooClass['MooMySQL']->query("INSERT INTO {$dbTablePre}screen set uid='{$user_arr['uid']}',mid='{$black_uid}'");
                $msg = '成功将会员(ID:' . $uid . ')加入黑名单。';
            }
        } else {
            $msg = '你不能将自己加到黑名单!';
        }
        MooMessage($msg, 'index.php?n=service&h=black');
    }
    if ($is_action == "delblack") {
        $del_id_arr = MooGetGPC('id', 'string', 'P');
        if (empty($del_id_arr)) {
            MooMessage('请选择要删除的内容', 'javascript:history.go(-1);');
        }
        if (!empty($del_id_arr)) {
            $del_id_list = implode(',', $del_id_arr);
            $sql = "DELETE FROM {$dbTablePre}screen WHERE mid IN({$del_id_list})";
            $_MooClass['MooMySQL']->query($sql);
        }
        MooMessage("删除成功", 'index.php?n=service&h=black', '05');
    }
    $pagesize = 4;
    //note 获得当前url
    $currenturl = 'http://' . $_SERVER['SERVER_NAME'] . ':' . $_SERVER["SERVER_PORT"] . $_SERVER["REQUEST_URI"];
    $currenturl2 = preg_replace("/(&page=\\d+)/", "", $currenturl);
    //note 获得第几页
    $page = max(1, intval($_GET['page']));
    //note limit查询开始位置
    $start = ($page - 1) * $pagesize;
    $query = $_MooClass['MooMySQL']->getOne("SELECT count(1) as c FROM {$dbTablePre}screen where uid='{$user_arr['uid']}'");
    $total = $query['c'];
    $sql = "SELECT * FROM {$dbTablePre}screen where uid='{$user_arr['uid']}' LIMIT {$start},{$pagesize}";
    $black_uid = $_MooClass['MooMySQL']->getAll($sql);
    $page_list = multimail($total, $pagesize, $page, $currenturl2);
    require MooTemplate('public/service_black_list', 'module');
}
Exemplo n.º 8
0
function register_incenter()
{
    include MooTemplate('public/register_incenter', 'module');
}
Exemplo n.º 9
0
function payment_ifyouaretheone_reg()
{
    global $_MooClass, $dbTablePre, $userid, $timestamp, $user_arr;
    if ($_POST) {
        $name = safeFilter(MooGetGPC('name', 'string', 'P'));
        $profession = safeFilter(MooGetGPC('profession', 'string', 'P'));
        $mobile = safeFilter(MooGetGPC('mobile', 'string', 'P'));
        $telphone = safeFilter(MooGetGPC('telphone', 'string', 'P'));
        $qq = safeFilter(MooGetGPC('qq', 'string', 'P'));
        $msn = safeFilter(MooGetGPC('msn', 'string', 'P'));
        $email = safeFilter(MooGetGPC('email', 'string', 'P'));
        $lovede = safeFilter(MooGetGPC('lovede', 'string', 'P'));
        $description = safeFilter(MooGetGPC('description', 'string', 'P'));
        $lovede1 = safeFilter(MooGetGPC('lovede1', 'string', 'P'));
        $description1 = safeFilter(MooGetGPC('description1', 'string', 'P'));
        $ip = GetIP();
        $uid = $userid;
        $dateline = time();
        //note 如果用户没有填写爱情宣言或者自我描述
        if ($lovede == $lovede1) {
            $lovede = "";
        }
        if ($description == $description1) {
            $description = "";
        }
        //note 限制爱情宣言和自我描述进库的字数
        $lovede = MooCutstr($lovede, "1000");
        $description = MooCutstr($description, "1000");
        //note 表单每一项都要填写
        if (!empty($name) && !empty($profession) && !empty($mobile) && !empty($lovede) && !empty($description)) {
            $sql = "insert into {$dbTablePre}ifyouaretheone (uid,name,profession,mobile,telphone,qq,msn,email,lovede,description,ip,dateline) \n            values('{$uid}','{$name}','{$profession}','{$mobile}','{$telphone}','{$qq}','{$msn}','{$email}','{$lovede}','{$description}','{$ip}','{$dateline}')";
            $_MooClass['MooMySQL']->query($sql);
            MooMessage("您的注册报名成功!", "index.php", '05');
        } else {
            MooMessage("提交失败,请填写完整!", "index.php?n=payment&h=ifyouaretheone_reg", '02');
        }
    }
    include MooTemplate('public/payment_ifyouaretheone_reg', 'module');
}
Exemplo n.º 10
0
			<li><a href="story.html" target="_blank">成功故事</a>|</li>
			<li><a href="diamond.html" target="_blank">汇款信息</a></li>
		</ul>
	</div>

	<p>Copyright 2006-<?php 
echo date('Y');
?>
 真爱一生网.All Right Reserved.皖ICP备14002819</p>
  
</div><!--foot end-->
<?php 
if ($GLOBALS['userid'] && !in_array(MooGetGPC('h', 'string'), array('return', 'pay', 'picflash', 'makepic', 'history', 'chat')) && $_GET['n'] != 'register') {
    ?>
	<?php 
    include MooTemplate('system/rightbottom', 'public');
}
?>


<!--登录模态框-->
<div class="modal fade" id="myModal" tabindex="0" role="dialog" aria-labelledby="myModalLabel" aria-hidden="false" >
  <div class="modal-dialog">
	<div class="modal-content">
	  <div class="modal-header">
		<button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button>
		<h5 class="modal-title" id="myModalLabel">登录真爱一生网,您将获取更多会员的征婚信息和更多的会员关注 </h5>
	  </div>
	  <div class="modal-body">
			<div class="login-box">
				<form id="loginform" name="loginform" action="index.php?n=index&h=submit" method="post" onsubmit="return checkLoginForm();">
Exemplo n.º 11
0
function index_add_vip()
{
    global $_MooClass, $user_arr;
    if (isset($user_arr['s_cid'])) {
        $back_url = 'index.php?n=index&h=add_vip&s_cid=' . $user_arr['s_cid'];
    } else {
        $back_url = 'index.php?n=index&h=add_vip';
    }
    if (!$user_arr['s_cid']) {
        header("location:index.php?n=login&back_url=" . urlencode($back_url));
    } else {
        $s_cid = MooGetGPC('s_cid', 'int', 'R');
    }
    require MooTemplate('public/add_vip', 'module');
}
Exemplo n.º 12
0
/**
 * 删除数据提醒页面
 *
 * @param string $content 提示内容
 * @param integer $button 按钮上的文本
 * @param integer $url 点击按钮转向的URL
 */
function delmessage($content, $button, $url)
{
    //提示消息
    $prompt['content'] = $content;
    $prompt['button'] = $button;
    $prompt['url'] = $url;
    require MooTemplate('public/service_email_remove', 'module');
    exit;
}
Exemplo n.º 13
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');
    }
}
Exemplo n.º 14
0
    }
    ?>
<span class="r-title">音乐</span></div>
					<div class="rightbox-in"><audio autoplay controls loop src="<?php 
    echo MOOPHP_HOST . '/' . $music_url;
    ?>
">您的浏览器不支持播放</audio></div>						
				</div>
				<?php 
}
?>

			</div><!--c-right end-->
			
			<?php 
include MooTemplate('public/space_leftmenu_new', 'module');
?>
			<div class="clear"></div>
		</div><!--content end-->
		
	</div><!--center end-->
	</div>
	
	<?php 
include MooTemplate('public/space_footer', 'module');
?>
	<!--[if lte IE 6]>
	<script type="text/javascript" src="./public/default/js/bootstrap-ie.js"></script>
	<![endif]-->
</body>
</html>
Exemplo n.º 15
0
/**
 * 新快速查询
 * 采用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;
        }
    }
}
Exemplo n.º 16
0
Arquivo: rose.php Projeto: noikiy/zays
function get_receive_rose()
{
    global $_MooClass, $dbTablePre, $userid, $pagesize, $user_arr;
    //note 获取删除提交的变量
    $delrose = MooGetGPC('delrose', 'string');
    $delroseid = MooGetGPC('delroseid', 'array');
    //note 删除提交的数据
    if ($delrose && count($delroseid)) {
        $ids = "'" . implode("','", $delroseid) . "'";
        $time = time();
        $_MooClass['MooMySQL']->query("UPDATE  {$dbTablePre}service_rose SET receive_del=1,receive_deltime='{$time}', receivenum = 0 WHERE rid  IN ( {$ids} )");
        MooMessage("鲜花删除成功", 'index.php?n=service&h=rose&t=igetrose', '05');
    }
    //note 如果提交的数据不存在,或者是提交的时候没有选中
    if ($delrose && !count($delroseid)) {
        MooMessage('请选择要删除的鲜花', 'index.php?n=service&h=rose&t=igetrose', '01');
        exit;
    }
    //分页
    $page_per = 4;
    $page_url = 'http://' . $_SERVER['SERVER_NAME'] . ':' . $_SERVER["SERVER_PORT"] . $_SERVER["REQUEST_URI"];
    $page_url = preg_replace("/(&page=\\d+)/", "", $page_url);
    $page_now = MooGetGPC('page', 'integer', 'G');
    $temp = $_MooClass['MooMySQL']->getOne("select count(1) as num FROM {$dbTablePre}service_rose WHERE receiveuid  = '{$userid}' and send_del=0");
    $item_num = $temp['num'];
    $page_num = ceil($item_num / $page_per);
    if ($page_now > $page_num) {
        $page_now = $page_num;
    }
    if ($page_now < 1) {
        $page_now = 1;
    }
    $start = ($page_now - 1) * $page_per;
    $rose = $_MooClass['MooMySQL']->getAll("SELECT * FROM {$dbTablePre}service_rose WHERE receiveuid = '{$userid}' and receive_del=0 ORDER BY receivetime desc LIMIT {$start},{$page_per}");
    //note 已收到的玫瑰总数
    $temp = $_MooClass['MooMySQL']->getOne("SELECT sum(case when receivenum>=1 then 1 else 0 end) as num FROM {$dbTablePre}service_rose WHERE receiveuid = '{$userid}' and receive_del=0");
    $receive_num = empty($temp['num']) ? 0 : $temp['num'];
    //note 已发送的玫瑰总数
    $temp = $_MooClass['MooMySQL']->getOne("SELECT sum(case when num>=1 then 1 else 0 end) as num FROM {$dbTablePre}service_rose WHERE senduid = '{$userid}' AND is_server=0 and send_del=0");
    $send_num = empty($temp['num']) ? 0 : $temp['num'];
    require MooTemplate('public/service_rose_getreceiverose', 'module');
}
Exemplo n.º 17
0
/**
* 终止程序执行,显示提示信息
* @param string $message 显示的信息文本
* @param string $urlForward 跳转地址,默认为空
* @param string $time 链接跳转时间,默认为3秒
* @param strint $stype (01是错误信息,02警告信息,03提示信息,04一般信息,05正确信息,为空就是提示信息)
* @return 无返回值
*/
function MooMessage($message, $urlForward = '', $stype = '', $time = 3, $js = '')
{
    global $user_arr;
    global $memcached, $fastdb, $_MooClass;
    if (!$stype) {
        $stype = '04';
    }
    //$message = $message;
    $title = $message;
    //$urlForward = $urlForward;
    $time = $time * 1000;
    if ($urlForward && empty($js)) {
        $message .= "<p align='center'><input type=\"button\" class=\"btn btn-default\" onclick=\"javascript:location.href='" . $urlForward . "'\" value=\"确 定\" /></p>";
    } elseif (!empty($js)) {
        $message .= "<p align='center'><input type=\"button\" class=\"btn btn-default\" onclick=\"history.back()\" value=\"确 定\" /></p>";
    }
    /* if($time) {
           $message .= "<script>".
               //"function redirect() {window.location.replace('$urlForward');}\n".
               "function redirect() {window.location.href='{$urlForward}';}\n".
               "setTimeout('redirect();', $time);\n".
               "</script>";
       } */
    require MooTemplate('system/msg', 'public');
    $_MooClass['MooMySQL']->close();
    $memcached->close();
    $fastdb->close();
    exit;
}
Exemplo n.º 18
0
function about_privacy()
{
    $left_menu = 'privacy';
    require MooTemplate('public/about_privacy', 'module');
}
Exemplo n.º 19
0
function getlatestvisitor()
{
    global $_MooClass, $dbTablePre, $userid, $timestamp, $user_arr;
    $pagesize = 4;
    //note 获取删除提交的变量
    $delvisitor = MooGetGPC('delvisitor', 'string');
    $delvisitorid = MooGetGPC('delvisitorid', 'array');
    //note 删除提交的数据
    if ($delvisitor && count($delvisitorid)) {
        for ($i = 0; $i < count($delvisitorid); $i++) {
            $result = $_MooClass['MooMySQL']->getOne("SELECT `who_del` FROM `" . $dbTablePre . "service_visitor` WHERE `vid`=" . $delvisitorid[$i], true);
            if ($result['who_del'] != 0) {
                $_MooClass['MooMySQL']->query("DELETE FROM {$dbTablePre}service_visitor WHERE vid = '{$delvisitorid[$i]}'");
            } else {
                $_MooClass['MooMySQL']->query("UPDATE `" . $dbTablePre . "service_visitor` SET `who_del`=2 WHERE `vid`=" . $delvisitorid[$i]);
            }
        }
        MooMessage("删除成功", 'index.php?n=service&h=mindme', '05');
    }
    //note 如果提交的数据不存在,或者是提交的时候没有选中
    if ($delvisitor && !count($delvisitorid)) {
        MooMessage('请选择要删除选项', 'index.php?n=service&h=mindme', '01');
        exit;
    }
    //note 获得当前url
    $currenturl = 'http://' . $_SERVER['SERVER_NAME'] . ':' . $_SERVER["SERVER_PORT"] . $_SERVER["REQUEST_URI"];
    $currenturl2 = preg_replace("/(&page=\\d+)/", "", $currenturl);
    //note 获得第几页
    $page = empty($_GET['page']) ? '1' : $_GET['page'];
    //note limit查询开始位置
    $start = ($page - 1) * $pagesize;
    //note 多少个人访问统计总数
    $ret_c = $_MooClass['MooMySQL']->getOne("SELECT count(*) as c FROM {$dbTablePre}service_visitor WHERE uid >0 and visitorid = '{$userid}' AND who_del !=2");
    $total = $ret_c['c'];
    if ($total > 200) {
        $total = 200;
    }
    //更改最近留意我的人最我显示200个
    $tomeArr = $_MooClass['MooMySQL']->getOne("SELECT count(*) FROM {$dbTablePre}service_visitor WHERE uid = '{$userid}' AND who_del !=1");
    $tome = $tomeArr['count(*)'];
    //note 查询出谁访问过我相关信息
    if ($total) {
        $results = $_MooClass['MooMySQL']->getAll("SELECT * FROM {$dbTablePre}service_visitor WHERE  uid >0 and visitorid = '{$userid}' AND who_del !=2 order by visitortime desc LIMIT {$start},{$pagesize}");
        $visitors = array();
        foreach ($results as $k => $v) {
            $send_user1 = array();
            $send_user2 = array();
            $vistor = array();
            $send_user1 = leer_send_user1($v['uid']);
            $send_user2 = leer_send_user2($v['uid']);
            $vistor['l'] = $v;
            $vistor['l']['visitortime'] = $vistor['l']['visitortime'] ? $vistor['l']['visitortime'] : time();
            $vistor['s'] = $send_user1;
            $vistor['t'] = $send_user2;
            $visitors[$k] = $vistor;
        }
    }
    require MooTemplate('public/service_visitor_latestvisitor', 'module');
}
Exemplo n.º 20
0
Arquivo: ajax.php Projeto: noikiy/zays
function reg_text()
{
    $vals = MooGetGPC('vals', 'integer', 'G');
    include MooTemplate('public/reg_text', 'module');
}
Exemplo n.º 21
0
function whoaddme()
{
    global $_MooClass, $dbTablePre, $userid, $pagesize, $user_arr;
    $pagesize = 4;
    //note 获得当前url
    $currenturl = 'http://' . $_SERVER['SERVER_NAME'] . ':' . $_SERVER["SERVER_PORT"] . $_SERVER["REQUEST_URI"];
    $currenturl2 = preg_replace("/(&page=\\d+)/", "", $currenturl);
    $currenturl2 = preg_replace("/7651/", "7652", $currenturl2);
    //note 获得第几页
    $page = max(1, intval($_GET['page']));
    //note limit查询开始位置
    $start = ($page - 1) * $pagesize;
    //note 查出谁加我为意中人的总数
    $ret_count = $_MooClass['MooMySQL']->getOne("SELECT count(*) as c FROM {$dbTablePre}service_friend WHERE friendid = '{$userid}'", true);
    $total = $ret_count['c'];
    $total2Arr = $_MooClass['MooMySQL']->getOne("SELECT count(*) FROM {$dbTablePre}service_friend WHERE uid = '{$userid}'");
    $total2 = $total2Arr['count(*)'];
    //note
    if ($total) {
        $friend = $_MooClass['MooMySQL']->getAll("SELECT * FROM {$dbTablePre}service_friend WHERE friendid = '{$userid}' order by sendtime desc LIMIT {$start},{$pagesize}");
    }
    require MooTemplate('public/service_friend_whoaddmylist', 'module');
}
Exemplo n.º 22
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');
    }
}
Exemplo n.º 23
0
function allmessage_detail($contentid)
{
    global $_MooClass, $dbTablePre, $userid, $user_arr;
    //note 获得上一封,下一封邮件
    //	$allmessg_arr = $_MooClass['MooMySQL']->getAll("SELECT s_id FROM {$dbTablePre}services WHERE s_uid = '$userid' and flag = '1' and s_uid_del='0' order by s_time desc");
    //
    //	$total = count($allmessg_arr);
    //	foreach($allmessg_arr as $k => $v) {
    //		if($allmessg_arr[$k]['s_id'] == $contentid) {
    //			$up = ($k - 1) <= 0 ? '0' : ($k - 1);
    //			$next = ($k + 1) >= $total ? ($total- 1) : ($k+1);
    //			$upid = $allmessg_arr[$up]['s_id'];
    //			$nextid = $allmessg_arr[$next]['s_id'];
    //			//地址栏参数是否正确
    //			$flg = true;
    //		}
    //	}
    //	echo $upid,'$',$nextid,'$',$contentid;
    //exit;
    //重新实现上一封,下一封邮件
    $allmessg_arr = $_MooClass['MooMySQL']->getOne("SELECT s_id,s_time FROM {$dbTablePre}services WHERE s_uid = '{$userid}' and flag = '1' and s_uid_del='0' and s_id={$contentid}");
    if ($allmessg_arr) {
        $where = "s_uid = '{$userid}' and flag = '1' and s_uid_del='0'";
        list($upid, $nextid) = getUpNextId($allmessg_arr['s_id'], $where, $allmessg_arr['s_time']);
        $flg = true;
    }
    //地址栏参数是否正确
    if (!$flg) {
        MooMessage('您浏览的不是您的邮件,返回', 'javascript:history.go(-1)', '04');
    }
    //note 删除记录
    $delmessagecontent = MooGetGPC('delmessagecontent', 'string');
    $messageid = MooGetGPC('messageid', 'integer');
    if ($delmessagecontent && $messageid) {
        $time = time();
        //$_MooClass['MooMySQL']->query("DELETE FROM {$dbTablePre}services WHERE s_id = '$messageid' and s_uid = '$userid'");
        $_MooClass['MooMySQL']->query("update {$dbTablePre}services set s_uid_del='1',s_uid_deltime = '{$time}' WHERE s_id = '{$messageid}' and s_uid = '{$userid}'");
        MooMessage("删除消息成功", 'index.php?n=service&h=message&t=allmessage', '05');
    }
    //note 显示查询的内容
    $memail = $_MooClass['MooMySQL']->getOne("SELECT * FROM {$dbTablePre}services WHERE s_id = '{$contentid}' and flag = '1' and s_uid_del='0'");
    //如果是本站注册会员
    if ($user_arr['usertype'] == 1 && $memail['s_cid'] != 3) {
        $m_level = get_userrank($userid);
        //会员等级
        if ($m_level != 1) {
            //不是高级会员
            if ($user_arr['gender'] == 0) {
                //男性
                if (!checkIsMobileCertical($userid)) {
                    //没有通过了手机验证
                    MooMessage('您只有先通过手机短信验证才能读取电子邮件,现在就去认证吧', 'index.php?n=myaccount&h=index2', '03');
                } else {
                    if (!checkIsOver($userid)) {
                        //过了试用期
                        $sql = "select count(*) as c from " . $dbTablePre . "services where s_status = '1'  and s_uid = " . $userid . " and read_time = '" . date("Y-m-d") . "'";
                        $arr = $_MooClass['MooMySQL']->getOne($sql, true);
                        $today_read_count = $arr['c'];
                        if ($today_read_count > 5) {
                            MooMessage('对不起,您不是钻石或高级会员,每天只可以看5条电子邮件!', 'javascript:history.go(-1)', '03');
                        }
                    }
                }
            } else {
                //女性
                if (!checkIsOver($userid)) {
                    //过了试用期
                    if (!checkIsMobileCertical($userid)) {
                        //没有通过了手机验证
                        MooMessage('您只有先通过手机短信验证才能读取电子邮件,现在就去认证吧', 'index.php?n=myaccount&h=index2', '03');
                    }
                }
            }
        }
    }
    //note 更新已经阅读状态
    if (!$memail['s_status']) {
        $_MooClass['MooMySQL']->query("UPDATE {$dbTablePre}services SET s_status = '1',read_time='" . date('Y-m-d') . "' WHERE s_id = '{$contentid}'");
    }
    //note 发件人的昵称或ID
    if ($memail['s_fromid'] == 0) {
        $fromname = '真爱一生网';
        //note 当前会员昵称
        $uname = $user_arr['nickname'] ? $user_arr['nickname'] : 'ID:' . $user_arr['uid'];
    } else {
        $from_name = $_MooClass['MooMySQL']->getOne("select uid,nickname from {$dbTablePre}members_search where uid='" . $memail['s_fromid'] . "'");
        $fromname = $from_name['nickname'] ? $from_name['nickname'] : 'ID ' . $from_name['uid'];
        $uname = $user_arr['nickname'] ? $user_arr['nickname'] : 'ID:' . $user_arr['uid'];
    }
    require MooTemplate('public/service_email_allmessagecontent', 'module');
}
Exemplo n.º 24
0
function lovestyle_btyanalysis()
{
    $type = 'bty';
    $typenum = isset($_GET['type']) ? trim(MooGetGPC('type', 'integer', 'G')) : '1';
    $tag = isset($_GET['btytag']) ? (int) $_GET['btytag'] : 1;
    if ($typenum < 1 || $typenum > 4) {
        $typenum = 1;
    }
    if ($tag < 1 || $tag > 3) {
        $tag = 1;
    }
    include MooTemplate('public/lovestyle_bty' . $typenum . '_0' . $tag, 'module');
}
Exemplo n.º 25
0
function getmyleers()
{
    global $_MooClass, $dbTablePre, $userid, $pagesize, $user_arr;
    //note 处理回复秋波
    $repeatleer = MooGetGPC('repeatleer', 'string');
    $repeatleerid = MooGetGPC('repeatleerid', 'integer');
    if ($repeatleer && $repeatleerid) {
        $_MooClass['MooMySQL']->query("UPDATE {$dbTablePre}service_leer SET stat = '{$repeatleer}' WHERE senduid = '{$repeatleerid}' AND receiveuid = '{$userid}'");
        header("location:index.php?n=service&h=leer");
    }
    //note 处理委婉拒绝秋波
    $refuseleer = MooGetGPC('refuseleer', 'string');
    $refuseleerid = MooGetGPC('refuseleerid', 'integer');
    if ($refuseleer && $refuseleerid) {
        $_MooClass['MooMySQL']->query("UPDATE {$dbTablePre}service_leer SET stat = '2' WHERE senduid = '{$refuseleerid}' AND receiveuid = '{$userid}'");
        header("location:index.php?n=service&h=leer");
    }
    //note 获取删除提交的变量
    $delleer = MooGetGPC('delleer', 'string');
    $delleerid = MooGetGPC('delleerid', 'array');
    //note 删除提交的数据
    if ($delleer && count($delleerid)) {
        $time = time();
        foreach ($delleerid as $v) {
            //$_MooClass['MooMySQL']->query("DELETE FROM {$dbTablePre}service_leer WHERE lid = '$v'");
            $_MooClass['MooMySQL']->query("UPDATE {$dbTablePre}service_leer SET receive_del=1,receive_deltime='{$time}',receivenum = '0' WHERE lid = '{$v}'");
        }
        MooMessage("秋波删除成功", 'index.php?n=service&h=leer');
    }
    //note 如果提交的数据不存在,或者是提交的时候没有选中
    if ($delleer && !count($delleerid)) {
        MooMessage('请选择要删除的秋波', 'index.php?n=service&h=leer', '01');
        exit;
    }
    //分页
    $page_per = 4;
    $page_url = 'http://' . $_SERVER['SERVER_NAME'] . ':' . $_SERVER["SERVER_PORT"] . $_SERVER["REQUEST_URI"];
    $page_url = preg_replace("/(&page=\\d+)/", "", $page_url);
    $page_now = MooGetGPC('page', 'integer', 'G');
    $temp = $_MooClass['MooMySQL']->getOne("select count(1) as num FROM {$dbTablePre}service_leer WHERE receiveuid  = '{$userid}' and receive_del=0");
    $item_num = $temp['num'];
    $page_num = ceil($item_num / $page_per);
    if ($page_now > $page_num) {
        $page_now = $page_num;
    }
    if ($page_now < 1) {
        $page_now = 1;
    }
    //读数据
    $start = ($page_now - 1) * $page_per;
    $leer = $_MooClass['MooMySQL']->getAll("SELECT * FROM {$dbTablePre}service_leer WHERE receiveuid = '{$userid}' and receive_del=0  ORDER BY receivetime desc LIMIT {$start},{$page_per}");
    //note 已收到的总数
    $temp = $_MooClass['MooMySQL']->getOne("SELECT sum(case when receivenum>=1 then 1 else 0 end) as num FROM {$dbTablePre}service_leer WHERE receiveuid = '{$userid}' and receive_del=0");
    $receive_num = empty($temp['num']) ? 0 : $temp['num'];
    //note 已发送的总数
    $temp = $_MooClass['MooMySQL']->getOne("SELECT sum(case when num>=1 then 1 else 0 end) as num FROM {$dbTablePre}service_leer WHERE senduid = '{$userid}' AND send_del = 0 AND is_server=0");
    $send_num = empty($temp['num']) ? 0 : $temp['num'];
    require MooTemplate('public/service_leer_getmyleers', 'module');
}
Exemplo n.º 26
0
}
?>
                    </div>

                </div>



            </div>
            <?php 
include MooTemplate('public/space_leftmenu_new', 'module');
?>
            <div class="clear"></div>
            <!--content end-->
            <?php 
include MooTemplate('system/footer_profile', 'public');
?>
        </div><!--main end-->

        <script type="text/javascript" src="module/payment/templates/default/js/scrollDoor.js?v=1.0"></script>
        <script type="text/javascript">
            window.onload = function(){var SDmodel = new scrollDoor();SDmodel.sd(["vf_01","vf_02","vf_03","vf_04"],["vf_01_","vf_02_","vf_03_","vf_04_"],"t01","t02");}
            $('.wrapper li a').on('click',function(){var uid=<?php 
echo $GLOBALS['MooUid'];
?>
;if(!uid){openLogin();return false;}});
            $('.preview').on('click',function(){var skiname=$(this).attr('data-skin');window.location.href='space_'+skiname+'.html';})
            var url="<?php 
echo $url;
?>
";
Exemplo n.º 27
0
?>
			</div>
			<div class="clear"></div>
			</div>
			</form>
			<div class="r-center-bottom">
			</div>
			<div class="clear"></div>
		</div>
	</div>
	<div class="clear"></div>
	</div>
	
	<!--content end-->
	<?php 
include MooTemplate('system/footer', 'public');
?>
<!--foot end-->
</div><!--main end-->
</body>
</html>
<script language="javascript" type="text/javascript">

// 删除全选功能
function checkAll(chk){  
	var checkboxes = document.getElementsByName("id[]");
	for(j=0; j < checkboxes.length; j++) {
		checkboxes[j].checked = chk.checked;
	}
}
Exemplo n.º 28
0
function whoaddme()
{
    global $_MooClass, $dbTablePre, $userid, $pagesize, $user_arr;
    //note 获取删除提交的变量
    $delfriend = MooGetGPC('delfriend', 'string', 'P');
    $delfriendid = MooGetGPC('delfriendid', 'array', 'P');
    //note 删除提交的数据
    if ($delfriend) {
        $ids = implode(',', $delfriendid);
        //foreach($delfriendid as $v) {
        $_MooClass['MooMySQL']->query("DELETE FROM {$dbTablePre}service_friend WHERE fid  in  ({$ids})");
        //}
        MooMessage("删除意中人成功", 'index.php?n=service&h=liker', '05');
    }
    $pagesize = 4;
    //note 获得当前url
    $currenturl = 'http://' . $_SERVER['SERVER_NAME'] . ':' . $_SERVER["SERVER_PORT"] . $_SERVER["REQUEST_URI"];
    $currenturl2 = preg_replace("/(&page=\\d+)/", "", $currenturl);
    //note 获得第几页
    $page = empty($_GET['page']) ? 1 : $_GET['page'];
    //note limit查询开始位置
    $start = ($page - 1) * $pagesize;
    //note 查出谁加我为意中人的总数
    $ret_count = $_MooClass['MooMySQL']->getOne("SELECT count(*) as c FROM {$dbTablePre}service_friend WHERE friendid = '{$userid}'");
    $total = $ret_count['c'];
    $total2Arr = $_MooClass['MooMySQL']->getOne("SELECT count(*) FROM {$dbTablePre}service_friend WHERE uid = '{$userid}'");
    $total2 = $total2Arr['count(*)'];
    //note
    if ($total) {
        $results = $_MooClass['MooMySQL']->getAll("SELECT * FROM {$dbTablePre}service_friend WHERE friendid = '{$userid}' order by sendtime desc LIMIT {$start},{$pagesize}");
        $friends = array();
        foreach ($results as $k => $v) {
            $send_user1 = array();
            $send_user2 = array();
            $friend = array();
            $send_user1 = leer_send_user1($v['uid']);
            $send_user2 = leer_send_user2($v['uid']);
            $friend['l'] = $v;
            $friend['s'] = $send_user1;
            $friend['t'] = $send_user2;
            $friends[$k] = $friend;
        }
    }
    require MooTemplate('public/service_friend_whoaddmylist', 'module');
}
Exemplo n.º 29
0
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>真爱一生网 - 城市之星服务</title>
<?php 
include MooTemplate('system/js_css', 'public');
?>
<style type="text/css">
.g{color:#999;margin-top:5px;font-size:12px}
.g a{color:#999;text-decoration:none}
dl{padding-top:10px}
</style>
</head>

<body>
<div style="width:982px; height:auto;margin:5px auto;">
    <!-- <div style="height:1479px; background:url(module/activity/templates/default/images/citystar.jpg) no-repeat;"></div> -->
	<img src="module/payment/templates/default/images/citystar.jpg" border="0" usemap="#Map" />
		<map name="Map" id="Map">
	    <area shape="rect" coords="703,348,924,390" href="index.php?n=payment&amp;h=city_star" target="_blank" />
        <area shape="rect" coords="381,1285,601,1327" href="index.php?n=payment&amp;h=city_star" target="_blank" />
	</map>
	
    <!-- <div style="height:573px; background:url(module/activity/templates/default/images/Sanniversary_01.jpg) no-repeat;"></div>
	 
    <div style="height:573px; background:url(module/activity/templates/default/images/Sanniversary_01.jpg) no-repeat;"></div>
	<div style="background:url(module/activity/templates/default/images/Sanniversary_02.jpg); height:559px;"></div>
	<div style="background:url(module/activity/templates/default/images/Sanniversary_03.jpg); height:594px;"></div>
	
  
Exemplo n.º 30
0
function advance_search($gender, $age_begin, $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, $body, $animalyear, $constellation, $bloodtype, $religion, $family, $language, $photo, $email, $searchsign)
{
    global $_MooClass, $dbTablePre;
    global $user_arr;
    // 包含配置文件
    require_once "crontab_config.php";
    //note 获得当前的url 去除多余的参数page=
    $currenturl = 'http://' . $_SERVER['SERVER_NAME'] . ':' . $_SERVER["SERVER_PORT"] . $_SERVER["REQUEST_URI"];
    $currenturl2 = preg_replace("/(&page=\\d+)/", "", $currenturl);
    $condition_str = "";
    /* 以下分页参数设置 */
    $pagesize = 16;
    //note limit查询开始位置
    $start = 0;
    $index = 'members_man';
    //索引 sphinx
    $filter = array();
    //过滤条件 sphinx
    if ($gender == 1) {
        $condition_str .= "女性";
        $index = 'members_women';
    } elseif ($gender == 0) {
        $condition_str .= "男性";
    }
    //note 查询是否显示照片
    if ($photo == '1') {
        $condition_str .= " 必须要照片";
        //$photo_sql = " AND `pic_name` != ''";
        $filter[] = array('images_ischeck', 1);
    }
    //note 转换成实际的年份
    if ($age_end) {
        $age_begin1 = gmdate('Y', time()) - intval($age_end);
    }
    if ($age_begin) {
        $age_end1 = gmdate('Y', time()) - intval($age_begin);
    }
    //note 年龄条件查询sql语句
    //$age_sql = '';
    if ($age_begin1 && $age_end1) {
        //$age_sql = ' AND (s.birthyear >= '.$age_begin1.' AND s.birthyear <= '.$age_end1.')';
        $filter[] = array('birthyear', array($age_begin1, $age_end1));
        $condition_str .= " 年龄" . $age_begin . "到" . $age_end . "岁";
    } else {
        if ($age_begin1 && empty($age_end1)) {
            //$age_sql = ' AND s.birthyear >= '.$age_begin;
            $filter[] = array('birthyear', array($age_begin, $age_begin + 99));
            $condition_str .= " 年龄大于等于" . $age_begin . "岁";
        } else {
            if ($age_end1 && empty($age_begin1)) {
                //$age_sql = ' AND s.birthyear <= '.$age_end;
                $filter[] = array('birthyear', array($age_end1 - 99, $age_end1));
                $condition_str .= " 年龄小于等于" . $age_end . "岁";
            }
        }
    }
    //note 地区条件查询sql语句
    /*
            $area_sql = '';
            $area_sql = ' AND s.province = '.$work_province.' AND s.city = '.$work_city;
            if($work_city == '-1' && $work_province != '-1')
            $area_sql = ' AND province = '.$work_province;
            
            if($work_province == '-1' && $work_city == '-1')
             $area_sql = '';
    if($work_province=="-1"){
     $area_sql = '';
    }
    */
    if ($work_province != '-1' && $work_province != 0) {
        $condition_str .= " 所在地区:" . $provice_list[$work_province];
        if ($work_province == '-2') {
            $work_province = 2;
        }
        $filter[] = array('province', $work_province);
        if ($work_city != '-1' && $work_city != 0) {
            $filter[] = array('city', $work_city);
            $condition_str .= " " . $city_list[$work_city];
        }
    }
    //note 婚姻状况条件查询sql语句
    if ($marriage != 0 && $marriage != '-1' && is_array($marriage)) {
        $marr_str = " 婚烟状况:";
        //$marriage_sql =" and  s.marriage in(";
        $marr_sql = array();
        foreach ($marriage as $v) {
            $marr_str .= $marriage_list[$v] . " ";
            $marr_sql[] = $v;
        }
        /*
        			if($marr_sql){
        			  $marr_sql=join(",",$marr_sql);
        			}*/
        $filter[] = array('marriage', implode(' | ', $marr_sql));
        //$marriage_sql.=$marr_sql.")";
        $condition_str .= $marr_str;
    }
    //note 月收入条件查询sql语句
    if ($salary != 0 && $salary != '-1' && is_array($salary)) {
        $salary_str = " 月收入:";
        //$salary_sql = " and s.salary in(";
        $sal_sql = array();
        foreach ($salary as $v) {
            $salary_str .= $salary_list[$v];
            $sal_sql[] = $v;
        }
        /*if($sal_sql){
        		  $sal_sql=join(",",$sal_sql);
        		}	
        		$salary_sql.=$sal_sql.")";*/
        $filter[] = array('salary', implode(' | ', $sal_sql));
        $condition_str .= $salary_str;
    }
    //if($salary == '-1') $salary_sql = '';
    //$condition_str .= $salary_str;
    //note 教育程度条件查询sql语句
    if ($education != '0' && $education != '-1' && is_array($education)) {
        $education_str = " 教育程度:";
        //$education_sql = " and  s.education in(";
        $e_sql = array();
        foreach ($education as $v) {
            $education_str .= $education_list[$v];
            $e_sql[] = $v;
        }
        /*if($e_sql){
        		  $e_sql=join(",",$e_sql);
        		}
        		$education_sql.=$e_sql.")";*/
        $filter[] = array('education', implode(' | ', $e_sql));
        $condition_str .= $education_str;
    }
    //if($education == '-1') $education_sql = '';
    //note 身高条件查询sql语句
    //$height_sql = '';
    $height1 = $height1 != 0 && $height1 != '-1' ? $height1 : 0;
    $height2 = $height2 != 0 && $height2 != '-1' ? $height2 : 0;
    if ($height1 || $height1) {
        if ($height1 && $height2 && $height2 > $height1) {
            //$height_sql = ' AND (s.height >= '.$height1.' AND s.height <= '.$height2.')';
            $filter[] = array('height', array($height1, $height2));
            $condition_str .= " 身高" . $height1 . "cm到" . $height2 . "cm";
        } else {
            if ($height1 && $height2 && $height2 < $height1) {
                //$height_sql = ' AND (s.height <= '.$height1.' AND s.height >= '.$height2.')';
                $filter[] = array('height', array($height2, $height1));
                $condition_str .= " 身高" . $height2 . "cm到" . $height1 . "cm";
            } else {
                if ($height1 && !$height2) {
                    //$height_sql = ' AND s.height >= '.$height1;
                    $filter[] = array('height', array($height1, $height1 + 200));
                    $condition_str .= " 身高大于等于" . $height1 . "cm";
                } else {
                    if ($height2 && !$height1) {
                        //$height_sql = ' AND s.height <='.$height2;
                        $filter[] = array('height', array(0, $height2));
                        $condition_str .= " 身高小于等于" . $height2 . "cm";
                    } else {
                        if ($height1 && $height2 && $height1 == $height2) {
                            //$height_sql = ' AND s.height ='.$height1;
                            $filter[] = array('height', $height1);
                            $condition_str .= " 身高等于" . $height1 . "cm";
                        }
                    }
                }
            }
        }
    }
    /*else if($height2 =='-1' && $height1 == '-1') {
      	$height_sql = '';
      }
      */
    //note 体重条件查询sql语句
    //$weight_sql = '';
    $weight1 = $weight1 != 0 && $weight1 != '-1' ? $weight1 : 0;
    $weight2 = $weight2 != 0 && $weight2 != '-1' ? $weight2 : 0;
    if ($weight1 && $weight2) {
        if ($weight1 && $weight2 && $weight2 > $weight1) {
            //$weight_sql = ' AND (sf.weight >= '.$weight1.' AND sf.weight <= '.$weight2.')';
            $filter[] = array('weight', array($weight1, $weight2));
            $condition_str .= " 体重" . $weight1 . "kg到" . $weight2 . "kg";
        } else {
            if ($weight1 && $weight2 && $weight2 < $weight1) {
                //$weight_sql = ' AND (sf.weight <= '.$weight1.' AND sf.weight >= '.$weight2.')';
                $filter[] = array('weight', array($weight2, $weight1));
                $condition_str .= " 体重" . $weight2 . "kg到" . $weight1 . "kg";
            } else {
                if ($weight1 && !$weight2) {
                    //$weight_sql = ' AND sf.weight >= '.$weight1;
                    $filter[] = array('weight', array($weight1, $weight1 + 80));
                    $condition_str .= " 体重大于等于" . $weight1 . "kg";
                } else {
                    if ($weight2 && !$weight1) {
                        //$weight_sql = ' AND sf.weight <='.$weight2;
                        $filter[] = array('weight', array(0, $weight2));
                        $condition_str .= " 体重小于等于" . $weight2 . "kg";
                    } else {
                        if ($weight1 && $weight2 && $weight1 == $weight2) {
                            //$weight_sql = ' AND sf.weight ='.$weight1;
                            $filter[] = array('weight', $weight1);
                            $condition_str .= " 体重等于" . $weight1 . "kg";
                        }
                    }
                }
            }
        }
    }
    /*else if($weight2 =='-1' && $weight1 == '-1') {
      	$weight_sql = '';
      }*/
    //note 是否抽烟查询sql语句
    if ($smoking != 0 && $smoking != '-1' && $smoking != '-2' && is_array($smoking)) {
        $smoking_str = " 抽烟要求:";
        //$smoking_sql = " and sf.smoking in(";
        $smok_sql = array();
        foreach ($smoking as $v) {
            $smoking_str .= $smoking_list[$v];
            $smok_sql[] = $v;
        }
        /*if($smok_sql){
        		    $smok_sql=join(",",$smok_sql);
        		}
        		$smoking_sql.= $smok_sql.")";*/
        $filter[] = array('smoking', implode(' | ', $smok_sql));
        $condition_str .= $smoking_str;
    }
    //if($smoking == '-1' || $smoking == '-2') $smoking_sql = '';
    //note 是否喝酒查询sql语句
    if ($drinking != 0 && $drinking != '-1' && $drinking != '-2' && is_array($drinking)) {
        $drinking_str = " 喝酒要求:";
        //$drinking_sql = " and sf.drinking in(";
        $drink_sql = array();
        foreach ($drinking as $v) {
            $drinking_str .= $drinking_list[$v] . " ";
            $drink_sql[] = $v;
        }
        $filter[] = array('drinking', implode(' | ', $drink_sql));
        /*	if($drink_sql){
        			  $drink_sql=join(",",$drink_sql);
        			 
        			}
        			$drinking_sql.=$drink_sql.")";*/
        $condition_str .= $drinking_str;
    }
    //
    //if($drinking == '-1' || $drinking == '-2') $drinking_sql = '';
    //note 从事职业查询sql语句
    if ($occupation != 0 && $occupation != '-1' && $occupation != '-2' && is_array($occupation)) {
        $occupation_str = " 从事行业要求:";
        //$occupation_sql = " and sf.occupation in( ";
        $oc_sql = array();
        foreach ($occupation as $v) {
            $occupation_str .= $drinking_list[$v] . " ";
            $oc_sql[] = $v;
        }
        /*if($oc_sql){
        		    $oc_sql=join(",",$oc_sql);
        		} 
        		$occupation_sql.=$oc_sql.")";
        		*/
        $filter[] = array('occupation', implode(' | ', $oc_sql));
        $condition_str .= $occupation_str;
    }
    //if($occupation == '-1' || $occupation == '-2')  $occupation_sql= '';
    //note 住房情况查询sql语句
    if ($house != 0 && $house != '-1' && $house != '-2' && is_array($house)) {
        $house_str = " 住房情况:";
        //$house_sql = "  and s.house in( ";
        $ho_sql = array();
        foreach ($house as $v) {
            $house_str .= $house_list[$v] . " ";
            $ho_sql[] = $v;
        }
        /*if($ho_sql){
        		  $ho_sql=join(",",$ho_sql);
        		}
        		$house_sql.=$ho_sql.")";*/
        $filter[] = array('house', implode(' | ', $ho_sql));
        $condition_str .= $house_str;
    }
    // if($house == '-1' || $house == '-2') $house_sql = '';
    //note 购车查询sql语句
    if ($vehicle != 0 && $vehicle != '-1' && $vehicle != '-2' && is_array($vehicle)) {
        $vehicle_str = " 购车情况:";
        //$vehicle_sql =" and sf.vehicle in(";
        $ve_sql = array();
        foreach ($vehicle as $v) {
            $vehicle_str .= $vehicle_list[$v] . " ";
            $ve_sql[] = $v;
        }
        /*if($ve_sql){
        		  $ve_sql=join(",",$ve_sql);
        		}
        		$vehicle_sql.=$ve_sql.")";*/
        $filter[] = array('vehicle', implode(' | ', $ve_sql));
        $condition_str .= $vehicle_str;
    }
    //if($vehicle == '-1' || $vehicle == '-2') $vehicle_sql = '';
    //note 公司类别sql语句
    if ($corptype != 0 && $corptype != '-1' && $corptype != '-2' && is_array($corptype)) {
        $corptype_str = " 公司类别:";
        //$corptype_sql = "  and sf.corptype in(";
        $co_sql = array();
        foreach ($corptype as $v) {
            $corptype_str .= $corptype_list[$v] . " ";
            $co_sql[] = $v;
        }
        /*if($co_sql){
        		    $co_sql=join(",",$co_sql);
        		}
        		$corptype_sql.=$co_sql." )";*/
        $filter[] = array('corptype', implode(' | ', $co_sql));
        $condition_str .= $corptype_str;
    }
    //if($corptype == '-1' || $corptype == '-2') $corptype_sql = '';
    //note 是否有孩子sql语句
    if ($children != 0 && $children != '-1' && $children != '-2' && is_array($children)) {
        $children_str = " 有无孩子:";
        //$children_sql = "  and  s.children in(";
        $chil_sql = array();
        foreach ($children as $v) {
            $children_str .= $children_list[$v] . " ";
            $chil_sql[] = $v;
        }
        /*if($chil_sql){
        		  $chil_sql=join(",",$chil_sql);
        		}
        		$children_sql.=$chil_sql.")";*/
        $filter[] = array('children', implode(' | ', $chil_sql));
        $condition_str .= $children_str;
    }
    //if($children == '-1' || $children == '-2') $children_sql = '';
    //note 是否要孩子sql语句
    if ($wantchildren != 0 && $wantchildren != '-1' && $wantchildren != '-2' && is_array($wantchildren)) {
        $wantchildren_str = " 可要孩子:";
        //$wantchildren_sql = "  and sf.wantchildren in(";
        $wan_sql = array();
        foreach ($wantchildren as $v) {
            $wantchildren_str .= $wantchildren_list[$v] . " ";
            $wan_sql[] = $v;
        }
        /*if($wan_sql){
        		  $wan_sql=join(",",$wan_sql);
        		}
        		$wantchildren_sql.=$wan_sql.")";*/
        $filter[] = array('wantchildren', implode(' | ', $wan_sql));
        $condition_str .= $wantchildren_str;
    }
    // if($wantchildren == '-1' || $wantchildren == '-2') $wantchildren_sql = '';
    //note 籍贯查询sql语句
    /* $hometown_sql = '';
       $hometown_sql = ' AND sf.hometownprovince = '.$home_townprovince.' AND sf.hometowncity = '.$home_towncity;
       if($home_towncity == '-1' && $home_townprovince !='-1') {
       	$hometown_sql = ' AND sf.hometownprovince = '.$home_townprovince;
       }
       if($home_townprovince == '-1' && $home_townprovince == '-1') $hometown_sql = '';*/
    if ($home_townprovince != 0 && $home_townprovince != -1) {
        if ($home_townprovince == '-2') {
            $home_townprovince = 2;
        }
        $filter[] = array('home_townprovince', $home_townprovince);
        $condition_str .= " 籍贯:" . $city_list[$home_townprovince];
        if ($home_towncity != 0 && $home_towncity != -1) {
            $filter[] = array('home_towncity', $home_towncity);
            $condtion_str .= " " . $city_list[$home_towncity];
        }
    }
    //note 名族查询sql语句
    /*$nation_sql = '';
      $nation_sql = ' AND sf.nation = '.$nation;
      if($nation == '-1') $nation_sql = '';
      */
    if ($nation != -1) {
        $filter[] = array('nation', $nation);
        $condition_str .= " 民族:" . $stock_list[$nation];
    }
    //note 体型查询sql语句
    if ($body != 0 && $body != '-1' && $body != '-2' && is_array($body)) {
        $body_str = " 体型:";
        //$body_sql = " and sf.body in(";
        $body_list = $user_arr["gender"] == 0 ? $body1_list : $body0_list;
        $bo_sql = array();
        foreach ($body as $v) {
            /*if ($user_arr["gender"] == 0) {
            			$body_str .= $body1_list[$v] . " ";
            		} else {
            			$body_str .= $body0_list[$v] . " ";
            		}*/
            $body_str .= $body_list[$v];
            $bo_sql[] = $v;
        }
        /*if($bo_sql){
        		    $bo_sql=join(",",$bo_sql);
        		}
        		$body_sql.=$bo_sql.")";*/
        $filter[] = array('body', implode(' | ', $bo_sql));
        $condition_str .= $body_str;
    }
    //if($body == '-1' || $body == '-2') $body_sql = '';
    //note 生肖查询sql语句
    if ($animalyear != 0 && $animalyear != '-1' && $animalyear != '-2' && is_array($animalyear)) {
        $animalyear_str = " 生肖:";
        //$animalyear_sql = "  and sf.animalyear in(";
        $ani_sql = array();
        foreach ($animalyear as $v) {
            $animalyear_str .= $animals_list[$v] . " ";
            $ani_sql[] = $v;
        }
        /*if($ani_sql){
        		  $ani_sql=join(",",$ani_sql); 
        		}
        		  $animalyear_sql.=$ani_sql.")";*/
        $filter[] = array('animalyear', implode(' | ', $ani_sql));
        $condition_str .= $animalyear_str;
    }
    //if($animalyear == '-1' || $animalyear == '-2') $animalyear_sql = '';
    //note 星座查询sql语句
    if ($constellation != 0 && $constellation != '-1' && $constellation != '-2' && is_array($constellation)) {
        $constellation_str = " 星座:";
        //$constellation_sql = " and  sf.constellation in( ";
        $cons_sql = array();
        foreach ($constellation as $v) {
            $constellation_str .= $constellation_list[$v] . " ";
            $cons_sql[] = $v;
        }
        /*if($cons_sql){
        		  $cons_sql=join(",",$cons_sql);
        		}
        		$constellation_sql.=$cons_sql.")";*/
        $filter[] = array('constellation', implode(' | ', $cons_sql));
        $condition_str .= $constellation_str;
    }
    //if($constellation == '-1' || $constellation == '-2') $constellation_sql = '';
    //note 血型查询sql语句
    if ($bloodtype != 0 && $bloodtype != '-1' && $bloodtype != '-2' && is_array($bloodtype)) {
        $bloodtype_str = " 血型:";
        //$bloodtype_sql =" and sf.bloodtype in(";
        $bloo_sql = array();
        foreach ($bloodtype as $v) {
            $bloodtype_str .= $bloodtype_list[$v] . " ";
            $bloo_sql[] = $v;
        }
        /*if($bloo_sql){
        		  $bloo_sql=join(",",$bloo_sql); 
        		}
        		$bloodtype_sql.=$bloo_sql.")";*/
        $filter[] = array('bloodtype', implode(' | ', $bloo_sql));
        $condition_str .= $bloodtype_str;
    }
    //if($bloodtype == '-1' || $bloodtype == '-2') $bloodtype_sql = '';
    //note 信仰查询sql语句
    if ($religion != 0 && $religion != '-1' && $religion != '-2' && is_array($religion)) {
        $religion_str = " 信仰:";
        //$religion_sql = "  and  sf.religion in(";
        $reli_sql = array();
        foreach ($religion as $v) {
            $religion_str .= $belief_list[$v] . " ";
            $reli_sql[] = $v;
        }
        /*	if($reli_sql){
        			  $reli_sql=join(",",$reli_sql);
        			}
        			$religion_sql.=$reli_sql.")";*/
        $filter[] = array('religion', implode(' | ', $reli_sql));
        $condition_str .= $religion_str;
    }
    // if($religion == '-1' || $religion == '-2') $religion_sql = '';
    //note 兄弟姐妹sql语句
    if ($family != '0' && $family != '-1' && $family != '-2' && is_array($family)) {
        $family_str = " 兄弟姐妹:";
        //$family_sql = " and  sf.family in(";
        $fami_sql = array();
        foreach ($family as $v) {
            $family_str .= $family_list[$v];
            $fami_sql[] = $v;
        }
        /*if($fami_sql){
        		    $fami_sql=join(",",$fami_sql);
        		}
        		$family_sql.=$fami_sql.")";*/
        $filter[] = array('family', implode(' | ', $fami_sql));
        $condition_str .= $family_str;
    }
    //if($family == '-1' || $family == '-2')  $family_sql = '';
    //note 语言能力sql语句,采用like查询
    $language_sql = "";
    if (is_array($language)) {
        $language_str = " 语言能力:";
        //$language_sql = " and(";
        //$lan_sql = "";
        $lan_sql = array();
        foreach ($language as $v) {
            $language_str .= $language_list[$v] . " ";
            $lan_sql[] = $v;
            /*if (empty($lan_sql)) {
            			$lan_sql .= " FIND_IN_SET('" . $v . "'," . "sf.language)";
            		} else {
            			$lan_sql .= " or FIND_IN_SET('" . $v . "'," . "sf.language)";
            		}*/
        }
        $filter[] = array('language', implode(' | ', $lan_sql));
        //$language_sql .= $lan_sql . ")";
        $condition_str .= $language_str;
    }
    //if($language == '-1' || $language == '-2') $language_sql = '';
    /*$sql = " on sf.uid=s.uid  where s.is_lock = 1 and s.gender='$gender' ".$age_sql.$area_sql.$marriage_sql.$salary_sql.$education_sql.$height_sql.$weight_sql.
    		$smoking_sql.$drinking_sql.$occupation_sql.$house_sql.$vehicle_sql.$corptype_sql.$children_sql.$wantchildren_sql.$hometown_sql.
    		$nation_sql.$body_sql.$animalyear_sql.$constellation_sql.$bloodtype_sql.$religion_sql.$family_sql.$language_sql.$photo_sql;*/
    $filter[] = array('is_lock', 1);
    $limit = array(16);
    $sp = searchApi($index);
    $sp->getResultOfReset($filter, $limit);
    $user_ids = $sp->getIds();
    //$user = $_MooClass['MooMySQL']->getAll("select s.*,sf.body, sf.hometownprovince, sf.hometowncity from `{$dbTablePre}members` s left join `{$dbTablePre}memberfield` sf $sql LIMIT 0, 16");
    //note 找不到匹配的结果返回单独提示页面
    if (count($user_ids) == '0') {
        return;
    }
    $sql = "select s.uid,s.nickname,s.birthyear,s.height,s.hometownprovince,s.hometowncity,b.pic_date,b.pic_name from `{$dbTablePre}members_search` s left join `{$dbTablePre}members_base` b on s.uid=b.uid where s.uid in (" . implode(',', $user_ids) . ")";
    $user = $_MooClass['MooMySQL']->getAll($sql);
    $recommend_member = $user[0];
    $recommend_member_href = '<a href="http://' . MOOPHP_HOST . '/index.php?n=space&h=viewpro&uid=' . $recommend_member["uid"] . '" style="color:#bd0000; text-decoration:underline" target="_blank">';
    if (!empty($recommend_member["nickname"])) {
        $recommend_member_href .= htmlspecialchars(MooCutstr($recommend_member["nickname"], 10));
    } else {
        $recommend_member_href .= htmlspecialchars($recommend_member["uid"]);
    }
    $recommend_member_href .= "</a>";
    $sql = "select introduce from " . $dbTablePre . "members_introduce where uid = '" . $recommend_member["uid"] . "'";
    $choice = $_MooClass['MooMySQL']->getOne($sql, true);
    ob_start();
    include MooTemplate('public/crontab_index', 'module');
    $content = ob_get_clean();
    //error_log($content, 0);
    //echo $email;
    $return = MooSendMail($email, "真爱一生网推荐会员", $content, "", false, $user_arr['uid']);
}