<!--<?php
include_once PrintEot('m_header');
$descrip = '這個好友值得您關注！';
print <<<EOT
-->
<div class="cc bgA" style="padding-top:10px;">
	<div class="c"></div>
	<div class="wrapB cc">
		<!-- inset portrait module -->
		<!--內容 begin-->
		<div class="contentC cc fl">
			<!--內容側欄 begin-->
			<div class="contentC-side cc fl" style="overflow:hidden;">
				<div class="boxB bgB pr cc"><span class="cirA1"></span><span class="cirA2"></span><span class="cirA3"></span><span class="cirA4"></span>
					<div class="tac p10 cc"><img src="$usericon[0]" width="$usericon[2]" height="$usericon[3]" border="0">
						<div class="tal mt8">
							<ul class="listAppItem xl-app" >
								<!--
EOT;
if($ismyfriend == false && $winduid != $u){print <<<EOT
-->
								<li><span id="statehtml"><a id="fri_icon" class="i-d" style="cursor: pointer;" onclick="changeFriend('$userdb[uid]');"><span id="friendstate">添加為好友</span></a></span></li>
								<!--
EOT;
}elseif($ismyfriend == true){print <<<EOT
-->
								<li><span id="statehtml"><span>已經是好友，</span><span class="gray o-del" style="cursor: pointer;" onclick="changeFriend('$userdb[uid]');"><span id="friendstate">解除好友</span></span></span></li>
								<!--
EOT;
}print <<<EOT
-->
								<!--
EOT;
if($u!=$winduid){print <<<EOT
-->
								<li><a class="i-s" style="cursor: pointer;" id="message" onclick="sendmsg('pw_ajax.php?action=msg&touid=$userdb[uid]','','message')">發短消息</a></li>
								<li><a class="i-o" style="cursor: pointer;" id="share" onclick="shareOtherType('share_user');">分享用戶</a></li>
								<!--
EOT;
}print <<<EOT
-->
							</ul>
						</div>
					</div>
					<script language="javascript">
function changeFriend(u){
	var friendstate = getObj('friendstate');
	if (friendstate.innerHTML == '添加為好友'){
		ajax.send('mode.php?m=o&q=ajax&action=addfriend&u='+u,'',function(){
			var rText = ajax.request.responseText.split('\t');
			if (rText[0] == 'success') {
				getObj('statehtml').innerHTML = '<span>已經是好友，</span><span class=\"gray o-del\" style=\"cursor: pointer;\" onclick=\"changeFriend(\''+u+'\');\"><span id=\"friendstate\">解除好友</span></span>';
				showDialog('success','操作成功!',1);
			} else {
				ajax.guide();
			}
		});
	}else if(friendstate.innerHTML == '解除好友'){
		pwConfirm('是否確認解除',friendstate,function(){
			ajax.send('mode.php?m=o&q=ajax&action=delfriend&u='+u,'',function(){
				var rText = ajax.request.responseText.split('\t');
				if (rText[0] == 'success') {
					getObj('statehtml').innerHTML = '<a id=\"fri_icon\" class=\"i-d\" style=\"cursor: pointer;\" onclick=\"changeFriend(\''+u+'\');\"><span id=\"friendstate\">添加為好友</span></a>';
					showDialog('success','操作成功!',1);
				} else {
					ajax.guide();
				}
			});
		});
	}
}
</script>
					<div id="share_user" style="display:none;">
					<div style="width:450px;height:290px;">
						<div class="h" style="cursor:move" onmousedown="read.move(event);">
							<div class="pr cc" style="height:30px;">
							<div class="fl threadlist" style="padding-left:10px;">
							<a href="javascript:;" class="current b">分享</a>
							<a href="#" onclick="shareOtherType('recommend_user');return false;">推薦</a>
							</div>
							</div>
						</div>
							<ul class="nemu-list cc mb8">
								<li>
									<div>摘要︰</div>
									<div class="exp bgB">分享了一個用戶&nbsp;<b>$userdb[username]</b></div>
								</li>
							</ul>
							<div class="c"></div>
							<ul class="nemu-list cc">
								<li>
									<div>描述︰</div>
									<textarea  style="width:98%;height:98px;"></textarea>
								</li>
							</ul>
							<div class="menu-bt tac">
								<input class="bt3" type="button" value="提 交" style="width:80px;" onclick="postShareOtherType('user','$userdb[uid]');">
								&nbsp;
								<input class="bt" type="button" value="取消" onclick="closep();"/>
							</div>
					</div>
					</div>
					<div id="recommend_user" style="display:none;">
					<div style="width:450px;height:290px;">
						<form method="post" action="mode.php?m=o&q=share&see=recommend&ajax=1" onsubmit="return false;">
							<input type="hidden" name="step" value="2" />
						<div class="h" style="cursor:move" onmousedown="read.move(event);">
							<div class="pr cc" style="height:30px;">
							<div class="fl threadlist" style="padding-left:10px;">
							<a href="#" onclick="shareOtherType('share_user');return false;">分享</a>
							<a href="javascript:;" class="current b">推薦</a>
							</div>
							</div>
						</div>
						<div style="padding:5px 20px 0;">
							<table width="100%" cellspacing="0">
								<tr>
									<td width="35%">推薦方式︰</td>
									<td>短消息推薦</td>
								</tr>
								<tr>
									<td>對方姓名︰</td>
									<td><input type="text" class="input" name="sendtoname" size="25" value="" /></td>
								</tr>
								<tr>
									<td>標題︰</td>
									<td><input type="text" class="input" name="subject" size="44" value="{$windid} 給您$atc_name" /></td>
								</tr>
								<tr>
									<td>內容︰</td>
									<td><textarea rows="6" style="width:300px" name="atc_content" onkeydown="ajax.quickpost(event,this.form)">您好！我在$db_bbsname($db_bbsurl/?u=$winduid)\n這個信息，認為很有價值，特推薦給您。\n\n主要信息︰\n$title\n\n描述︰\n$descrip\n\n希望您能喜歡。</textarea></td>
								</tr>
							</table>
						</div>
							<ul>
								<li style="text-align:center;padding:5px 0;">
									<input type="button" class="bt3" name="ajaxsubmit" style="width:80px;" onclick="ajax.submit(this.form);" value="提 交" />
									&nbsp;
									<input class="bt" type="button" value="取消" onclick="closep();"/>
								</li>
							</ul>
						</form>
					</div>
					</div>
					<!--
