<!--<?php
include_once PrintEot('m_header');
include_once PrintEot('user_space');
print <<<EOT
-->
		<div id="content" class="w720 fr">
			<div id="content-main" class="w720-2">
				<div class="cc p-info">
					<h1><strong class="f24 blue"><a href="u.php?uid=$u">$username</a></strong> <span class="f24 gray">/</span> <span class="red b f16">好友</span> <span class="gray">( {$count}位 )</span></h1>
				</div>
				<div class="breadCrumb">
				<a href="u.php?uid=$u" class="gray">&laquo;返回首页继续浏览</a>
				</div>
				<div class="cc">
					<div class="w530-2 fl">
						<table width="100%">
<!--
EOT;
if (!empty($friends)) {
foreach ($friends as $key => $value) {
$value[honor] = substrs($value[honor],50);
print <<<EOT
-->
                <tr class="tr3" id="friend_{$value[uid]}">
                    <td width="50"><a href="u.php?uid=$value[uid]" class="b"><img src="$value[face]" class="img-50" /></a></td><td><a href="{$basename}q=user&u=$value[uid]" class="b">$value[username]</a>
<!--
EOT;
if(checkOnline($value['thisvisit'])){
print <<<EOT
-->
						<span><img src="$imgpath/online.png" title="在线" /></span>
<!--
EOT;
}print <<<EOT
-->
						<a style="cursor: pointer;line-height:2;" onclick="sendmsg('pw_ajax.php?action=msg&touid=$value[uid]');" title="发送消息"><img src="$pwModeImg/operation/mail.png" /></a>
						<p class="height-18">$value[honor]</p><span class="gray">最近登录:$value[lastvisit]</span>
					</td>
                    <td width="100">
						<div class="cc"><span class="fl">
<!--
EOT;
if($value[isfriend]){print<<<EOT
-->
							<a href="javascript:;" onclick="pwConfirm('是否确认解除',this,function(){delFriend('$value[uid]')});" class="del">解除好友</a>
<!--
EOT;
}else{print <<<EOT
-->
							<a id="add_$value[uid]" onclick="sendmsg('pw_ajax.php?action=addfriend&touid=$value[uid]','',this.id)" style="cursor: pointer;" title="加为好友">加为好友</a>
<!--
EOT;
}print <<<EOT
-->
						</span> &nbsp;</div>
					</td>
                </tr>
<!--
EOT;
}} else {print <<<EOT
-->
				<tr class="tr3">
					<td colspan="2">暂没有好友</td>
                </tr>
<!--
EOT;
}print <<<EOT
-->
            </table>
            <div class="mt10">$pages</div>
<script language="javascript">
function delFriend(u){
	ajax.send('mode.php?m=o&q=ajax&a=delfriend&u='+u,'',function(){
		var rText = ajax.request.responseText.split("|");
		if (rText[0] == 'success') {
			var element = document.getElementById('friend_'+u);
			if (element) {
				showDialog('success','操作成功!',1);
				element.parentNode.removeChild(element);
			} else {
			}
		} else {
			ajax.guide();
		}
	});
}
</script>
					</div>
				</div>
			</div>
		</div>
</div>
</div>
<div class="y-bg2"></div>
<div class="y-bg"></div>
<!--
EOT;
?>-->