function getMemberfield() { // note memberfield表字段 $members_base['qq'] = MoogetGPC('qq', 'string', 'P'); $members_base['msn'] = MoogetGPC('msn', 'string', 'P'); // note QQ格式 if ($members_base['qq'] != '' && !preg_match('/^\\d{5,11}$/', $members_base['qq'])) { MooMessage("QQ格式不正确!", "index.php?n=register&h=stepthree"); } // note MSN格式 if ($members_base['msn'] != '' && !preg_match('/^\\w+([-_]\\w+)*@(\\w{2,}\\.)+[a-zA-Z]{2,}$/', $members_base['msn'])) { MooMessage("MSN格式不正确!", "index.php?n=register&h=stepthree"); } $members_search['updatetime'] = time(); $members_search['body'] = MoogetGPC('body3', 'integer', 'P'); $members_search['hometownProvince'] = MoogetGPC('hometownProvince3', 'integer', 'P'); $members_search['hometownCity'] = MoogetGPC('hometownCity3', 'integer', 'P'); $members_base['currentprovince'] = MooGetGPC('currentprovince', 'integer', 'P'); $members_base['currentcity'] = MooGetGPC('currentcity', 'integer', 'P'); // 期望交友所在地区 $friendprovince = MooGetGPC('currentprovince', 'integer', 'P'); if ($friendprovince) { foreach ($_POST['friendprovince'] as $key => $val) { if (in_array($val, array(10101201, 10101002))) { $_POST['friendcity'][$key] = $val; $val = 10101000; } $friend_area[][$val] = $_POST['friendcity'][$key]; } $members_base['friendprovince'] = serialize($friend_area); } if (in_array($members_search['hometownProvince'], array(10101201, 10101002))) { // note 修正广东省深圳和广州的区域查询 2010-09-04 $members_search['hometownCity'] = $members_search['hometownProvince']; $members_search['hometownProvince'] = 10101000; } $members_search['wantchildren'] = MoogetGPC('wantchildren3', 'integer', 'P'); $members_search['nation'] = MoogetGPC('stock3', 'integer', 'P'); $members_search['occupation'] = MoogetGPC('occupation3', 'integer', 'P'); $members_base['nature'] = MoogetGPC('nature3', 'integer', 'P'); $members_search['truename'] = safeFilter(MoogetGPC('truename', 'string', 'P')); $members_search['weight'] = MoogetGPC('weight', 'integer', 'P'); $members_search['animalyear'] = MoogetGPC('animals', 'integer', 'P'); $members_search['constellation'] = MoogetGPC('constellation', 'integer', 'P'); $members_search['bloodtype'] = MoogetGPC('bloodtype', 'integer', 'P'); $members_search['religion'] = MoogetGPC('belief', 'integer', 'P'); $members_base['finishschool'] = safeFilter(MoogetGPC('finishschool', 'string', 'P')); $members_search['family'] = MoogetGPC('family', 'integer', 'P'); $members_search['language'] = ArrToStr(MoogetGPC('tonguegifts', 'array', 'P')); $members_search['smoking'] = MoogetGPC('smoking', 'integer', 'P'); $members_search['drinking'] = MoogetGPC('drinking', 'integer', 'P'); $members_search['vehicle'] = MoogetGPC('vehicle', 'integer', 'P'); $members_search['corptype'] = MoogetGPC('corptype', 'integer', 'P'); $members_base['fondfood'] = ArrToStr(MoogetGPC('fondfoods', 'array', 'P')); $members_base['fondplace'] = ArrToStr(MoogetGPC('fondplaces', 'array', 'P')); $members_base['fondactivity'] = ArrToStr(MoogetGPC('fondactions', 'array', 'P')); $members_base['fondsport'] = ArrToStr(MoogetGPC('fondsports', 'array', 'P')); $members_base['fondmusic'] = ArrToStr(MoogetGPC('fondmusics', 'array', 'P')); $members_base['fondprogram'] = ArrToStr(MoogetGPC('fondprograms', 'array', 'P')); $memberssearch = array(); foreach ($members_search as $k => $v) { if ($v) { $memberssearch[$k] = $v; } } $membersbase = array(); foreach ($members_base as $k => $v) { if ($v) { $membersbase[$k] = $v; } } $result['search'] = $memberssearch; $result['base'] = $membersbase; return $result; }
function interest() { global $_MooClass, $dbTablePre, $userid, $user_arr; $members_base['fondactivity'] = ArrToStr(MoogetGPC('fondactions', 'array', 'P')); $members_base['fondsport'] = ArrToStr(MoogetGPC('fondsports', 'array', 'P')); $members_base['fondmusic'] = ArrToStr(MoogetGPC('fondmusics', 'array', 'P')); $members_base['fondprogram'] = ArrToStr(MoogetGPC('fondprograms', 'array', 'P')); //memberfield表 foreach ($members_base as $key => $val) { //if($val){ $membersbase[$key] = $val; //} } $where_arr = array('uid' => $userid); if (count($membersbase) >= 1) { updatetable('members_base', $membersbase, $where_arr); //note 快速常用搜索表更新 //fastsearch_update($userid,'1'); //note 快速高级搜索表更新 //fastsearch_update($userid,'2'); if (MOOPHP_ALLOW_FASTDB) { MooFastdbUpdate('members_base', 'uid', $userid, $membersbase); } } //note 分配客服 //allotserver($userid); MooMessage("操作已完成", 'index.php?n=material'); }