PageRenderTime 43ms CodeModel.GetById 10ms RepoModel.GetById 0ms app.codeStats 0ms

/u/require/friend/my.php

https://bitbucket.org/johnroyer/phpwind8.7
PHP | 462 lines | 389 code | 42 blank | 31 comment | 93 complexity | 728c2fc8d5c0fb921def63ef9ed24695 MD5 | raw file
  1. <?php
  2. !defined('R_P') && exit('Forbidden');
  3. require_once (R_P . 'require/showimg.php');
  4. S::gp(array('type', 'u'));
  5. $u = (int) $u;
  6. !$u && $u = $winduid;
  7. $basename = "u.php?";
  8. $type = empty($type) ? 'attention' : $type;
  9. $thisbase = $basename . "a=$a&type=$type&";
  10. if ($type == 'attention') {
  11. $attentionSerivce = L::loadClass('Attention', 'friend'); /* @var $attentionSerivce PW_Attention */
  12. $updateSQL = array();
  13. $count = $winddb['follows'];
  14. if ($count < 1000 || $count > 10000000) {
  15. $num = $attentionSerivce->countFollows($winduid);
  16. if ($num != $count) {
  17. $updateSQL['follows'] = $winddb['follows'] = $count = $num;
  18. }
  19. }
  20. $page > ceil($count/$db_perpage) && $page = ceil($count/$db_perpage);
  21. $attentions = $count ? $attentionSerivce->getFollowListInPage($winduid, $page, $db_perpage) : array();
  22. $attentionedUids = $myAttentionUids = array();
  23. foreach ($attentions as $attention) {
  24. $attentionedUids[] = $attention['uid'];
  25. }
  26. $myAttentionUids = $attentionSerivce->getUidsInFansListByFriendids($winduid, $attentionedUids);
  27. foreach ($attentions as $key => $attention) {
  28. $attentions[$key]['attention'] = 1;
  29. if (!in_array($attention['uid'], $myAttentionUids)) continue;
  30. $attentions[$key]['attentionEach'] = 1;
  31. }
  32. if ($updateSQL) {
  33. $userService = L::loadClass('UserService', 'user'); /* @var $userService PW_UserService */
  34. $userService->update($winduid, array(), $updateSQL);
  35. }
  36. $pages = numofpage($count,$page,ceil($count/$db_perpage),"{$thisbase}&");
  37. //所有好友
  38. $friendsAllUids = getFriendsIdArr($winduid);
  39. } elseif ($type == 'attentioned') {
  40. $attentionSerivce = L::loadClass('Attention', 'friend'); /* @var $attentionSerivce PW_Attention */
  41. $updateSQL = array();
  42. $count = $winddb['fans'];
  43. if ($count < 1000 || $count > 10000000) {
  44. $num = $attentionSerivce->countFans($winduid);
  45. if ($num != $count) {
  46. $updateSQL['fans'] = $winddb['fans'] = $count = $num;
  47. }
  48. }
  49. if ($winddb['newfans'] > 0) {
  50. $updateSQL['newfans'] = $winddb['newfans'] = 0;
  51. }
  52. $page > ceil($count/$db_perpage) && $page = ceil($count/$db_perpage);
  53. $attentions = $count ? $attentionSerivce->getFansListInPage($winduid, $page, $db_perpage) : array();
  54. $attentionedUids = $myAttentionUids = array();
  55. foreach ($attentions as $attention) {
  56. $attentionedUids[] = $attention['uid'];
  57. }
  58. $myAttentionUids = $attentionSerivce->getUidsInFollowListByFriendids($winduid, $attentionedUids);
  59. foreach ($attentions as $key => $attention) {
  60. $attentions[$key]['attention'] = 0;
  61. if (!in_array($attention['uid'], $myAttentionUids)) continue;
  62. $attentions[$key]['attentionEach'] = 1;
  63. $attentions[$key]['attention'] = 1;
  64. }
  65. if ($updateSQL) {
  66. $userService = L::loadClass('UserService', 'user'); /* @var $userService PW_UserService */
  67. $userService->update($winduid, array(), $updateSQL);
  68. }
  69. $pages = numofpage($count,$page,ceil($count/$db_perpage),"{$thisbase}&");
  70. //所有好友
  71. $friendsAllUids = getFriendsIdArr($winduid);
  72. } elseif ($type == 'my') {
  73. $page = (int) S::getGP('page');
  74. $ftid = (int)S::getGP('ftid');
  75. $page < 1 && $page = 1;
  76. $db_perpage = 12;
  77. $ftype = $ftid == '-1' ? 0 : (is_numeric($ftid) && $ftid > 0 ? $ftid : null);
  78. $friendType = array();
  79. $count = $friendsNums = $defaultTypeFriendNum = 0;
  80. $friendsService = L::loadClass('Friend', 'friend'); /* @var $friendsService PW_Friend */
  81. list($friendsNums, $friendType, $defaultTypeFriendNum) = $friendsService->getFriendsTypeAndNum($winduid);
  82. if ($friendsNums != $winddb['f_num']) {
  83. $userService = L::loadClass('UserService', 'user');
  84. $userService->update($winduid, array(), array('f_num' => $friendsNums));
  85. }
  86. $count = (int)$friendsService->countUserFriends($u,$ftype);
  87. $page > ceil($count/$db_perpage) && $page = ceil($count/$db_perpage);
  88. $friends = $count ? $friendsService->findUserFriendsInPage($u, $page, $db_perpage, $ftype) : array();
  89. $uids = array_keys($friends);
  90. $attentionSerivce = L::loadClass('attention', 'friend'); /* @var $attentionSerivce PW_Attention */
  91. $myFansUids = $attentionSerivce->getUidsInFansListByFriendids($winduid, $uids);
  92. foreach ($friends as $key => $friend) {
  93. $attentions[$key]['attentionEach'] = 0;
  94. if ($friend['attention'] && in_array($friend['uid'], $myFansUids)) {
  95. $friends[$key]['attentionEach'] = 1;
  96. }
  97. }
  98. $friendsAllUids = getFriendsIdArr($winduid);
  99. $pages = numofpage($count,$page,ceil($count/$db_perpage),"{$thisbase}ftid=$ftype&");
  100. } elseif ($type == 'find') {
  101. S::gp(array('step', 'according'));
  102. $db_perpage = 12;
  103. $according = $according ? $according : 'user';
  104. ${$according.'checked'} = 'selected="selected"';
  105. //所有好友
  106. $friendsAllUids = getFriendsIdArr($winduid);
  107. if ($step == 2) {
  108. S::gp(array('f_keyword', 'decode'));
  109. !isset($f_keyword) && Showmsg('pse_input_keyword');
  110. $decode && $f_keyword = pwConvert($f_keyword, $db_charset, 'utf8');
  111. if($according && !in_array($according,array('user','uid','email','tags'))){
  112. showMsg("抱歉,搜索類型不存在");
  113. }
  114. $f_keyword = strip_tags($f_keyword);
  115. $count = 0;
  116. $members = $myAttentionUids = array();
  117. $searchURL = "u.php?a=friend&type=find";
  118. switch($according){
  119. case "user" :
  120. $searcherService = L::loadclass('searcher', 'search'); /* @var $searcherService PW_searcher */
  121. $uids = $memberdata = $attentionData = array();
  122. list($count,$users) = $searcherService->searchUsers($f_keyword,$page,$db_perpage);
  123. $users = $users ? $users : array();
  124. foreach ($users as $user) {
  125. $uids[] = $user['uid'];
  126. }
  127. if ($uids) {
  128. $userService = L::loadClass('UserService', 'user'); /* @var $userService PW_UserService */
  129. foreach ($userService->getUsersWithMemberDataByUserIds($uids) as $rt) {
  130. $memberdata[$rt['uid']] = $rt['thisvisit'];
  131. }
  132. $attentionSerivce = L::loadClass('attention', 'friend'); /* @var $attentionSerivce PW_Attention */
  133. $myAttentionsInfo = $attentionSerivce->getFollowListByFriendids($winduid, $uids);
  134. foreach ($myAttentionsInfo as $myAttentions) {
  135. $myAttentionUids[] = $myAttentions['friendid'];
  136. }
  137. foreach($users as $key => $user) {
  138. $user['thisvisit'] = $memberdata[$user['uid']];
  139. list($user['face']) = showfacedesign($user['icon'], '1', 's');
  140. in_array($user['uid'], $myAttentionUids) && $user['attention'] = 1;
  141. $members[] = $user;
  142. }
  143. }
  144. $members && $pages = ($count) ? numofpage($count,$page,ceil($count/$db_perpage),$searchURL."&f_keyword=".urlencode($f_keyword)."&step=2&",null,'',true) : '';
  145. break;
  146. case "uid" :
  147. $f_keyword = (int)$f_keyword;
  148. $userService = L::loadClass('UserService', 'user'); /* @var $userService PW_UserService */
  149. $user = $userService->get($f_keyword, true, true);
  150. if ($user) {
  151. $count = 1;
  152. $attentionSerivce = L::loadClass('Attention', 'friend'); /* @var $attentionSerivce PW_Attention */
  153. $user['attention'] = $attentionSerivce->isFollow($winduid, $user['uid']);
  154. list($user['face']) = showfacedesign($user['icon'], '1', 's');
  155. $members[] = $user;
  156. }
  157. !$f_keyword && $f_keyword = '';
  158. break;
  159. case "email" :
  160. $userService = L::loadClass('UserService', 'user'); /* @var $userService PW_UserService */
  161. $user = $userService->get($userService->getUserIdByEmail($f_keyword), true, true);
  162. if ($user) {
  163. $count = 1;
  164. $attentionSerivce = L::loadClass('Attention', 'friend'); /* @var $attentionSerivce PW_Attention */
  165. $user['attention'] = $attentionSerivce->isFollow($winduid, $user['uid']);
  166. list($user['face']) = showfacedesign($user['icon'], '1', 'm');
  167. $members[] = $user;
  168. }
  169. break;
  170. case "tags" : //標籤找人
  171. $memberTagsService = L::loadClass('MemberTagsService','user');
  172. list($count,$tagsUids,$memberTags) = $memberTagsService->getUidsByTagName($f_keyword, ($page - 1) * $db_perpage, $db_perpage);
  173. $tagsUids = $tagsUids ? $tagsUids : array();
  174. $userService = L::loadClass('UserService', 'user'); /* @var $userService PW_UserService */
  175. $users = $userService->getByUserIds($tagsUids);
  176. $users = $users ? $users : array();
  177. foreach ($users as $user) {
  178. $uids[] = $user['uid'];
  179. }
  180. if ($uids) {
  181. foreach ($userService->getUsersWithMemberDataByUserIds($uids) as $rt) {
  182. $memberdata[$rt['uid']] = $rt['thisvisit'];
  183. }
  184. $attentionSerivce = L::loadClass('attention', 'friend'); /* @var $attentionSerivce PW_Attention */
  185. $myAttentionsInfo = $attentionSerivce->getFollowListByFriendids($winduid, $uids);
  186. foreach ($myAttentionsInfo as $myAttentions) {
  187. $myAttentionUids[] = $myAttentions['friendid'];
  188. }
  189. foreach($users as $key => $user) {
  190. $user['thisvisit'] = $memberdata[$user['uid']];
  191. list($user['face']) = showfacedesign($user['icon'], '1', 's');
  192. in_array($user['uid'], $myAttentionUids) && $user['attention'] = 1;
  193. $members[] = $user;
  194. }
  195. }
  196. $members && $pages = ($count) ? numofpage($count,$page,ceil($count/$db_perpage),$searchURL."&f_keyword=".urlencode($f_keyword)."&step=2&according=tags&",null,'',true) : '';
  197. break;
  198. }
  199. } else {
  200. $friendUids = $mostFriendUids = $recommendUids = $onlineUids = $attentionUids = $onlineMembers = array();
  201. $friendService = L::loadClass('Friend', 'friend'); /* @var $friendService PW_Friend */
  202. $friendUids = $friendService->findFriendsByUid($winduid);
  203. /**=================朋友的朋友Start==============**/
  204. $mostFriends = array();
  205. $friendUidList = $friendUids;
  206. $friendUids = randArray($friendUids,10);
  207. if ($friendUids) {
  208. $query = $db->query('SELECT friendid FROM pw_friends WHERE uid IN(' . S::sqlImplode($friendUids) . ') AND status=0');
  209. $mfriends = array();
  210. while ($rt = $db->fetch_array($query)) {
  211. if ($rt['friendid'] == $winduid || S::inArray($rt['friendid'], $friendUidList))
  212. continue;
  213. $mostFriendUids[] = $rt['friendid'];
  214. }
  215. $mostFriendUids = randArray($mostFriendUids, 6);
  216. if ($mostFriendUids) {
  217. $query = $db->query('SELECT m.uid,m.username,m.icon as face,m.honor,m.groupid,m.memberid,md.fans FROM pw_members m'. " LEFT JOIN pw_memberdata md ON m.uid = md.uid".' WHERE m.uid IN(' . S::sqlImplode($mostFriendUids) . ')');
  218. while ($rt = $db->fetch_array($query)) {
  219. list($rt['face']) = showfacedesign($rt['face'], '1', 's');
  220. $mostFriends[] = $rt;
  221. }
  222. }
  223. }
  224. /**=================朋友的朋友End==============**/
  225. /**=================可能感興趣的人Start==============**/
  226. $recommendUsers['recommendUsers'] = array();
  227. $recommendUsers = $newSpace->getSpaceData(array('recommendUsers'=>12));
  228. $recommendUsers = $recommendUsers['recommendUsers'];
  229. /**=================可能感興趣的人End==============**/
  230. /**=================當前在線的人數Start==============**/
  231. require_once (R_P . 'require/functions.php');
  232. $onlineUsers = GetOnlineUser();
  233. if ($onlineUsers) {
  234. $onlineUserkeys = array_keys($onlineUsers);
  235. $onlineUserkeys = randArray($onlineUserkeys, 6);
  236. $onlineUids = $onlineUserkeys;
  237. $query = $db->query("SELECT m.uid,m.username,m.email,m.icon as face,m.regdate,m.honor,m.gender,m.groupid,m.memberid,md.thisvisit,md.fans" . " FROM pw_members m " . " LEFT JOIN pw_memberdata md ON m.uid = md.uid" . " WHERE m.uid IN(" . S::sqlImplode($onlineUserkeys) . ")" . " AND m.uid !=" . S::sqlEscape($winduid));
  238. while ($rt = $db->fetch_array($query)) {
  239. list($rt['face']) = showfacedesign($rt['face'], '1', 'm');
  240. $rt['regdate'] = get_date($rt['regdate']);
  241. $rt['honor'] = substrs($rt['honor'], 50);
  242. $onlineMembers[] = $rt;
  243. }
  244. }
  245. // var_export($onlineMembers);exit;
  246. $attentionUids = array_merge($mostFriendUids,$recommendUids,$onlineUids);
  247. if ($attentionUids) {
  248. $attentionSerivce = L::loadClass('Attention', 'friend'); /* @var $attentionSerivce PW_Attention */
  249. $myAttentionsInfo = $myAttentionUids = array();
  250. $myAttentionsInfo = $attentionSerivce->getFollowListByFriendids($winduid, $attentionUids);
  251. foreach ($myAttentionsInfo as $myAttentions) {
  252. $myAttentionUids[] = $myAttentions['friendid'];
  253. }
  254. foreach ($mostFriends as $key=>$mostFriend) {
  255. in_array($mostFriend['uid'], $myAttentionUids) && $mostFriends[$key]['attention'] = 1;
  256. }
  257. foreach ((array)$recommendUsers as $key=>$recommendUser) {
  258. in_array($recommendUser['uid'], $myAttentionUids) && $recommendUsers[$key]['attention'] = 1;
  259. }
  260. foreach ($onlineMembers as $key=>$onlineMember) {
  261. in_array($onlineMember['uid'], $myAttentionUids) && $onlineMembers[$key]['attention'] = 1;
  262. }
  263. }
  264. /**=================當前在線的人數End==============**/
  265. }
  266. $username = $windid;
  267. } elseif ($type == 'invite') {
  268. if (!$rg_allowregister) ObHeader($basename.'a=friend&type=attention');
  269. $spaceurl = $db_bbsurl.'/u.php?a=invite&uid='.$winduid;
  270. /*xufazhang 08-17*/
  271. $hash = appkey($winduid);
  272. $spaceurl .= '&hash='.$hash;
  273. require_once (R_P . 'require/credit.php');
  274. //* include pwCache::getPath(D_P . 'data/bbscache/inv_config.php');
  275. //* include pwCache::getPath(D_P . 'data/bbscache/mail_config.php');
  276. //* include pwCache::getPath(D_P . 'data/bbscache/dbreg.php');
  277. extract(pwCache::getData(D_P . 'data/bbscache/inv_config.php', false));
  278. extract(pwCache::getData(D_P . 'data/bbscache/mail_config.php', false));
  279. extract(pwCache::getData(D_P . 'data/bbscache/dbreg.php', false));
  280. $thisbase .= 'type=' . $type;
  281. //$inv_linkcontent = $spaceurl."\r\n".$inv_linkcontent;
  282. if ($rg_allowregister == 2) {
  283. $_overtime = $timestamp - (int) $inv_days * 86400;
  284. $page = S::getGP('page');
  285. $page = (int)$page;
  286. $db_perpage = 15;
  287. (!is_numeric($page) || $page < 1) && $page = 1;
  288. $limit = S::sqlLimit(($page - 1) * $db_perpage, $db_perpage);
  289. $rt = $db->get_one("SELECT COUNT(*) AS sum FROM pw_invitecode WHERE uid=" . S::sqlEscape($winduid) . " AND ifused = '0' AND createtime >= " . S::sqlEscape($_overtime));
  290. $pages = numofpage($rt['sum'], $page, ceil($rt['sum'] / $db_perpage), "$thisbase&");
  291. $query = $db->query("SELECT * FROM pw_invitecode WHERE uid=" . S::sqlEscape($winduid) . " AND ifused = '0' AND createtime >= " . S::sqlEscape($_overtime) . " ORDER BY id DESC $limit");
  292. $invdb = array();
  293. while ($rt = $db->fetch_array($query)) {
  294. $rt['overtime'] = get_date(($rt['createtime'] + (int) $inv_days * 86400), 'Y-m-d H:i:s');
  295. // $rt['invlink'] = $db_bbsurl . '/' . $db_registerfile . '?invcode=' . $rt['invcode'];
  296. $invdb[] = $rt;
  297. }
  298. }
  299. } elseif ($type == 'inviteCode') {
  300. if ($rg_allowregister != 2) ObHeader($basename.'a=friend&type=attention');
  301. S::gp(array('step', 't'), 'GP');
  302. require_once (R_P . 'require/credit.php');
  303. //* include_once pwCache::getPath(D_P . "data/bbscache/inv_config.php");
  304. pwCache::getData(D_P . "data/bbscache/inv_config.php");
  305. $allowinvite = allowcheck($inv_groups, $groupid, $winddb['groups']) ? 1 : 0;
  306. $usrecredit = ${'db_' . $inv_credit . 'name'};
  307. $creditto = array('rvrc' => $userrvrc, 'money' => $winddb['money'], 'credit' => $winddb['credit'],
  308. 'currency' => $winddb['currency']);
  309. if (empty($step)) {
  310. $_sql = "";
  311. $_overtime = (int)($timestamp - $inv_days * 86400);
  312. if ($t == 'register') {
  313. $_sql = " AND ifused = '1' ";
  314. } elseif ($t == 'notused') {
  315. $_sql = " AND ifused = '0' AND createtime >= " . S::sqlEscape($_overtime);
  316. } elseif ($t == 'overtime') {
  317. $_sql = " AND ifused = '0' AND createtime < " . S::sqlEscape($_overtime);
  318. }
  319. $page = S::getGP('page');
  320. $page = (int)$page;
  321. $db_perpage = 10;
  322. (!is_numeric($page) || $page < 1) && $page = 1;
  323. $rt = $db->get_one("SELECT COUNT(*) AS sum FROM pw_invitecode WHERE uid=" . S::sqlEscape($winduid) . " $_sql ");
  324. $pageCount = ceil($rt['sum'] / $db_perpage);
  325. $page = $page < 0 ? 1 : $page > $pageCount ? $pageCount : $page;
  326. $pages = numofpage($rt['sum'], $page, $pageCount, $thisbase . "type=inviteCode&t=$t&");
  327. $limit = S::sqlLimit(($page - 1) * $db_perpage, $db_perpage);
  328. $query = $db->query("SELECT * FROM pw_invitecode WHERE uid=" . S::sqlEscape($winduid) . " $_sql ORDER BY id DESC $limit");
  329. $invdb = array();
  330. while ($rt = $db->fetch_array($query)) {
  331. $rt['used'] = '';
  332. if ($rt['ifused'] =='0' && $rt['createtime'] < $_overtime){
  333. $rt['used'] = "<span class='gray'>已過期</span>";
  334. } elseif ($rt['ifused'] == '0' && $rt['createtime'] >= $_overtime){
  335. $rt['used'] = "<span class='s3' >未使用</span>";
  336. } elseif ($rt['ifused'] == '1'){
  337. $rt['used'] = "<span class='s2' >已註冊</span>";
  338. }
  339. $rt['overtime'] = get_date(($rt['createtime'] + (int) $inv_days * 86400), 'Y-m-d H:i:s');
  340. $rt['usetime'] = $rt['usetime'] ? get_date($rt['usetime'], 'Y-m-d H:i:s') : '';
  341. $invdb[] = $rt;
  342. }
  343. }
  344. } elseif ($type == 'viewer') {
  345. $username = $windid;
  346. $userdb = $db->get_one("SELECT m.uid,m.username,m.email,m.groupid,m.memberid,m.icon,ud.index_privacy,ud.profile_privacy,ud.info_privacy,ud.credit_privacy,ud.owrite_privacy,ud.msgboard_privacy,ud.visits,ud.whovisit FROM pw_members m LEFT JOIN pw_ouserdata ud ON m.uid=ud.uid WHERE m.uid=" . S::sqlEscape($u));
  347. $whovisit = unserialize($userdb['whovisit']);
  348. is_array($whovisit) || $whovisit = array();
  349. $visituids = array_keys($whovisit);
  350. if ($visituids) {
  351. $userService = L::loadClass('UserService', 'user'); /* @var $userService PW_UserService */
  352. foreach ($userService->getUsersWithMemberDataByUserIds($visituids) as $rt) {
  353. list($rt['face']) = showfacedesign($rt['icon'], 1, 'm');
  354. $whovisit[$rt['uid']] = get_date($whovisit[$rt['uid']], ($whovisit[$rt['uid']] < $tdtime ? 'm-d' : 'H:i'));
  355. $whovisit[$rt['uid']] = array('visittime' => $whovisit[$rt['uid']]) + $rt;
  356. }
  357. }
  358. } elseif ($type == 'birthday') {
  359. $birthday = $winddb['bday'];
  360. $customFieldService = L::loadClass('customerfield','user');
  361. $fieldInfo = $customFieldService->getFieldByFieldName('bday');
  362. switch ($fieldInfo['category']) {
  363. case 'basic' :
  364. $birthdayLink = 'base';
  365. break;
  366. case 'contact' :
  367. $birthdayLink = 'link';
  368. break;
  369. case 'education' :
  370. $birthdayLink = 'education';
  371. break;
  372. case 'other':
  373. $birthdayLink = 'other';
  374. break;
  375. }
  376. $friendsService = L::loadClass('Friend', 'friend'); /* @var $friendsService PW_Friend */
  377. $friendsBirthday = $friendsService->findUserFriendsBirthdayInPage($winduid, 20, 1, 25);
  378. }
  379. if ($space == 1) {
  380. require_once (R_P . 'require/credit.php');
  381. list($userdb, $ismyfriend, $friendcheck, $usericon, $usercredit, $totalcredit, $appcount, $p_list) = getAppleftinfo($u);
  382. } else {
  383. }
  384. require_once (uTemplate::printEot('friend_index'));
  385. pwOutPut();
  386. /**
  387. * 數組裡隨機取幾個
  388. *
  389. * @param array $dealArray
  390. * @param int $num
  391. * return array()
  392. */
  393. function randArray($dealArray, $num){
  394. if (!is_array($dealArray)) return "";
  395. if ($num >= count($dealArray)) return $dealArray;
  396. if ($num <= 0) return "";
  397. $temp = array_rand($dealArray,$num);
  398. $result = array();
  399. foreach ($temp as $value) {
  400. $result[] = $dealArray[$value];
  401. }
  402. return $result;
  403. }
  404. /**
  405. * 獲取存放會員好友的ID數組
  406. *
  407. * @param array $dealArray
  408. * @param int $num
  409. * return array()
  410. */
  411. function getFriendsIdArr($winduid) {
  412. $friendsAll = $friendsAllUids = array();
  413. $friendsService = L::loadClass('Friend', 'friend'); /* @var $friendsService PW_Friend */
  414. $friendsAll = $friendsService->getFriendsByUid($winduid);
  415. foreach ($friendsAll as $key => $friend) {
  416. $friendsAllUids[] = $friend['friendid'];
  417. }
  418. return $friendsAllUids;
  419. }
  420. ?>