EOT;
if($privacy['profile']){print <<<EOT
-->
					<h6 class="bdbA boxC pdD">基本資料</h6>
					<div class="p10  cc" style="overflow:hidden">
						<p>性別 ︰
							<!--
EOT;
if($userdb['gender']==1){print <<<EOT
-->
							男
							<!--
EOT;
}elseif($userdb['gender']==2){print <<<EOT
-->
							女
							<!--
EOT;
}else{print <<<EOT
-->
							保密
							<!--
EOT;
}print <<<EOT
-->
						</p>
						<p>生日 ︰$userdb[bday]</p>
						<p>來自 ︰$userdb[location]</p>
						<p>精華 ︰$userdb[digests] </p>
						<p>發帖 ︰$userdb[postnum]</p>
						<p>平均日發帖︰{$averagepost} (今日:{$userdb[todaypost]})</p>
					</div>
					<!--
EOT;
}if($privacy['info']){print <<<EOT
-->
					<h6 class="bdbA boxC pdD bdtA">個人信息</h6>
					<div class="p10  cc">
						<!--
EOT;
if($userdb[site]){print <<<EOT
-->
						<p>個人主頁 ︰ $userdb[site]</p>
						<!--
EOT;
}if($userdb[introduce]){print <<<EOT
-->
						<p>自我簡介 ︰ $userdb[introduce]</p>
						<!--
EOT;
}if($systitle){print <<<EOT
-->
						<p>系統頭餃 ︰ $systitle $userdb[privilege]</p>
						<!--
EOT;
}print <<<EOT
-->
						<p>會員頭餃 ︰ $memtitle</p>
						<p>在線時間 ︰ $userdb[onlinetime] 時</p>
						<p>注冊時間 ︰ $userdb[regdate]</p>
						<p>最後登錄 ︰ $userdb[lastvisit]</p>
<!--
EOT;
if($isGM || $groupid == '3'){print <<<EOT
-->
						
						<p>最後登錄IP︰{$userdb[onlineip][0]}</p>
<!--
EOT;
}print <<<EOT
-->		
					</div>
					<!--
EOT;
}if($privacy['credit']){print <<<EOT
-->
					<h6 class="bdbA boxC pdD bdtA">個人積分</h6>
					<div class="p10  cc">
						<p>綜合積分 ︰<span class="blue b">$totalcredit</span></p>
						<p>{$credit->cType[rvrc]} ︰<span class="blue b">$userdb[rvrc]</span> {$credit->cUnit[rvrc]}</p>
						<p>{$credit->cType[money]} ︰<span class="blue b">$userdb[money]</span> {$credit->cUnit[money]}</p>
						<p>{$credit->cType[credit]} ︰<span class="s3 b">$userdb[credit]</span> {$credit->cUnit[credit]}</p>
						<!--
EOT;

foreach($_CREDITDB as $key => $value){
$ucredit = $usercredit[$key] ? $usercredit[$key] : 0;
print <<<EOT
-->
						<p>{$value[0]} ︰<span class="blue b">{$ucredit}</span> {$value[1]}</p>
						<!--
EOT;
}print <<<EOT
-->
					</div>
					<!--
EOT;
}print <<<EOT
-->
				</div>
			</div>
			<div class="contentC-main cc fr">
				<div class="cc mb8" style="overflow:hidden">
					<dl>
						<dt><span class="b f14">$userdb[username]</span>&nbsp;<span class="gray2">(有{$userdb['visits']}人看過)</span></dt>
						<dd class="gray1">$userdb[honor]</dd>
					</dl>
				</div>
				<div id="person-nav" class="cc">
					<ul>
						<li class="current"><a href="{$basename}q=user&u=$u">動態</a></li>
						<li><a href="{$basename}q=write&u=$u">記錄</a></li>
						<!--
