<!--<?php
include_once PrintEot('m_header');
print <<<EOT
-->
<div id="center" style="width:800px">
		<div>
			<ul class="ul_title">
				<li class="current"><a href="{$basename}q=$q">好友邀請</a></li>
				<li><a href="{$basename}q=$q&a=all">訪問好友主頁</a></li>
			</ul>
		</div>
		<div>
			<div style="float:left;">
				<img src="$friend[face]" />
<!--
EOT;
if($friends){
print <<<EOT
-->
				$friend[username]在這里有$friend[f_num]個好友
<!--
EOT;
foreach($friends as $value){
print <<<EOT
-->
				<a href="{$basename}q=user&u=$value[uid]"><img src="$value[face]" /></a>
<!--
EOT;
}
print <<<EOT
-->

<!--
EOT;
}
print <<<EOT
-->
			</div>
			<div style="float:right">
				<strong>hi 我是$friend[username]<strong>
			</div>
<!--
EOT;
if($winduid){
print <<<EOT
-->
			<p style="padding-top: 1em;">
				<a style="cursor: pointer;" onclick="addFriend('$u')">加為好友</a>
			</p>
<script language="javascript">
var basename = "$basename";
function addFriend(u){
	ajax.send('mode.php?q=ajax&action=addfriend&u='+u,'',function(){
		var rText = ajax.request.responseText.split('\t');
		if (rText[0] == 'success') {
			var element = document.getElementById('friend_'+u);
				showDialog('success','操作成功!',1);
				url = basename + 'q=home&u='+u;
				setTimeout('window.location="'+url+'"',2000);
		} else {
			ajax.guide();
		}
	});
}
</script>
<!--
EOT;
}else{
print <<<EOT
-->
			<p style="padding-top: 1em;">
				<a href="$regurl?u=$u">接受邀請，我要注冊</a>
				<a href="login.php?u=$u">馬上登錄</a>
			</p>
<!--
EOT;
}
print <<<EOT
-->
		</div>

</div></div>
<!--
EOT;
?>-->