} L::loadClass('attupload', 'upload', false); /*上传错误检查 $return = PwUpload::checkUpload(); $return !== true && Showmsg($return); end*/ if (PwUpload::getUploadNum() || $flashatt) { S::gp(array('savetoalbum', 'albumid'), 'P', 2); $postdata->att = new AttUpload($winduid, $flashatt, $savetoalbum, $albumid); $postdata->att->check(); } $postdata->iscontinue = (int) $iscontinue; $topicpost->execute($postdata); $tid = $topicpost->getNewId(); // defend start CloudWind::yunUserDefend('postthread', $winduid, $windid, $timestamp, $cloud_information[1] ? $timestamp - $cloud_information[1] : 0, $tid ? 101 : 102, '', $postdata->data['content'], '', ''); // defend end defined('AJAX') && ($pinfo = $pinfo . $tid); if ($postSpecial) { $postSpecial->insertData($tid); } if ($postTopic) { //分类主题插入数据 $postTopic->insertData($tid, $fid); } if ($postCate) { //团购插入数据 $postCate->insertData($tid, $fid); } if ($postActForBbs) { //活动初始化
$user_a = explode('|', $winddb['icon']); $usericon = ''; if ($facetype == 1) { $usericon = setIcon($proicon, $facetype, $user_a); } elseif ($_G['allowportait'] && $facetype == 2) { $httpurl = S::getGP('httpurl', 'P'); if (strncmp($httpurl[0], 'http://', 7) != 0 || strrpos($httpurl[0], '|') !== false) { refreshto("profile.php?action=modify&info_type={$info_type}&facetype={$facetype}", getLangInfo('msg', 'illegal_customimg'), 2, true); } $proicon = S::escapeChar($httpurl[0]); $httpurl[1] = (int) $httpurl[1]; $httpurl[2] = (int) $httpurl[2]; $httpurl[3] = (int) $httpurl[3]; $httpurl[4] = (int) $httpurl[4]; list($user_a[2], $user_a[3]) = flexlen($httpurl[1], $httpurl[2], $httpurl[3], $httpurl[4]); $usericon = setIcon($proicon, $facetype, $user_a); unset($httpurl); } pwFtpClose($ftp); //update member $usericon && ($result = $userService->update($winduid, array('icon' => $usericon))); // defend start CloudWind::yunUserDefend('editprofile', $winduid, $windid, $timestamp, 0, $result === true ? 101 : 102, '', '', '', array('profile' => 'icon')); // defend end //* $_cache = getDatastore(); //* $_cache->delete('UID_'.$winduid); //job sign initJob($winduid, "doUpdatedata"); refreshto("profile.php?action=modify&info_type={$info_type}", 'operate_success', 2, true); } }
$db->update("INSERT INTO pw_userbinding SET " . S::sqlSingle(array('id' => $arr[$uid]['id'], 'uid' => $winduid, 'password' => $userdb['password']))); $id = $arr[$uid]['id']; } elseif (isset($arr[$winduid]) && isset($arr[$uid])) { if ($arr[$uid]['id'] == $arr[$winduid]['id']) { Showmsg('userbinding_has'); } else { $db->update("UPDATE pw_userbinding SET id=" . S::sqlEscape($arr[$winduid]['id']) . ' WHERE id=' . S::sqlEscape($arr[$uid]['id'])); $id = $arr[$winduid]['id']; } } else { Showmsg('undefined_action'); } $db->update("UPDATE pw_userbinding u LEFT JOIN pw_members m ON u.uid=m.uid SET m.userstatus=m.userstatus|(1<<11) WHERE u.id=" . S::sqlEscape($id)); _clearMembersCache($id); // defend start CloudWind::yunUserDefend('bindaccount', $winduid, $windid, $timestamp, 0, 101, '', '', '', array('uniqueid' => $uid)); // defend end refreshto("profile.php?action=modify&info_type=binding", 'operate_success', 2, true); } elseif ($_POST['step'] == '4') { PostCheck(); S::gp(array('selid')); if ($selid && is_array($selid)) { $arr = array(); $query = $db->query("SELECT u2.uid FROM pw_userbinding u1 LEFT JOIN pw_userbinding u2 ON u1.id=u2.id WHERE u1.uid=" . S::sqlEscape($winduid)); while ($rt = $db->fetch_array($query)) { $arr[] = $rt['uid']; } if ($delarr = array_intersect($arr, $selid)) { $db->update("DELETE FROM pw_userbinding WHERE uid IN(" . S::sqlImplode($delarr) . ')'); $tmp = $delarr + array($winduid); if (count(array_unique($tmp)) == count($arr)) {
S::slashes($userdb); S::gp(array('prooicq', 'proaliww', 'proicq', 'proyahoo', 'promsn', 'proauthmobile', 'oicq', 'aliww'), 'P'); //联系方式 处理 //$prooicq && !is_numeric($prooicq) && Showmsg('illegal_OICQ'); $proicq && !is_numeric($proicq) && Showmsg('illegal_OICQ'); $oicq && !is_numeric($oicq) && Showmsg('QQ号码只能输入数字'); if ($aliww && strlen($aliww) > 31) { Showmsg('阿里旺旺账号字符不能超过30'); } //update member $pwSQL = array('icq' => $proicq); /* modify for authentication */ if (!getstatus($userdb['userstatus'], PW_USERSTATUS_AUTHMOBILE)) { $proauthmobile && !preg_match('/^1(3|5|8)[0-9]{9}$/', $proauthmobile) && Showmsg('illegal_authmobile'); $pwSQL['authmobile'] = $proauthmobile; } /* modify for authentication */ $userService->update($winduid, $pwSQL); //* $_cache = getDatastore(); //* $_cache->delete('UID_'.$winduid); //update customerfield data $customfieldService = L::loadClass('CustomerFieldService', 'user'); /* @var $customfieldService PW_CustomerFieldService */ $customfieldService->saveProfileCustomerData('contact'); // defend start CloudWind::yunUserDefend('editprofile', $winduid, $windid, $timestamp, 0, 101, '', '', '', array('profile' => 'updatelink')); // defend end //job sign initJob($winduid, "doUpdatedata"); refreshto("profile.php?action=modify&info_type={$info_type}", 'operate_success', 2, true); }
function sendUserInfo($cloud_information) { if (!CLOUDWIND_SECURITY_SERVICE::isArray($cloud_information) || SCR == 'yi') { return false; } list($operate, $leaveTime, $tid, $fid) = $cloud_information ? $cloud_information : array('', ''); if (!in_array($operate, array('index', 'read', 'thread')) || $operate == SCR) { return false; } $user = CloudWind::getOnlineUserInfo(); $viewTime = CloudWind_getConfig('g_timestamp') - $leaveTime ? CloudWind_getConfig('g_timestamp') - $leaveTime : ''; CloudWind::yunUserDefend('view' . $operate, $user['uid'], $user['username'], $leaveTime, $viewTime, 101, '', '', '', array('uniqueid' => $tid . '-' . $fid)); return true; }
} } else { S::gp(array('friendtype')); if ($friendtype > 0) { $checkftid = $db->get_value("SELECT ftid FROM pw_friendtype WHERE uid=" . S::sqlEscape($winduid) . " AND ftid=" . S::sqlEscape($friendtype)); if (empty($checkftid)) { Showmsg('friend_type_not_exists'); } } if (!$friendcheck) { $friendService = L::loadClass('Friend', 'friend'); /* @var $friendService PW_Friend */ $friendService->addFriend($winduid, $friend['uid'], '', $friendtype); $result = $friendService->addFriend($friend['uid'], $winduid); // defend start CloudWind::yunUserDefend('addfriend', $winduid, $windid, $timestamp, 0, $result === true ? 101 : 102, !S::IsBool($result) ? $reason : '', '', '', array('uniqueid' => $winduid . '-' . $friend['uid'])); // defend end $userCacheService = L::loadClass('UserCache', 'user'); /* @var $userCacheService PW_UserCache */ $userCacheService->delete($winduid, 'recommendUsers'); M::sendNotice(array($friend['username']), array('title' => getLangInfo('writemsg', 'friend_add_title_1', array('username' => $windid)), 'content' => getLangInfo('writemsg', 'friend_add_content_1', array('uid' => $winduid, 'username' => $windid)))); //job sign initJob($winduid, "doAddFriend", array('user' => $friend['username'])); if (empty($reload)) { Showmsg('friend_update_success'); } else { Showmsg('ajax_friend_update_success'); } } elseif ($friendcheck == 1) { S::gp(array('checkmsg'), 'P'); if (strlen($checkmsg) > 255) {
} $upmembers['safecv'] = $safecv; } $pwSQL = array_merge($upmembers, array('email' => $proemail)); //update memdata if ($upmemdata) { $userService->update($winduid, array(), $upmemdata); } //update meminfo if ($upmeminfo) { updateThreadTrade($upmeminfo, $winduid); } unset($upmemdata, $upmeminfo); $result = $userService->update($winduid, $pwSQL); // defend start CloudWind::yunUserDefend('editprofile', $winduid, $windid, $upmemdata['pwdctime'], 0, 101, '', '', '', array('profile' => array_keys($pwSQL))); // defend end /* platform weibo app */ $siteBindService = L::loadClass('WeiboSiteBindService', 'sns/weibotoplatform/service'); /* @var $siteBindService PW_WeiboSiteBindService */ if ($siteBindService->isOpen() && $upmembers['password']) { $weiboLoginService = L::loadClass('WeiboLoginService', 'sns/weibotoplatform/service'); /* @var $weiboLoginService PW_WeiboLoginService */ $weiboLoginService->setLoginUserPasswordHasReset($winduid); Cookie("winduser", StrCode($winduid . "\t" . PwdCode($upmembers['password']) . "\t" . $upmembers['safecv'])); Cookie("ck_info", $db_ckpath . "\t" . $db_ckdomain); Cookie('lastvisit', '', 0); //自动获取勋章_start require_once R_P . 'require/functions.php'; doMedalBehavior($winduid, 'continue_login'); //自动获取勋章_end
} elseif ($action == 'quit') { if (!$db_pptifopen || !$db_pptcmode) { checkVerify('loginhash'); } require_once R_P . 'require/checkpass.php'; if ($groupid == '6') { $bandb = $db->get_one("SELECT type FROM pw_banuser WHERE uid=" . S::sqlEscape($winduid) . " AND fid='0'"); if ($bandb['type'] == 3) { Cookie('force', $winduid); } } //* 当用户“退出”时,删除该用户在pw_online_user表中的记录 $onlineService = L::loadClass('OnlineService', 'user'); $onlineService->deleteOnlineUser($winduid); // defend start CloudWind::yunUserDefend('quit', $winduid, $windid, $timestamp, 0, 101, '', '', '', ''); // defend end Loginout(); require_once R_P . 'uc_client/uc_client.php'; $showmsginfo = uc_user_synlogout(); //passport if ($db_pptifopen && $db_ppttype == 'server' && ($db_ppturls || $forward)) { $jumpurl = $forward ? $forward : $db_ppturls; $forward = $pre_url; require_once R_P . 'require/passport_server.php'; } //passport Cookie("jobpop", 0); /*jobpop*/ Cookie('clearm_' . $winduid, '', 0); if (preg_match('/u.php$/i', $pre_url)) {