EOT;
if($db_dopen){print <<<EOT
-->
						<li><a href="{$basename}q=diary&u=$u">日志</a></li>
						<!--
EOT;
}print <<<EOT
-->
						<li><a href="{$basename}q=photos&u=$u">相冊</a></li>
						<li><a href="{$basename}q=share&u=$u">分享</a></li>
						<li><a href="{$basename}q=article&u=$u">帖子</a></li>
<!--
EOT;
if($u != $winduid) {print <<<EOT
-->
						<li><a href="{$basename}q=friend&u=$u">好友</a></li>
<!--
EOT;
}print <<<EOT
-->
						<li><a href="{$basename}q=groups&u=$u">群組</a></li>
					</ul>
				</div>
				<div class="c"></div>
				<div id="minifeed" class="cc pdD"  style="overflow:hidden">
					<!--
EOT;
if ($privacy['index']) {
if (!empty($feeds)) {
foreach ($feeds as $day => $feed) {
print <<<EOT
-->
					<dl class="mb8 pdD">
						<dt class="b bdbA"> $day </dt>
						<dd class="cc">
							<div class="list-dlB">
								<!--
EOT;
foreach ($feed as $key => $value) {
$add_classname = getAppClassName($value['type']);
print <<<EOT
-->
								<dl class="cc list-dlB-A">
									<dt class="xl-app fl"><a class="aimg $add_classname fl">&nbsp;</a></dt>
									<dd class="bdbA"><a href="{$basename}q=user&uid=$value[uid]">$value[username]</a>&nbsp;$value[descrip]
										<!--
EOT;
if (checkCommType($value[type]) && $value[typeid]>0) {
print <<<EOT
-->
										<div id="com_{$value[type]}_{$value[typeid]}">
											<p><a style="cursor: pointer;" onclick="showCommList('$value[type]','$value[typeid]','com_{$value[type]}_{$value[typeid]}',this);">回復</a></p>
										</div>
										<!--
EOT;
}print <<<EOT
-->
									</dd>
								</dl>
								<!--
EOT;
}print <<<EOT
-->
							</div>
						</dd>
					</dl>
					<!--
EOT;
}print <<<EOT
-->
					<!--
EOT;
} else { print <<<EOT
-->
					<dl class="status-item">
						<dd class="status-info"> 暫時沒有好友動態 </dd>
					</dl>
					<!--
EOT;
}}else{print <<<EOT
-->
					<dl class="status-item">
						<dd class="status-info"> 暫時無權限查看好友空間 </dd>
					</dl>
					<!--
EOT;
}if($privacy['msgboard']){print <<<EOT
-->
					<dl class="p10" id="board_container">
						<dt class="b mb8">留言板</dt>
						<!--
EOT;
if ($ismyfriend) { print <<<EOT
-->
						<dd>
							<div class="mb8">
								<textarea maxlength="200" cols="60" rows="5" id="board"/>
								</textarea>
							</div>
							<input type="hidden" id="board_uid" value="$u">
							<input class="bt3" type="button" value=" 留言 " onclick="postBoard();"/>
							&nbsp;&nbsp; </dd>
						<!--
EOT;
} print <<<EOT
-->
						<!--
EOT;
foreach ($boards as $value) { print <<<EOT
-->
						<dd class="cc pdD" id="board_{$value[id]}">
							<div>
								<dl class="cc mt8">
									<dd class="fl pdr"><img src="$value[face]" class="fl pdr portrait-s" /></dd>
									<!--
EOT;
if ($value[uid]==$winduid || $winduid==$u || $groupid==3) { print <<<EOT
-->
									<dd class="fr"><a style="cursor: pointer;" onclick="pwConfirm('是否確定刪除本條留言',this,function(){delBoard('$value[id]')})" title="刪除" class="o-del gray">刪除</a></dd>
									<!--
EOT;
} print <<<EOT
-->
									<dd class="fl cc"><a href="{$basename}q=user&u=$value[uid]">$value[username]</a><span class="gray">$value[postdate] 留言道:</span>
										<div class="pdD"> $value[title] </div>
										<!--
EOT;
if ($value[uid]==$winduid || $winduid==$u) { print <<<EOT
-->
										<div id="com_board_{$value[id]}"><a style="cursor: pointer;" onclick="javascript:showCommList('board','$value[id]','com_board_{$value[id]}',this)">回復($value[c_num])</a></div>
										<!--
EOT;
}print <<<EOT
-->
									</dd>
								</dl>
							</div>
						</dd>
						<!--
EOT;
}print <<<EOT
-->
						<a href="{$basename}q=board&u=$u" class="pd8 cc fl">更多留言</a>
					</dl>
					<!--
EOT;
}print <<<EOT
-->
				</div>
			</div>
			<!--核心內容 end-->
		</div>
		<script language="JavaScript" src="mode/o/js/comment.js"></script>
		<script language="JavaScript" src="mode/o/js/board.js"></script>
		<!--內容 end-->
		<!--側欄 begin-->
		<div class="sidebarC cc fr">
			<div class="boxB bgA pr cc"><span class="cirA1"></span><span class="cirA2"></span><span class="cirA3"></span><span class="cirA4"></span>
				<div class="home-sider-item">
					<h3 class="cc"><span class="fl">最近來訪</span></h3>
					<div class="cc mt8 mb8">
						<!--
