示例#1
0
文件: login.php 项目: noikiy/zays
function login_index()
{
    global $memcached;
    $seccode = md5(uniqid(rand(), true));
    MooSetCookie('seccode', $seccode, time() + 3600, '');
    $session_seccode = $memcached->set($seccode, '', 0, 300);
    require adminTemplate("login_index");
}
示例#2
0
文件: index.php 项目: noikiy/zays
function lovestyle_interest()
{
    global $userid, $tc_id, $_MooCookie, $hntest_cache;
    $sql = "SELECT COUNT(*) AS c FROM {$GLOBALS['dbTablePre']}test_vote \n\t\tWHERE `uid`='{$userid}' AND `tc_id`='{$tc_id}' ";
    $comp_num = $GLOBALS['_MooClass']['MooMySQL']->getOne($sql, true);
    $comp_num = $comp_num['c'];
    if (!isset($_MooCookie['test_index'])) {
        MooSetCookie('test_index', $comp_num);
        $_MooCookie['test_index'] = $comp_num;
    }
    $read_vote = 0;
    if ($_MooCookie['test_index'] >= 0 && $_MooCookie['test_index'] < $comp_num) {
        $comp_num = $_MooCookie['test_index'];
        $read_vote = 1;
    } else {
        MooSetCookie('test_index', $comp_num);
    }
    $sql = "SELECT * FROM {$GLOBALS['dbTablePre']}test_question \n\t\tWHERE `tc_id`='11' LIMIT {$comp_num},1 ";
    $question = $GLOBALS['_MooClass']['MooMySQL']->getOne($sql, true);
    if ($read_vote) {
        $sql = "SELECT `opt` FROM {$GLOBALS['dbTablePre']}test_vote \n\t\t\tWHERE `uid`='{$userid}' AND `qid`='{$question['qid']}' AND `tc_id`='{$tc_id}' LIMIT 1 ";
        $this_vote = $GLOBALS['_MooClass']['MooMySQL']->getOne($sql);
        $this_vote = $this_vote['opt'];
    }
    if ($question['show_type'] >= 3) {
        $scores_arr = explode(',', $question['str_scores']);
    }
    //print_r($question);
    /*
    	$sql = "SELECT COUNT(*) AS c FROM {$GLOBALS['dbTablePre']}test_question 
    		WHERE `tc_id`='{$tc_id}' ";
    	$temp = $GLOBALS['_MooClass']['MooMySQL']->getOne($sql);
    	$total = $temp['c'];
    */
    $total = $hntest_cache['count'][$tc_id];
    $percent = (int) ($comp_num / $total * 100);
    if ($percent >= 100) {
        MooSetCookie('test_index', -1);
        MooMessage("恭喜您的测试已完成", 'index.php?n=lovestyle&h=result&tcid=2');
    }
    switch ($question['show_type']) {
        case '3':
            $temp_style = '02';
            break;
        case '4':
            $temp_style = '01';
            break;
        case '0':
        case '1':
            $sql = "SELECT `op_id`,`option`,`scores` FROM {$GLOBALS['dbTablePre']}test_question_option \n\t\t\t\tWHERE `qid`={$question['qid']} ORDER BY `op_id` ASC";
            $options = $GLOBALS['_MooClass']['MooMySQL']->getAll($sql);
            $options_count = sizeof($options);
            $temp_style = $options_count == 2 ? '04' : '03';
            break;
    }
    include MooTemplate('public/lovestyle_interest', 'module');
}
示例#3
0
文件: index.php 项目: noikiy/zays
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');
}
示例#4
0
文件: ajax.php 项目: noikiy/zays
function getVcode()
{
    global $_MooCookie, $_MooClass, $dbTablePre;
    $rand = rand(1621, 9699);
    //MooSetCookie( "mobilevcode_",$rand );
    MooSetCookie("mobilevcode", md5(md5($rand)));
    $telphone = MooGetGPC('telphone', 'string', 'G');
    $time = time();
    $time_cookie = isset($_MooCookie['vtime']) ? $_MooCookie['vtime'] : 0;
    if ($time - $time_cookie >= 60) {
        MooSetCookie('vtime', $time, time() + 3600 * 24 * 8);
        //手机短信接口
        SendMsg($telphone, "您的短信验证码:" . $rand, 1);
    }
}
示例#5
0
文件: function.php 项目: noikiy/zays
/**
*来源获取(网站来源访问和推荐用户ID)
*@返回COOKIE值在注册的时候写入
*PHPYOU
*/
function MooGetFromwhere(){
    global $_MooCookie;
	$puid=$_MooCookie['puid'] ?$_MooCookie['puid'] :MooGetGPC('puid','integer','G');
	if($puid){
		MooSetCookie('puid', $puid, 24*3600);
	}
	$website=$_MooCookie['website']?$_MooCookie['website']:MooGetGPC('website','string','G');
	if($website){
		MooSetCookie('website', $puid, 24*3600);
	}
	if( isset($_GET['wf']) && isset($_GET['st']) ){
		MooSetCookie('where_from', "http://www.7651.com/virtual/?".$_SERVER['QUERY_STRING'], 24*3600);
		return;
	}
	if( preg_match("/\/virtual\//",$_MooCookie['where_from']) ) return;
	$rf_url = $_SERVER['HTTP_REFERER'];
	// 判断是否有外来页
	if (empty($rf_url)) {
		//error_log("rf error", 0);
		return false;
	}
	
	$rf_arr = parse_url($rf_url);
	$rf_hostname = $rf_arr["host"];
	$rf_path = $rf_ar["path"];
	
	//print_r($rf_arr);
	// 判断外来是否是本站
	if ($rf_hostname == $_SERVER["HTTP_HOST"] && strstr($rf_url, "/pop/") === false && strstr($rf_url, "/reg/") === false) {
		//error_log("rf error1", 0);
		$where_from = $_MooCookie['where_from'];
		$where_from_arr = parse_url($where_from);
		if ($where_from_arr["host"] == $_SERVER["HTTP_HOST"]) {
			MooSetCookie('where_from', "", -24*3600);
		}
		
		return false;
	}

	$where_from = $_MooCookie['where_from'];
	// 判断外来与cookie中记录是否一致
	if ($where_from == $rf_url) {
		return false;
	}

	MooSetCookie('where_from', $_SERVER['HTTP_REFERER'], 24*3600);
	return true;
}
示例#6
0
文件: ajax.php 项目: noikiy/zays
function telphone_code()
{
    global $_MooCookie, $userid, $_MooClass, $dbTablePre;
    if ($_MooCookie['sendtimes']) {
        return;
    }
    MooSetCookie("sendtimes", 1);
    $rand = rand(3621, 9654);
    MooSetCookie("rand", md5(md5($rand)));
    MooSetCookie("counts", $_MooCookie['counts'] + 1, 3600);
    $phone = MooGetGPC('phone', 'string', 'G');
    $content = "会员ID{$userid},您的手机验码:" . $rand;
    if (SendMsg($phone, $content, 1)) {
        $time = time();
        $_MooClass['MooMySQL']->query("INSERT INTO {$dbTablePre}smslog_sys (id,sid,uid,content,sendtime,type) values('','','{$userid}','{$content}','{$time}','验证码')");
    }
}
示例#7
0
文件: function.php 项目: noikiy/zays
/**
@param (忘记密码)通过地址栏用户名和新密码登陆
@param return null
*/
function find_pwd()
{
    global $_MooClass, $dbTablePre, $userid, $_MooCookie;
    //	if($userid){
    //		return;
    //	}
    $uid = MooGetGPC('uid', 'string', G);
    $pwd = MooGetGPC('upwd', 'string', G);
    /*	echo md5($uid).'<br>';
    	echo md5($pwd);
    	print_r($_COOKIE);
    	exit;
    */
    if ($_MooCookie['findpwd'] == md5($pwd) && md5($uid) == $_MooCookie['finduser']) {
        $newpwd = md5(base64_decode($pwd));
        //note 修改密码
        //$_MooClass['MooMySQL']->query("update {$dbTablePre}members set password = '******' where uid = '{$uid}'");
        //if(MOOPHP_ALLOW_FASTDB){
        //			MooFastdbUpdate('members','uid',$uid);
        //		}
        MooSetCookie('auth', MooAuthCode("{$uid}\t{$newpwd}", 'ENCODE'), 86400);
        //note 写入session表需要的字段值
        $online_ip = GetIP();
        $lastactive = $GLOBALS['timestamp'];
        //$uid = $user['uid'];
        //note 更新用户的最近登录ip和最近登录时间
        $updatesqlarr = array('lastip' => $online_ip, 'lastvisit' => $lastactive, 'password' => $newpwd);
        $wheresqlarr = array('uid' => $uid);
        updatetable("members_search", $updatesqlarr, $wheresqlarr);
        if (MOOPHP_ALLOW_FASTDB) {
            $val = array();
            $val['lastip'] = $online_ip;
            $val['lastvisit'] = $lastactive;
            $val['password'] = $newpwd;
            MooFastdbUpdate('members_search', 'uid', $uid, $val);
            //!!
        }
        //note 先删除表里面已存在对应用户的session
        //$_MooClass['MooMySQL']->query("DELETE FROM `{$dbTablePre}membersession` WHERE `uid` ='$uid'");
        //$_MooClass['MooMySQL']->query("REPLACE INTO `{$dbTablePre}membersession` SET `username`= '$user[username]',`password`='$user[password]',`ip` = '$online_ip',`lastactive` = '$lastactive',`uid` = '$uid'");
        return 1;
    }
    return 0;
}
示例#8
0
function active_email()
{
    global $_MooClass;
    $uid = $u['uid'] = MooGetGPC('uid', 'string');
    $verifycode = MooGetGPC('verifycode', 'string');
    $username = $u['username'] = MooGetGPC('p', 'string');
    if ($verifycode == strtoupper(md5('hongniangwang' . $u['uid'] . $u['username']))) {
        $online_ip = GetIP();
        $t = time();
        $pass = md5('123456');
        $r = $_MooClass['MooMySQL']->getOne("select * from web_activelog where uid={$uid}  limit 1", true);
        if ($r['username'] == $username) {
            MooMessage("您已经激活过了", "index.php", "05");
        } else {
            //$_MooClass['MooMySQL']->query("update web_members_search,web_members_login set password='******',usertype=1,regdate='$t',last_login_time = '$t',login_meb = login_meb+1,lastip='$online_ip',lastvisit='$t'  where uid='$uid'");
            $_MooClass['MooMySQL']->query("update web_members_search as s,web_members_login as l set s.password='******',s.usertype=1,s.regdate='{$t}',l.last_login_time = '{$t}',l.lastip='{$online_ip}',l.lastvisit='{$t}'  where s.uid='{$uid}' and l.uid='{$uid}'");
            searchApi('members_man members_women')->updateAttr(array('usertype', 'regdate'), array($uid => array(1, $t)));
            $_MooClass['MooMySQL']->query("insert into web_activelog(uid,username,activetime) values('{$uid}','{$username}','{$t}')");
        }
        MooSetCookie('auth', MooAuthCode("{$uid}\t{$pass}", 'ENCODE'), 86400);
        MooSetCookie('username', $u['username'], time() + 3600);
        if (MOOPHP_ALLOW_FASTDB) {
            $user11 = MooFastdbGet('members_search', 'uid', $uid);
            $meb = $user11['login_meb'];
            $val_s = $val_l = array();
            $val_s['password'] = $pass;
            $val_s['usertype'] = 1;
            $val_s['regdate'] = $t;
            $val_l['last_login_time'] = $t;
            $val_l['login_meb'] = $meb + 1;
            $val_l['lMooFastdbUpdateastip'] = $online_ip;
            $val_l['lastvisit'] = $t;
            MooFastdbUpdate('members_search', 'uid', $uid, $val_s);
            //!!
            MooFastdbUpdate('members_login', 'uid', $uid, $val_l);
        }
        //$_MooClass['MooMySQL']->query("INSERT INTO `web_membersession` SET `username`= '$u[username]',`password`='$pass',`ip` = '$online_ip',`lastactive` = '$t',`uid` = '$uid'");
        MooMessage("验证激活成功", "index.php", "05");
    } else {
        MooMessage("参数有误!请注册", "index.php", "02");
    }
}
示例#9
0
文件: index.php 项目: noikiy/zays
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');
    }
}
示例#10
0
文件: ajax.php 项目: noikiy/zays
function reg_truetelphone()
{
    global $_MooCookie, $_MooClass, $dbTablePre;
    $rand = rand(362144, 965421);
    MooSetCookie("rand", md5(md5($rand)));
    $truetelphone_val = MooGetGPC('truetelphone_val', 'string', 'G');
    $all_val = explode(',', $truetelphone_val);
    $uid = $all_val[0];
    $telphone = $all_val[1];
    $password2 = $all_val[2];
    $time = time();
    $time_cookie = isset($_MooCookie['time']) ? $_MooCookie['time'] : 0;
    if ($time - $time_cookie >= 60) {
        MooSetCookie('time', $time, time() + 3600 * 24 * 8);
        //希希奥信息发送手机短信接口
        if (SendMsg($telphone, "您已成功注册为真爱一生网会员ID:" . $uid . ",密码" . $password2 . ",手机认证码" . $rand . ",本认证码两小时内有效。")) {
            $_MooClass['MooMySQL']->query("INSERT INTO {$dbTablePre}smslog_sys (id,sid,uid,content,sendtime,type) values('','','{$uid}','注册验证码','{$time}','注册验证码')");
        }
    } else {
        echo 'Not login!';
    }
}
示例#11
0
文件: index.php 项目: noikiy/zays
/**
 * 用户投票 
 */
