{?set jieqi_blocks_module = "system"?}
{?set jieqi_blocks_config = "userblocks"?}
{?set $jieqi_pagetitle = "我的好友-{$jieqi_sitename}"?}

<script type="text/javascript">
//删除
function act_delete(url){
	var o = getTarget();
	var param = {
		method: 'POST', 
		onReturn: function(){
			$_(o.parentNode.parentNode).remove();
		}
	}
	if(confirm('确实要删除该好友么？')) Ajax.Tip(url, param);
	return false;
}
</script>

{?block bid="0" blockname="会员工具" module="system" filename="" classname="BlockSystemCustom" side="-1" title="" vars="" template="block_userbox_tab.html" contenttype="4" custom="1" publish="3" hasvars="0"?}
<form id="frmaddfriends" name="frmaddfriends" method="get" action="{?$jieqi_url?}/addfriends.php">
<table class="grid" width="100%" align="center">
<caption><span class="fr">用户名：<input type="text" class="text" size="15" name="username"><button type="button" class="button b_s" style="margin:0 5px;" name="btn_addfriends" id="btn_addfriends" onclick="Ajax.Tip('frmaddfriends', 3000);">加为好友</button><input type="hidden" name="jumpurl" value="{?$jieqi_thisurl|htmlspecialchars?}" /><input type="hidden" name="act" value="add" />{?$jieqi_token_input?}</span> 我的好友（{?$nowfriends?}/{?$maxfriends?}）</caption>
  <tr align="center">
    <th width="25%">好友名称</th>
    <th width="15%">加入日期</th>
    <th width="15%">用户信息</th>
    <th width="15%">发短消息</th>
    <th width="15%">好友会客室</th>
    <th width="15%">删除好友</th>
  </tr>
  <tbody id="jieqi_page_contents">
{?section name=i loop=$friendsrows?}
  <tr>
    <td><a href="{?function jieqi_geturl:'system':'user':$friendsrows[i].yourid?}" target="_blank">{?$friendsrows[i].yourname?}</a></td>
    <td align="center">{?$friendsrows[i].adddate|date:'Y-m-d'?}</td>
    <td align="center">[<a href="{?function jieqi_geturl:'system':'user':$friendsrows[i].yourid:'info'?}" target="_blank">查看信息</a>]</td>
    <td align="center">[<a href="{?$jieqi_url?}/newmessage.php?receiver={?$friendsrows[i].yourname|urlencode?}" target="_blank">写新消息</a>]</td>
    <td align="center">[<a href="{?$jieqi_url?}/ptopics.php?oid={?$friendsrows[i].yourid?}" target="_blank">好友会客室</a>]</td>
    <td align="center">[<a id="act_delete_{?$friendsrows[i].yourid?}" href="javascript:;" onclick="act_delete('{?$jieqi_url?}/myfriends.php?id={?$friendsrows[i].yourid?}&act=delete{?$jieqi_token_url?}');">删除好友</a>]</td>
  </tr>
{?/section?}
  </tbody>
</table>
</form>
<div class="pages">{?$url_jumppage?}</div>