} } } $emailCount = is_array($emailList) ? count($emailList) : 0; $friendCount = count($friendList); $notFriendCount = count($userList); } require_once PrintEot('ajax_friendinvite'); ajax_footer(); } elseif ($step == 'addfriend') { S::gp(array('value'), 'GP'); empty($value) && Showmsg("非法操作"); L::loadClass('friend', 'friend', false); $friendServer = new PW_Friend(); $value = explode(',', $value); $check = $friendServer->getFriendCheck($value); $friend = array(); foreach ($value as $key => $id) { if ($id != $winduid) { if (getstatus($check[$id], 3, 3) == 0) { $friend[] = array($winduid, $id, 0, $timestamp, ''); $friend[] = array($id, $winduid, 0, $timestamp, ''); } elseif (getstatus($check[$id], 3, 3) == 1) { $friend[] = array($id, $winduid, 1, $timestamp, ''); } } } $friend && $friendServer->addFriends($friend); exit; } elseif ($step == 'sendmail') { S::gp(array('value', 'extranote'), 'GP');