function vote()
{
    global $userid;
    $tb_pre = $GLOBALS['dbTablePre'];
    $db = $GLOBALS['_MooClass']['MooMySQL'];
    $year = (int) date('Y');
    $month = (int) date('m');
    $day = (int) date('d');
    $max_daily_vote = 100;
    // 每天最大投票数量
    $uid = MooGetGPC('uid', 'integer', 'G');
    $mode = MooGetGPC('mode', 'string', 'G');
    $vote = $mode == 'flower' ? 1 : ($mode == 'egg' ? -1 : 0);
    if (!$userid) {
        exit("gotourl:index.php?n=login&back_url=" . urlencode('index.php?n=lovestation&h=crazyfan'));
    }
    if ($uid == $userid) {
        exit('不能给自己投票!');
    }
    if ($vote != 0) {
        $user = $db->getOne("select score from {$tb_pre}carcrazyfan where uid={$uid}");
        $score = unserialize($user['score']);
        $cur_score = $score[$year][$month] + $vote;
        if ($cur_score >= 0) {
            $count = MooGetGPC(MOOPHP_COOKIE_PRE . 'crazyfan_vote_num', 'integer', 'C');
            $pre_day = MooGetGPC(MOOPHP_COOKIE_PRE . 'crazyfan_vote_day', 'integer', 'C');
            if ($pre_day != $day) {
                $count = 0;
                MooSetCookie('crazyfan_vote_day', $day, 86400);
            }
            if ($count == $max_daily_vote) {
                exit('maxvote');
            }
            MooSetCookie('crazyfan_vote_num', $count + 1, 86400);
            $score[$year][$month] = $cur_score;
            $score = addslashes(serialize($score));
            $db->query("update {$tb_pre}carcrazyfan set score='{$score}' where uid={$uid}");
            echo 'ok';
        } else {
            echo 'iszero';
        }
    }
    exit;
}
示例#12
0
文件: index.php 项目: noikiy/zays
function payment_validateID()
{
    global $_MooClass, $dbTablePre, $uid, $user_arr, $yeepay_banktype;
    $orderTitle = "您正在申请开通身份通认证,服务费<span>5</span>元,共计<span>5</span>元";
    $pay_h = 'pay_validateID';
    $p3_Amt = 5.0;
    $username = MooGetGPC('userName', 'string', 'P');
    $usercode = MooGetGPC('userCode', 'string', 'P');
    $mobile = MooGetGPC('msisdn', 'string', 'P');
    MooSetCookie('sftrz_username', MooAuthCode($username, 'ENCODE'), 86400);
    MooSetCookie('sftrz_usercode', MooAuthCode($usercode, 'ENCODE'), 86400);
    MooSetCookie('sftrz_mobile', MooAuthCode($mobile, 'ENCODE'), 86400);
    include MooTemplate('public/paymentchannel', 'module');
}
示例#13
0
文件: ajax.php 项目: noikiy/zays
function login_qq()
{
    global $_MooClass, $timestamp, $dbTablePre;
    $qqinfo = MooGetGPC('qqinfo', 'string', 'P');
    //返回的Json 字符数据
    $open_id = MooGetGPC('open_id', 'string', 'P');
    $qqinfo = stripslashes($qqinfo);
    $q = json_decode($qqinfo, true);
    //判定以前是否用QQ登录过
    $sql = "select uid from web_members_qq where open_id='{$open_id}'";
    $qquser = $_MooClass['MooMySQL']->getOne($sql);
    if (!empty($qquser['uid'])) {
        $qquserid = $qquser['uid'];
        $sql = "select password from web_members_search where uid='{$qquserid}'";
        $User = $_MooClass['MooMySQL']->getOne($sql);
        $password = $User['password'];
        MooSetCookie('auth', MooAuthCode("{$qquserid}\t{$password}", 'ENCODE'), 86400);
        exit('login_before_with_your_qq');
    }
    $ret = $q['ret'];
    $msg = $q['msg'];
    $is_lost = $q['is_lost'];
    $nickname = $q['nickname'];
    $gender = $q['gender'];
    $province_ = $q['province'];
    $city_ = $q['city'];
    $birthyear = $q['year'];
    $figureurl = $q['figureurl'];
    $figureurl_1 = $q['figureurl_1'];
    $figureurl_2 = $q['figureurl_2'];
    $figureurl_qq_1 = $q['figureurl_qq_1'];
    $figureurl_qq_2 = $q['figureurl_qq_2'];
    $is_yellow_vip = $q['is_yellow_vip'];
    $vip = $q['vip'];
    $yellow_vip_level = $q['yellow_vip_level'];
    $level = $q['level'];
    $is_yellow_year_vip = $q['is_yellow_year_vip'];
    $rand = rand(1, 10000);
    $password = md5('_qquserlogin_' . $rand);
    //事务开始
    $_MooClass['MooMySQL']->query("begin;");
    $sql_res = array();
    //事务数组
    if ($gender == '男') {
        $fm = 0;
    } elseif ($gender == '女') {
        $fm = 1;
    }
    $province = array("10102000" => "北京", "10103000" => "上海", "10101201" => "深圳", "10101002" => "广州", "10101000" => "广东", "10104000" => "天津", "10105000" => "重庆", "10106000" => "安徽", "10107000" => "福建", "10108000" => "甘肃", "10109000" => "广西", "10110000" => "贵州", "10111000" => "海南", "10112000" => "河北", "10113000" => "河南", "10114000" => "黑龙江", "10115000" => "湖北", "10116000" => "湖南", "10117000" => "吉林", "10118000" => "江苏", "10119000" => "江西", "10120000" => "辽宁", "10121000" => "内蒙古", "10122000" => "宁夏", "10123000" => "青海", "10124000" => "山东", "10125000" => "山西", "10126000" => "陕西", "10127000" => "四川", "10128000" => "西藏", "10129000" => "新疆", "10130000" => "云南", "10131000" => "浙江", "10132000" => "澳门", "10133000" => "香港", "10134000" => "台湾", "2" => "国外");
    $city = array("10101201" => "深圳", "10101002" => "广州", "10101003" => "佛山", "10101004" => "湛江", "10101005" => "珠海", "10101006" => "肇庆", "10101007" => "东莞", "10101008" => "惠州", "10101009" => "海丰", "10101010" => "顺德", "10101011" => "中山", "10101012" => "茂名", "10101013" => "汕头", "10101014" => "梅州", "10101015" => "韶关", "10101016" => "江门", "10101017" => "南海", "10101018" => "清远", "10101019" => "英德", "10101020" => "潮州", "10101021" => "番禺", "10101022" => "阳江", "10101023" => "河源", "10101024" => "高州", "10101025" => "兴宁", "10101026" => "揭阳", "10101027" => "化州", "10101028" => "汕尾", "10101029" => "廉江", "10101030" => "阳春", "10101031" => "三水", "10101032" => "信宜", "10101033" => "乐昌", "10101034" => "普宁", "10101035" => "博罗", "10101036" => "徐闻", "10101037" => "恩平", "10101038" => "罗定", "10101039" => "阳东", "10101040" => "鹤山", "10101041" => "高明", "10101042" => "新兴", "10101043" => "蕉岭", "10101044" => "连平", "10101045" => "曲江", "10101046" => "潮安", "10101047" => "惠来", "10101048" => "丰顺", "10101049" => "龙川", "10101050" => "新丰", "10101051" => "四会", "10101052" => "从化", "10101053" => "仁化", "10101054" => "封开", "10101055" => "乳源", "10101056" => "广宁", "10101057" => "南澳", "10101058" => "阳山", "10101059" => "陆河", "10101060" => "遂溪", "10101061" => "宝安", "10101062" => "连州", "10101063" => "潮阳", "10101064" => "惠阳", "10101065" => "吴川", "10101066" => "开平", "10101067" => "斗门", "10101068" => "云浮", "10101069" => "龙门", "10101070" => "雷州", "10101071" => "新会", "10101072" => "郁南", "10101073" => "阳西", "10101074" => "梅县", "10101075" => "揭东", "10101076" => "大埔", "10101077" => "和平", "10101078" => "翁源", "10101079" => "高要", "10101080" => "饶平", "10101081" => "揭西", "10101082" => "五华", "10101083" => "紫金", "10101084" => "花都区", "10101085" => "始兴", "10101086" => "怀集", "10101087" => "平远", "10101088" => "佛冈", "10101089" => "增城", "10101090" => "南雄", "10101091" => "德庆", "10101092" => "澄海", "10101093" => "连山", "10101094" => "电白", "10101095" => "连南", "10101096" => "陆丰", "10101097" => "惠东", "10101098" => "台山", "10102001" => "东城区", "10102002" => "西城区", "10102003" => "崇文区", "10102004" => "宣武区", "10102005" => "朝阳区", "10102006" => "丰台区", "10102007" => "石景山区", "10102008" => "海淀区", "10102009" => "门头沟区", "10102010" => "房山区", "10102011" => "通州区", "10102012" => "顺义区", "10102013" => "昌平区", "10102014" => "大兴区", "10102015" => "怀柔区", "10102016" => "平谷区", "10102017" => "密云县", "10102018" => "延庆县", "10103001" => "浦东新区", "10103002" => "徐汇区", "10103003" => "长宁区", "10103004" => "普陀区", "10103005" => "闸北区", "10103006" => "虹口区", "10103007" => "杨浦区", "10103008" => "黄浦区", "10103009" => "卢湾区", "10103010" => "静安区", "10103011" => "宝山区", "10103012" => "闵行区", "10103013" => "嘉定区", "10103014" => "金山区", "10103015" => "松江区", "10103016" => "青浦区", "10103017" => "崇明县", "10103018" => "奉贤区", "10103019" => "南汇区", "10103020" => "川沙区", "10104002" => "武清区", "10104003" => "宁河区", "10104004" => "天津区", "10104005" => "宝坻区", "10104006" => "静海区", "10104007" => "蓟县", "10104008" => "和平区", "10104009" => "河东区", "10104010" => "河西区", "10104011" => "南开区", "10104012" => "河北区", "10104013" => "红桥区", "10104014" => "塘沽区", "10104015" => "汉沽区", "10104016" => "大港区", "10104017" => "东丽区", "10104018" => "西青区", "10104019" => "北辰区", "10104020" => "津南区", "10105001" => "重庆", "10105002" => "奉节", "10105003" => "武隆", "10105004" => "忠县", "10105005" => "巫山", "10105006" => "开县", "10105007" => "永川", "10105008" => "荣昌", "10105009" => "巴县", "10105010" => "铜梁", "10105012" => "石柱", "10105013" => "合川", "10105014" => "双桥", "10105015" => "南川", "10105016" => "长寿", "10105017" => "巫溪", "10105018" => "黔江", "10105019" => "云阳", "10105020" => "垫江", "10105021" => "梁平", "10105022" => "万县", "10105023" => "大足", "10105024" => "北碚", "10105025" => "壁山", "10105026" => "江北", "10105027" => "潼南", "10105028" => "涪陵", "10105029" => "江津", "10105030" => "丰都", "10105031" => "南桐", "10105032" => "城口", "10105033" => "綦江", "10105034" => "渝中区", "10105035" => "大渡口区", "10105036" => "沙坪坝区", "10105037" => "九龙坡区", "10105038" => "南岸区", "10105039" => "万盛区", "10105040" => "渝北区", "10105041" => "巴南区", "10105042" => "万州区", "10105043" => "秀山土家族苗族自治县", "10105044" => "酉阳土家族苗族自治县", "10105045" => "彭水苗族土家族自治县", "10106001" => "合肥", "10106002" => "淮南", "10106003" => "蚌埠", "10106004" => "宿州", "10106005" => "阜阳", "10106006" => "六安", "10106007" => "巢湖", "10106008" => "滁州", "10106009" => "芜湖", "10106010" => "屯溪", "10106011" => "安庆", "10106012" => "黄山", "10106013" => "铜陵", "10106014" => "黟县", "10106015" => "砀山", "10106016" => "全椒", "10106017" => "祁门", "10106018" => "繁昌", "10106019" => "舒城", "10106020" => "绩溪", "10106021" => "怀宁", "10106022" => "东至", "10106023" => "临泉", "10106024" => "怀远", "10106025" => "旌德", "10106026" => "潜山", "10106027" => "贵池", "10106028" => "颍上", "10106029" => "郎溪", "10106030" => "桐城", "10106031" => "和县", "10106032" => "涡阳", "10106033" => "肥西", "10106034" => "宣州", "10106035" => "太湖", "10106036" => "无为", "10106037" => "阜南", "10106038" => "明光", "10106039" => "当涂", "10106040" => "金寨", "10106041" => "来安", "10106042" => "淮北", "10106043" => "凤台", "10106044" => "霍邱", "10106045" => "灵壁", "10106046" => "凤阳", "10106047" => "休宁", "10106048" => "南陵", "10106049" => "寿县", "10106050" => "萧县", "10106051" => "歙县", "10106052" => "芜湖县", "10106053" => "岳西", "10106054" => "石台", "10106055" => "利辛", "10106056" => "固镇", "10106057" => "广德", "10106058" => "宿松", "10106059" => "青阳", "10106060" => "太和", "10106061" => "五河", "10106062" => "宁国", "10106063" => "望江", "10106064" => "含山", "10106065" => "界首", "10106066" => "长丰", "10106067" => "泾县", "10106068" => "枞阳", "10106069" => "庐江", "10106070" => "蒙城", "10106071" => "肥东", "10106072" => "毫州", "10106073" => "定远", "10106074" => "濉溪", "10106075" => "马鞍山", "10106076" => "霍山", "10106077" => "泗县", "10106078" => "天长", "10106079" => "池州", "10106080" => "宣城", "10107001" => "福州", "10107002" => "厦门", "10107003" => "泉州", "10107004" => "南平", "10107005" => "邵武", "10107006" => "福安", "10107007" => "漳州", "10107008" => "龙岩", "10107009" => "三明", "10107010" => "莆田", "10107011" => "晋江", "10107012" => "石狮", "10107013" => "宁德", "10107014" => "华安", "10107015" => "松溪", "10107016" => "古田", "10107017" => "尤溪", "10107018" => "连江", "10107019" => "龙海", "10107020" => "光泽", "10107021" => "周宁", "10107022" => "永安", "10107023" => "福清", "10107024" => "云霄", "10107025" => "仙游", "10107026" => "宁化", "10107027" => "永泰", "10107028" => "诏安", "10107029" => "建宁", "10107030" => "罗源", "10107031" => "安溪", "10107032" => "将乐", "10107033" => "同安", "10107034" => "永定", "10107035" => "德化", "10107036" => "建瓯", "10107037" => "武平", "10107038" => "建阳", "10107039" => "福鼎", "10107040" => "连城", "10107041" => "南靖", "10107042" => "浦城", "10107043" => "寿宁", "10107044" => "沙县", "10107045" => "闽候", "10107046" => "长泰", "10107047" => "政和", "10107048" => "屏南", "10107049" => "大田", "10107050" => "长乐", "10107051" => "漳浦", "10107052" => "武夷山", "10107053" => "清流", "10107054" => "平潭", "10107055" => "东山", "10107056" => "明溪", "10107057" => "闽清", "10107058" => "平和", "10107059" => "南安", "10107060" => "泰宁", "10107061" => "漳平", "10107062" => "永春", "10107063" => "上杭", "10107064" => "惠安", "10107065" => "顺昌", "10107066" => "柘荣", "10107067" => "长汀", "10107068" => "霞浦", "10108001" => "兰州", "10108002" => "张掖", "10108003" => "武威", "10108004" => "酒泉", "10108005" => "安西", "10108006" => "金昌", "10108007" => "天水", "10108008" => "定西", "10108009" => "平凉", "10108010" => "西峰", "10108011" => "陇西", "10108012" => "甘南", "10108013" => "迭部", "10108014" => "会宁", "10108015" => "宕昌", "10108016" => "漳县", "10108017" => "金塔", "10108018" => "永靖", "10108019" => "礼县", "10108020" => "民勤", "10108021" => "岷县", "10108022" => "临夏市", "10108023" => "嘉峪关", "10108024" => "东乡", "10108025" => "两当", "10108026" => "古浪", "10108027" => "渭源", "10108028" => "红古区", "10108029" => "广河", "10108030" => "永昌", "10108031" => "宁县", "10108032" => "榆中", "10108033" => "武山", "10108034" => "山丹", "10108035" => "环县", "10108036" => "张家川", "10108037" => "临潭", "10108038" => "民乐", "10108039" => "武都", "10108040" => "正宁", "10108041" => "泾川", "10108042" => "碌曲", "10108043" => "萧南", "10108044" => "靖远", "10108045" => "成县", "10108046" => "崇信", "10108047" => "旧尼", "10108048" => "玉门", "10108049" => "景泰", "10108050" => "文县", "10108051" => "庄浪", "10108052" => "敦煌", "10108053" => "临夏县", "10108054" => "西和", "10108055" => "通渭", "10108056" => "阿克塞", "10108057" => "和政", "10108058" => "徽县", "10108059" => "天祝", "10108060" => "临洮", "10108061" => "肃北", "10108062" => "康乐", "10108063" => "金川", "10108064" => "庆阳", "10108065" => "皋兰", "10108066" => "甘谷", "10108067" => "积石山", "10108068" => "镇原", "10108069" => "永登", "10108070" => "秦安", "10108071" => "夏河", "10108072" => "高台", "10108073" => "合水", "10108074" => "静宁", "10108075" => "清水", "10108076" => "舟曲", "10108077" => "临泽", "10108078" => "白银", "10108079" => "华池", "10108080" => "灵台", "10108081" => "玛曲", "10108082" => "康县", "10108083" => "华亭", "10108084" => "陇南", "10109001" => "南宁", "10109002" => "柳州", "10109003" => "钦州", "10109004" => "百色", "10109005" => "玉林", "10109006" => "防城港", "10109007" => "桂林", "10109008" => "梧州", "10109009" => "河池", "10109010" => "北海", "10109011" => "武鸣", "10109012" => "龙胜", "10109013" => "合山", "10109014" => "贵港", "10109015" => "龙州", "10109016" => "资源", "10109017" => "浦北", "10109018" => "来宾", "10109019" => "平南", "10109020" => "大新", "10109021" => "苍梧", "10109022" => "宜州", "10109023" => "象州", "10109024" => "田林", "10109025" => "横县", "10109026" => "岑溪", "10109027" => "环江", "10109028" => "阳朔", "10109029" => "西林", "10109030" => "扶绥", "10109031" => "贺县", "10109032" => "凤山", "10109033" => "上思", "10109034" => "荔浦", "10109035" => "田阳", "10109036" => "柳江", "10109037" => "钟山", "10109038" => "南丹", "10109039" => "上林", "10109040" => "平乐", "10109041" => "田东", "10109042" => "柳城", "10109043" => "都安", "10109044" => "邕宁", "10109045" => "灵川", "10109046" => "平果", "10109047" => "融安", "10109048" => "北流", "10109049" => "宁明", "10109050" => "永福", "10109051" => "那坡", "10109052" => "金秀", "10109053" => "博白", "10109054" => "马山", "10109055" => "恭城", "10109056" => "灵山", "10109057" => "忻城", "10109058" => "桂平", "10109059" => "宾阳", "10109060" => "武宣", "10109061" => "天等", "10109062" => "藤县", "10109063" => "罗城", "10109064" => "隆林", "10109065" => "隆安", "10109066" => "昭平", "10109067" => "天峨", "10109068" => "临桂", "10109069" => "凌云", "10109070" => "蒙山", "10109071" => "东兰", "10109072" => "灌阳", "10109073" => "靖西", "10109074" => "鹿寨", "10109075" => "富川", "10109076" => "巴马", "10109077" => "凭祥", "10109078" => "兴安", "10109079" => "乐业", "10109080" => "三江", "10109081" => "容县", "10109082" => "大化", "10109083" => "崇左", "10109084" => "全州", "10109085" => "德保", "10109086" => "融水", "10109087" => "陆川", "10109088" => "合浦", "10109089" => "贺州", "10110001" => "贵阳", "10110002" => "六盘水", "10110003" => "玉屏", "10110004" => "凯里", "10110005" => "都匀", "10110006" => "安顺", "10110007" => "遵义", "10110008" => "台江", "10110009" => "清镇", "10110010" => "紫云", "10110011" => "德江", "10110012" => "镇远", "10110013" => "务川", "10110014" => "黄平", "10110015" => "息烽", "10110016" => "镇宁", "10110017" => "威宁", "10110018" => "三穗", "10110019" => "贵定", "10110020" => "纳雍", "10110021" => "毕节", "10110022" => "锦屏", "10110023" => "习水", "10110024" => "瓮安", "10110025" => "大方", "10110026" => "兴义", "10110027" => "从江", "10110028" => "荔波", "10110029" => "织金", "10110030" => "望谟", "10110031" => "松桃", "10110032" => "绥阳", "10110033" => "平塘", "10110034" => "六枝", "10110035" => "兴仁", "10110036" => "道真", "10110037" => "惠水", "10110038" => "雷山", "10110039" => "普安", "10110040" => "石阡", "10110041" => "凤冈", "10110042" => "榕江", "10110043" => "麻江", "10110044" => "平坝", "10110045" => "印江", "10110046" => "余庆", "10110047" => "施秉", "10110048" => "修文", "10110049" => "关岭", "10110050" => "长顺", "10110051" => "岑巩", "10110052" => "开阳", "10110053" => "普定", "10110054" => "赫章", "10110055" => "铜仁", "10110056" => "天柱", "10110057" => "赤水", "10110058" => "福泉", "10110059" => "黔西", "10110060" => "黎平", "10110061" => "仁怀", "10110062" => "三都", "10110063" => "金沙", "10110064" => "册亨", "10110065" => "沿河", "10110066" => "桐梓", "10110067" => "独山", "10110068" => "剑河", "10110069" => "安龙", "10110070" => "万山", "10110071" => "正安", "10110072" => "罗甸", "10110073" => "盘县", "10110074" => "贞丰", "10110075" => "江口", "10110076" => "湄潭", "10110077" => "龙里", "10110078" => "丹寨", "10110079" => "晴隆", "10110080" => "思南", "10110081" => "铜仁地区", "10110082" => "黔西南布依族苗族自治州", "10110083" => "黔东南苗族侗族自治州", "10110084" => "黔南布依族苗族自治州", "10111001" => "海口", "10111002" => "三亚", "10111003" => "洋浦", "10111004" => "澄迈", "10111005" => "昌江", "10111006" => "文昌", "10111007" => "琼海", "10111008" => "琼山", "10111009" => "通什", "10111010" => "保亭", "10111011" => "琼中", "10111012" => "白沙", "10111013" => "东方", "10111014" => "定安", "10111015" => "临高", "10111016" => "屯昌", "10111017" => "万宁", "10111018" => "乐东", "10111019" => "陵水", "10111020" => "儋州", "10111021" => "五指山", "10112001" => "石家庄", "10112002" => "衡水", "10112003" => "邢台", "10112004" => "邯郸", "10112005" => "沧州", "10112006" => "唐山", "10112007" => "廊坊", "10112008" => "秦皇岛", "10112009" => "承德", "10112010" => "保定", "10112011" => "张家口", "10112012" => "赵县", "10112013" => "万全", "10112014" => "霸州", "10112015" => "安平", "10112016" => "肥乡", "10112017" => "安国", "10112018" => "宽城", "10112019" => "泊头", "10112020" => "沙河", "10112021" => "高邑", "10112022" => "崇礼", "10112023" => "大城", "10112024" => "临西", "10112025" => "昌黎", "10112026" => "曲阳", "10112027" => "滦平", "10112028" => "肃宁", "10112029" => "武安", "10112030" => "灵寿", "10112031" => "尚义", "10112032" => "固安", "10112033" => "临城", "10112034" => "抚宁", "10112035" => "高阳", "10112036" => "玉田", "10112037" => "献县", "10112038" => "磁县", "10112039" => "赤城", "10112040" => "大厂", "10112041" => "宁晋", "10112042" => "正定", "10112043" => "容城", "10112044" => "遵化", "10112045" => "铙阳", "10112046" => "成安", "10112047" => "清苑", "10112048" => "涿鹿", "10112049" => "巨鹿", "10112050" => "井陉", "10112051" => "安新", "10112052" => "唐海", "10112053" => "武邑", "10112054" => "鸡泽", "10112055" => "易县", "10112056" => "阳原", "10112057" => "海兴", "10112058" => "南宫", "10112059" => "新乐", "10112060" => "蠡县", "10112061" => "乐亭", "10112062" => "景县", "10112063" => "丘县", "10112064" => "唐县", "10112065" => "孟村", "10112066" => "威县", "10112067" => "深泽", "10112068" => "迁安", "10112069" => "枣强", "10112070" => "大名", "10112071" => "涿州", "10112072" => "隆化", "10112073" => "南皮", "10112074" => "平乡", "10112075" => "晋州", "10112076" => "怀安", "10112077" => "深州", "10112078" => "广平", "10112079" => "博野", "10112080" => "平泉", "10112081" => "吴桥", "10112082" => "任县", "10112083" => "赞皇", "10112084" => "张北", "10112085" => "永清", "10112086" => "定州", "10112087" => "丰宁", "10112088" => "河间", "10112089" => "平山", "10112090" => "沽源", "10112091" => "文安", "10112092" => "内丘", "10112093" => "卢龙", "10112094" => "阜平", "10112095" => "任丘", "10112096" => "临漳", "10112097" => "行唐", "10112098" => "康保", "10112099" => "香河", "10112100" => "柏乡", "10112101" => "青龙", "10112102" => "获鹿", "10112103" => "徐水", "10112104" => "滦县", "10112105" => "涉县", "10112106" => "潢城", "10112107" => "怀来", "10112108" => "三河", "10112109" => "隆尧", "10112110" => "栾城", "10112111" => "雄县", "10112112" => "滦南", "10112113" => "武强", "10112114" => "永年", "10112115" => "涞水", "10112116" => "蔚县", "10112117" => "黄骅", "10112118" => "新河", "10112119" => "元氏", "10112120" => "望都", "10112121" => "丰南", "10112122" => "阜城", "10112123" => "曲周", "10112124" => "涞源", "10112125" => "盐山", "10112126" => "清河", "10112127" => "无极", "10112128" => "顺平", "10112129" => "丰润", "10112130" => "故城", "10112131" => "馆陶", "10112132" => "定兴", "10112133" => "兴隆", "10112134" => "青县", "10112135" => "广宗", "10112136" => "辛集", "10112137" => "宣化", "10112138" => "迁西", "10112139" => "冀县", "10112140" => "魏县", "10112141" => "高碑店", "10112142" => "围场", "10112143" => "东光", "10112144" => "南和", "10113001" => "郑州", "10113002" => "新乡", "10113003" => "安阳", "10113004" => "许昌", "10113005" => "驻马店", "10113006" => "漯河", "10113007" => "信阳", "10113008" => "周口", "10113009" => "洛阳", "10113010" => "平顶山", "10113011" => "三门峡", "10113012" => "南阳", "10113013" => "开封", "10113014" => "商丘", "10113015" => "鹤壁", "10113016" => "濮阳", "10113017" => "焦作", "10113018" => "原阳", "10113019" => "内乡", "10113020" => "南乐", "10113021" => "息县", "10113022" => "荥阳", "10113023" => "泌阳", "10113024" => "长垣", "10113025" => "卢氏", "10113026" => "中牟", "10113027" => "罗山", "10113028" => "武陟", "10113029" => "汝南", "10113030" => "辉县", "10113031" => "杞县", "10113032" => "淮阳", "10113033" => "义马", "10113034" => "登封", "10113035" => "宛城", "10113036" => "孟县", "10113037" => "西平", "10113038" => "长葛", "10113039" => "尉氏", "10113040" => "鹿邑", "10113041" => "陕县", "10113042" => "西峡", "10113043" => "沁阳", "10113044" => "平舆", "10113045" => "禹州", "10113046" => "洛宁", "10113047" => "项城", "10113048" => "虞城", "10113049" => "汤阴", "10113050" => "方城", "10113051" => "正阳", "10113052" => "舞钢", "10113053" => "偃师", "10113054" => "太康", "10113055" => "永城", "10113056" => "内黄", "10113057" => "唐河", "10113058" => "淇县", "10113059" => "光山", "10113060" => "襄城", "10113061" => "宜阳", "10113062" => "宁陵", "10113063" => "镇平", "10113064" => "淮滨", "10113065" => "民权", "10113066" => "鲁山", "10113067" => "汝阳", "10113068" => "舞阳", "10113069" => "延津", "10113070" => "桐柏", "10113071" => "范县", "10113072" => "商城", "10113073" => "上街", "10113074" => "汝州", "10113075" => "栾川", "10113076" => "获嘉", "10113077" => "清丰", "10113078" => "新郑", "10113079" => "修武", "10113080" => "遂平", "10113081" => "封丘", "10113082" => "兰考", "10113083" => "西华", "10113084" => "渑池", "10113085" => "新密", "10113086" => "卧龙", "10113087" => "温县", "10113088" => "确山", "10113089" => "通许", "10113090" => "郸城", "10113091" => "灵宝", "10113092" => "巩义", "10113093" => "邓州", "10113094" => "博爱", "10113095" => "上蔡", "10113096" => "鄢陵", "10113097" => "沈丘", "10113098" => "淅川", "10113099" => "济源", "10113100" => "新蔡", "10113101" => "孟津", "10113102" => "扶沟", "10113103" => "夏邑", "10113104" => "林州", "10113105" => "社旗", "10113106" => "浚县", "10113107" => "潢川", "10113108" => "郏县", "10113109" => "伊川", "10113110" => "商水", "10113111" => "柘城", "10113112" => "滑县", "10113113" => "新野", "10113114" => "新县", "10113115" => "叶县", "10113116" => "新安", "10113117" => "临颖", "10113118" => "睢县", "10113119" => "卫辉", "10113120" => "南召", "10113121" => "台前", "10113122" => "固始", "10113123" => "宝丰", "10113124" => "嵩县", "10113125" => "郾城", "10114001" => "哈尔滨", "10114002" => "绥化", "10114003" => "佳木斯", "10114004" => "牡丹江", "10114005" => "齐齐哈尔", "10114006" => "北安", "10114007" => "大庆", "10114008" => "大兴安岭", "10114009" => "鸡西", "10114010" => "穆棱", "10114011" => "望奎", "10114012" => "五常", "10114013" => "同江", "10114014" => "海林", "10114015" => "青冈", "10114016" => "呼兰", "10114017" => "饶河", "10114018" => "绥芬河", "10114019" => "克山", "10114020" => "鹤岗", "10114021" => "安达", "10114022" => "逊克", "10114023" => "依安", "10114024" => "双鸭山", "10114025" => "杜尔伯特", "10114026" => "阿城", "10114027" => "密山", "10114028" => "嫩江", "10114029" => "讷河", "10114030" => "宝清", "10114031" => "方正", "10114032" => "勃利", "10114033" => "加格达奇", "10114034" => "富裕", "10114035" => "延寿", "10114036" => "依兰", "10114037" => "呼玛", "10114038" => "泰来", "10114039" => "庆安", "10114040" => "肇东", "10114041" => "桦南", "10114042" => "伊春", "10114043" => "林口", "10114044" => "绥棱", "10114045" => "木兰", "10114046" => "抚远", "10114047" => "东宁", "10114048" => "兰西", "10114049" => "巴彦", "10114050" => "桦川", "10114051" => "铁力", "10114052" => "宁安", "10114053" => "黑河", "10114054" => "萝北", "10114055" => "林甸", "10114056" => "虎林", "10114057" => "孙吴", "10114058" => "拜泉", "10114059" => "绥滨", "10114060" => "肇州", "10114061" => "鸡东", "10114062" => "德都", "10114063" => "龙江", "10114064" => "友谊", "10114065" => "肇源", "10114066" => "通河", "10114067" => "七台河", "10114068" => "五大连池", "10114069" => "甘南", "10114070" => "集贤", "10114071" => "尚志", "10114072" => "塔河", "10114073" => "克东", "10114074" => "明水", "10114075" => "双成", "10114076" => "汤原", "10114077" => "漠河", "10114078" => "海伦", "10114079" => "宾县", "10114080" => "富锦", "10114081" => "嘉荫", "10115001" => "武汉", "10115002" => "黄石", "10115003" => "沙市", "10115004" => "鄂州", "10115005" => "襄樊", "10115006" => "咸宁", "10115007" => "十堰", "10115008" => "宜昌", "10115009" => "恩施", "10115010" => "荆州", "10115011" => "黄冈", "10115012" => "荆门", "10115013" => "孝感", "10115014" => "襄阳", "10115015" => "蒲圻", "10115016" => "神农架", "10115017" => "麻城", "10115018" => "五峰", "10115019" => "南漳", "10115020" => "荆沙", "10115021" => "竹溪", "10115022" => "浠水", "10115023" => "兴山", "10115024" => "枣阳", "10115025" => "监利", "10115026" => "随枣", "10115027" => "英山", "10115028" => "建始", "10115029" => "保康", "10115030" => "公安", "10115031" => "黄梅", "10115032" => "鹤峰", "10115033" => "钟祥", "10115034" => "天门", "10115035" => "来凤", "10115036" => "汉川", "10115037" => "洪湖", "10115038" => "武昌县", "10115039" => "阳新", "10115040" => "利川", "10115041" => "云梦", "10115042" => "远安", "10115043" => "黄陂", "10115044" => "通山", "10115045" => "郧县", "10115046" => "广水", "10115047" => "枝江", "10115048" => "通城", "10115049" => "房县", "10115050" => "黄州", "10115051" => "长阳", "10115052" => "宜城", "10115053" => "嘉鱼", "10115054" => "竹山", "10115055" => "红安", "10115056" => "秭归", "10115057" => "谷城", "10115058" => "郧西", "10115059" => "罗田", "10115060" => "老河口", "10115061" => "石首", "10115062" => "随州", "10115063" => "蕲春", "10115064" => "巴东", "10115065" => "松滋", "10115066" => "仙桃", "10115067" => "武穴", "10115068" => "宣恩", "10115069" => "大悟", "10115070" => "京山", "10115071" => "潜江", "10115072" => "武昌", "10115073" => "大冶", "10115074" => "咸丰", "10115075" => "应城", "10115076" => "温泉", "10115077" => "蔡甸", "10115078" => "安陆", "10115079" => "当阳", "10115080" => "新洲", "10115081" => "崇阳", "10115082" => "丹江口", "10115083" => "枝城", "10115084" => "恩施土家族苗族自治州", "10116001" => "长沙", "10116002" => "株洲", "10116003" => "益阳", "10116004" => "岳阳", "10116005" => "常德", "10116006" => "吉首", "10116007" => "娄底", "10116008" => "怀化", "10116009" => "衡阳", "10116010" => "邵阳", "10116011" => "郴州", "10116012" => "零陵", "10116013" => "张家界", "10116014" => "湘潭", "10116015" => "醴陵", "10116016" => "沅江", "10116017" => "通道", "10116018" => "平江", "10116019" => "桂阳", "10116020" => "凤凰", "10116021" => "双峰", "10116022" => "会同", "10116023" => "宜章", "10116024" => "永顺", "10116025" => "耒阳", "10116026" => "新化", "10116027" => "辰溪", "10116028" => "宁乡", "10116029" => "桃源", "10116030" => "花垣", "10116031" => "衡南", "10116032" => "洪江", "10116033" => "浏阳", "10116034" => "石门", "10116035" => "泸溪", "10116036" => "衡山", "10116037" => "新宁", "10116038" => "东安", "10116039" => "津市", "10116040" => "桑植", "10116041" => "新邵", "10116042" => "新田", "10116043" => "湘乡", "10116044" => "临澧", "10116045" => "桂东", "10116046" => "武岗", "10116047" => "蓝山", "10116048" => "桃江", "10116049" => "芷江", "10116050" => "湘阴", "10116051" => "临武", "10116052" => "邵东", "10116053" => "江永", "10116054" => "茶陵", "10116055" => "南县", "10116056" => "溆浦", "10116057" => "临湘", "10116058" => "安仁", "10116059" => "双牌", "10116060" => "炎陵", "10116061" => "靖州", "10116062" => "汨罗", "10116063" => "永兴", "10116064" => "龙山", "10116065" => "冷水江", "10116066" => "新晃", "10116067" => "保靖", "10116068" => "常宁", "10116069" => "涟源", "10116070" => "沅陵", "10116071" => "望城", "10116072" => "汉寿", "10116073" => "古丈", "10116074" => "衡东", "10116075" => "永州", "10116076" => "澧县", "10116077" => "祁东", "10116078" => "城步", "10116079" => "祁阳", "10116080" => "韶山", "10116081" => "安乡", "10116082" => "慈利", "10116083" => "资兴", "10116084" => "绥宁", "10116085" => "宁远", "10116086" => "麻阳", "10116087" => "汝城", "10116088" => "洞口", "10116089" => "江华", "10116090" => "攸县", "10116091" => "安化", "10116092" => "黔阳", "10116093" => "华容", "10116094" => "嘉禾", "10116095" => "隆回", "10116096" => "道县", "10116097" => "湘西土家族苗族自治州", "10117001" => "长春", "10117002" => "吉林", "10117003" => "延吉", "10117004" => "通化", "10117005" => "梅河口", "10117006" => "四平", "10117007" => "白城", "10117008" => "松原", "10117009" => "安图", "10117010" => "辉南", "10117011" => "东辽", "10117012" => "图们", "10117013" => "农安", "10117014" => "德惠", "10117015" => "前郭", "10117016" => "犁树", "10117017" => "乾安", "10117018" => "磬石", "10117019" => "靖宇", "10117020" => "集安", "10117021" => "蛟河", "10117022" => "抚松", "10117023" => "通榆", "10117024" => "珲春", "10117025" => "洮南", "10117026" => "和龙", "10117027" => "柳河", "10117028" => "辽源", "10117029" => "敦化", "10117030" => "双阳", "10117031" => "东丰", "10117032" => "龙井", "10117033" => "九台", "10117034" => "扶余", "10117035" => "双辽", "10117036" => "榆树", "10117037" => "长岭", "10117038" => "公主岭", "10117039" => "永吉", "10117040" => "临江", "10117041" => "桦甸", "10117042" => "长白", "10117043" => "舒兰", "10117044" => "江源", "10117045" => "大安", "10117046" => "汪清", "10117047" => "镇赉", "10117048" => "白山", "10117049" => "延边朝鲜族自治州", "10118001" => "南京", "10118002" => "苏州", "10118003" => "无锡", "10118004" => "徐州", "10118005" => "常州", "10118006" => "镇江", "10118007" => "连云港", "10118008" => "淮阴", "10118009" => "盐城", "10118010" => "扬州", "10118011" => "南通", "10118012" => "昆山", "10118013" => "张家港", "10118014" => "宜兴", "10118015" => "江阴", "10118016" => "淮安", "10118017" => "常熟", "10118018" => "泰兴", "10118019" => "吴江", "10118020" => "太仓", "10118021" => "江浦", "10118022" => "滨海", "10118023" => "金湖", "10118024" => "靖江", "10118025" => "江宁", "10118026" => "射阳", "10118027" => "盱眙", "10118028" => "如皋", "10118029" => "姜堰", "10118030" => "溧水", "10118031" => "大丰", "10118032" => "东海", "10118033" => "海门", "10118034" => "沭阳", "10118035" => "灌云", "10118036" => "海安", "10118037" => "泗阳", "10118038" => "锡山", "10118039" => "丰县", "10118040" => "江都", "10118041" => "丹徒", "10118042" => "邳县", "10118043" => "金坛", "10118044" => "仪征", "10118045" => "睢宁", "10118046" => "句容", "10118047" => "宝应", "10118048" => "响水", "10118049" => "洪泽", "10118050" => "吴县", "10118051" => "泰州", "10118052" => "六合", "10118053" => "阜宁", "10118054" => "涟水", "10118055" => "如东", "10118056" => "高淳", "10118057" => "建湖", "10118058" => "通州市", "10118059" => "兴化", "10118060" => "东台", "10118061" => "赣榆", "10118062" => "启东", "10118063" => "宿迁", "10118064" => "铜山", "10118065" => "灌南", "10118066" => "泗洪", "10118067" => "沛县", "10118068" => "武进", "10118069" => "邗江", "10118070" => "丹阳", "10118071" => "新沂", "10118072" => "溧阳", "10118073" => "高邮", "10118074" => "扬中", "10119001" => "南昌", "10119002" => "九江", "10119003" => "景德镇", "10119004" => "上饶", "10119005" => "鹰潭", "10119006" => "宜春", "10119007" => "萍乡", "10119008" => "赣州", "10119009" => "吉安", "10119010" => "抚州", "10119011" => "铜鼓", "10119012" => "进贤", "10119013" => "临川", "10119014" => "兴国", "10119015" => "余干", "10119016" => "浮梁", "10119017" => "乐安", "10119018" => "石城", "10119019" => "波阳", "10119020" => "永丰", "10119021" => "莲花", "10119022" => "庐山", "10119023" => "南丰", "10119024" => "南康", "10119025" => "万年", "10119026" => "峡江", "10119027" => "贵溪", "10119028" => "湖口", "10119029" => "大余", "10119030" => "横峰", "10119031" => "万安", "10119032" => "瑞昌", "10119033" => "上高", "10119034" => "崇义", "10119035" => "德兴", "10119036" => "宁冈", "10119037" => "彭泽", "10119038" => "靖安", "10119039" => "龙南", "10119040" => "新余", "10119041" => "资溪", "10119042" => "井岗山", "10119043" => "永修", "10119044" => "丰城", "10119045" => "全南", "10119046" => "东乡", "10119047" => "万载", "10119048" => "会昌", "10119049" => "新建", "10119050" => "崇仁", "10119051" => "于都", "10119052" => "玉山", "10119053" => "乐平", "10119054" => "安义", "10119055" => "宜黄", "10119056" => "宁都", "10119057" => "弋阳", "10119058" => "新干", "10119059" => "南城", "10119060" => "寻乌", "10119061" => "广丰", "10119062" => "吉水", "10119063" => "修水", "10119064" => "黎川", "10119065" => "赣县", "10119066" => "铅山", "10119067" => "泰和", "10119068" => "余江", "10119069" => "星子", "10119070" => "宜丰", "10119071" => "上犹", "10119072" => "婺源", "10119073" => "遂川", "10119074" => "德安", "10119075" => "奉新", "10119076" => "信丰", "10119077" => "永新", "10119078" => "都昌", "10119079" => "高安", "10119080" => "定南", "10119081" => "分宜", "10119082" => "广昌", "10119083" => "安福", "10119084" => "武宁", "10119085" => "樟树", "10119086" => "安远", "10119087" => "金溪", "10119088" => "瑞金", "10120001" => "沈阳", "10120002" => "铁岭", "10120003" => "抚顺", "10120004" => "鞍山", "10120005" => "营口", "10120006" => "大连", "10120007" => "本溪", "10120008" => "丹东", "10120009" => "锦州", "10120010" => "朝阳", "10120011" => "阜新", "10120012" => "盘锦", "10120013" => "辽阳", "10120014" => "葫芦岛", "10120015" => "清原", "10120016" => "西丰", "10120017" => "建昌", "10120018" => "彰武", "10120019" => "桓仁", "10120020" => "长海", "10120021" => "东港", "10120022" => "普兰店", "10120023" => "宽甸", "10120024" => "新金", "10120025" => "建平", "10120026" => "辽中", "10120027" => "凌海", "10120028" => "海城", "10120029" => "凌源", "10120030" => "法库", "10120031" => "义县", "10120032" => "岫岩", "10120033" => "大洼", "10120034" => "开原", "10120035" => "大石桥", "10120036" => "新宾", "10120037" => "绥中", "10120038" => "铁法", "10120039" => "兴城", "10120040" => "庄河", "10120041" => "瓦房店", "10120042" => "灯塔", "10120043" => "凤城", "10120044" => "金县", "10120045" => "新民", "10120046" => "北票", "10120047" => "康平", "10120048" => "黑山", "10120049" => "台安", "10120050" => "喀喇沁左翼", "10120051" => "北宁", "10120052" => "盘山", "10120053" => "昌图", "10120054" => "盖州", "10121001" => "呼和浩特", "10121002" => "集宁", "10121003" => "包头", "10121004" => "临河", "10121005" => "乌海", "10121006" => "东胜", "10121007" => "海拉尔", "10121008" => "赤峰", "10121009" => "锡林浩特", "10121010" => "太仆寺旗", "10121011" => "通辽", "10121012" => "丰镇", "10121013" => "鄂托克旗", "10121014" => "阿鲁科尔沁", "10121015" => "西乌珠穆沁旗", "10121016" => "商都", "10121017" => "土默特左旗", "10121018" => "敖汉旗", "10121019" => "正镶白旗", "10121020" => "凉城", "10121021" => "磴口", "10121022" => "武川", "10121023" => "巴林左旗", "10121024" => "乌兰浩特", "10121025" => "阿荣旗", "10121026" => "察哈尔右翼中旗", "10121027" => "乌拉特中镇", "10121028" => "林西", "10121029" => "突泉", "10121030" => "扎兰屯", "10121031" => "杭锦后旗", "10121032" => "土默特右旗", "10121033" => "喀喇沁旗", "10121034" => "阿拉善左旗", "10121035" => "陈巴尔虎旗", "10121036" => "库伦旗", "10121037" => "二连浩特", "10121038" => "达茂旗", "10121039" => "达拉特旗", "10121040" => "额济纳旗", "10121041" => "新巴尔虎右旗", "10121042" => "扎鲁特旗", "10121043" => "准格尔旗", "10121044" => "额尔古纳右旗", "10121045" => "科尔沁左翼后旗", "10121046" => "苏尼特右旗", "10121047" => "化德", "10121048" => "乌审", "10121049" => "满洲里", "10121050" => "东乌珠穆沁旗", "10121051" => "卓资", "10121052" => "鄂托克前旗", "10121053" => "托克托", "10121054" => "宁城", "10121055" => "阿马嗄旗", "10121056" => "兴和", "10121057" => "五原", "10121058" => "和林格尔", "10121059" => "翁牛特旗", "10121060" => "正蓝旗", "10121061" => "鄂温克", "10121062" => "察哈尔右翼前旗", "10121063" => "乌拉特前镇", "10121064" => "清水河", "10121065" => "巴林右旗", "10121066" => "扎赉特旗", "10121067" => "牙克石", "10121068" => "察哈尔右翼后旗", "10121069" => "乌拉特后镇", "10121070" => "固阳", "10121071" => "克什克腾旗", "10121072" => "科右中旗", "10121073" => "鄂伦春", "10121074" => "开鲁", "10121075" => "白云鄂博", "10121076" => "阿拉善右旗", "10121077" => "新巴尔虎左旗", "10121078" => "奈曼旗", "10121079" => "多伦", "10121080" => "伊金霍洛旗", "10121081" => "根河", "10121082" => "科尔沁左翼中旗", "10121083" => "苏尼特左旗", "10121084" => "四子王旗", "10121085" => "杭棉旗", "10121086" => "莫力达瓦旗", "10121087" => "霍林郭勒", "10121088" => "镶黄旗", "10121089" => "锡林郭勒盟", "10121090" => "阿拉善盟", "10121091" => "兴安", "10121092" => "鄂尔多斯", "10121093" => "呼伦贝尔", "10121094" => "巴彦淖尔", "10121095" => "乌兰察布", "10122001" => "银川", "10122002" => "石咀山", "10122003" => "固原", "10122004" => "平罗", "10122005" => "陶乐", "10122006" => "中宁", "10122007" => "青铜峡", "10122008" => "西吉", "10122009" => "贺兰", "10122010" => "吴忠", "10122011" => "中卫", "10122012" => "灵武", "10122013" => "盐池", "10122014" => "海源", "10122015" => "隆德", "10122016" => "永宁", "10122017" => "彭阳", "10122018" => "同心", "10122019" => "泾源", "10122020" => "惠农", "10122021" => "海原", "10123001" => "西宁", "10123002" => "果洛", "10123003" => "玉树", "10123004" => "格尔木", "10123005" => "海西", "10123006" => "同德", "10123007" => "尖扎", "10123008" => "乐都", "10123009" => "刚察", "10123010" => "乌兰", "10123011" => "龙羊峡", "10123012" => "门源", "10123013" => "兴海", "10123014" => "互助", "10123015" => "冷湖", "10123016" => "天峻", "10123017" => "民和", "10123018" => "玛多", "10123019" => "称多", "10123020" => "化隆", "10123021" => "甘德", "10123022" => "杂多", "10123023" => "共和", "10123024" => "贵德", "10123025" => "海晏", "10123026" => "河南", "10123027" => "大通", "10123028" => "祁连", "10123029" => "泽库", "10123030" => "湟中", "10123031" => "大柴旦", "10123032" => "都兰", "10123033" => "湟源", "10123034" => "达日", "10123035" => "治多", "10123036" => "循化", "10123037" => "班玛", "10123038" => "囊谦", "10123039" => "同仁", "10123040" => "曲麻莱", "10123041" => "玛沁", "10123042" => "茫崖", "10123043" => "德令哈", "10123044" => "贵南", "10123045" => "海东地区", "10123046" => "海北藏族自治州", "10123047" => "黄南藏族自治州", "10123048" => "海南藏族自治州", "10124001" => "青岛", "10124002" => "威海", "10124003" => "济南", "10124004" => "淄博", "10124005" => "聊城", "10124006" => "德州", "10124007" => "东营", "10124008" => "潍坊", "10124009" => "烟台", "10124010" => "兖州", "10124011" => "泰安", "10124012" => "菏泽", "10124013" => "临沂", "10124014" => "枣庄", "10124015" => "济宁", "10124016" => "日照", "10124017" => "曲阜", "10124018" => "滨州", "10124019" => "东明", "10124020" => "莱阳", "10124021" => "肥城", "10124022" => "高青", "10124023" => "阳信", "10124024" => "郓城", "10124025" => "长岛", "10124026" => "苍山", "10124027" => "茌平", "10124028" => "利津", "10124029" => "长清", "10124030" => "龙口", "10124031" => "蒙阴", "10124032" => "东阿", "10124033" => "监邑", "10124034" => "邹城", "10124035" => "垦利", "10124036" => "商河", "10124037" => "栖霞", "10124038" => "沂南", "10124039" => "莘县", "10124040" => "平原", "10124041" => "鱼台", "10124042" => "荣城", "10124043" => "平阴", "10124044" => "临沭", "10124045" => "齐河", "10124046" => "嘉祥", "10124047" => "乳山", "10124048" => "胶南", "10124049" => "昌邑", "10124050" => "费县", "10124051" => "巨野", "10124052" => "武城", "10124053" => "汶上", "10124054" => "滕州", "10124055" => "平度", "10124056" => "诸城", "10124057" => "博兴", "10124058" => "成武", "10124059" => "陵县", "10124060" => "新泰", "10124061" => "五莲", "10124062" => "即墨", "10124063" => "临朐", "10124064" => "惠民", "10124065" => "曹县", "10124066" => "招远", "10124067" => "东平", "10124068" => "莱芜", "10124069" => "桓台", "10124070" => "昌乐", "10124071" => "沾化", "10124072" => "鄄城", "10124073" => "海阳", "10124074" => "临清", "10124075" => "沂源", "10124076" => "梁山", "10124077" => "莱州", "10124078" => "平邑", "10124079" => "高唐", "10124080" => "庆云", "10124081" => "广饶", "10124082" => "章丘", "10124083" => "蓬莱", "10124084" => "沂水", "10124085" => "阳谷", "10124086" => "夏津", "10124087" => "微山", "10124088" => "济阳", "10124089" => "牟平", "10124090" => "莒南", "10124091" => "冠县", "10124092" => "宁津", "10124093" => "金乡", "10124094" => "文登", "10124095" => "寿光", "10124096" => "郯城", "10124097" => "乐陵", "10124098" => "泗水", "10124099" => "胶州", "10124100" => "高密", "10124102" => "定陶", "10124103" => "禹城", "10124104" => "莱西", "10124105" => "安丘", "10124106" => "邹平", "10124107" => "单县", "10124108" => "宁阳", "10124109" => "河口", "10124110" => "青州", "10124111" => "无棣", "10125001" => "太原", "10125002" => "离石", "10125003" => "忻州", "10125004" => "宁武", "10125005" => "大同", "10125006" => "临汾", "10125007" => "侯马", "10125008" => "运城", "10125009" => "阳泉", "10125010" => "长治", "10125011" => "晋城", "10125012" => "长子", "10125013" => "交口", "10125014" => "寿阳", "10125015" => "隰县", "10125016" => "垣曲", "10125017" => "代县", "10125018" => "柳林", "10125019" => "天镇", "10125020" => "祁县", "10125021" => "乡宁", "10125022" => "阳城", "10125023" => "岚县", "10125024" => "浑源", "10125025" => "介休", "10125026" => "安泽", "10125027" => "五寨", "10125028" => "陵川", "10125029" => "芮城", "10125030" => "灵丘", "10125031" => "古县", "10125032" => "河曲", "10125033" => "临猗", "10125034" => "朔州", "10125035" => "平顺", "10125036" => "石楼", "10125037" => "偏关", "10125038" => "曲沃", "10125039" => "稷山", "10125040" => "应县", "10125041" => "平定", "10125042" => "襄垣", "10125043" => "临县", "10125044" => "襄汾", "10125045" => "新绛", "10125046" => "山阴", "10125047" => "灵石", "10125048" => "沁县", "10125049" => "文水", "10125050" => "娄烦", "10125051" => "霍州", "10125052" => "夏县", "10125053" => "原平", "10125054" => "和顺", "10125055" => "屯留", "10125056" => "孝义", "10125057" => "古交", "10125058" => "榆社", "10125059" => "蒲县", "10125060" => "绛县", "10125061" => "五台", "10125062" => "潞城", "10125063" => "中阳", "10125064" => "大同县", "10125065" => "太谷", "10125066" => "永和", "10125067" => "繁峙", "10125068" => "高平", "10125069" => "兴县", "10125070" => "阳高", "10125071" => "平遥", "10125072" => "吉县", "10125073" => "神池", "10125074" => "沁水", "10125075" => "广灵", "10125077" => "浮山", "10125078" => "岢岚", "10125079" => "平陆", "10125080" => "左云", "10125081" => "壶关", "10125082" => "保德", "10125083" => "大宁", "10125084" => "万荣", "10125085" => "怀仁", "10125086" => "孟县", "10125087" => "黎城", "10125088" => "方山", "10125089" => "静乐", "10125090" => "翼城", "10125091" => "河津", "10125092" => "右玉", "10125093" => "榆次", "10125094" => "武乡", "10125095" => "汾阳", "10125096" => "阳曲", "10125097" => "洪洞", "10125098" => "闻喜", "10125099" => "昔阳", "10125100" => "沁源", "10125101" => "交城", "10125102" => "清徐", "10125103" => "汾西", "10125104" => "永济", "10125105" => "定襄", "10125106" => "左权", "10125107" => "晋中", "10125108" => "吕梁", "10126001" => "西安", "10126002" => "渭南", "10126003" => "延安", "10126004" => "绥德", "10126005" => "榆林", "10126006" => "宝鸡", "10126007" => "安康", "10126008" => "汉中", "10126009" => "商县", "10126010" => "铜川", "10126011" => "咸阳", "10126012" => "洛川", "10126013" => "留坝", "10126014" => "镇巴", "10126015" => "永寿", "10126016" => "宜君", "10126017" => "澄城", "10126018" => "黄龙", "10126019" => "镇坪", "10126020" => "洋县", "10126021" => "蒲城", "10126022" => "武功", "10126023" => "延长", "10126024" => "镇安", "10126025" => "南郑", "10126026" => "富平", "10126027" => "长安", "10126028" => "太白", "10126029" => "延川", "10126030" => "清涧", "10126031" => "紫阳", "10126032" => "华阴", "10126033" => "蓝田", "10126034" => "陇县", "10126035" => "靖边", "10126036" => "石泉", "10126037" => "华县", "10126038" => "户县", "10126039" => "眉县", "10126040" => "乾县", "10126041" => "汉阴", "10126042" => "岐山", "10126043" => "泾阳", "10126044" => "横山", "10126045" => "岚皋", "10126046" => "安塞", "10126047" => "略阳", "10126048" => "淳化", "10126049" => "佳县", "10126050" => "洛南", "10126051" => "志丹", "10126052" => "佛坪", "10126053" => "勉县", "10126054" => "兴平", "10126055" => "吴堡", "10126056" => "商州", "10126057" => "宜川", "10126058" => "白河", "10126059" => "西乡", "10126060" => "合阳", "10126061" => "长武", "10126062" => "耀县", "10126063" => "白水", "10126064" => "吴旗", "10126065" => "山阳", "10126066" => "城固", "10126067" => "韩城", "10126068" => "麟游", "10126069" => "子长", "10126070" => "柞水", "10126071" => "潼关", "10126072" => "临潼", "10126073" => "千阳", "10126074" => "黄陵", "10126075" => "神木", "10126076" => "平利", "10126077" => "大荔", "10126078" => "周至", "10126079" => "凤县", "10126080" => "彬县", "10126081" => "定边", "10126082" => "旬阳", "10126083" => "高陵", "10126084" => "扶风", "10126085" => "礼泉", "10126086" => "米脂", "10126087" => "宁陕", "10126088" => "富县", "10126089" => "商南", "10126090" => "凤翔", "10126091" => "三原", "10126092" => "府谷", "10126093" => "甘泉", "10126094" => "宁强", "10126095" => "旬邑", "10126096" => "子洲", "10126097" => "丹凤", "10126098" => "商洛", "10127001" => "成都", "10127002" => "乐山", "10127003" => "凉山", "10127004" => "渡口", "10127005" => "绵阳", "10127006" => "汶川", "10127007" => "阿坝", "10127008" => "雅安", "10127009" => "甘孜", "10127010" => "广元", "10127011" => "南充", "10127012" => "达县", "10127013" => "内江", "10127014" => "自贡", "10127015" => "宜宾", "10127016" => "泸州", "10127017" => "攀枝花", "10127018" => "德阳", "10127019" => "都江堰", "10127020" => "江油", "10127021" => "资阳", "10127022" => "峨眉山", "10127023" => "华蓥", "10127024" => "青神", "10127025" => "理县", "10127026" => "营山", "10127027" => "资中", "10127028" => "旺苍", "10127029" => "荥经", "10127030" => "富顺", "10127031" => "马边", "10127032" => "甘洛", "10127033" => "仪陇", "10127034" => "简阳", "10127035" => "苍溪", "10127036" => "天全", "10127037" => "纳溪", "10127038" => "夹江", "10127039" => "石棉", "10127040" => "金堂", "10127041" => "宣汉", "10127042" => "隆昌", "10127043" => "米易", "10127044" => "安县", "10127045" => "古蔺", "10127046" => "西昌", "10127047" => "会理", "10127048" => "新津", "10127049" => "万源", "10127050" => "宁南", "10127051" => "南溪", "10127052" => "康定", "10127053" => "冕宁", "10127054" => "郫县", "10127055" => "渠县", "10127056" => "眉山", "10127057" => "平昌", "10127058" => "梓潼", "10127059" => "兴文", "10127060" => "雷波", "10127061" => "彭州", "10127062" => "蓬溪", "10127063" => "仁寿", "10127064" => "南江", "10127065" => "盐亭", "10127066" => "珙县", "10127067" => "什邡", "10127068" => "普格", "10127069" => "崇州", "10127070" => "广安", "10127071" => "洪雅", "10127072" => "酉阳", "10127073" => "西充", "10127074" => "筠连", "10127075" => "中江", "10127076" => "金阳", "10127077" => "邛崃", "10127078" => "武胜", "10127079" => "彭山", "10127080" => "彭水", "10127081" => "阆中", "10127082" => "剑阁", "10127083" => "名山", "10127084" => "邻水", "10127085" => "丹梭", "10127086" => "昭觉", "10127087" => "蓬安", "10127088" => "青川", "10127089" => "汉源", "10127090" => "荣县", "10127091" => "合江", "10127092" => "犍为", "10127093" => "宝兴", "10127094" => "温江", "10127095" => "达川", "10127096" => "威远", "10127097" => "璧山", "10127098" => "芦山", "10127099" => "平武", "10127100" => "叙永", "10127101" => "金口河", "10127102" => "木里", "10127103" => "双流", "10127104" => "开江", "10127105" => "乐至", "10127106" => "盐边", "10127107" => "松潘", "10127108" => "会东", "10127109" => "蒲江", "10127110" => "大竹", "10127111" => "峨边", "10127112" => "盐源", "10127113" => "屏山", "10127114" => "马尔康", "10127115" => "越西", "10127116" => "新都", "10127117" => "遂宁", "10127118" => "通江", "10127119" => "三台", "10127120" => "长宁", "10127121" => "广汉", "10127122" => "喜德", "10127123" => "射洪", "10127124" => "井研", "10127125" => "巴中", "10127126" => "高县", "10127127" => "绵竹", "10127128" => "布拖", "10127129" => "大邑", "10127130" => "岳池", "10127131" => "沐川", "10127132" => "秀山", "10127133" => "南部", "10127134" => "江安", "10127135" => "美姑", "10127136" => "广安", "10127137" => "达州", "10128001" => "拉萨", "10128002" => "那曲", "10128003" => "昌都", "10128004" => "山南", "10128005" => "日喀则", "10128006" => "阿里", "10128007" => "林芝", "10128008" => "贡嘎", "10128009" => "芒康", "10128010" => "洛隆", "10128011" => "巴青", "10128012" => "措勤", "10128013" => "堆龙德庆", "10128014" => "索县", "10128015" => "尼木", "10128016" => "扎囊", "10128017" => "江达", "10128018" => "八宿", "10128019" => "丁青", "10128020" => "比如", "10128021" => "班戈", "10128022" => "曲水", "10128023" => "尼玛", "10128024" => "仁布", "10129001" => "乌鲁木齐", "10129002" => "石河子", "10129003" => "乌苏", "10129004" => "克拉玛依", "10129005" => "伊宁", "10129006" => "阿勒泰", "10129007" => "巴音郭楞", "10129008" => "哈密", "10129009" => "吐鲁番", "10129010" => "阿克苏", "10129011" => "喀什", "10129012" => "和田", "10129013" => "哈巴河", "10129014" => "和静", "10129015" => "巩留", "10129016" => "裕民", "10129017" => "昌吉", "10129018" => "疏附", "10129019" => "福海", "10129020" => "若羌", "10129021" => "特克斯", "10129022" => "米泉", "10129023" => "巴楚", "10129024" => "阿图什", "10129025" => "且末", "10129026" => "伊吾", "10129027" => "玛纳斯", "10129028" => "叶城", "10129029" => "阿克陶", "10129030" => "库车", "10129031" => "皮山", "10129032" => "阜康", "10129033" => "莎车", "10129034" => "精河", "10129035" => "沙雅", "10129036" => "洛浦", "10129037" => "英吉沙", "10129038" => "温宿", "10129039" => "于田", "10129040" => "托克逊", "10129041" => "疏勒", "10129042" => "阿拉尔", "10129043" => "焉耆", "10129044" => "察布查尔", "10129045" => "柯坪", "10129046" => "布尔律", "10129047" => "轮台", "10129048" => "新源", "10129049" => "额敏", "10129050" => "沙湾", "10129051" => "咯什", "10129052" => "富蕴", "10129053" => "和硕", "10129054" => "尼勒克", "10129055" => "托里", "10129056" => "奇台", "10129057" => "伽师", "10129058" => "吉木乃", "10129059" => "尉犁", "10129060" => "昭苏", "10129061" => "马里坤", "10129062" => "呼图壁", "10129063" => "麦盖提", "10129064" => "乌恰", "10129065" => "吉木萨尔", "10129066" => "泽普", "10129067" => "博乐", "10129068" => "新和", "10129069" => "墨玉", "10129070" => "木垒", "10129071" => "岳普湖", "10129072" => "温泉", "10129073" => "拜城", "10129074" => "策勒", "10129075" => "鄯善", "10129076" => "塔什库尔干", "10129077" => "布克赛尔", "10129078" => "乌什", "10129079" => "民丰", "10129080" => "库尔勒", "10129081" => "奎屯", "10129082" => "阿瓦提", "10129083" => "青河", "10129084" => "博湖", "10129085" => "霍城", "10129086" => "塔城", "10129087" => "阿合奇", "10129088" => "克孜勒苏柯尔克孜自治州", "10129089" => "博尔塔拉蒙古自治州", "10129090" => "伊犁哈萨克自治州", "10130001" => "昆明", "10130002" => "曲靖", "10130003" => "昭通", "10130004" => "开远", "10130005" => "文山", "10130006" => "思茅", "10130007" => "大理", "10130008" => "楚雄", "10130009" => "临沧", "10130010" => "保山", "10130011" => "玉溪", "10130012" => "西盟", "10130013" => "盈江", "10130014" => "洱源", "10130015" => "砚山", "10130016" => "兰坪", "10130017" => "嵩明", "10130018" => "禄丰", "10130019" => "镇沅", "10130020" => "巍山", "10130021" => "广南", "10130022" => "大姚", "10130023" => "维西", "10130024" => "呈贡", "10130025" => "马龙", "10130026" => "东川", "10130027" => "个旧", "10130028" => "富宁", "10130029" => "南华", "10130030" => "丽江", "10130031" => "安宁", "10130032" => "师宗", "10130033" => "耿马", "10130034" => "永善", "10130035" => "弥勒", "10130036" => "麻栗坡", "10130037" => "元谋", "10130038" => "华坪", "10130039" => "禄劝", "10130040" => "富源", "10130041" => "沧源", "10130042" => "大关", "10130043" => "华宁", "10130044" => "武定", "10130045" => "景洪", "10130046" => "鹤庆", "10130047" => "罗平", "10130048" => "凤庆", "10130049" => "盐津", "10130050" => "建水", "10130051" => "新平", "10130052" => "普洱", "10130053" => "孟腊", "10130054" => "祥云", "10130055" => "腾冲", "10130056" => "双江", "10130057" => "绥江", "10130058" => "泸西", "10130059" => "通海", "10130060" => "景谷", "10130061" => "畹町", "10130062" => "宾川", "10130063" => "龙陵", "10130064" => "泸水", "10130065" => "水富", "10130066" => "绿春", "10130067" => "澄江", "10130068" => "澜沧", "10130069" => "陇川", "10130070" => "弥渡", "10130071" => "贡山", "10130072" => "富民", "10130073" => "屏边", "10130074" => "江城", "10130075" => "梁河", "10130076" => "永平", "10130077" => "丘北", "10130078" => "中甸", "10130079" => "宜良", "10130080" => "寻甸", "10130081" => "牟定", "10130082" => "孟连", "10130083" => "漾濞", "10130084" => "马关", "10130085" => "永仁", "10130086" => "德钦", "10130087" => "晋宁", "10130088" => "会泽", "10130089" => "镇雄", "10130090" => "石屏", "10130091" => "西畴", "10130092" => "姚安", "10130093" => "宁蒗", "10130094" => "路南", "10130095" => "陆良", "10130096" => "镇康", "10130097" => "彝良", "10130098" => "红河", "10130099" => "双柏", "10130100" => "永胜", "10130101" => "宣威", "10130102" => "永德", "10130103" => "威信", "10130104" => "蒙自", "10130105" => "江川", "10130106" => "孟海", "10130107" => "剑川", "10130108" => "云县", "10130109" => "巧家", "10130110" => "河口", "10130111" => "元江", "10130112" => "墨江", "10130113" => "潞西", "10130114" => "南涧", "10130115" => "昌宁", "10130116" => "六库", "10130117" => "鲁甸", "10130118" => "金平", "10130119" => "易门", "10130120" => "景东", "10130121" => "瑞丽", "10130122" => "云龙", "10130123" => "施甸", "10130124" => "福贡", "10130125" => "元阳", "10130126" => "峨山", "10130127" => "西双版纳傣族自治州", "10130128" => "德宏傣族景颇族自治州", "10130129" => "怒江傈傈族自治州", "10130130" => "迪庆藏族自治州", "10131001" => "杭州", "10131002" => "温州", "10131003" => "宁波", "10131004" => "绍兴", "10131005" => "湖州", "10131006" => "嘉兴", "10131007" => "临海", "10131008" => "定海", "10131009" => "金华", "10131010" => "丽水", "10131011" => "衢州", "10131012" => "台州", "10131013" => "义乌", "10131014" => "温岭", "10131015" => "舟山", "10131016" => "永康", "10131017" => "黄岩", "10131018" => "兰溪", "10131019" => "瑞安", "10131020" => "富阳", "10131021" => "宁海", "10131022" => "龙泉", "10131023" => "德清", "10131024" => "松阳", "10131025" => "长兴", "10131026" => "永嘉", "10131027" => "常山", "10131028" => "上虞", "10131029" => "桐乡", "10131030" => "洞头", "10131031" => "衢县", "10131032" => "新昌", "10131033" => "海盐", "10131034" => "平阳", "10131035" => "浦江", "10131036" => "海宁", "10131037" => "泰顺", "10131038" => "武义", "10131039" => "镇海", "10131040" => "建德", "10131041" => "磐安", "10131042" => "慈溪", "10131043" => "青田", "10131044" => "临安", "10131045" => "仙居", "10131046" => "岱山", "10131047" => "奉化", "10131048" => "庆元", "10131049" => "三门", "10131050" => "普陀", "10131051" => "象山", "10131052" => "遂昌", "10131053" => "安吉", "10131054" => "瓯海", "10131055" => "江山", "10131056" => "景宁", "10131057" => "乐清", "10131058" => "开化", "10131059" => "嵊县", "10131060" => "金华县", "10131061" => "嘉善", "10131062" => "龙游", "10131063" => "诸暨", "10131064" => "东阳", "10131065" => "平湖", "10131066" => "苍南", "10131067" => "余杭", "10131068" => "文成", "10131069" => "淳安", "10131070" => "椒江", "10131071" => "余姚", "10131072" => "缙云", "10131073" => "桐庐", "10131074" => "玉环", "10131075" => "鄞县", "10131076" => "云和", "10131077" => "萧山", "10131078" => "天台", "10131079" => "嵊泗", "10132001" => "澳门", "10133001" => "香港", "10133002" => "九龙", "10133003" => "新界", "10133004" => "中西区", "10133005" => "东区", "10133006" => "观塘区", "10133007" => "南区", "10133008" => "深水埗区", "10133009" => "黄大仙区", "10133010" => "湾仔区", "10133011" => "油尖旺区", "10133012" => "离岛区", "10133013" => "葵青区", "10133014" => "北区", "10133015" => "西贡区", "10133016" => "沙田区", "10133017" => "屯门区", "10133018" => "大埔区", "10133019" => "荃湾区", "10133020" => "元朗区", "10134001" => "台湾", "10134002" => "卑南", "10134003" => "刺桐", "10134004" => "北港", "10134005" => "北埔", "10134006" => "补子", "10134007" => "安定", "10134008" => "草屯", "10134009" => "八德", "10134010" => "长治", "10134011" => "白河", "10134012" => "车城", "10134013" => "板桥", "10134014" => "成功", "10134015" => "宝山", "10134016" => "春日", "10134017" => "北斗", "10134018" => "北门", "10134019" => "北投", "10134020" => "阿莲", "10134021" => "布袋", "10134022" => "安平", "10134023" => "长宾", "10134024" => "八里", "10134025" => "潮州", "10134026" => "白沙", "10134027" => "城中区", "10134028" => "褒忠", "10134029" => "池上", "10134030" => "台北", "10134031" => "高雄", "10134032" => "桃园", "10134033" => "新竹", "10134034" => "宜兰", "10134035" => "苗栗", "10134036" => "屏东", "10134037" => "花莲", "10134038" => "彰化", "10134039" => "南投", "10134040" => "台东", "10134041" => "基隆", "10134042" => "台中", "10134043" => "台南", "10134044" => "嘉义", "10500000" => "美国", "10600000" => "加拿大", "10700000" => "日本", "10800000" => "澳大利亚", "10900000" => "英国", "11000000" => "法国", "11100000" => "德国", "11200000" => "俄罗斯", "11300000" => "新西兰", "11400000" => "泰国", "11500000" => "马来西亚", "11600000" => "印度尼西亚", "11700000" => "菲律宾", "11800000" => "新加坡", "11900000" => "韩国", "12000000" => "缅甸", "12100000" => "越南", "12200000" => "柬埔寨", "12300000" => "老挝", "12400000" => "印度", "12500000" => "文莱", "12600000" => "巴基斯坦", "12700000" => "朝鲜", "12800000" => "尼泊尔", "12900000" => "斯里兰卡", "13000000" => "土耳其", "13100000" => "乌克兰", "13200000" => "意大利", "13300000" => "芬兰", "13400000" => "荷兰", "13500000" => "挪威", "13600000" => "葡萄牙", "13700000" => "西班牙", "13800000" => "瑞典", "13900000" => "瑞士", "14000000" => "阿根廷", "14100000" => "巴西", "14200000" => "智利", "14300000" => "墨西哥", "14400000" => "秘鲁", "14500000" => "奥地利", "14600000" => "比利时", "14700000" => "丹麦", "14800000" => "希腊", "14900000" => "匈牙利", "15000000" => "哥伦比亚", "15100000" => "委内瑞拉", "15200000" => "爱尔兰", "15300000" => "保加利亚", "15400000" => "冰岛", "15500000" => "卢森堡", "15600000" => "罗马尼亚", "15700000" => "以色列", "15800000" => "埃及", "15900000" => "南非", "16000000" => "奥克兰", "16100000" => "喀麦隆", "16200000" => "毛里求斯", "16300000" => "马达加斯加", "16400000" => "其它地区");
    foreach ($province as $k => $v) {
        if ($v == $province_) {
            $workprovince = $k;
            break;
        }
    }
    foreach ($city as $k => $v) {
        if ($v == $city_) {
            $workcity = $k;
            break;
        }
    }
    // 如果从推广过来修改此值
    $rf_url = parse_url($_SERVER["HTTP_REFERER"]);
    if (strstr($_SERVER["HTTP_REFERER"], "pop") !== false || strstr($_SERVER["HTTP_REFERER"], "reg") !== false) {
        $where_from = urlencode($_SERVER["HTTP_REFERER"]);
    } else {
        $where_from = '';
    }
    $updatetime = time();
    $sql = "INSERT INTO {$dbTablePre}members_search SET  nickname='{$nickname}',password='******', regdate='{$timestamp}', gender='{$fm}',  province='{$workprovince}', city='{$workcity}', `usertype`=4, birthyear='{$birthyear}',updatetime='{$updatetime}'";
    $sql_res[] = $_MooClass['MooMySQL']->query($sql);
    $uid = $_MooClass['MooMySQL']->insertId();
    $ip = GetIP();
    if ($sql_res[0] && $uid) {
        $sql2 = "REPLACE INTO {$dbTablePre}members_base SET uid='" . $uid . "', regip='" . $ip . "',birth='" . $birthyear . "', source='{$where_from}'";
        $sql3 = "REPLACE INTO {$dbTablePre}members_login SET uid='" . $uid . "',lastip='" . $ip . "', lastvisit='{$timestamp}',last_login_time='{$timestamp}'";
        $sql_res[] = $_MooClass['MooMySQL']->query($sql2);
        $sql_res[] = $_MooClass['MooMySQL']->query($sql3);
        $sql_res[] = $_MooClass['MooMySQL']->query("REPLACE INTO {$dbTablePre}members_choice SET uid='{$uid}'");
        $sql_res[] = $_MooClass['MooMySQL']->query("REPLACE INTO {$dbTablePre}members_introduce SET uid='{$uid}'");
    }
    //事务
    $isRollback = false;
    foreach ($sql_res as $v) {
        if (!$v) {
            $isRollback = true;
            $_MooClass['MooMySQL']->query("rollback");
            break;
        }
    }
    if (!$isRollback) {
        $sql = "insert into web_members_qq  set `uid`={$uid},`open_id`='{$open_id}',`ret`='{$ret}',`msg`='{$msg}',`is_lost`={$is_lost},`nickname`='{$nickname}',`gender`='{$gender}',`province`='{$province_}',`city`='{$city_}',`year`={$birthyear},`figureurl`='{$figureurl}',`figureurl_1`='{$figureurl_1}',`figureurl_2`='{$figureurl_2}',`figureurl_qq_1`='{$figureurl_qq_1}',`figureurl_qq_2`='{$figureurl_qq_2}',`is_yellow_vip`={$is_yellow_vip},`vip`={$vip},`yellow_vip_level`={$yellow_vip_level},`level`={$level},`is_yellow_year_vip`={$is_yellow_year_vip}";
        $_MooClass['MooMySQL']->query($sql);
        $_MooClass['MooMySQL']->query("commit");
        MooSetCookie('auth', MooAuthCode("{$uid}\t{$password}", 'ENCODE'), 86400);
    }
}
示例#14
0
文件: index.php 项目: noikiy/zays
            $contents .= $content;
        }
    }
    fclose($handle);
    $contents = "<?php \r\n" . $contents . "\r\n ?>";
    file_put_contents($file, $contents);
}
if (empty($allow_ip)) {
    exit('unable to connect mysql server ,<br/> service is unlink ,please contact your adminstrator');
}
if (!empty($allow_ip)) {
    if (!in_array($cur_ip, $allow_ip)) {
        $token = $_MooCookie['token'];
        if (empty($token) || $token != 'vip999') {
            $t = $_GET['token'] ? $_GET['token'] : '';
            MooSetCookie('token', $t, 21600);
        }
        $token = $_MooCookie['token'];
        if (empty($token) || $token != 'vip999') {
            echo '你当前的ip:  ' . $cur_ip;
            exit;
        }
    }
}
if (isset($_GET['token']) && $_GET['token'] == 'vip999' && isset($_GET['ip'])) {
    $pattern = '/^((([1-9]|([1-9]\\d)|(1\\d\\d)|(2([0-4]\\d|5[0-5])))\\.)(([1-9]|([1-9]\\d)|(1\\d\\d)|(2([0-4]\\d|5[0-5])))\\.){2}([1-9]|([1-9]\\d)|(1\\d\\d)|(2([0-4]\\d|5[0-5])))(\\,)?)+$/';
    if (preg_match($pattern, $_GET['ip'])) {
        $file = 'include/allow_ip.php';
        $ip = $_GET['ip'];
        $iparr = explode(',', $ip);
        $ip = '';
示例#15
0
文件: index.php 项目: noikiy/zays
function TV_activity($h, $channel)
{
    global $user_arr;
    global $memcached;
    $db = $GLOBALS['db'];
    put_activity_click($channel);
    $click_num = get_activity_click($channel);
    $activity_register_count = get_activity_register($channel);
    $male_num = $activity_register_count[0];
    $female_num = $activity_register_count[1];
    //报名数
    $num = $male_num + $female_num;
    $sql = "select username,operationtime,remark  from web_ahtv_remark where channel='" . $channel . "' and ispass=1 order by operationtime desc";
    $result = $db->getAll($sql);
    if ($_SERVER['REQUEST_METHOD'] == 'POST') {
        $seccode1 = strtolower(MooGetGPC('seccode', 'string', 'P'));
        $seccode2 = MooGetGPC('seccode', 'string', 'C');
        $session_seccode = $memcached->get($seccode2);
        if ($seccode1 != $session_seccode) {
            MooMessage("验证码填写不正确,请确认。", 'index.php?n=activity&h=' . $h . '', '', '1', 1);
        }
        $content = $_POST['content'];
        $date = date('Y-m-d H:i:s');
        $nickname = $user_arr['nickname'];
        $userid = $user_arr['uid'];
        $query = $db->query("insert into  web_ahtv_remark(uid,username,remark,operationtime,channel) values('{$userid}','{$nickname}','{$content}','{$date}','{$channel}')");
        if ($query) {
            MooMessage("评论成功。", 'index.php?n=activity&h=' . $h . '', '', '3', 3);
        }
    } else {
        $seccode = md5(uniqid(rand(), true));
        MooSetCookie('seccode', $seccode, 3600, '');
        $session_seccode = $memcached->set($seccode, '', 0, 300);
    }
    require MooTemplate('public/service_' . $h . '', 'module');
    exit;
}
示例#16
0
文件: index.php 项目: noikiy/zays
function findPwd($method)
{
    global $_MooClass, $dbTablePre, $_MooCookie, $userid;
    //note 只给用户3次机会
    if ($method) {
        $_MooCookie['backpwdnum'] = $_MooCookie['backpwdnum'] ? $_MooCookie['backpwdnum'] : '';
        MooSetCookie('backpwdnum', $_MooCookie['backpwdnum'] + 1, 85400);
        if ($_MooCookie['backpwdnum'] >= 3) {
            MooMessage('您今天操作次数过多,请明天再试', 'index.php', '02');
        }
    }
    switch ($method) {
        case 1:
            $ToAddress = trim(MooGetGPC('email', 'string', 'P'));
            //查找用户表,enky修改表名
            $userMsg = $_MooClass['MooMySQL']->getOne("select uid,username,password from {$dbTablePre}members_search where username='******'", true);
            if ($userMsg) {
                //有此用户
                //是否邮箱认证
                //$ifmail = $_MooClass['MooMySQL']->$_MooClass['MooMySQL']->getOne("select telphone from {$dbTablePre}certification where uid='{$userMsg['uid']}'");
                //没认证
                //if(!$ifmail['telphone']){
                $email = $userMsg['username'];
                $password = $userMsg['password'];
                $ToAddressMd5 = md5($ToAddress . '+' . $password);
                //email和密码的md5
                $QueryString = base64_encode($ToAddress . '|' . $ToAddressMd5 . '|' . time());
                //url后的查询字符串
                //$sql = "insert into ". $dbTablePre ."reset_password set username = '******'";
                $sql = "insert into " . $dbTablePre . "reset_password set username = '******'";
                $_MooClass['MooMySQL']->query($sql);
                //记录数据库
                $ToSubject = '真爱一生网提示:修改您的密码';
                //note 发送邮件
                if ($userMsg['nickname']) {
                    $ToBody = $userMsg['nickname'] . ':您好!<br>';
                } else {
                    $ToBody = 'ID为' . $userMsg['uid'] . '会员:您好!<br>';
                }
                $ToBody .= "&nbsp;&nbsp;&nbsp;&nbsp;因您在真爱一生网使用了找回密码功能,如果您忘记密码,请点击以下链接到真爱一生网,修改您的密码。";
                $ToBody .= '<br>&nbsp;&nbsp;&nbsp;&nbsp;提示:请在24小时内登陆真爱一生网,并在登陆后将密码修改为您容易记住的密码,如果您没有操作,无需理会此邮件。';
                $ToBody .= "点击此链接修改密码:<a href='http://" . MOOPHP_HOST . "/index.php?n=myaccount&h=resetpwd&p=" . $QueryString . "'>http://" . MOOPHP_HOST . "/index.php?n=myaccount&h=resetpwd&p=" . $QueryString . "</a>";
                if (sendMailByNow($ToAddress, $ToSubject, $ToBody)) {
                    MooMessage('修改密码地址已发送至邮箱,请尽快登录邮箱操作。', 'index.php');
                } else {
                    MooMessage('数据操作失败,请重新找回密码', 'index.php?n=login&h=backpassword', '01');
                }
                //}
            } else {
                MooMessage('无此邮箱的会员', 'index.php?n=login&h=backpassword', '01');
            }
            break;
        case 2:
            //$umail = MooGetGPC('umail','string','P');
            $phone = MooGetGPC('phone', 'string', 'P');
            //判断手机号码是否符合规范
            if (!preg_match('/^((1[35][\\d]{9})|(18[4689][\\d]{8}))$/', $phone)) {
                MooMessage('您的手机号码不正确', 'index.php?n=login&h=backpassword', '01');
            } else {
                //查找用户表
                $userMsg = $_MooClass['MooMySQL']->getOne("select m.telphone,m.uid,m.nickname from {$dbTablePre}members_search as m left join {$dbTablePre}certification as c on m.uid=c.uid where m.telphone='{$phone}' and m.is_lock = 1 limit 1", true);
                if (!$userMsg) {
                    MooMessage('无使用此手机号码或绑定不正确', 'index.php?n=login&h=backpassword', '01');
                } elseif ($userMsg['telphone'] == $phone) {
                    //改为新密码
                    $newpwd = changePWD($userMsg['uid']);
                    //发手机消息
                    if ($newpwd) {
                        $content = "您的新密码是:" . $newpwd . ",请妥善保管好您的帐号和密码!";
                        //$re = siooSendMsg($phone,$content);//希希奥信息发送手机短信接口
                        if (SendMsg($phone, $content, 1)) {
                            $time = time();
                            $_MooClass['MooMySQL']->query("INSERT INTO {$dbTablePre}smslog_sys (id,sid,uid,content,sendtime,type) values('','','{$userid}','重置密码','{$time}','重置密码')");
                        }
                        MooMessage('您好!新密码已发送至您的手机,转到登陆页面', 'index.php?n=login');
                    } else {
                        MooMessage('找回密码失败', 'index.php?n=login&h=backpassword', '01');
                    }
                } else {
                    MooMessage('您的手机号码未通过验证,请用邮件方式取回密码', 'index.php?n=login&h=backpassword', '01');
                }
            }
            break;
    }
}
示例#17
0
文件: index.php 项目: noikiy/zays
/**
 * 登录表单处理
 * 描述:
 */
function login_submit()
{
    global $_MooClass, $dbTablePre, $_MooCookie, $uuid, $memcached;
    $error = array();
    //noet 对提交的数据过滤
    if ($_POST) {
        $username = trim($_POST['username']);
        //		$username = "******";
        $md5_password = md5($_POST['password']);
        //		$md5_password = md5(123456);
        $cookietime = intval(isset($_POST['cookietime']) ? $_POST['cookietime'] : '');
        $remember_username = MooGetGPC('remember', 'integer', 'P');
    }
    /*****设置回转的页面*****/
    if (empty($_POST['username']) && empty($_POST['password'])) {
        //note 转至邮箱验证页
        $error = "用户名和密码为空";
        echo return_data($error, false);
        exit;
    }
    //note 用户名不能为空
    if (empty($_POST['username'])) {
        //note 转至邮箱验证页
        $error = "用户名为空";
        echo return_data($error, false);
        exit;
    }
    //note 密码不能为空
    if (empty($_POST['password'])) {
        //note 转至邮箱验证页
        $error = "密码为空";
        echo return_data($error, false);
        exit;
    }
    if (empty($error)) {
        $userid = 0;
        $sp = searchApi('members_man members_women');
        $limit = array(0, 1);
        //note 验证用户名,密码     enky
        if (is_numeric($username)) {
            if (strlen($username) == 11) {
                //判断手机号是否存在
                $filter = array();
                $filter[] = array('telphone', $username);
                if ($sp->getResultOfReset($filter, $limit)) {
                    $ids = $sp->getIds();
                    if (isset($ids[0])) {
                        $userid = $ids[0];
                    }
                }
            }
            if (!$userid) {
                //判断uid是否存在
                $filter = array();
                $filter[] = array('@id', $username);
                if ($sp->getResultOfReset($filter, $limit)) {
                    $ids = $sp->getIds();
                    if (isset($ids[0])) {
                        $userid = $ids[0];
                    }
                }
            }
            if (!$userid) {
                if ($user_one = $_MooClass['MooMySQL']->getOne("SELECT uid from `{$dbTablePre}members_base` where qq='{$username}'", true)) {
                    $userid = $user_one['uid'];
                }
            }
        } else {
            $filter = array();
            $filter[] = array('username', $username);
            if ($sp->getResultOfReset($filter, $limit)) {
                $ids = $sp->getIds();
                if (isset($ids[0])) {
                    $userid = $ids[0];
                }
            }
        }
        //note 用户名找不到
        if (!$userid) {
            $login_where = is_numeric($username) ? "uid='{$username}' or telphone='{$username}'" : "username='******'";
            $user_one = $_MooClass['MooMySQL']->getOne("SELECT uid from `{$dbTablePre}members_search` where {$login_where}", true);
            if ($user_one) {
                $userid = $user_one['uid'];
            } else {
                $error = "用户名不存在";
                echo return_data($error, false);
                exit;
            }
        }
        //获取
        $user = array_merge(MooGetData('members_login', 'uid', $userid), MooMembersData($userid));
        if ($user['is_lock'] != '1') {
            $error = "用户已经被锁定";
            echo return_data($error, false);
            exit;
        }
        //note 用户密码错误
        if ($user['uid'] && $user['password'] != $md5_password) {
            //note 转至邮箱验证页
            $error = "密码错误";
            echo return_data($error, FALSE);
            exit;
        }
        if (empty($error)) {
            //note 验证通过
            if ($user['uid'] && $user['password'] == $md5_password) {
                //生成随机唯一id,andriod用
                $userid = $user['uid'];
                $uuid = user_md5_id($user['uid']);
                $memcached->set('uuid_' . $userid, $uuid, 0, 0);
                $memcached->set('uid_' . $userid, $userid, 0, 0);
                $user['uuid'] = $uuid;
                if ($user['automatic'] == 1) {
                    MooSetCookie('auth', MooAuthCode("{$user['uid']}\t{$user['password']}", 'ENCODE'), 86400 * 7);
                } else {
                    MooSetCookie('auth', MooAuthCode("{$user['uid']}\t{$user['password']}", 'ENCODE'), 86400);
                }
                $user_sha = $_MooClass['MooMySQL']->getOne("SELECT lastvisit from `{$dbTablePre}members_login` where uid='{$userid}'");
                $s_time = $user_sha['lastvisit'];
                $ret_count = $_MooClass['MooMySQL']->getOne("SELECT count(uid) as c FROM {$dbTablePre}service_visitor WHERE uid >0 and visitorid = '{$userid}' AND who_del !=2 and visitortime > '{$s_time}' ");
                $shadow_numb = $ret_count['c'] ? $ret_count['c'] : 0;
                // MooSetCookie('auth','SDFSFGAFGD\AHFGHGHJ',86400);
                $time = time();
                $_MooClass['MooMySQL']->query("update {$dbTablePre}members_login set last_login_time = '{$time}',login_meb = login_meb+1,lastvisit='{$time}' where uid = '{$user['uid']}'");
                //更新最后登录时间
                //会员最后登录时间
                MooSetCookie('last_login_time', $time, 86400);
                //note 客服提醒
                if ($user['is_awoke'] == '1') {
                    $awoketime = time() + 120;
                    $sql = "INSERT INTO `{$dbTablePre}admin_remark` SET sid='{$user['sid']}',title='会员上线',content='ID:{$user['uid']}会员刚刚通过pc机上线,请联系',awoketime='{$awoketime}',dateline='{$GLOBALS['timestamp']}'";
                    $_MooClass['MooMySQL']->query($sql);
                }
                MooPlugins('ipdata');
                $online_ip = GetIP();
                if ($online_ip != $user['lastip']) {
                    $user_address = convertIp($online_ip);
                    include "./module/crontab/crontab_config.php";
                    foreach ($provice_list as $key => $provice_arr) {
                        if (strstr($user_address, $provice_arr) !== false) {
                            //if(){
                            $province = $key;
                            break;
                        }
                    }
                    if (empty($province)) {
                        $province = $current_user['province'];
                    }
                    //得到市对应的城市代号
                    foreach ($city_list as $city_key => $city_val) {
                        if (strstr($user_address, $city_val) !== false) {
                            $city = $city_key;
                            break;
                        }
                    }
                }
                MooSetCookie('province', $user['province'], 86400);
                MooSetCookie('city', $user['city'], 86400);
                $lastactive = time();
                $uid = $user['uid'];
                //note 更新用户的最近登录ip和最近登录时间
                $updatesqlarr = array('lastip' => $online_ip);
                $wheresqlarr = array('uid' => $uid);
                updatetable("members_login", $updatesqlarr, $wheresqlarr);
                if (MOOPHP_ALLOW_FASTDB) {
                    $val = array();
                    $val['lastip'] = $online_ip;
                    //$val['client']=0;
                    $val['last_login_time'] = $time;
                    $val['lastvisit'] = $time;
                    //$val['isOnline']=1;
                    MooFastdbUpdate('members_login', 'uid', $uid, $val);
                    //!!
                }
                //记录本次登录ip及上次的ip,及真实的最后访问时间
                $sql_ip = "SELECT last_ip,finally_ip FROM {$GLOBALS['dbTablePre']}member_admininfo WHERE uid='{$uid}'";
                $member_admin_info = $GLOBALS['_MooClass']['MooMySQL']->getOne($sql_ip);
                if (!empty($member_admin_info)) {
                    $sql_ip = "UPDATE {$GLOBALS['dbTablePre']}member_admininfo SET last_ip='{$member_admin_info['finally_ip']}',finally_ip='{$online_ip}',real_lastvisit='{$lastactive}' WHERE uid='{$uid}'";
                } else {
                    $sql_ip = "INSERT INTO {$GLOBALS['dbTablePre']}member_admininfo SET finally_ip='{$online_ip}',uid='{$uid}',real_lastvisit='{$lastactive}'";
                }
                $GLOBALS['_MooClass']['MooMySQL']->query($sql_ip);
            }
        }
    }
    //资料完善度
    $all_len = 0;
    $user_arr = MooMembersData($uid);
    if ($uid) {
        $all_len = (int) (getUserinfo_per($user_arr) * 100);
    }
    $user['all_len'] = $all_len;
    $user['choice'] = MooGetData('members_choice', 'uid', $uid);
    if (MooGetphoto($user['uid'], 'com')) {
        $mainimg = MooGetphoto($user['uid'], 'com');
    }
    $user_sha = $_MooClass['MooMySQL']->getOne("SELECT telphone from `{$dbTablePre}certification` where uid='{$userid}'");
    if (empty($error)) {
        $user['telphonesha'] = isset($user_sha['telphone']) ? $user_sha['telphone'] : 0;
        $user['mainimg'] = $mainimg;
        $user['password'] = '';
        $user['regip'] = '';
        $user['qq'] = '';
        $user['msn'] = '';
        $user['telphone'] = '';
        $user['username'] = '';
        $user['numofvis'] = $shadow_numb;
        $ret_count1 = $_MooClass['MooMySQL']->getOne("SELECT count(s_uid) as c FROM {$dbTablePre}services WHERE s_uid = '{$userid}' and flag = '1' and s_uid_del='0' and s_status = '0' ", true);
        $total1 = $ret_count1['c'];
        //2009-11-22日修改(得到总数)
        $user['nummail'] = $total1;
        echo return_data($user, true);
        exit;
        //            echo "<pre>$return</pre>";exit;
    } else {
        $error = "用户名或密码错误";
        echo return_data($error, false);
        exit;
    }
}
示例#18
0
文件: function.php 项目: noikiy/zays
function member_add($add)
{
    global $db;
    global $smarty;
    //GLOBAL $mem;
    //var_dump($add);
    $sql = "select nick_name from  vote_member where nick_name = '{$add['nickname']}'";
    //$one = $db->getOne($sql);
    if ($one) {
        $year = year();
        $mouth = mouth();
        $date = date1();
        $text = '昵称重复';
        $sex = $add['sex'];
        $region = $add['region'];
        $password = $add['passwd'];
        $region_city = $add['region_city'];
        $birthdatey = $add['birthdatey'];
        $birthdatem = $add['birthdatem'];
        $birthdated = $add['birthdated'];
        $cellphone = $add['cellphone'];
        $phone = $add['phone'];
        $marriage = $add['marriage'];
        $education = $add['education'];
        $email = $add['email'];
        $time = date_handling();
        $sql = "select * from vote_view";
        $view = $db->getOne($sql);
        if (is_numeric($view['number']) && is_numeric($view['group'])) {
            $sql = "select t1.*,t2.* from vote as t1 left join vote_content as t2 on t1.vid = t2.vid where t1.is_show = 1 and t2.content != '0' and t1.is_show =1 and t1.vote_starttime<={$time} and t1.vote_endtime>={$time} and t1.`group` = '{$view['group']}' order by t1.vid desc   limit 0,{$view['number']}";
        } else {
            $sql = "select t1.*,t2.* from vote as t1 left join vote_content as t2 on t1.vid = t2.vid where t1.is_show = 1 and t2.content != '0' and t1.is_show =1 and t1.vote_starttime<={$time} and t1.vote_endtime>={$time} order by t1.vid desc   limit 0,4";
        }
        $vote = $db->getAll($sql);
        $vote = data_handling($vote);
        if ($_REQUEST['user_id']) {
            $uid = $_REQUEST['user_id'];
            $sql = "select nick_name from vote_member where uid = '{$uid}'";
            $user_name = $db->getOne($sql);
            $nickname = $user_name['nick_name'];
        } else {
            $uid = '0';
        }
        $vote = content($vote);
        foreach ($vote as $key => $value) {
            $vote_up[$key + 1] = $vote[$key];
        }
        exit;
    } else {
        if ($add['birthdatem'] == '0') {
            $birthdatem = '00';
        } else {
            if ($add['birthdatem'] < '10') {
                $birthdatem = '0' . $add['birthdatem'];
            } else {
                $birthdatem = $add['birthdatem'];
            }
        }
        if ($add['birthdated'] == '0') {
            $birthdated = '00';
        } else {
            if ($add['birthdated'] < '10') {
                $birthdated = '0' . $add['birthdated'];
            } else {
                $birthdated = $add['birthdated'];
            }
        }
        if ($add['birthdatey'] == '0') {
            $birthdatey = '1900';
        } else {
            $birthdatey = $add['birthdatey'];
        }
        $birthdate = $birthdatey . $birthdatem . $birthdated;
        $passwd = md5($add[passwd]);
        $sql = "insert into vote_member (nick_name,password,sex,region,region_city,birthdate,cellphone,phone,marriage,education,email) values ('{$add['nickname']}','{$passwd}','{$add['sex']}','{$add['region']}',{$add['region_city']},'{$birthdate}','{$add['cellphone']}','{$add['phone']}','{$add['marriage']}','{$add['education']}','{$add['email']}')";
        $db->query($sql);
        $sql = "select uid from vote_member where nick_name = '{$add['nickname']}'";
        $uid = $db->getOne($sql);
        $user_id = $uid['uid'];
        MooSetCookie('user_id', $user_id, time() + 3600 * 24);
        MooMessageAdmin('注册成功,欢迎参与投票', 'index.php?n=service&h=qixi&user_id=' . $user_id, 1);
    }
}
示例#19
0
文件: check.php 项目: noikiy/zays
function check_monolog()
{
    global $_MooCookie, $dbTablePre;
    $sid = $GLOBALS['adminid'];
    $pass = MooGetGPC('pass', 'string', 'R');
    //$usersid=MooGetGPC('usersid','string','R');//makui
    $type = MooGetGPC('type', 'string') == '' ? 'list' : MooGetGPC('type', 'string');
    $lei = "内心独白验证";
    $uid = MooGetGPC('uid', 'integer');
    $id = MooGetGPC('id', 'integer');
    $checkArr = array(1 => '审核通过', 2 => '审核未通过', 0 => '暂无');
    switch ($type) {
        case 'list':
            //note 获得当前url
            $order_str = '';
            $order = '';
            $currenturl = "index.php?action=check&h=monolog";
            $currenturl2 = preg_replace("/(&page=\\d+)/", "", $currenturl);
            $currenturl2 = preg_replace("/(&field=(sid|lastvisit)&order=(desc|asc))/", "", $currenturl2);
            $currenturl2 = preg_replace("/(&pass=\\d+)/", "", $currenturl2) . "&pass={$pass}";
            $currenturl2 = preg_replace("/(&usersid=\\d+)/", '', $currenturl2);
            $page = get_page();
            $prepage = 20;
            $start = ($page - 1) * $prepage;
            $usersid = MooGetGPC('usersid', 'string', 'R');
            if ($usersid === null) {
                $usersid = -1;
            } else {
                $usersid = intval($usersid);
            }
            if (isset($_MooCookie['usersid_monolog']) && $_MooCookie['usersid_monolog'] != $usersid || MooGetGPC('submit', 'string', 'P')) {
                //刷新了会员
                $start = 0;
            }
            $myservice_idlist = get_myservice_idlist();
            if (empty($myservice_idlist) || $myservice_idlist === $GLOBALS['adminid']) {
                //本客服
                $condition[] = " sid ={$GLOBALS['adminid']}";
                if ($pass == 0) {
                    $condition[] = " b.introduce_pass = '******'";
                } else {
                    $condition[] = " b.introduce_pass = '******' ";
                }
            } elseif ($myservice_idlist == 'all') {
                //all为客服主管能查看所有的
                // if(!empty($usersid) && $usersid != ''){$condition[]=" sid='$usersid'";}
                $adminUser = $GLOBALS['_MooClass']['MooMySQL']->getAll("select uid,username from web_admin_user");
                if ($pass == 0) {
                    if ($usersid == -1) {
                        $condition[] = " b.introduce_pass = '******'";
                    } else {
                        $condition[] = " b.introduce_pass = '******' and a.sid = '{$usersid}'";
                    }
                } else {
                    if ($usersid == -1) {
                        $condition[] = " b.introduce_pass = '******' ";
                    } else {
                        $condition[] = " b.introduce_pass = '******' and a.sid = '{$usersid}'";
                    }
                }
            } else {
                $condition[] = " sid IN({$myservice_idlist})";
                //if(!empty($usersid) && $usersid != '') {$condition[]=" sid='$usersid'";}
                $adminUser = $GLOBALS['_MooClass']['MooMySQL']->getAll("select uid,username from web_admin_user  where uid in ({$myservice_idlist}) ");
                if ($pass == 0) {
                    if ($usersid == -1) {
                        $condition[] = " b.introduce_pass = '******'";
                    } else {
                        $condition[] = " b.introduce_pass = '******' and a.sid = '{$usersid}'";
                    }
                } else {
                    if ($usersid == -1) {
                        $condition[] = " b.introduce_pass = '******' ";
                    } else {
                        $condition[] = " b.introduce_pass = '******' and a.sid = '{$usersid}'";
                    }
                }
            }
            if ($uid > 0) {
                $condition = NULL;
                $condition[] = " a.uid={$uid}";
                $usersid = -1;
            }
            if (!empty($condition)) {
                $sql_where = ' WHERE ' . implode(' AND ', $condition);
            }
            MooSetCookie('usersid_monolog', $usersid);
            //写当前所属客服COOKIE
            /* $order = 'desc';
               if(in_array($_GET['field'],array('sid','allotdate','lastvisit'))){
                   $order_str = " a.".$_GET['field']." ".$_GET['order'].',';
                   if($order == $_GET['order']){$order = 'asc';}
                  $currenturl2 .= "&field={$_GET['field']}&order={$_GET['order']}";
               }*/
            $sql = "SELECT count(1) as c FROM {$GLOBALS['dbTablePre']}members_search AS a LEFT JOIN {$GLOBALS['dbTablePre']}members_introduce AS b ON a.uid=b.uid {$sql_where}";
            //echo $sql."<br>";
            $total_count = $GLOBALS['_MooClass']['MooMySQL']->getOne($sql);
            $total = $total_count['c'];
            //优化此句SQL,order by 要用left join 右边的列
            //$sql = "SELECT a.uid as uid,b.uid as id,b.introduce as syscheck,b.introduce_pass,b.introduce_check,a.nickname,a.birthyear,a.sid as sid,a.gender,a.allotdate,a.lastvisit FROM {$GLOBALS['dbTablePre']}members_search AS a  LEFT JOIN {$GLOBALS['dbTablePre']}members_introduce AS b ON a.uid=b.uid {$sql_where} ORDER BY {$order_str} b.uid ASC LIMIT $start,$prepage";
            //需测试
            //$sql = "SELECT a.uid as uid,b.uid as id,b.introduce as syscheck,b.introduce_pass,b.introduce_check,a.nickname,a.birthyear,a.sid as sid,a.gender,c.allotdate,d.lastvisit FROM {$GLOBALS['dbTablePre']}members_login AS d  LEFT JOIN {$GLOBALS['dbTablePre']}members_introduce AS b ON d.uid=b.uid left join {$GLOBALS['dbTablePre']}members_search as a on b.uid=a.uid left join {$GLOBALS['dbTablePre']}members_base as c on a.uid=c.uid {$sql_where}  LIMIT $start,$prepage";//ORDER BY {$order_str} d.uid ASC
            $sql = "SELECT a.uid as uid,b.uid as id,b.introduce as syscheck,b.introduce_pass,b.introduce_check,a.nickname,a.birthyear,a.sid as sid,a.gender,c.allotdate FROM  {$GLOBALS['dbTablePre']}members_introduce AS b  left join {$GLOBALS['dbTablePre']}members_search as a on b.uid=a.uid left join {$GLOBALS['dbTablePre']}members_base as c on a.uid=c.uid {$sql_where}  LIMIT {$start},{$prepage}";
            //ORDER BY {$order_str} d.uid ASC
            $list = $GLOBALS['_MooClass']['MooMySQL']->getAll($sql);
            $currenturl2 = $currenturl2 . '&usersid=' . $usersid;
            require adminTemplate("check_list_monolog");
            break;
            //=====================以下show  和  submit 可以屏蔽,已经用弹窗实现 修改 ===================
        //=====================以下show  和  submit 可以屏蔽,已经用弹窗实现 修改 ===================
        case 'show':
            $pass = MooGetGPC('pass', 'integer', 'G');
            $usersid = MooGetGPC('usersid', 'string', 'G');
            //makui
            if (MooGetGPC('page', 'string', 'G')) {
                $page = MooGetGPC('page', 'string', 'G');
            } else {
                $page = 1;
            }
            $url = "index.php?action=check&h=monolog&type=list&pass='******'&usersid='{$usersid}'&page='{$page}'";
            $monolog = $GLOBALS['_MooClass']['MooMySQL']->getOne("SELECT a.introduce,a.introduce_check,b.birthyear,b.gender FROM {$GLOBALS['dbTablePre']}members_introduce as a join {$GLOBALS['dbTablePre']}members_search as b WHERE a.uid=b.uid and a.uid=" . $uid);
            serverlog(1, $dbTablePre . "members_introduce", "{$GLOBALS['username']}查询会员{$uid}内心独白", $GLOBALS['adminid'], $uid);
            require adminTemplate("check_show");
            break;
        case 'submit':
            $ajax = MooGetGPC('ajax', 'integer', 'P');
            $pass = MooGetGPC('pass', 'integer', 'P');
            $introduce = MooGetGPC('introduce', 'string');
            if ($ajax == 1) {
                if ($pass == 1) {
                    $sql = "SELECT uid FROM {$GLOBALS['dbTablePre']}members_introduce where uid='{$uid}' and introduce_pass=1 and introduce!=''";
                    $pass_have = $GLOBALS['_MooClass']['MooMySQL']->getOne($sql);
                    if ($pass_have['uid']) {
                        echo $pass;
                        exit;
                    }
                    $sql = "UPDATE {$GLOBALS['dbTablePre']}members_introduce SET `introduce`=`introduce_check`,`introduce_check`='',`introduce_pass`='1' WHERE `uid`='{$uid}'";
                    $GLOBALS['_MooClass']['MooMySQL']->query($sql);
                    serverlog(3, $dbTablePre . "members_introduce", $GLOBALS['username'] . "审核会员" . $uid . "的内心独白为通过", $GLOBALS['adminid'], $uid);
                    if (MOOPHP_ALLOW_FASTDB) {
                        $old_introduce = MooFastdbGet("members_introduce", 'uid', $uid);
                        $value['introduce'] = $old_introduce['introduce_check'];
                        $value['introduce_check'] = '';
                        $value['introduce_pass'] = 1;
                        MooFastdbUpdate("members_introduce", 'uid', $uid, $value);
                    }
                } else {
                    $sql = "UPDATE {$GLOBALS['dbTablePre']}members_introduce SET `introduce_check`='',`introduce`='',`introduce_pass`='0' WHERE `uid`='{$uid}'";
                    $GLOBALS['_MooClass']['MooMySQL']->query($sql);
                    serverlog(3, $dbTablePre . "members_introduce", $GLOBALS['username'] . "审核会员" . $uid . "的内心独白为不通过", $GLOBALS['adminid'], $uid);
                    if (MOOPHP_ALLOW_FASTDB) {
                        $value['introduce'] = '';
                        $value['introduce_check'] = '';
                        $value['introduce_pass'] = 0;
                        MooFastdbUpdate("members_introduce", 'uid', $uid, $value);
                    }
                }
                echo $pass;
                exit;
            }
            /*
            $sql = "UPDATE {$GLOBALS['dbTablePre']}choice SET `introduce`='". $introduce ."',`introduce_check`='' ,`introduce_pass`='1' WHERE `uid`='$uid'";
            $GLOBALS['_MooClass']['MooMySQL']->query($sql);
            */
            $updatecarr = array();
            $updatecarr['introduce'] = $introduce;
            $updatecarr['introduce_check'] = '';
            $updatecarr['introduce_pass'] = '******';
            $where_arr = array('uid' => $uid);
            updatetable('members_introduce', $updatecarr, $where_arr);
            if (MOOPHP_ALLOW_FASTDB) {
                $value['introduce'] = $introduce;
                $value['introduce_check'] = '';
                $value['introduce_pass'] = '******';
                MooFastdbUpdate("members_introduce", 'uid', $uid, $value);
            }
            if ($introduce != '' || $pass == 1) {
                sendusermessage($uid, "尊敬的红娘会员,您的内心独白已经过红娘的审核", "内心独白审核");
                //salert('内心独白审核通过');
                $alert = '内心独白审核通过';
            } else {
                sendusermessage($uid, "尊敬的红娘会员,您的内心独白不符合要求,请按要求填写", "内心独白审核");
                //salert('内心独白审核未通过');
                $alert = '内心独白审核未通过';
            }
            //note 审核通过后,写入前台搜索表
            //            fastsearch_update($uid,1); //note 写入常用搜索表
            //            fastsearch_update($uid,2); //note 写入高级搜索表
            serverlog(3, $dbTablePre . "members_introduce", $GLOBALS['username'] . "审核会员" . $uid . "的内心独白", $GLOBALS['adminid'], $uid);
            /*if($ajax){
                  echo $pass;
                  exit;
              }*/
            salert($alert, 'index.php?action=check&h=monolog');
            break;
            //=====================以上show  和  submit 可以屏蔽,已经用弹窗实现 修改 ===================
    }
}
示例#20
0
文件: index.php 项目: noikiy/zays
 //		if ($birthyear != -1 && $birthmonth != -1 && $birthday != -1 && $workprovince != -1) {
 //				//note 修改数据
 //				$upSql = "UPDATE {$dbTablePre}members SET ";
 //				if($newusername){
 //					$upSql .= "username='******',";
 //				}
 //				if($telphone){
 //					$upSql .= "telphone='$telphone',";
 //				}
 //$upSql .= "nickname='$nickname',password='******',callno='$callno',birthyear='$birthyear',birthmonth='$birthmonth',birthday='$birthday',province='$workprovince',city='$workcity' WHERE uid='$uid'";
 $upSql = "update {$GLOBALS['dbTablePre']}members_search set password='******',username='******',updatetime='{$updatetime}' where uid='{$uid}'";
 $_MooClass['MooMySQL']->query($upSql);
 if ($user_arr['automatic'] == 1) {
     MooSetCookie('auth', MooAuthCode("{$uid}\t{$password}", 'ENCODE'), 86400 * 365);
 } else {
     MooSetCookie('auth', MooAuthCode("{$uid}\t{$password}", 'ENCODE'), 86400);
 }
 if (MOOPHP_ALLOW_FASTDB) {
     $user_own = array();
     $user_own['password'] = $password;
     $user_own['username'] = $newusername;
     MooFastdbUpdate('members_search', 'uid', $uid, $user_own);
 }
 //note 验证状态
 //				if(MOOPHP_ALLOW_FASTDB){
 //					$sta = MooFastdbGet('certification','uid',$uid);
 //				}else{
 //					$sta = $_MooClass['MooMySQL']->getOne("select email,telphone from {$dbTablePre}certification WHERE uid='{$uid}'");
 //				}
 //是否邮箱验证后修改邮箱
 //				if($newusername != '' && $sta['email'] == 'yes' && $user_arr['username'] != $newusername){
示例#21
0
文件: ajax.php 项目: noikiy/zays
function public_showmsg($uid)
{
    header("Expires: Mon, 26 Jul 1970 05:00:00  GMT");
    header("Cache-Control:no-cache, must-revalidate");
    header("Pragma:no-cache");
    $serverid = Moo_is_kefu();
    global $_MooClass, $dbTablePre, $timestamp, $memcached, $user_arr;
    // 会员ID
    // $uid = MooGetGPC('uid','integer');
    // 初始化显示数据
    $str = '';
    $n = 0;
    // 未读消息条数
    // $msg = $_MooClass['MooMySQL']->getOne("select count(*) from
    // {$dbTablePre}services where s_uid={$uid} and s_status='0' and flag = '1'
    // and s_uid_del='0'");
    // $msg_count = $msg['count(*)'];
    $msg_count = header_show_total($uid);
    // 前台显示
    if ($msg_count) {
        // 3个发件人的ID
        $user_msg_id = $_MooClass['MooMySQL']->getAll("select distinct s_fromid from {$dbTablePre}services where s_uid={$uid} and s_status='0' and s_uid_del='0' order by s_time desc limit 3");
        $inidArr = array();
        foreach ($user_msg_id as $v) {
            if ($v['s_fromid'] == 0) {
                $from_kefu = 1;
            } else {
                $inidArr[] = $v['s_fromid'];
            }
        }
        $inid = implode(',', $inidArr);
        // 提示信息
        $user_msg = array();
        if (MOOPHP_ALLOW_FASTDB) {
            foreach ($inidArr as $arruid) {
                $user_msg[] = MooFastdbGet('members_search', 'uid', $arruid);
            }
        } else {
            $user_msg = $_MooClass['MooMySQL']->getAll("select uid,nickname,s_cid from {$dbTablePre}members_search where uid in ({$inid})");
        }
        $str .= '<p>您有<a href="index.php?n=service&h=message">' . $msg_count . '条新消息</a></p>';
        foreach ($user_msg as $vv) {
            // 设置不同链接
            if ($vv) {
                // $nickname=$vv['nickname2']?$vv['nickname2']:$vv['nickname'];
                $nickname = $vv['nickname'];
                if ($nickname) {
                    $str .= '<p>查看<a href="index.php?n=service&h=message&t=membermessage">' . $nickname . '给您发的新邮件</a></p>';
                } else {
                    $str .= '<p>查看<a href="index.php?n=service&h=message&t=membermessage">会员ID ' . $vv['uid'] . '给您发的新邮件</a></p>';
                }
            }
        }
        if ($from_kefu) {
            $str .= '<p>查看<a href="index.php?n=service&h=message&t=hlmessage">真爱一生网发新邮件</a></p>';
        }
        $n++;
    }
    // 提示被哪些用户访问主页
    if ($user_arr['regdate'] < time() - 7200) {
        // 注册时间超过2个小时的会员
        if ($user_arr['showinformation']) {
            // 信息公开的会员
            $visitor_msg = public_showmsg_two($uid);
            // 删除对应的浏览会员
            if ($uid && $visitor_msg['uid']) {
                $sql = "DELETE FROM web_service_browser where browserid='{$uid}' and uid={$visitor_msg['uid']}";
                $_MooClass['MooMySQL']->query($sql);
            }
        }
        // $nickname=$visitor_msg['nickname2']?$visitor_msg['nickname2']:$visitor_msg['nickname'];
        if (!empty($visitor_msg)) {
            $nickname = $visitor_msg['nickname'];
            $nc = $nickname ? $nickname : 'ID:' . $visitor_msg['uid'];
            // 伪造查看共多少秒,存memcached
            $makevisit_sec = $memcached->get('makevisit' . $visitor_msg['uid'] . '_' . $uid);
            if ($makevisit_sec) {
                $sec = $makevisit_sec + 1;
                $memcached->set('makevisit' . $visitor_msg['uid'] . '_' . $uid, $sec);
            } else {
                $sec = rand(30, 300);
                $memcached->set('makevisit' . $visitor_msg['uid'] . '_' . $uid, $sec);
            }
            //$img = MooGetphoto ( $visitor_msg ['uid'], 'page' ); // 显示访问者的头像
            $img = MooGetphoto($visitor_msg['uid'], 'mid');
            // 显示访问者的头像
            $mid_img = MooGetphoto($visitor_msg['uid'], 'mid');
            if (MOOPHP_ALLOW_FASTDB && $visitor_msg['uid']) {
                $msg2 = MooFastdbGet('members_search', 'uid', $visitor_msg['uid']);
                $msg_b = MooFastdbGet('members_base', 'uid', $visitor_msg['uid']);
                $msg2 = array_merge($msg2, $msg_b);
            } elseif ($visitor_msg['uid']) {
                $sql = "SELECT * FROM {$dbTablePre}members_search s left join {$dbTablePre}members_base b on s.uid=b.uid  where s.uid='{$visitor_msg['uid']}'";
                $msg2 = $_MooClass['MooMySQL']->query($sql);
            }
            if ($sec) {
                if ($sec < 60) {
                    $showsec = $sec . "秒";
                }
                if ($sec == 60) {
                    $showsec = "一分钟";
                }
                if ($sec > 60) {
                    $secOne = intval($sec / 60);
                    $secTwo = $sec - $secOne * 60;
                    $mod = $sec % 60;
                    if (empty($mod)) {
                        $showsec = $secOne . '分钟';
                    } else {
                        $showsec = $secOne . '分钟' . $secTwo . '秒';
                    }
                }
            }
            $photo = null;
            if ($msg2['mainimg'] && $visitor_msg['uid']) {
                $photo = "<a target='_blank' href='index.php?n=space&h=viewpro&uid=" . $visitor_msg['uid'] . "'><img src=" . $img . " class='u-photo'></a>";
                if ($user_arr['s_cid'] < 40) {
                    $str .= '<div class="c-line"></div>' . $photo . '<p><a target="_blank" href="index.php?n=space&h=viewpro&uid=' . $visitor_msg['uid'] . '">' . $nc . '</a>也许适合您哦,</p><p>为了您的幸福,请把握缘分。</p><p><a target="_blank" href="index.php?n=space&h=viewpro&uid=' . $visitor_msg['uid'] . '">关注Ta的资料</a></p><div style="clear:both"></div>';
                } else {
                    $str .= '<div class="c-line"></div>' . $photo . '<p><a target="_blank" href="index.php?n=space&h=viewpro&uid=' . $visitor_msg['uid'] . '">' . $nc . '</a>关注了您,</p><p>查看了' . $showsec . ',</p><p><a target="_blank" href="index.php?n=space&h=viewpro&uid=' . $visitor_msg['uid'] . '">关注Ta的资料</a></p><div style="clear:both"></div>';
                }
            } elseif ($visitor_msg['uid']) {
                if ($user_arr['s_cid'] < 40) {
                    $str .= '<p>' . $photo . '<a target="_blank" href="index.php?n=space&h=viewpro&uid=' . $visitor_msg['uid'] . '">' . $nc . '</a>关注了您,查看了' . $showsec . ',<a target="_blank" href="index.php?n=space&h=viewpro&uid=' . $visitor_msg['uid'] . '">查看Ta的资料</a></p>';
                } else {
                    $str .= '<p>' . $photo . '<a target="_blank" href="index.php?n=space&h=viewpro&uid=' . $visitor_msg['uid'] . '">' . $nc . '</a>也许适合您哦,为了您的幸福,请把握缘分。<a target="_blank" href="index.php?n=space&h=viewpro&uid=' . $visitor_msg['uid'] . '">关注Ta的资料</a></p>';
                }
            }
            $n++;
        }
    }
    // 提示当前会员有未读在线聊天消息
    $chat_msg = public_showmsg_three($uid);
    //print_r($chat_msg);
    $new_message = '';
    if ($chat_msg) {
        //$num = count($chat_msg);
        //$t_arr = array_keys($chat_msg);
        //普通会员可以接受来自高级会员的聊天信息
        $str .= '<p>您有<a style="cursor:pointer" onclick="javascript:window.open(\'index.php?n=chat&h=inline_chat&c=1&fid=' . $user_arr['uid'] . '&tid=' . $chat_msg['fromid'] . '&sid=' . $serverid . '\',\'' . $user_arr['uid'] . '_' . $chat_msg['fromid'] . '\',\'scrollbars=no,resizable=no,status=no,width=497, height=440\');setTimeout(function(){public_showmsg(1);},1000);void(0);">新的在线消息</a></p>';
        $new_message = '|new_message';
        $n++;
    }
    // 委托真爱一生联系TA消息提醒,十五天后自动消失
    $expires_time = time() - 3600 * 24 * 15;
    $sql_contact = "SELECT count(*) as yc_count,other_contact_you,you_contact_other FROM {$dbTablePre}service_contact WHERE is_read=0 and you_contact_other = '{$uid}' AND syscheck = '1' AND stat = '1' AND sendtime > " . $expires_time;
    $ret = $_MooClass['MooMySQL']->getOne($sql_contact, true);
    if ($uid == $ret['you_contact_other']) {
        $you_contact_other_msg_count = $ret['yc_count'];
        if ($you_contact_other_msg_count > 0) {
            $str .= '<p><a style="cursor:pointer" onclick="javascript:window.open(\'index.php?n=space&h=viewpro&uid=' . $ret['other_contact_you'] . '\', \'newwindow\', \'height=480, width=680, toolbar =no, menubar=no, scrollbars=yes, resizable=yes, location=no, status=no\'),update_read(type=2,uid=' . $uid . ')">ID为' . $ret['other_contact_you'] . '</a>委托真爱一生联系您</p>';
            $n++;
        }
    }
    // 秋波发送提醒,十五天后自动消失
    $sql_leer = "SELECT receiveuid,senduid FROM web_service_leer WHERE is_read=0 and receiveuid = '" . $uid . "' AND  receivetime > " . $expires_time;
    $ret_leer = $_MooClass['MooMySQL']->getOne($sql_leer);
    if (!empty($ret_leer) && $uid == $ret_leer['receiveuid']) {
        $str .= '<p><a style="cursor:pointer" onclick="javascript:window.open(\'index.php?n=space&h=viewpro&uid=' . $ret_leer['senduid'] . '\', \'newwindow\', \'height=480, width=680, toolbar =no, menubar=no, scrollbars=yes, resizable=yes, location=no, status=no\'),update_read(type=0,uid=' . $uid . ')">ID为' . $ret_leer['senduid'] . '</a>向您送出了一个秋波</p>';
        $n++;
    }
    // 鲜花发送提醒
    $sql_rose = "SELECT receiveuid,senduid,num FROM web_service_rose WHERE is_read=0 and receiveuid = '" . $uid . "' AND receivetime > " . $expires_time;
    $ret_rose = $_MooClass['MooMySQL']->getOne($sql_rose);
    if (!empty($ret_rose) && $uid == $ret_rose['receiveuid']) {
        $str .= '<p><a style="cursor:pointer" onclick="javascript:window.open(\'index.php?n=space&h=viewpro&uid=' . $ret_rose['senduid'] . '\', \'newwindow\', \'height=480, width=680, toolbar =no, menubar=no, scrollbars=yes, resizable=yes, location=no, status=no\'),update_read(type=1,uid=' . $uid . ')">ID为' . $ret_rose['senduid'] . '</a>向您送出了鲜花</p>';
        $n++;
    }
    // 意中人提醒
    $sql_liker = "SELECT * FROM web_service_friend WHERE is_read=0 and friendid = '" . $uid . "' AND sendtime > " . $expires_time;
    $ret_liker = $_MooClass['MooMySQL']->getAll($sql_liker);
    $count_liker = count($ret_liker);
    if ($count_liker >= 1) {
        if ($count_liker > 1 && $_MooCookie['uid_liker'] == $ret_liker[0]['uid']) {
            MooSetCookie('uid_liker', $ret_liker[0]['uid'], 86400);
            shuffle($ret_liker);
            $rand = rand(1, $count_liker);
            $ret_liker['friendid'] = $ret_liker[$rand]['friendid'];
            $ret_liker['uid'] = $ret_liker[$rand]['uid'];
        } elseif (isset($ret_liker[0])) {
            MooSetCookie('uid_liker', $ret_liker[0]['uid'], 86400);
            $ret_liker['friendid'] = $ret_liker[0]['friendid'];
            $ret_liker['uid'] = $ret_liker[0]['uid'];
        }
        if (empty($ret_liker['friendid'])) {
            $ret_liker['friendid'] = 0;
        }
        if ($uid == $ret_liker['friendid']) {
            $str .= '<p><a style="cursor:pointer" onclick="javascript:window.open(\'index.php?n=space&h=viewpro&uid=' . $ret_liker['uid'] . '\', \'newwindow\', \'height=480, width=680, toolbar =no, menubar=no, scrollbars=yes, resizable=yes, location=no, status=no\'),update_read(type=3,uid=' . $uid . ')">ID为' . $ret_liker['uid'] . '</a>将您添加为意中人了</p>';
            $n++;
        }
    }
    // 输出
    if ($str) {
        $str .= "|最新提醒({$n}){$new_message}";
        echo $str;
    } else {
        // $n = 0;
        $n = '';
        echo $n;
    }
}
示例#22
0
文件: testindex.php 项目: noikiy/zays
/**
 * 登录表单处理
 * 描述:
 */
function login_submit()
{
    global $_MooClass, $dbTablePre, $_MooCookie;
    //noet 对提交的数据过滤
    if ($_POST) {
        $username = trim($_POST['username']);
        $md5_password = md5($_POST['password']);
        $cookietime = intval(isset($_POST['cookietime']) ? $_POST['cookietime'] : '');
        $remember_username = MooGetGPC('remember', 'integer', 'P');
    }
    /*****设置回转的页面*****/
    $returnurl = MooGetGPC('returnurl', 'string', "P");
    //echo $returnurl;
    //exit;
    //note 要填写用户和密码
    if (empty($_POST['username']) && empty($_POST['password'])) {
        //note 转至邮箱验证页
        if ($returnurl) {
            $returnurl = $returnurl;
            MooMessage("请填写用户名和密码", "{$returnurl}", '03');
        } else {
            MooMessage("请填写用户名和密码", "index.php?n=login", '03');
        }
        exit;
    }
    //note 用户名不能为空
    if (empty($_POST['username'])) {
        //note 转至邮箱验证页
        if ($returnurl) {
            $returnurl = $returnurl;
            MooMessage("用户名不能为空", "{$returnurl}", '03');
        } else {
            MooMessage("用户名不能为空", "index.php?n=login", '03');
        }
        exit;
    }
    //note 密码不能为空
    if (empty($_POST['password'])) {
        //note 转至邮箱验证页
        if ($returnurl) {
            $returnurl = $returnurl;
            MooMessage("密码不能为空", "{$returnurl}", '03');
        } else {
            MooMessage("密码不能为空", "index.php?n=login", '03');
        }
        exit;
    }
    $userid = 0;
    $sp = searchApi('members_man members_women');
    $limit = array(0, 1);
    //note 验证用户名,密码     enky
    if (is_numeric($username)) {
        if (strlen($username) == 11) {
            //判断手机号是否存在
            $filter = array();
            $filter[] = array('telphone', $username);
            if ($sp->getResultOfReset($filter, $limit)) {
                $ids = $sp->getIds();
                if (isset($ids[0])) {
                    $userid = $ids[0];
                }
            }
        }
        if (!$userid) {
            //判断uid是否存在
            $filter = array();
            $filter[] = array('@id', $username);
            if ($sp->getResultOfReset($filter, $limit)) {
                $ids = $sp->getIds();
                if (isset($ids[0])) {
                    $userid = $ids[0];
                }
            }
        }
        if (!$userid) {
            if ($user_one = $_MooClass['MooMySQL']->getOne("SELECT uid from `{$dbTablePre}members_base` where qq='{$username}'")) {
                $userid = $user_one['uid'];
            }
        }
        /*if(strlen($username)==11){
        		   $sql_where = " s.telphone='{$username}'";
                   $user = $_MooClass['MooMySQL']->getOne("SELECT s.uid,s.username,s.password,s.birthyear,s.gender,s.province,s.city,b.automatic,s.is_lock,b.is_awoke,s.sid,l.last_login_time,l.lastip FROM `{$dbTablePre}members_search` as s left join `{$dbTablePre}members_base` as b on s.uid=b.uid left join `{$dbTablePre}members_login` as l on s.uid=l.uid   WHERE $sql_where");
        		}else{
        			$sql_where = " s.uid = '{$username}'";
        			$user = $_MooClass['MooMySQL']->getOne("SELECT s.uid,s.username,s.password,s.birthyear,s.gender,s.province,s.city,b.automatic,s.is_lock,b.is_awoke,s.sid,l.last_login_time,l.lastip FROM `{$dbTablePre}members_search` as s left join `{$dbTablePre}members_base` as b on s.uid=b.uid left join `{$dbTablePre}members_login` as l on s.uid=l.uid   WHERE $sql_where");
        			if(empty($user)){
        			   $sql_where = "b.qq='{$username}'";
        			   //$user = $_MooClass['MooMySQL']->getOne("SELECT a.uid,username,password,birthyear,gender,province,city,automatic,is_lock,is_awoke,sid,last_login_time,lastip FROM `{$dbTablePre}members` a ,`{$dbTablePre}memberfield` b WHERE a.uid=b.uid and $sql_where");
        				$user = $_MooClass['MooMySQL']->getOne("SELECT s.uid,s.username,s.password,s.birthyear,s.gender,s.province,s.city,b.automatic,s.is_lock,b.is_awoke,s.sid,l.last_login_time,l.lastip FROM `{$dbTablePre}members_search` as s left join `{$dbTablePre}members_base` as b on s.uid=b.uid left join `{$dbTablePre}members_login` as l on s.uid=l.uid   WHERE $sql_where");
        			}
        		}*/
    } else {
        $filter = array();
        $filter[] = array('username', $username);
        if ($sp->getResultOfReset($filter, $limit)) {
            $ids = $sp->getIds();
            if (isset($ids[0])) {
                $userid = $ids[0];
            }
        }
        /*$sql_where = "s.username = '******'";
        		//$user = $_MooClass['MooMySQL']->getOne("SELECT uid,username,password,birthyear,gender,province,city,automatic,is_lock,is_awoke,sid,last_login_time,lastip FROM `{$dbTablePre}members` WHERE $sql_where");
        		$user = $_MooClass['MooMySQL']->getOne("SELECT s.uid,s.username,s.password,s.birthyear,s.gender,s.province,s.city,b.automatic,s.is_lock,b.is_awoke,s.sid,l.last_login_time,l.lastip FROM `{$dbTablePre}members_search` as s left join `{$dbTablePre}members_base` as b on s.uid=b.uid left join `{$dbTablePre}members_login` as l on s.uid=l.uid   WHERE $sql_where");*/
    }
    //note 用户名找不到
    if (!$userid) {
        $login_where = is_numeric($username) ? "uid='{$username}' or telphone='{$username}'" : "username='******'";
        $user_one = $_MooClass['MooMySQL']->getOne("SELECT uid from `{$dbTablePre}members_search` where {$login_where}");
        if ($user_one) {
            $userid = $user_one['uid'];
        } else {
            //note 转至邮箱验证页
            if ($returnurl) {
                MooMessage("用户名不存在", "{$returnurl}", '01');
            } else {
                MooMessage("用户名不存在", "index.php?n=login", '01');
            }
        }
    }
    //获取
    $user = array_merge(MooGetData('members_login', 'uid', $userid), MooMembersData($userid));
    echo $user['is_lock'];
    exit;
    if ($user['is_lock'] != '1') {
        MooMessage("很抱歉您的用户名已经被锁定!<br>请联系真爱一生网客服:<b>400-678-0405</b>", "{$returnurl}", '01', 6);
    }
    //note 用户密码错误
    if ($user['uid'] && $user['password'] != $md5_password) {
        //note 转至邮箱验证页
        if ($returnurl) {
            $returnurl = $returnurl;
            MooMessage("用户密码错误", "{$returnurl}", '01');
        } else {
            MooMessage("用户密码错误", "index.php?n=login", '01');
        }
        exit;
    }
    //note 验证通过
    if ($user['uid'] && $user['password'] == $md5_password) {
        if ($user['automatic'] == 1) {
            MooSetCookie('auth', MooAuthCode("{$user['uid']}\t{$user['password']}", 'ENCODE'), 86400 * 7);
        } else {
            MooSetCookie('auth', MooAuthCode("{$user['uid']}\t{$user['password']}", 'ENCODE'), 86400);
        }
        $time = time();
        $_MooClass['MooMySQL']->query("update {$dbTablePre}members_login set last_login_time = '{$time}',login_meb = login_meb+1,lastvisit='{$time}' where uid = '{$user['uid']}'");
        //更新最后登录时间
        //会员最后登录时间
        MooSetCookie('last_login_time', $time, 86400);
        //note 客服提醒
        if ($user['is_awoke'] == '1') {
            $awoketime = time() + 120;
            $sql = "INSERT INTO `{$dbTablePre}admin_remark` SET sid='{$user['sid']}',title='会员上线',content='ID:{$user['uid']}会员刚刚通过pc机上线,请联系',awoketime='{$awoketime}',dateline='{$GLOBALS['timestamp']}'";
            $_MooClass['MooMySQL']->query($sql);
        }
        //note 记住用户名
        if ($remember_username == 1) {
            MooSetCookie('username', $username, time() + 3600);
        } else {
            MooSetCookie('username', $username, -1200);
        }
        //		echo print_r($_MooCookie);die;
        MooPlugins('ipdata');
        $online_ip = GetIP();
        if ($online_ip != $user['lastip']) {
            $user_address = convertIp($online_ip);
            include "./module/crontab/crontab_config.php";
            foreach ($provice_list as $key => $provice_arr) {
                if (strstr($user_address, $provice_arr) !== false) {
                    //if(){
                    $province = $key;
                    break;
                }
            }
            if (empty($province)) {
                $province = $current_user['province'];
            }
            //得到市对应的城市代号
            foreach ($city_list as $city_key => $city_val) {
                if (strstr($user_address, $city_val) !== false) {
                    $city = $city_key;
                    break;
                }
            }
        }
        MooSetCookie('province', $user['province'], 86400);
        MooSetCookie('city', $user['city'], 86400);
        $lastactive = time();
        $uid = $user['uid'];
        //note 更新用户的最近登录ip和最近登录时间
        $updatesqlarr = array('lastip' => $online_ip);
        $wheresqlarr = array('uid' => $uid);
        updatetable("members_login", $updatesqlarr, $wheresqlarr);
        if (MOOPHP_ALLOW_FASTDB) {
            $val = array();
            $val['lastip'] = $online_ip;
            //$val['client']=0;
            $val['last_login_time'] = $time;
            $val['lastvisit'] = $time;
            //$val['isOnline']=1;
            MooFastdbUpdate('members_login', 'uid', $uid, $val);
            //!!
        }
        //记录本次登录ip及上次的ip,及真实的最后访问时间
        $sql_ip = "SELECT last_ip,finally_ip FROM {$GLOBALS['dbTablePre']}member_admininfo WHERE uid='{$uid}'";
        $member_admin_info = $GLOBALS['_MooClass']['MooMySQL']->getOne($sql_ip);
        if (!empty($member_admin_info)) {
            $sql_ip = "UPDATE {$GLOBALS['dbTablePre']}member_admininfo SET last_ip='{$member_admin_info['finally_ip']}',finally_ip='{$online_ip}',real_lastvisit='{$lastactive}' WHERE uid='{$uid}'";
        } else {
            $sql_ip = "INSERT INTO {$GLOBALS['dbTablePre']}member_admininfo SET finally_ip='{$online_ip}',uid='{$uid}',real_lastvisit='{$lastactive}'";
        }
        $GLOBALS['_MooClass']['MooMySQL']->query($sql_ip);
        //note 先删除表里面已存在对应用户的session
        //$_MooClass['MooMySQL']->query("DELETE FROM `{$dbTablePre}membersession` WHERE `uid` = '$uid'");
        //删除过期SESSION
        //$date=time()-1200;
        //$_MooClass['MooMySQL']->query("DELETE FROM `{$dbTablePre}membersession` WHERE lastactive<'$date'");
        //$_MooClass['MooMySQL']->query("REPLACE INTO `{$dbTablePre}membersession` SET `username`= '$user[username]',`password`='$user[password]',`ip` = '$online_ip',`lastactive` = '$lastactive',`uid` = '$uid'");
        //发送短信提醒关注的会员上线了
        //fanglin暂时屏蔽
        /*if($_MooCookie['iscontact'] != "yes"){
        		   MooSend_Contact($uid,$user['gender'],"system");
        		}
        		
        
        		//note 伪造用户访问
        		$selectuser=selectuser($user['province'],$user['city'],$user['birthyear'],$user['gender']);
        		$time=strtotime(date('Y-m-d'))-24*60*60;
        		for($i=0;$i<count($selectuser);$i++){
        		      $result=$_MooClass['MooMySQL']->getOne("SELECT `uid` FROM `".$dbTablePre."service_visitor` WHERE `uid`='".$selectuser[$i]['uid']."' AND `visitorid`='".$user['uid']."' AND `who_del`!=2");
        		      if($result['uid']==''){
        		              $_MooClass['MooMySQL']->query("INSERT INTO `".$dbTablePre."service_visitor` SET `uid`='".$selectuser[$i]['uid']."',`visitorid`='".$user['uid']."',`visitortime`='".$time."',`who_del`=1");
        		      }else $_MooClass['MooMySQL']->query("UPDATE `".$dbTablePre."service_visitor` SET `visitortime`='".$time."' WHERE `uid`='".$selectuser[$i]['uid']."' AND `visitorid`='".$user['uid']."'");
        		      
        		}*/
        //note 转至邮箱验证页
        if ($returnurl) {
            $returnurl = $returnurl;
            header("Location:" . $returnurl);
        } else {
            header("Location:index.php?n=service");
        }
        exit;
    }
}
示例#23
0
文件: index.php 项目: noikiy/zays
function register_steptwo()
{
    global $_MooClass, $dbTablePre, $uid, $user_arr, $_MooCookie;
    $userinfo = $user_arr;
    $password = isset($_MooCookie['password2']) ? $_MooCookie['password2'] : '';
    MooSetCookie('password2', '');
    $userchoice = MooGetData('members_choice', 'uid', $uid);
    $telphonecheck = MooGetGPC('telphonecheck', 'string');
    if (MooSubmit('register_submittwo')) {
        // note members表字段
        $members_search['nickname'] = safeFilter(rtrim(MoogetGPC('nickname', 'string', 'P')));
        $members_search['marriage'] = MoogetGPC('marriage1', 'integer', 'P');
        // update1_arr
        $members_search['height'] = MoogetGPC('height', 'integer', 'P');
        $members_search['salary'] = MoogetGPC('salary', 'integer', 'P');
        $members_search['education'] = MoogetGPC('education1', 'integer', 'P');
        $members_search['children'] = MoogetGPC('children1', 'integer', 'P');
        $members_search['house'] = MoogetGPC('house', 'integer', 'P');
        $members_search['updatetime'] = time();
        $members_base['oldsex'] = MoogetGPC('oldsex', 'integer', 'P');
        $gender = $_MooClass['MooMySQL']->getOne("select gender from {$dbTablePre}members_search WHERE uid='{$uid}'", true);
        if ($gender['gender'] == 0) {
            $members_choice['gender'] = 1;
        } else {
            $members_choice['gender'] = 0;
        }
        $members_choice['age1'] = MoogetGPC('age1', 'integer', 'P');
        // $update2_arr
        $members_choice['age2'] = MoogetGPC('age2', 'integer', 'P');
        $members_choice['workprovince'] = MoogetGPC('workProvince', 'integer', 'P');
        $members_choice['workCity'] = MoogetGPC('workCity', 'integer', 'P');
        if (in_array($members_choice['workprovince'], array(10101201, 10101002))) {
            $members_choice['workcity'] = $members_choice['workprovince'];
            $members_choice['workprovince'] = 10101000;
        }
        $members_choice['marriage'] = MoogetGPC('marriage2', 'integer', 'P');
        $members_choice['education'] = MoogetGPC('education2', 'integer', 'P');
        $members_choice['children'] = MoogetGPC('children2', 'integer', 'P');
        $members_choice['salary'] = MoogetGPC('salary1', 'integer', 'P');
        $members_choice['height1'] = MoogetGPC('height1', 'integer', 'P');
        $members_choice['height2'] = MoogetGPC('height2', 'integer', 'P');
        $members_choice['hasphoto'] = MoogetGPC('hasphoto', 'integer', 'P');
        $members_choice['nature'] = MoogetGPC('nature2', 'integer', 'P');
        $members_choice['body'] = MoogetGPC('body2', 'integer', 'P');
        $members_choice['weight1'] = MoogetGPC('weight1', 'integer', 'P');
        $members_choice['weight2'] = MoogetGPC('weight2', 'integer', 'P');
        $members_choice['occupation'] = MoogetGPC('occupation2', 'integer', 'P');
        $members_choice['nation'] = MoogetGPC('stock2', 'integer', 'P');
        $members_choice['hometownprovince'] = MoogetGPC('hometownProvince2', 'integer', 'P');
        $members_choice['hometowncity'] = MoogetGPC('hometownCity2', 'integer', 'P');
        $members_choice['updatetime'] = time();
        if (in_array($members_choice['hometownprovince'], array(10101201, 10101002))) {
            $members_choice['hometowncity'] = $members_choice['hometownprovince'];
            $members_choice['hometownprovince'] = 10101000;
        }
        $members_choice['wantchildren'] = MoogetGPC('wantchildren2', 'integer', 'P');
        $members_choice['smoking'] = MoogetGPC('issmoking', 'integer', 'P');
        $members_choice['drinking'] = MoogetGPC('isdrinking', 'integer', 'P');
        // *********内心独白处理**********//
        $members_introduce['introduce'] = MoogetGPC('introduce', 'string', 'P');
        // $update2_arr
        $members_introduce['introduce_check'] = safeFilter(rtrim(MoogetGPC('introduce', 'string', 'P')));
        $telcheck = MoogetGPC('telcheck', 'string');
        $truetelphone = MoogetGPC('truetelphone', 'string');
        $telphonemack = md5(md5(MoogetGPC('telphonemack', 'string', 'P')));
        $web_rand = $_MooCookie['rand'];
        // wxmtest********************************************
        // SQL条件
        $where_arr = array('uid' => $uid);
        if ($members_search || $members_choice) {
            // 会员基本信息
            //if ($members_search) {
            // 判断昵称
            if (rtrim($members_search['nickname']) != '') {
                if (preg_match('/^((1[345]\\d{9})|(18[024-9]\\d{8})|(010-?\\d{8})|(02)[012345789]-?\\d{8}|(0[3-9]\\d{2,2}-?\\d{7,8})|(.*@.*))$/', $members_search['nickname'])) {
                    MooMessage("昵称不符合规范!", "index.php?n=register&h=steptwo");
                }
                // note 昵称截取
                $members_search['nickname'] = MooCutstr($members_search['nickname'], 12, $dot = '');
                // 更新数据
                updatetable('members_search', $members_search, $where_arr);
                updatetable('members_base', $members_base, $where_arr);
                if (MOOPHP_ALLOW_FASTDB) {
                    MooFastdbUpdate('members_search', 'uid', $uid, $members_search);
                    MooFastdbUpdate('members_base', 'uid', $uid, $members_base);
                }
                // searchApi("members_man
                // members_women")->updateAttr(array('nickname','marriage','height','salary','education','children','house'),array(9888888888=>$search));
            } else {
                MooMessage("昵称必填!", "index.php?n=register&h=steptwo");
            }
            //}
            if ($members_choice) {
                updatetable('members_choice', $members_choice, $where_arr);
                if (MOOPHP_ALLOW_FASTDB) {
                    MooFastdbUpdate('members_choice', 'uid', $uid, $members_choice);
                }
            }
            if ($members_introduce) {
                // 内心独白必填
                // if($update2_arr['introduce_check'] != ''){
                $members_introduce['introduce'] = '';
                $members_introduce['introduce_pass'] = '******';
                updatetable('members_introduce', $members_introduce, $where_arr);
                if (MOOPHP_ALLOW_FASTDB) {
                    MooFastdbUpdate('members_introduce', 'uid', $uid, $members_introduce);
                }
                // }else{
                // MooMessage("内心独白必填!", "index.php?n=register&h=steptwo");
                // }
            }
            MooMessage("进入下一步!", "index.php?n=register&h=stepthree");
        }
    }
    include MooTemplate('public/register_steptwo', 'module');
}
示例#24
0
文件: index.php 项目: noikiy/zays
                 $rand = rand(362144, 965421);
                 MooSetCookie("rand", md5(md5($rand)));
                 // 希希奥信息发送手机短信接口
                 $re = SendMsg($telphone, "注册真爱一生网成功 ID:" . $uid);
                 if ($re) {
                     $time = time();
                     $content = "注册成功提醒";
                     $sql_res[] = $_MooClass['MooMySQL']->query("INSERT INTO {$dbTablePre}smslog_sys (id,sid,uid,content,sendtime,type) values('','','{$uid}','{$content}','{$time}','注册成功提醒')");
                     //$sql = "DELETE FROM {$dbTablePre}smslog_sys where uid = '$tele'";
                     //$_MooClass ['MooMySQL']->query($sql);
                 }
                 MooSetCookie('auth', MooAuthCode("{$uid}\t{$password}", 'ENCODE'), 86400 * 7);
                 MooSetCookie("where_from", "");
                 MooSetCookie("puid", "");
                 MooSetCookie("website", "");
                 MooSetCookie('password2', $password2, 3600);
                 // }
             } else {
                 $error = "填写资料不全";
                 echo return_data($error, false);
                 exit;
             }
         }
     }
 } else {
     if ($userid) {
         $error = "您现在是登陆状态";
         echo return_data($error, false);
         exit;
     }
     register_stepone();
示例#25
0
文件: index.bak.php 项目: noikiy/zays
         $seccode1 = strtolower(MooGetGPC('seccode', 'string', 'P'));
         $seccode2 = MooGetGPC('seccode', 'string', 'C');
         $session_seccode = $memcached->get($seccode2);
         if ($seccode1 != $session_seccode) {
             MooMessage("验证码填写不正确,请确认。", "index.php?n=service&h=eyes", '', '1', 1);
         }
         $content = $_POST['content'];
         $date = date('Y-m-d H:i:s');
         $nickname = $user_arr['nickname'];
         $query = $_MooClass['MooMySQL']->query("insert into  web_ahtv_remark(uid,username,remark,operationtime,channel) values('{$userid}','{$nickname}','{$content}','{$date}','6')");
         if ($query) {
             MooMessage("评论成功。", "index.php?n=service&h=eyes", '', '3', 1);
         }
     } else {
         $seccode = md5(uniqid(rand(), true));
         MooSetCookie('seccode', $seccode, 3600, '');
         $session_seccode = $memcached->set($seccode, '', 0, 300);
     }
     $eyes_regest_count = array();
     $eyes_regest_counts = $_MooClass['MooMySQL']->getAll('SELECT count(`id`) AS count ,`gender`  FROM `web_ahtv_reguser`  WHERE `uid`!=0 and `channel`=6 group by `gender`');
     //对人数的修改
     foreach ($eyes_regest_counts as $value) {
         $eyes_regest_count[$value['gender']] = $value['count'] + 40;
     }
     $man_eyes_regest = $_MooClass['MooMySQL']->getAll('SELECT a.`uid`,b.`nickname`,b.`education`,b.`birthyear` FROM `web_ahtv_reguser` as a left join web_members as b  on a.`uid`=b.`uid` WHERE a.`uid`!=0 and a.`channel`=6 and a.`gender`=0 and b.nickname!=\'\' order by a.`regtime` desc limit 9 ');
     $woman_eyes_regest = $_MooClass['MooMySQL']->getAll('SELECT a.`uid`,b.`nickname`,b.`education`,b.`birthyear` FROM `web_ahtv_reguser` as a left join web_members as b  on a.`uid`=b.`uid` WHERE a.`uid`!=0 and a.`channel`=6 and a.`gender`=1 and b.nickname!=\'\' order by a.`regtime` desc limit 9 ');
     require MooTemplate('public/service_eyes', 'module');
     exit;
 case "zyzhuodong":
     require MooTemplate('public/service_zyzhuodong', 'module');
     exit;
