<!--<?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" id="img-width"><img src="$usericon[0]" width="$usericon[2]" height="$usericon[3]" border="0">
						<div class="tal mt8">
								<style>
								.listAppItem{padding:0 .5em 1em}
								.listAppItem ul{padding:.5em;}
								.listAppItem li{width:95%;float:left;padding-bottom:.35em;}
								.listAppItem li a{float:left;padding-left:20px;display:inline;}
								</style>
							<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($groupid==3){print <<<EOT
-->
				<h6 class="bdbA boxC pdD">管理员操作</h6>
				<div class="p10  cc">
				<ul class="menu-half">
					<li><a href="$db_adminfile?adminjob=setuser&action=edit&uid=$userdb[uid]" target="_blank">编辑用户</a></li>
					<li><a href="$db_adminfile?adminjob=banuser&username=$userdb[username]" target="_blank">会员禁言</a></li>
                	<li><a href="$db_adminfile?adminjob=superdel&admintype=article&action=deltpc&fid=-1&ifkeep=1&author=$userdb[username]&lines=30&ttable=auto" target="_blank">删除主题</a></li>
					<li><a onMouseOver="postdbopen('menu_userpost','del_post');" id="del_post" href="$db_adminfile?adminjob=superdel&admintype=article&action=delrpl&fid=-1&author=$userdb[username]&nums=30" target="_blank">删除回复</a></li>
					<li><a href="$db_adminfile?adminjob=superdel&admintype=member&action=del&schname=$userdb[username]&groupid=$userdb[groupid]&regdate=all&schlastvisit=all&item=14" target="_blank">清除用户</a></li>
				</ul>
				</div>
<div id="menu_userpost" class="menu" style="display:none;">
  <table width="120" cellspacing="1" cellpadding="5">
    <tr>
      <th class="h">用户回复</th>
    </tr>
    <tr>
      <td class="f_one"><a id="ptable_0" href="">pw_posts</a></td>
    </tr>
<!--
EOT;
foreach($p_list as $value){print <<<EOT
-->
    <tr>
      <td class="f_one"><a id="ptable_$value" href="">pw_posts$value</a></td>
    </tr>
<!--
EOT;
}print <<<EOT
-->
  </table>
</div>
<script language="JavaScript">
function postdbopen(menuid,aid){
	read.open(menuid,aid);
	var obj = getObj(menuid).getElementsByTagName('a');
	for (var i=0;i<obj.length;i++) {
		if (obj[i].id && obj[i].id.indexOf('ptable_') != -1) {
			var ptable = '';
			var objarray = obj[i].id.split('_');
			if (parseInt(objarray[1]) > 0) {
				ptable = '&ptable=' + objarray[1];
			}
			getObj(obj[i].id).href = getObj(aid).href + ptable;
			if (aid == 'del_post') {
				getObj(obj[i].id).target = "_blank";
			}
		}
	}
}
</script>
<!--
EOT;
}print<<<EOT
-->
<!--
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>
<!--
EOT;
if($userdb[oicq]){print <<<EOT
-->
						<p>QQ：$userdb[oicq]</p>
<!--
EOT;
}if($userdb[yahoo]){print <<<EOT
-->
						<p>Yahoo：$userdb[yahoo]</p>
<!--
EOT;
}if($userdb[msn]){print <<<EOT
-->
						<p>Msn：$userdb[msn]</p>
<!--
EOT;
}if($userdb[email]){print <<<EOT
-->
						<p>Email：$userdb[email]</p>
<!--
EOT;
}print <<<EOT
-->
					</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>
<script language="javascript">
// JavaScript Document
var imgMaxWidth=150; //控制内容中图片大小
var content = document.getElementById("img-width");
ImgLoad(content);
function ImgLoad(obj)
{
	for(var i=0;i<obj.getElementsByTagName("img").length;i++){
		var o=obj.getElementsByTagName("img")[i];
		if (o.width>imgMaxWidth){
			if (o.style.width){
				o.style.width="";
			}
			o.width=imgMaxWidth;
			o.removeAttribute("height");
			o.setAttribute("title","ctrl+鼠标滚轮缩放");
			o.style.cursor="hand";
			o.style.display="block";
			o.vspace=5;
			o.resized=1;
			o.onclick=ImgClick;
			o.onmousewheel=bbimg;
		}
	}
}

function ImgClick()
{
	if (this.parentElement){
		if (this.parentElement.tagName!="A"){
			window.open(this.src);
		}
	}else{
		window.open(this.src);
	}
}

function bbimg()
{
	if (event.ctrlKey){
		var zoom=parseInt(this.style.zoom, 10)||100;
		zoom+=event.wheelDelta/12;
		if (zoom>0) this.style.zoom=zoom+'%';
		return false;
	}else{
		return true;
	}
}
</script>
<!--
EOT;
?>-->
