<!--<?php
require_once(uTemplate::printEot('header'));
require_once(uTemplate::printEot('user_appleft'));
print<<<EOT
-->
<div class="contUser">
<table width="100%"><tr><td valign="top" height="500">
	<div class="p15">
		<h4 class="site"><img src="u/images/module/friend.png" align="absmiddle" class="mr10" /><span>朋友</span></h4>
		<div class="navC mb10">
			<ul>
				<li id="type_attention"><a href="u.php?a=friend&type=attention">我的关注</a></li>
				<li id="type_attentioned"><a  href="u.php?a=friend&type=attentioned">我的粉丝</a></li>
				<li id="type_my"><a href="u.php?a=friend&type=my">我的好友</a></li>
				<li id="type_find"><a href="u.php?a=friend&type=find">查找好友</a></li>
<!--
EOT;
if ($rg_allowregister != '0') {
print <<<EOT
-->
				<li id="type_invite"><a href="u.php?a=friend&type=invite">邀请好友</a></li>
<!--
EOT;
}if ($rg_allowregister == '2') {
print <<<EOT
-->
				<li id="type_inviteCode"><a href="u.php?a=friend&type=inviteCode">邀请码管理</a></li>	
<!--
EOT;
}
print <<<EOT
-->
				<li id="type_birthday"><a href="u.php?a=friend&type=birthday">好友生日</a></li>
			</ul>
		</div>