示例#26
0
文件: function.php 项目: noikiy/zays
function get_page()
{
    global $_MooCookie;
    $clear = MooGetGPC('clear', 'integer', 'G');
    $page = MooGetGPC('page', 'integer', 'G');
    if ($page == 0 && !$clear) {
        $page1 = isset($_MooCookie['page']) ? $_MooCookie['page'] : 0;
        $h1 = 0;
        if (isset($_MooCookie['h'])) {
            $h1 = $_MooCookie['h'];
        }
        if (isset($_GET['h']) && $h1 == $_GET['h'] && empty($_GET['order'])) {
            $page = $page1;
        }
    }
    $page = $page < 1 ? 1 : $page;
    MooSetCookie('page', $page);
    MooSetCookie('h', $_GET['h']);
    return $page;
}
示例#27
0
function ajax_this_login()
{
    $time = time();
    $uid = MooGetGPC('luid', 'integer', 'G');
    $serverid = $GLOBALS['adminid'];
    $sql = "select * from {$GLOBALS['dbTablePre']}members_search where uid='{$uid}'";
    $userinfo = $GLOBALS['_MooClass']['MooMySQL']->getOne($sql);
    if (!$userinfo) {
        echo '用户不存在';
        exit;
    }
    /*
    	$useronline = $GLOBALS['_MooClass']['MooMySQL']->getOne("select * from {$GLOBALS['dbTablePre']}membersession where uid='$uid'");
    	if($useronline){
    		//echo '此用户在线';exit();
    	}*/
    $userinfo_uid = $userinfo['uid'];
    $userinfo_pw = $userinfo['password'];
    //模拟用户登录
    MooSetCookie('auth', '', -86400 * 365);
    MooSetCookie('kefu', '', -86400 * 365);
    MooSetCookie('auth', MooAuthCode("{$userinfo_uid}\t{$userinfo_pw}", 'ENCODE'), 86400);
    MooSetCookie('kefu', MooAuthCode("hongniangwang\t{$serverid}", 'ENCODE'), 86400);
    if (!session_id()) {
        session_start();
    }
    $_SESSION['s_userid'] = $userinfo['uid'];
    //更新模拟时间
    $GLOBALS['_MooClass']['MooMySQL']->query("update `{$GLOBALS['dbTablePre']}member_admininfo` set real_lastvisit='{$time}' where uid='{$uid}'");
    if ($GLOBALS['groupid'] != 60) {
        $GLOBALS['_MooClass']['MooMySQL']->query("update `{$GLOBALS['dbTablePre']}members_login` set lastvisit='{$time}' where uid='{$uid}'");
        if (MOOPHP_ALLOW_FASTDB) {
            $value['lastvisit'] = $time;
            MooFastdbUpdate('members_login', 'uid', $uid, $value);
        }
    }
    //$kefu = $_MooCookie['kefu'];exit($kefu);
    serverlog(4, $GLOBALS['dbTablePre'] . 'members_search', "{$GLOBALS['adminid']}号客服{$GLOBALS['username']}在后台以会员{$userinfo['uid']}的身份查看{$uid}", $GLOBALS['adminid'], $userinfo['uid']);
    echo 'ok';
}
示例#28
0
文件: MooPHP.php 项目: noikiy/zays
/**
 * 显示未读消息数
 * @return integer $total 返回统计总数
 */