EOT;
if($whovisit){
$c = 0;
foreach ($whovisit as $value) {
$c++;if($c>6)break;
print <<<EOT
-->
						<dl class="member100 member65 height130">
							<dd><a href="{$basename}q=user&u=$value[uid]"><img src="$value[icon]" class="portrait-m"/></a></dd>
							<dt>
								<!--
EOT;
if ($value['thisvisit']) {
print <<<EOT
-->
								<span><img src="$imgpath/$stylepath/head-ol.gif" title="在線" align="absmiddle" /></span>
								<!--
EOT;
}print <<<EOT
-->
								<a href="{$basename}q=user&u=$value[uid]" class="u-name">$value[username]</a></dt>
							<dd><span class="gray2">$value[visittime]</span></dd>
						</dl>
						<!--
EOT;
}}else{print <<<EOT
-->
						<p class="tac">暫時還沒有訪客</p>
						<!--
EOT;
}print <<<EOT
-->
					</div>
				</div>
				<div class="home-sider-item">
					<h3 class="cc"><span class="fl">{$userdb[username]}訪問過</span></h3>
					<div class="cc mt8 mb8">
						<!--
EOT;
if($tovisit){
$c = 0;
foreach ($tovisit as $value) {
$c++;if($c>6)break;print <<<EOT
-->
						<dl class="member100 member65 height130">
							<dd><a href="{$basename}q=user&u=$value[uid]"><img src="$value[icon]" class="portrait-m"/></a></dd>
							<dt>
								<!--
EOT;
if ($value['thisvisit']) {
print <<<EOT
-->
								<span><img src="$imgpath/$stylepath/head-ol.gif" title="在線" align="absmiddle" /></span>
								<!--
EOT;
}print <<<EOT
-->
								<a href="{$basename}q=user&u=$value[uid]" class="u-name"> $value[username]</a><br />
								<span class="gray2">$value[visittime]</span></dt>
						</dl>
						<!--
EOT;
}}else{print <<<EOT
-->
						<p class="tac">暫時還沒有訪問記錄</p>
						<!--
EOT;
}print <<<EOT
-->
					</div>
				</div>
				<div class="home-sider-item">
					<h3 class="cc"><span class="fl">{$userdb[username]}的好友</span><a href="{$basename}q=friend&u=$u" class="gray fr">更多</a></h3>
					<div class="cc mt8 mb8">
						<!--
EOT;
foreach ($friends as $key => $value) {
$value[showname] = substrs($value[username],8);
print <<<EOT
-->
						<dl class="member100 member65 height90">
							<dd><a href="{$basename}q=user&u={$value[uid]}"><img title="{$value[username]}" src="$value[face]" class="portrait-m"/></a></dd>
							<dt><a href="{$basename}q=user&u={$value[uid]}" class="u-name">$value[showname]</a></dt>
						</dl>
						<!--
EOT;
}print <<<EOT
-->
					</div>
				</div>
				<div class="c"></div>
			</div>
		</div>
	</div>
</div>
<!--
EOT;
?>-->