<!--
EOT;
if ($type == 'birthday') {print <<<EOT
-->
		<div class="bdB pb10 p_lr_10 cc">
			我现在的生日设置为：{$birthday} <a href="profile.php?action=modify&info_type=$birthdayLink">点击设置我的生日</a>
		</div>
		<div class="conFeed" style="padding-left:7px;">
<!--
EOT;
if ($friendsBirthday) {
foreach ($friendsBirthday as $birth => $friends) {
$bday=explode("-",$friends[bday]);
$d1=mktime(0,0,0,$bday[0],$bday[1],0);
$d2=mktime(0,0,0,get_date($timestamp,'m'),get_date($timestamp,'d'),0);
$days=($d1-$d2)/3600/24;
$nowdays = ($days > 0) ? $days.'天后':'今天';
print <<<EOT
-->
			<dl class="dl cc">
				<dt class="dt">
					<a href="u.php?uid=$friends[uid]" class="img_50 _cardshow" data-card-url="pw_ajax.php?action=smallcard&type=showcard&uid={$friends[uid]}" target="_blank"  data-card-key="{$friends['username']}"><img src="$friends[face]" width="44" height="44" alt="admin" /></a>
				</dt>
				<dd class="dd">
					<p class="f14"><a href="u.php?uid=$friends[uid]" class=" _cardshow" data-card-url="pw_ajax.php?action=smallcard&type=showcard&uid={$friends[uid]}" target="_blank" data-card-key="{$friends['username']}">$friends[username]</a>在{$nowdays}（{$friends[bday]}）过生日</p>
					<p><a href="javascript:;" onclick="sendmsg('pw_ajax.php?action=msg&touid=$friends[uid]');" class="bless" title="送祝福">送祝福</a></p>
				</dd>
			</dl>
<!--
EOT;
}}else { print <<<EOT
-->
		<div class="tac f14 p15">最近没有好友过生日</div>
<!--
EOT;
}print <<<EOT
-->
			<div class="mb10 cc">$pages</div>
		</div>
<!--
EOT;
}
print <<<EOT
-->
<script type="text/javascript">setCurrent('type_$type','type_attention','current');</script>
<!--
EOT;
if ($type == 'my') {

if ($u == $winduid) {print <<<EOT
-->
		<div class="sidebar fr">
			<div >
			<div class="boxC">
				<h3>好友分组</h3>
					<ul class="ulE" id="dt_ul">
					<li id="dt_all"><a href="{$thisbase}">全部好友</a> [<span id="fcount">{$friendsNums}</span>]</li>
<!--
EOT;
foreach ($friendType as $value) {print <<<EOT
-->
					<li id="dt_{$value[ftid]}" onmousemove="isMouseUp({$value[ftid]},0)" onmouseout="isMouseUp({$value[ftid]},1)" >			
						<a id="del_{$value[ftid]}" style="visibility:hidden" title="删除" class="adel cp mr10" onclick="pwConfirm('是否确认解除？',this,function(){delType('$value[ftid]','$u')})">删除</a>
						<a id="edit_{$value[ftid]}" style="visibility:hidden" title="编辑" class="aedit mr5 cp" onclick="showEidt('$value[ftid]','$u');">编辑</a>
						<a id="ftype_{$value[ftid]}" href="{$thisbase}ftid={$value[ftid]}" class="mr5">$value[name]</a><cite id="dnum_{$value[ftid]}">[{$value[num]}]</cite>
					</li>
<!--
EOT;
}print <<<EOT
-->
					<li id="dt_-1"><a href="{$thisbase}ftid=-1" class="mr5">未分组</a>[{$defaultTypeFriendNum}]</li>
				</ul>
<!--
EOT;
$type = $ftid == -1  ? 'null' : $ftid;
print <<<EOT
-->
<script>
     setCurrent('dt_$type','dt_all','current');
</script>	                 
				<div class="pd5"><span class="cp addImg" onclick="addType('dt_ul','$u')">添加分组</span></div>
			</div>
			</div>
		</div>
<!--
EOT;
}print<<<EOT
-->
		<div class="contentB p_lr_10">
		<div class="friList mb10" id="friList">
<!--
EOT;
if (!empty($friends)) {
$userService = L::loadClass('UserService', 'user');
foreach ($friends as $key => $value) {
$groupId = ($value['groupid'] == '-1') ? $value['memberid'] : $value['groupid'];
$groupRight = $userService->getRightByGroupId($groupId);
$value['honor'] = $groupRight['allowhonor'] ? substrs($value['honor'],40) : '';
print <<<EOT
-->
			<dl class="cc nadlA" id="friend_{$value[uid]}">
				<dt><a href="{$db_userurl}$value[uid]" class="img_50 _cardshow" data-card-url="pw_ajax.php?action=smallcard&type=showcard&uid={$value[uid]}" target="_blank" data-card-key="{$value['username']}"><img src="$value[face]" width="44" height="44" /></a></dt>
				<dd>
					<div class="nadlCon">
						<div class="nadlCon_l fl">
							<p class="mb5">
<!--
EOT;
$gender = getDefaultGender($value['gender']);
if(checkOnline($value['thisvisit'])){
print <<<EOT
-->
<span class="{$gender}_ol mr5" title="在线" alt="在线">在线</span>
<!--
EOT;
}print <<<EOT
-->
							<a href="{$db_userurl}$value[uid]" class="b _cardshow" data-card-url="pw_ajax.php?action=smallcard&type=showcard&uid={$value[uid]}" target="_blank" data-card-key="{$value['username']}">$value[username]</a>
</p>
							<p class="mb5">$value[honor]</p>
							<p>被关注：<span id="att_friend_{$value[uid]}" class="mr20">{$value['fans']}</span>最近登录: {$value[lastvisit]}</p>
						</div>
<!--
EOT;
if($u == $winduid) {
if ($value[ftid] && $friendType[$value[ftid]]) {
$ftypename = $friendType[$value[ftid]][name];
} else {
$ftypename = '未分组';
}
print <<<EOT
-->
						<div class="nadlCon_r fl pr">
							<a href="javascript:;" class="link_down" id="td_ftid{$value[uid]}" onclick="read.open('menu_ftid{$value[uid]}','td_ftid{$value[uid]}');" title="点击重新分组"><span id="ftypename_{$value[uid]}">{$ftypename}</span></a>
<div id="menu_ftid{$value[uid]}" style="display:none; ">
<!--
EOT;
if ($friendType) {print <<<EOT
-->
			<div class="pw_menu friGroup">
				<ul class="menuList">
<!--
EOT;
foreach ($friendType as $type) {print <<<EOT
-->
					<li><a  href="javascript:;" onclick="setFriendType('',{$value[uid]}, $type[ftid]);" class="s6">{$type['name']}</a></li>
<!--
EOT;
}print <<<EOT
-->
				</ul>
			</div>
<!--
EOT;
}print <<<EOT
-->
			</div>
						</div>
						<div class="nadlCon_c fr">				
<!--
EOT;
if (!$value['attention']) {print <<<EOT
-->
									<p class="mb5"><a href="javascript:;" onclick="Attention.add(this,'{$value['uid']}',1)" class="add_follow">加关注</a></p>
<!--
EOT;
	}if ($value['attentionEach']) {print <<<EOT
-->
                  <p class="mb5"><img src="u/images/mnfollow.png" title="互相关注" /></p>
<!--
EOT;
	}print <<<EOT
-->
							<ul>
<!--
EOT;
if($u == $winduid){print <<<EOT
-->
									<li><a href="javascript:;" onclick="sendmsg('pw_ajax.php?action=msg&touid=$value[uid]');" class="s6">发消息</a></li>
<!--
EOT;
}print <<<EOT
-->
<!--
EOT;
if ($value['attention']) {print <<<EOT
-->
									<li><a href="javascript:;" onclick="pwConfirm('是否取消关注？',this,function(){Attention.del('{$value[uid]}')})" class="s6">取消关注</a></li>
<!--
EOT;
}if (!in_array($value['uid'], $friendsAllUids)) {print <<<EOT
-->
									<li><a href="javascript:;"  onclick="sendmsg('pw_ajax.php?action=addfriend&touid={$value[uid]}&reload=1');">加为好友</a></li>
<!--
EOT;
 } else {print <<<EOT
-->
									<li><a href="javascript:;" onclick="pwConfirm('是否确认解除？',this,function(){delFriend('$value[uid]')});" title="解除好友">解除好友</a></li>
<!--
EOT;
} print <<<EOT
-->
								</ul>
						</div>
					</div>
				</dd>
			</dl>
<!--
EOT;
}}print <<<EOT
-->
		</div>
<script type="text/javascript">
var li = document.getElementById("friList");
var tt = li.getElementsByTagName("dl");
for(i=0; i<tt.length; i++){
	tt[i].onmouseover= function(){
		for(j=0; j<tt.length; j++){
			tt[j].className = "cc nadlA";
			this.className  = "current cc nadlA";
		}
	}
	tt[i].onmouseout= function(){
      for(j=0; j<tt.length; j++){
          this.className  = "cc nadlA";
      }
   }
}
</script>
<!--
EOT;
} else {print <<<EOT
-->
			<div class="p15 f14 tac">暂无朋友,<a href="u.php?a=friend&type=find">寻找我的朋友</a></div>
<!--
EOT;
}print <<<EOT
-->
			<div class="mb10 cc">$pages</div>
		</div>
<!--
EOT;
} elseif ($type == 'attention' || $type == 'attentioned')  {print <<<EOT
-->
	<div class="p_lr_10 contentB">
		<div class="friList" id="friList">
<!--
EOT;
if (!empty($attentions)) {
$userService = L::loadClass('UserService', 'user');
foreach ($attentions as $key => $value) {
$groupId = ($value['groupid'] == '-1') ? $value['memberid'] : $value['groupid'];
$groupRight = $userService->getRightByGroupId($groupId);
$value['honor'] = $groupRight['allowhonor'] ? substrs($value['honor'],40) : '';
print <<<EOT
-->
			<dl class="cc nadlA" id="friend_{$value[uid]}">
				<dt><a href="{$db_userurl}$value[uid]" class="img_50 _cardshow" data-card-url="pw_ajax.php?action=smallcard&type=showcard&uid={$value[uid]}" target="_blank" data-card-key="{$value['username']}"><img src="$value[face]" width="44" height="44" /></a></dt>
				<dd>
					<div class="nadlCon">
						<div class="nadlCon_l fl">
							<p class="mb5">
<!--
EOT;
$gender = getDefaultGender($value['gender']);
if(checkOnline($value['thisvisit'])){
print <<<EOT
-->
<span class="{$gender}_ol mr5" title="在线" alt="在线">在线</span>
<!--
EOT;
}print <<<EOT
-->
							<a href="{$db_userurl}$value[uid]" class="b _cardshow" data-card-url="pw_ajax.php?action=smallcard&type=showcard&uid={$value[uid]}" target="_blank" data-card-key="{$value['username']}">$value[username]</a>
</p>
							<p class="mb5">$value[honor]</p>
							<p>最近登录: {$value[lastvisit]}</p>
						</div>
						<div class="nadlCon_c fr">
<!--
EOT;
if (!$value['attention']) {print <<<EOT
-->
									<p class="mb5"><a href="javascript:;" onclick="Attention.add(this,'{$value['uid']}',1)" class="add_follow">加关注</a></p>
<!--
EOT;
	}if ($value['attentionEach']) {print <<<EOT
-->
                  <p class="mb5"><img src="u/images/mnfollow.png" title="互相关注" /></p>
<!--
EOT;
	}print <<<EOT
-->
							<ul>
<!--
EOT;
if($u == $winduid){print <<<EOT
-->
									<li><a href="javascript:;" onclick="sendmsg('pw_ajax.php?action=msg&touid=$value[uid]');" class="s6">发消息</a></li>
<!--
EOT;
}print <<<EOT
-->
<!--
EOT;
if ($value['attention']) {print <<<EOT
-->
									<li><a href="javascript:;" onclick="pwConfirm('是否取消关注？',this,function(){Attention.del('{$value[uid]}')})" class="s6">取消关注</a></li>
<!--
EOT;
}if (!in_array($value['uid'], $friendsAllUids)) {print <<<EOT
-->
									<li><a href="javascript:;"  onclick="sendmsg('pw_ajax.php?action=addfriend&touid={$value[uid]}&reload=1');">加为好友</a></li>
<!--
EOT;
 } else {print <<<EOT
-->
									<li><a href="javascript:;" onclick="pwConfirm('是否确认解除？',this,function(){delFriend('$value[uid]')});" title="解除好友">解除好友</a></li>
<!--
EOT;
}print <<<EOT
-->
								</ul>
						</div>
					</div>
				</dd>
			</dl>
<!--
EOT;
}print <<<EOT
--> 
		</div>
<script type="text/javascript">
var li = document.getElementById("friList");
var tt = li.getElementsByTagName("dl");
for(i=0; i<tt.length; i++){
	tt[i].onmouseover= function(){
		for(j=0; j<tt.length; j++){
			tt[j].className = "cc nadlA";
			this.className  = "current cc nadlA";
		}
	}
	tt[i].onmouseout= function(){
      for(j=0; j<tt.length; j++){
          this.className  = "cc nadlA";
      }
   }
}
</script>
<!--
EOT;
} else {print <<<EOT
-->
<!--
EOT;
	if ($atype == 'attentioned') {print <<<EOT
-->
		<div class="tac f14 p15">暂无人关注你,<a href="u.php?a=friend&type=find">试试关注别人吧</a></div>
<!--
EOT;
	} else {print <<<EOT
-->
		<div class="tac f14 p15">暂无关注,<a href="u.php?a=friend&type=find">寻找我要关注的人</a></div>
<!--
EOT;
	}print <<<EOT
-->
<!--
EOT;
}print <<<EOT
-->                                
		<div class="mt10 cc">$pages</div>
	</div>
<!--
EOT;
} elseif ($type == 'find') {
if ($step != 2 ){
	$check = "checked=".'"checked"';
}
print <<<EOT
-->
<form action="u.php" method="get" onsubmit="return checkSubmit();">
<input type="hidden" name="a" value="friend">
<input type="hidden" name="type" value="find">
<input type="hidden" name="step" value="2">
	<div class="friSearch p15 cc mb10">
		<div class="fl friSip mr5">
			<input class="f14 fl" type="text" size="50" name="f_keyword" value="$f_keyword" maxlength="35" id="f_keyword" />
		<span class="dropdown">
			<select name="according" id="friSelect">
				<option value="user" $userchecked>用户名</option>
				<option value="uid" $uidchecked>UID</option>
				<option value="email" $emailchecked>电子邮箱</option>
				<option value="tags" $tagschecked>标签</option>			
			</select>
		</span>
		</div>
		<span class="mr20"><span class="btn"><span><button type="submit">查找</button></span></span></span>
<!--
EOT;
$rg_config  = L::reg();
if (!($rg_config['rg_allowregister'] == 0 || ($rg_config['rg_registertype'] == 1 && date('j',$timestamp) != $rg_config['rg_regmon']) || ($rg_config['rg_registertype'] == 2 && date('w',$timestamp) != $rg_config['rg_regweek']))) {
print <<<EOT
--> 
		想找更多朋友，马上<a href="u.php?a=friend&type=invite">开始邀请</a>
<!--
EOT;
}print <<<EOT
-->
	</div>
</form>
<script type="text/javascript">
var ld=window.onload;
function checkSubmit() {
	var keyWord = getObj("f_keyword").value;
	if (keyWord == '' || keyWord == null) {
		showDialog('error','关键字不能为空,请重新输入',1);
		return false;
	}
	//window.location = '{$thisbase}type=find&step=2&f_keyword=' + keyWord + '&according=' + getObj('according').value;
	return true;
}
function changDisplay(source,target) {
	var objsource = getObj(source);
	objsource.style.display = 'none';
	var objtarget = getObj(target);
	objtarget.style.display = '';
}
window.onReady(function(){
	var photoselect = new sSelect(getObj('friSelect'));
})
</script>
<div>
<!--
EOT;
if (empty($step)) {print <<<EOT
-->
<!--
EOT;
if ($recommendUsers) {print <<<EOT
-->
	<h5 class="h5 mb10"><strong>可能感兴趣的人</strong></h5>
	<ul class="threeLines cc">
<!--
EOT;
$userService = L::loadClass('UserService', 'user');
foreach ($recommendUsers as $member){
$groupId = ($member['groupid'] == '-1') ? $member['memberid'] : $member['groupid'];
$groupRight = $userService->getRightByGroupId($groupId);
//$db_menuinit .= ",'td_recommendUsers{$member[uid]}' : 'menu_recommendUsers{$member[uid]}'";
print <<<EOT
-->
		<li>
			<dl class="friDl cc p10 mr10 mb10">
				<dt class="fl mr10"><a class="img_50 _cardshow" data-card-url="pw_ajax.php?action=smallcard&type=showcard&uid={$member[uid]}" href="u.php?uid={$member['uid']}" target="_blank" data-card-key="{$member['username']}"><img height="44" width="44" src="$member[face]"/></a></dt>
				<dd>
					<div class="lh_18">
<!--
EOT;
if (!$member['attention']) {print <<<EOT
-->
<a href="javascript:;" onclick="Attention.add(this,'{$member['uid']}',1);" class="add_follow fr" name="att_recommend">加关注</a>
<!--
EOT;
} else {print <<<EOT
--><a href="javascript:;" class="fr add_following gray">关注中</a>
<!--
EOT;
}print <<<EOT
-->
<!--
EOT;
$gender = getDefaultGender($member['gender']);
if (checkOnline($member['thisvisit'])) {
print <<<EOT
--><span class="{$gender}_ol mr5" title="在线" alt="在线">在线</span><!--
EOT;
}print <<<EOT
-->
<a href="{$db_userurl}$member[uid]" class="b _cardshow" data-card-url="pw_ajax.php?action=smallcard&type=showcard&uid={$member[uid]}" data-card-key="{$member['username']}">$member[username]</a></div>
<!--
EOT;
if ($member['honor'] && $groupRight['allowhonor']) {print <<<EOT
-->
					<div class="lh_18">{$member['honor']}</div>
<!--
EOT;
} else {print <<<EOT
-->
					<div>该用户暂无签名</div>
<!--
EOT;
}print <<<EOT
-->
					<a href="javascript:;" class="adown s6 fr" id="td_recommendUsers{$member[uid]}" onmouseover="read.open('menu_recommendUsers{$member[uid]}','td_recommendUsers{$member[uid]}');">更多操作</a>
					<div class="pw_menu" style="display:none;" id="menu_recommendUsers{$member[uid]}">
						<ul class="menuList" style="width:70px;">
<!--
EOT;
if (!in_array($member['uid'], $friendsAllUids)) {print <<<EOT
-->
									<li><a href="javascript:;"  onclick="sendmsg('pw_ajax.php?action=addfriend&touid={$member[uid]}&reload=1');">加为好友</a></li>
<!--
EOT;
 } else {print <<<EOT
-->
									<li><a href="javascript:;" onclick="pwConfirm('是否确认解除？',this,function(){delFriend('$member[uid]')});" title="解除好友">解除好友</a></li>
<!--
EOT;
}print <<<EOT
-->
							<li><a href="javascript:;" onclick="sendmsg('pw_ajax.php?action=msg&touid={$member[uid]}');">发送消息</a></li>
<!--
EOT;
if ($member['attention']) {print <<<EOT
-->
							<li><a href="javascript:;" onclick="pwConfirm('是否取消关注？',this,function(){Attention.del('{$member[uid]}')});" title="取消关注">取消关注</a></li>
<!--
EOT;
}print <<<EOT
-->
						</ul>
					</div>
					被关注：<span id="att_recommend_{$member[uid]}">{$member['fans']}</span>
				</dd>
			</dl>
		</li>
<!--
EOT;
}print <<<EOT
-->
	</ul>
<!--
EOT;
}print <<<EOT
-->

<!--
EOT;
if ($mostFriends) {print <<<EOT
-->
	<h5 class="h5 mb10"><strong>好友的好友</strong></h5>
	<ul class="threeLines cc">
<!--
EOT;
$userService = L::loadClass('UserService', 'user');
foreach ($mostFriends as $member){
$groupId = ($member['groupid'] == '-1') ? $member['memberid'] : $member['groupid'];
$groupRight = $userService->getRightByGroupId($groupId);
//$db_menuinit .= ",'td_mostFriends{$member[uid]}' : 'menu_mostFriends{$member[uid]}'";
print <<<EOT
-->
		<li>
			<dl class="friDl cc p10 mr10 mb10">
				<dt class="fl mr10"><a class="img_50 _cardshow" data-card-url="pw_ajax.php?action=smallcard&type=showcard&uid={$member[uid]}" href="u.php?uid={$member['uid']}" target="_blank" data-card-key="{$member['username']}"><img height="44" width="44" src="$member[face]"/></a></dt>
				<dd>
					<div class="lh_18">
<!--
EOT;
if (!$member['attention']) {print <<<EOT
-->
<a href="javascript:;" onclick="Attention.add(this,'{$member['uid']}',1)" class="add_follow fr" name="att_friends">加关注</a>
<!--
EOT;
} else {print <<<EOT
--><a href="javascript:;" class="fr add_following gray">关注中</a>
<!--
EOT;
}print <<<EOT
-->
<!--
EOT;
$gender = getDefaultGender($member['gender']);
if (checkOnline($member['thisvisit'])) {
print <<<EOT
--><span class="{$gender}_ol mr5" title="在线" alt="在线">在线</span><!--
EOT;
}print <<<EOT
-->
<a href="{$db_userurl}$member[uid]" class="b _cardshow" data-card-url="pw_ajax.php?action=smallcard&type=showcard&uid={$member[uid]}" data-card-key="{$member['username']}">$member[username]</a></div>
<!--
EOT;
if ($member['honor'] && $groupRight['allowhonor']) {print <<<EOT
-->
					<div class="lh_18">{$member['honor']}</div>
<!--
EOT;
} else {print <<<EOT
-->
					<div>该用户暂无签名</div>
<!--
EOT;
}print <<<EOT
-->
					<a href="javascript:;" class="adown s6 fr" id="td_mostFriends{$member[uid]}" onmouseover="read.open('menu_mostFriends{$member[uid]}','td_mostFriends{$member[uid]}');">更多操作</a>
					<div class="pw_menu" style="display:none;" id="menu_mostFriends{$member[uid]}">
						<ul class="menuList" style="width:70px;">
<!--
EOT;
if (!in_array($member['uid'], $friendsAllUids)) {print <<<EOT
-->
									<li><a href="javascript:;"  onclick="sendmsg('pw_ajax.php?action=addfriend&touid={$member['uid']}&reload=1');">加为好友</a></li>
<!--
EOT;
 } else {print <<<EOT
-->
									<li><a href="javascript:;" onclick="pwConfirm('是否确认解除？',this,function(){delFriend('$member[uid]')});" title="解除好友">解除好友</a></li>
<!--
EOT;
}print <<<EOT
-->
							<li><a href="javascript:;" onclick="sendmsg('pw_ajax.php?action=msg&touid={$member[uid]}');">发送消息</a></li>
<!--
EOT;
if ($member['attention']) {print <<<EOT
-->
							<li><a href="javascript:;" onclick="pwConfirm('是否取消关注？',this,function(){Attention.del('{$member[uid]}')});" title="取消关注">取消关注</a></li>
<!--
EOT;
}print <<<EOT
-->
						</ul>
					</div>
					被关注：<span id="att_friends_{$member[uid]}">{$member['fans']}</span>
				</dd>
			</dl>
		</li>
<!--
EOT;
}print <<<EOT
-->
	</ul>
<!--
EOT;
}print <<<EOT
-->	

<!--
EOT;
if ($onlineMembers) {print <<<EOT
-->
	<h5 class="h5 mb10"><strong>当前在线的人</strong></h5>
	<ul class="threeLines cc">
<!--
EOT;
$userService = L::loadClass('UserService', 'user');
foreach ($onlineMembers as $member) {
//$db_menuinit .= ",'td_onlineMembers{$member[uid]}' : 'menu_onlineMembers{$member[uid]}'";
$groupId = ($member['groupid'] == '-1') ? $member['memberid'] : $member['groupid'];
$groupRight = $userService->getRightByGroupId($groupId);
print <<<EOT
-->
		<li>
			<dl class="friDl cc p10 mr10 mb10">
				<dt class="fl mr10"><a class="img_50 _cardshow" data-card-url="pw_ajax.php?action=smallcard&type=showcard&uid={$member[uid]}" href="u.php?uid={$member['uid']}" target="_blank" data-card-key="{$member['username']}"><img height="44" width="44" src="$member[face]"/></a></dt>
				<dd>
					<div class="lh_18">
<!--
EOT;
if (!$member['attention']) {print <<<EOT
-->
<a href="javascript:;" onclick="Attention.add(this,'{$member['uid']}',1)" class="add_follow fr" name="att_online">加关注</a>
<!--
EOT;
} else {print <<<EOT
--><a href="javascript:;" class="fr add_following gray">关注中</a>
<!--
EOT;
}print <<<EOT
-->
<!--
EOT;
$gender = getDefaultGender($member['gender']);
if (checkOnline($member['thisvisit'])) {
print <<<EOT
--><span class="{$gender}_ol mr5" title="在线" alt="在线">在线</span><!--
EOT;
}print <<<EOT
--><a href="{$db_userurl}$member[uid]" target="_blank" class="b _cardshow" data-card-url="pw_ajax.php?action=smallcard&type=showcard&uid={$member[uid]}" data-card-key="{$member['username']}" >$member[username]</a></div>
<!--
EOT;
if ($member['honor'] && $groupRight['allowhonor']) {print <<<EOT
-->
					<div class="lh_18">{$member['honor']}</div>
<!--
EOT;
} else {print <<<EOT
-->
					<div>该用户暂无签名</div>
<!--
EOT;
}print <<<EOT
-->
					<a href="javascript:;" class="adown s6 fr" id="td_onlineMembers{$member[uid]}" onmouseover="read.open('menu_onlineMembers{$member[uid]}','td_onlineMembers{$member[uid]}');">更多操作</a>
					<div class="pw_menu" style="display:none;" id="menu_onlineMembers{$member[uid]}">
						<ul class="menuList" style="width:70px;">
<!--
EOT;
if (!in_array($member['uid'], $friendsAllUids)) {print <<<EOT
-->
									<li><a href="javascript:;"  onclick="sendmsg('pw_ajax.php?action=addfriend&touid={$member['uid']}&reload=1');">加为好友</a></li>
<!--
EOT;
 } else {print <<<EOT
-->
									<li><a href="javascript:;" onclick="pwConfirm('是否确认解除？',this,function(){delFriend('$member[uid]')});" title="解除好友">解除好友</a></li>
<!--
EOT;
}print <<<EOT
-->
							<li><a href="javascript:;" onclick="sendmsg('pw_ajax.php?action=msg&touid={$member[uid]}');">发送消息</a></li>
<!--
EOT;
if ($member['attention']) {print <<<EOT
-->                        
							<li><a href="javascript:;" onclick="pwConfirm('是否取消关注？',this,function(){Attention.del('{$member[uid]}')});" title="取消关注">取消关注</a></li>
<!--
EOT;
}print <<<EOT
-->
						</ul>
					</div>
					被关注：<span id="att_online_{$member[uid]}">{$member['fans']}</span>
				</dd>
			</dl>
		</li>
<!--
EOT;
}print <<<EOT
-->
	</ul>
<!--
EOT;
}} else {
if($members){print<<<EOT
-->
	<h5 class="h5 mb10"><strong>搜索  {$keyword}  找到{$count}个人</strong></h5>
	<ul class="threeLines cc">
<!--
EOT;
$userService = L::loadClass('UserService', 'user');
foreach ($members as $key => $member){
$groupId = ($member['groupid'] == '-1') ? $member['memberid'] : $member['groupid'];
$groupRight = $userService->getRightByGroupId($groupId);
print <<<EOT
-->
		<li>
			<dl class="friDl cc p10 mr10 mb10">
				<dt class="fl mr10"><a class="img_50 _cardshow" data-card-url="pw_ajax.php?action=smallcard&type=showcard&uid={$member[uid]}" href="u.php?uid={$member['uid']}" target="_blank" data-card-key="{$member['username']}"><img height="44" width="44" src="$member[face]"/></a></dt>
				<dd>
					<div class="lh_18">
<!--
EOT;
$gender = getDefaultGender($member['gender']);
if (checkOnline($member['thisvisit'])) {
print <<<EOT
--><span class="{$gender}_ol mr5" title="在线" alt="在线">在线</span><!--
EOT;
}print <<<EOT
-->
					<a href="{$db_userurl}$member[uid]" class="b _cardshow" data-card-url="pw_ajax.php?action=smallcard&type=showcard&uid={$member[uid]}" target="_blank" data-card-key="{$member['username']}">$member[username]</a>
					</div>
<!--
EOT;
if ($according == 'tags') {
print <<<EOT
-->
					<div>{$memberTags[$member[uid]]}</div>
<!--
EOT;
} else {
	if ($member['honor'] && $groupRight['allowhonor']) {print <<<EOT
-->
					<div>{$member['honor']}</div>
<!--
EOT;
	} else {print <<<EOT
-->
					<div>该用户暂无签名</div>
<!--
EOT;
	}
}print <<<EOT
-->
					<div class="cc">
<!--
EOT;
if (!$member['attention']) {print <<<EOT
-->
						<div class="fl mr10" id="att_{$value['uid']} "><a href="javascript:;" onclick="Attention.add(this,'{$member['uid']}',1)" class="add_follow" >加关注</a></div>
<!--
EOT;
} else {print <<<EOT
-->
						<a href="javascript:;" onclick="pwConfirm('是否取消关注？',this,function(){Attention.del('{$member[uid]}')});" title="取消关注" class="s6 mr10">取消关注</a>
<!--
EOT;
}print <<<EOT
-->
<!--
EOT;
if (!in_array($member['uid'], $friendsAllUids)) {print <<<EOT
-->
						<a href="javascript:;"  onclick="sendmsg('pw_ajax.php?action=addfriend&touid={$member[uid]}&reload=1');" title="加为好友" class="add_follow">加为好友</a>
<!--
EOT;
} else {print <<<EOT
-->
						<a href="javascript:;" onclick="pwConfirm('是否确认解除？',this,function(){delFriend('$member[uid]')});" title="解除好友">解除好友</a>
<!--
EOT;
}print <<<EOT
-->
					</div>
				</dd>
			</dl>
		</li>
<!--
EOT;
}print <<<EOT
-->
	</ul>
	<div class="cc mb10">$pages</div>
<!--
EOT;
}else {print <<<EOT
-->
	<div class="f14 tac p15">很抱歉，没有搜到你要的人</div>
<!--
EOT;
}}print <<<EOT
-->
</div>
<!--
EOT;
}elseif ($type == 'invite') {
	require_once(uTemplate::printEot('friend_invite'));
}elseif ($type == 'inviteCode') {
	require_once(uTemplate::printEot('friend_invitecode'));
}print <<<EOT
-->
	</div>
</td></tr></table>
</div>
<script type="text/javascript" src="js/app_global.js"></script>
<script type="text/javascript" src="u/js/friend.js"></script>
<script type="text/javascript" src="js/app_type.js"></script>
<script type="text/javascript" src="js/select.js"></script>
<!--
EOT;
require_once(uTemplate::printEot('footer'));
?>-->