function header_show_total($userid)
{
    global $_MooClass, $dbTablePre, $_MooCookie;
    $TOTAL = 0;
    //note 收到邮件数
    if (isset($_MooCookie['servicesemail' . $GLOBALS['MooUid']])) {
        $TOTAL = $_MooCookie['servicesemail' . $GLOBALS['MooUid']];
    } else {
        $query = $_MooClass['MooMySQL']->getOne("select count(1) as c from {$dbTablePre}services where s_status = '0' and s_uid = '{$userid}' and flag = '1' and s_uid_del='0'");
        $TOTAL = $query['c'];
        MooSetCookie('servicesemail' . $GLOBALS['MooUid'], $TOTAL, 600);
    }
    return $TOTAL;
}
示例#29
0
文件: index.php 项目: noikiy/zays
function resetpwd()
{
    global $_MooClass, $dbTablePre, $last_login_time;
    $p = MooGetGPC("p", "string", "G");
    //数据库中是否存在
    $sql = "select * from  " . $dbTablePre . "reset_password where username = '******'";
    $is_exists = $_MooClass['MooMySQL']->getOne($sql);
    if (!$is_exists) {
        MooMessage('操作失败,可能已过期,请重新找回密码', 'index.php?n=login&h=backpassword', '01');
    }
    $p = base64_decode($p);
    $p_arr = explode("|", $p);
    $expires_time = $p_arr[2] + 86400;
    if ($expires_time < time()) {
        MooMessage('对不起,您的操作已过期,请重新找回密码', 'index.php?n=login&h=backpassword', '01');
    }
    if (MOOPHP_ALLOW_FASTDB) {
        $user = MooFastdbGet('members_search', 'username', $p_arr[0]);
        $user_b = MooFastdbGet('members_base', 'username', $p_arr[0]);
    } else {
        $user = $_MooClass['MooMySQL']->getOne("SELECT * FROM {$dbTablePre}members_search as s left join {$dbTablePre}members_base as b on s.uid=b.uid  WHERE username='******' LIMIT 1 ");
    }
    MooSetCookie('auth', MooAuthCode("{$user['uid']}\t{$user['password']}", 'ENCODE'), $user['automatic'] == 1 ? 86400 * 365 : 86400);
    $time = time();
    $_MooClass['MooMySQL']->query("update {$dbTablePre}members_login set last_login_time = '{$time}',lastvisit='{$time}' where uid = '{$user['uid']}'");
    //更新最后登录时间
    //update other table login_meb
    $_MooClass['MooMySQL']->query("update {$dbTablePre}members_base set login_meb = login_meb+1 where uid = '{$user['uid']}'");
    //更新最后登录时间
    //note 客服提醒
    if ($user_b['is_awoke'] == '1') {
        $awoketime = time() + 120;
        $sql = "INSERT INTO `{$dbTablePre}admin_remark` SET sid='{$user['sid']}',title='会员上线',content='ID:{$user['uid']}会员刚刚上线,请联系',awoketime='{$awoketime}',dateline='{$GLOBALS['timestamp']}'";
        $_MooClass['MooMySQL']->query($sql);
        //$_MooClass['MooMySQL']->query("INSERT INTO `{$dbTablePre}custom_remark` (cid,keyword,content,awoketime,addtime) values ('{$user['sid']}','会员上线','尊敬的客服,您的真爱一生号为{$user['uid']}的会员刚刚上线,请尽快与该会员联系','".(time()+120)."','".time()."')");
    }
    $online_ip = GetIP();
    $lastactive = time();
    $uid = $user['uid'];
    //记录本次登录ip及上次的ip,及真实的最后访问时间
    $sql_ip = "SELECT last_ip,finally_ip FROM {$GLOBALS['dbTablePre']}member_admininfo WHERE uid='{$uid}'";
    $member_admin_info = $GLOBALS['_MooClass']['MooMySQL']->getOne($sql_ip);
    if (!empty($member_admin_info)) {
        $sql_ip = "UPDATE {$GLOBALS['dbTablePre']}member_admininfo SET last_ip='{$member_admin_info['finally_ip']}',finally_ip='{$online_ip}',real_lastvisit='{$lastactive}' WHERE uid='{$uid}'";
    } else {
        $sql_ip = "INSERT INTO {$GLOBALS['dbTablePre']}member_admininfo SET finally_ip='{$online_ip}',uid='{$uid}',real_lastvisit='{$lastactive}'";
    }
    $GLOBALS['_MooClass']['MooMySQL']->query($sql_ip);
    //note 先删除表里面已存在对应用户的session
    //$_MooClass['MooMySQL']->query("DELETE FROM `{$dbTablePre}membersession` WHERE `uid` = '$uid'");
    //删除过期SESSION
    $date = time() - 1200;
    //$_MooClass['MooMySQL']->query("DELETE FROM `{$dbTablePre}membersession` WHERE lastactive<'$date'");
    //$_MooClass['MooMySQL']->query("REPLACE INTO `{$dbTablePre}membersession` SET `username`= '$user[username]',`password`='$user[password]',`ip` = '$online_ip',`lastactive` = '$lastactive',`uid` = '$uid'");
    //发送短信提醒关注的会员上线了
    //fanglin暂时屏蔽
    if ($_MooCookie['iscontact'] != "yes") {
        //MooSend_Contact($uid,$user['gender'],"system"); // MooPHP.php 中已被注释掉 (luyamin/2012-07-28)
    }
    //note 伪造用户访问
    /*$selectuser=selectuser($user['province'],$user['city'],$user['birthyear'],$user['gender']);
    	$time=strtotime(date('Y-m-d'))-24*60*60;
    	for($i=0;$i<count($selectuser);$i++){
    		  $result=$_MooClass['MooMySQL']->getOne("SELECT `uid` FROM `".$dbTablePre."service_visitor` WHERE `uid`='".$selectuser[$i]['uid']."' AND `visitorid`='".$user['uid']."' AND `who_del`!=2");
    		  if($result['uid']==''){
    				  $_MooClass['MooMySQL']->query("INSERT INTO `".$dbTablePre."service_visitor` SET `uid`='".$selectuser[$i]['uid']."',`visitorid`='".$user['uid']."',`visitortime`='".$time."',`who_del`=1");
    		  }else $_MooClass['MooMySQL']->query("UPDATE `".$dbTablePre."service_visitor` SET `visitortime`='".$time."' WHERE `uid`='".$selectuser[$i]['uid']."' AND `visitorid`='".$user['uid']."'");
    		  
    	}*/
    header("Location:index.php?n=material&h=password&pwd=1");
}
示例#30
0
文件: index.php 项目: noikiy/zays
function index_index()
{
    global $_MooClass, $dbTablePre, $userid, $user_arr, $memcached;
    $url = $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI'];
    MooSetCookie('where_from', $url, 300);
    //note 先初始化用户信息
    //-------会员推荐------//
    /* $workprovince = MooGetGPC('workprovince','integer','G');//工作省份
    
    	$workcity =  MooGetGPC('workcity','integer','G');//工作城市
    
    	if(in_array( $workprovince, array(10101201,10101002)))
    	{
    		//note 修正广东省深圳和广州的区域查询
    		$workcity = $workprovince;
    		$workprovince = 10101000;
    	}
    
    	$age1 = MooGetGPC('age1','integer','G');//最小年龄
    	$age2 = MooGetGPC('age2','integer','G');//最大年龄 */
    //登录首页后用户的形象照
    if ($userid) {
        $sql = "select mainimg from web_members_base where uid='{$userid}'";
        $um = $_MooClass['MooMySQL']->getOne($sql);
        $mainimg = $um['mainimg'];
        if (empty($mainimg)) {
            $mainimg = $user_arr['gender'] ? 'public/default/images/nopic_female.gif' : 'public/default/images/nopic_male.gif';
        }
    }
    $gender = $user_arr['gender'] ? 0 : 1;
    //包含配置文件
    include_once "./module/crontab/crontab_config.php";
    $cur_ip = GetIP();
    //$cur_ip='202.115.131.250';
    MooPlugins('ipdata');
    $ip_arr = convertIp($cur_ip);
    //得到省份对应的数值,查库
    $province = $city = 0;
    foreach ($provice_list as $key => $val) {
        if (strstr($ip_arr, $val)) {
            $province = $key;
            break;
        }
    }
    //得到市对应的城市代号
    foreach ($city_list as $city_key => $city_val) {
        if (strstr($ip_arr, $city_val)) {
            $city = $city_key;
            break;
        }
    }
    $sql = "SELECT s.uid,s.nickname,s.gender,s.education,s.occupation,s.province,s.city,s.birthyear,s.s_cid,s.city_star,s.salary,b.mainimg,s.pic_num FROM web_members_search s left join web_members_base b on s.uid=b.uid where s.images_ischeck=1 and s.gender={$gender} order by  s.province<>'{$province}' , s.city<>'{$city}' ,s.city desc,s.province desc limit 0,10";
    $userList = $_MooClass['MooMySQL']->getAll($sql);
    $sql = "SELECT s.uid,s.nickname,s.gender,s.education,s.occupation,s.province,s.city,s.birthyear,s.s_cid,s.city_star,s.salary,b.mainimg,s.pic_num FROM web_members_search s left join web_members_base b on s.uid=b.uid where s.images_ischeck=1 and  s.s_cid in(10,20,30) order by  s.province<>'{$province}' , s.city<>'{$city}' ,s.city desc,s.province desc limit 0,10";
    $vipuser = $_MooClass['MooMySQL']->getAll($sql);
    //成功案例
    $sql = "select s.sid,s.uid,s.title,s.content,s.name1,s.name2,sp.img,s.story_date from `web_story` as s left join  `web_story_pic` as sp  on s.sid=sp.sid where s.syscheck=1 and s.recommand= '1'  GROUP BY sp.sid order by s.submit_date desc limit 0, 5";
    $storys = $_MooClass['MooMySQL']->getAll($sql);
    //滚动文字
    $textInfo_ = array();
    $time = time();
    $textInfo = $textInfo_ = array();
    $sql = "select content from web_admin_remark where title in ('秋波','赠送礼物','意中人','委托') order by dateline desc limit 60";
    $textInfo_ = $_MooClass['MooMySQL']->getAll($sql);
    $sql = "select uid,apply_note from web_payment_new where status=3  order by pay_time desc limit 20";
    $result_ = $_MooClass['MooMySQL']->getAll($sql);
    foreach ($result_ as $k_ => $v_) {
        if (!empty($v_['uid'])) {
            $xyz['content'] = '恭喜' . $v_['uid'] . '成功升级为' . $v_['apply_note'];
            array_push($textInfo_, $xyz);
        }
    }
    shuffle($textInfo_);
    $sql = "SELECT  content from `{$dbTablePre}text_show` where start_time<{$time} and end_time>={$time} and `show`=1 order by `order` asc";
    $textInfo = $_MooClass['MooMySQL']->getAll($sql);
    require MooTemplate('public/index2015', 'module');
}