<!--<?php
print <<<EOT
-->
<style type="text/css">
.mb10{margin-bottom:10px;}
.pwB_uWrap_a{background:#fff;padding:1px;margin:10px 0;min-width:800px;}
.pwB_uWrap_b{background:$forumcolortwo;color:#333; position:relative;}
.pwB_uWrap_a h6{border-bottom:1px solid #e4e4e4;padding-bottom:5px;margin-bottom:5px;}
.pwB_uRight_a{border-left:1px solid $tdcolor;background:#fff;margin-left:200px;}
.pwB_uRight_b{padding:15px;_float:left;}
.pwB_uLeft_a{ position:absolute;left:0;top:0;width:200px;padding:15px 0;}
.pwB_uPic_a{border:1px solid $tdcolor;padding:3px;background:#fff;}
.pwB_ubox_a{padding:15px 0 0 15px;}
.pwB_uList_a{line-height:20px;padding:5px 0;}
.pwB_uList_a li{color:#666;float:left;width:40%;}
.pwB_uList_b{padding-left:15px; font-family:Arial;}
.pwB_uList_b li{line-height:22px;height:22px;overflow:hidden;}
.pwB_uList_b em{font-style:normal;color:#666;float:left;width:65px;line-height:22px;height:22px;}
.pwB_uList_c{padding:5px 1px;color:#666;}
.pwB_uList_c a{color:#336699;}
.pwB_uList_c dd{ font-family:Arial;color:#666;}
.pwB_uList_d{line-height:24px;}
.pwB_uList_d a{color:#336699;}
.pwB_uList_d .current{ font-weight:700;}
.pwB_uList_d li:hover{background-color:$forumcolortwo;}
.pwB_uList_e li{background:url($imgpath/$stylepath/u-fav.gif) 0 4px no-repeat;padding-left:20px;}
.pwB_uList_e .current{background:url($imgpath/$stylepath/u-fav-cur.gif) 0 4px no-repeat;}
.pwB_uList_e #uf_forum{background:url($imgpath/$stylepath/u-fav-forums.gif) 0 4px no-repeat;}
.pwB_uH1_a{padding:0;margin:0;display:inline;}
.pwB_uH1_a em{ font-style:normal; font-size:12px; font-weight:100;color:#333;}
#honor{margin-right:10px;}
.pwB_uNav_a{border-bottom:1px solid $tablecolor;height:25px; position:relative;margin-top:10px;}
.pwB_uNav_a ul{ position:absolute;bottom:0px;_bottom:-2px;}
.pwB_uNav_a li{line-height:25px;height:25px;float:left;margin-right:5px;}
.pwB_uNav_a a{padding:0 10px;background:$tdcolor;float:left;display:block;height:25px;overflow:hidden;}
.pwB_uNav_a a:hover{background:$tablecolor; text-decoration:none;}
.pwB_uNav_a .current a{background:#fff;border:1px solid $tablecolor;border-bottom:0;}
.pwB_uNav_b{border-bottom:1px solid #e4e4e4;padding-bottom:5px;}
.pwB_uNav_b li{float:left;margin-right:5px;}
.pwB_uNav_b .none{line-height:24px;}
.pwB_uNav_b a{background:$forumcolortwo;border:1px solid $tdcolor;line-height:22px;float:left;padding:0 5px;}
.pwB_uNav_b a:hover{ text-decoration:none;background:$tdcolor;}
.pwB_uNav_b .current a{border:1px solid $tablecolor;}
.pwB_uContent_a{padding:15px 0 15px 12px;float:left;width:60%;}
.pwB_uConside_a{width:35%;float:right;padding:15px 0;margin-left:15px;}
.pwB_uTable_a td,.pwB_uTable_a th{padding:6px 0;vertical-align:top;border-bottom:1px solid $forumcolortwo;}
.pwB_uTable_a td{color:#333;}
.pwB_uTable_a th{font-weight:100;color:#666;text-align:left;}
</style>
<div class="pwB_uWrap_a t">
	<div class="pwB_uWrap_b cc">
    	<div class="pwB_uLeft_a">
        	<div class="tac mb10"><img class="pwB_uPic_a" src="$usericon[0]" width="$usericon[2]" height="$usericon[3]" border="0"></div>
            <table width="100%" border="0" cellpadding="0" cellspacing="0" style="border:0px;">
            	<tr class="tac">
            		<td><img src="$imgpath/email.gif" align="absmiddle" /> <a href="message.php?action=write&touid=$userdb[uid]" target="_blank">发短消息</a></td>
            		<td>
<!--
EOT;
if($userdb['thisvisit']+$db_onlinetime*1.5>$timestamp){print <<<EOT
-->
            		<img src="$imgpath/$stylepath/u-adf.gif" align="absmiddle" title="在线" />
            		<a onclick="ajax.send('pw_ajax.php?action=addfriend&touid=$uid','',ajax.get);" class="cp" title="在线" >加为好友</a>
<!--
EOT;
}else{print <<<EOT
-->
            		<img src="$imgpath/$stylepath/u-adf-no.gif" align="absmiddle" title="离线" />&nbsp;
            		<a onclick="ajax.send('pw_ajax.php?action=addfriend&touid=$uid','',ajax.get);" class="cp" title="离线" >加为好友</a>
<!--
EOT;
}print <<<EOT
-->
            		</td>
            	</tr>
            </table>
            <div class="pwB_ubox_a">
<!--
EOT;
if($groupid==3){print <<<EOT
-->
            	<div class="f14 b">管理员操作</div>
                <ul class="pwB_uList_a cc">
                	<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=delmember&action=del&schname=$userdb[username]&groupid=$userdb[groupid]&regdate=all&schlastvisit=all&item=14" target="_blank">清除用户</a></li>
                </ul>
<div id="menu_userpost" class="menu" style="display:none;">
<!--
EOT;
if ($p_list){print<<<EOT
-->
  <ul>
<!--
EOT;
foreach($p_list as $key => $val){
$name = $val ? $val : ($key != 0 ? getLangInfo('other','posttable').$key : getLangInfo('other','posttable'));
print <<<EOT
-->
	<li><a id="ptable_$key" href="">$name</a></li>
<!--
EOT;
}print <<<EOT
-->

  </ul>
<!--
EOT;
}print <<<EOT
-->
</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
-->
            </div>
            <ul class="pwB_uList_b">
                <li><em>等级</em>{$ltitle[$userdb[memberid]]}</li>
<!--
EOT;
if($systitle){print <<<EOT
-->
                <li><em>身份</em>{$systitle}</li>
<!--
EOT;
}print <<<EOT
-->
                <li><em>最后登录</em>{$_LoginInfo['lastlodate']}</li>
            </ul>
        </div>
    	<div class="pwB_uRight_a cc">
        <div class="pwB_uRight_b">
        <table cellspacing="0" cellpadding="0" style="width:auto;">
            <tr>
                <td>
                    <h1 class="pwB_uH1_a">{$userdb[username]}</h1>
                </td>
                <td style="padding-left:1em; line-height:120%">
<!--
EOT;
if($isU){print <<<EOT
-->
<!--
EOT;
if($_G[allowhonor]){print <<<EOT
-->
                <span id="honor">
<!--
EOT;
if($winddb['honor']){print <<<EOT
-->
                {$winddb[honor]}
<!--
EOT;
}else{print <<<EOT
-->
                您还没有设置个性签名
<!--
EOT;
}print <<<EOT
-->
                </span>
                <a id="sethonor" onclick="sendmsg('pw_ajax.php','action=honor',this.id)" class="gray" style="cursor:pointer"><img src="$imgpath/infobox-edit.gif" />&nbsp;编辑</a>
<script language="JavaScript">
function honor() {
var str = ajax.request.responseText.split("\t");
if (str[0] == 'success') {
getObj('honor').innerHTML = '&nbsp;' + (str[1] ? str[1] : '您还没有设置个性签名') + '&nbsp;';
} else {
ajax.guide();
}
}
</script>
<!--
EOT;
}}else{print <<<EOT
-->
                {$userdb[honor]}
<!--
EOT;
}print <<<EOT
-->
                </td>
            </tr>
        </table>
        <div class="c"></div>
        <div class="pwB_uNav_a">
            <ul class="cc">
                <li id="u_index"><a href="u.php?uid=$uid">个人首页</a></li>
                <li id="u_show"><a href="u.php?action=show&uid=$uid">资料</a></li>
                <li id="u_topic"><a href="u.php?action=topic&uid=$uid">主题</a></li>
                <li id="u_post"><a href="u.php?action=post&uid=$uid">回复</a></li>
                <li id="u_favor"><a href="u.php?action=favor&uid=$uid">收藏</a></li>
                <li id="u_friend"><a href="u.php?action=friend&uid=$uid">好友</a></li>
                <li id="u_trade"><a href="u.php?action=trade&uid=$uid">商品</a></li>
<!--
EOT;
if ($isU) {print <<<EOT
-->
                <li id="u_friend"><a href="message.php" target="_blank">消息</a></li>
                <li id="u_friend"><a href="profile.php" target="_blank">设置</a></li>
<!--
EOT;
}print <<<EOT
-->
            </ul>
            <script language="javascript">setCurrent('u_$action','u_index','current');</script>
        </div>
<!--
EOT;
if (empty($action)) {print <<<EOT
-->
			<div class="pwB_uContent_a">
            <table width="100%">
            	<tr class="vt"><td height="500">
					<div id="minifeed">
						<h6 class="f14 b">
<!--
EOT;
if ($isU) {print <<<EOT
-->
							好友近况
<!--
EOT;
} else {print <<<EOT
-->
							个人动态
<!--
EOT;
}print <<<EOT
-->
						</h6>

<!--
EOT;
if ($feed) {
foreach ($feed as $key => $value) {print <<<EOT
-->
					<dl class="pwB_uList_c">
						<dt><a href="u.php?uid=$value[uid]">$value[username]</a> $value[descrip]</dt>
					</dl>
<!--
EOT;
}} else {print <<<EOT
-->
					<dl class="pwB_uList_c">
						<dt>最近没有动作!</dt>
					</dl>
<!--
EOT;
}print <<<EOT
-->
					<div class="tar"><a href="u.php?action=feed&uid=$uid" class="s4">&raquo;&nbsp;更多</a></div>
				</div>
				<div id="new-reply">
					<h6 class="f14 b">最新回复</h6>
<!--
EOT;
foreach ($postdb as $key => $value) {print <<<EOT
-->
					<dl class="pwB_uList_c">
						<dt><a href="job.php?action=topost&tid=$value[tid]&pid=$value[pid]">{$value[subject]}</a> {$value[postdate]}</dt>
					</dl>
<!--
EOT;
}print <<<EOT
-->
					<div class="tar"><a href="u.php?action=post&uid=$uid" class="s4">更多</a></div>
				</div>
            	</td></tr>
            </table>
			</div>
			<div class="pwB_uConside_a">
            	<h6><span class="f14 b">最新主题</span></h6>
				<div id="new-topic" class="pwB_uNewtopic_a">
<!--
EOT;
foreach ($topicdb as $key => $value) {print <<<EOT
-->
					<dl class="pwB_uList_c">
						<dt><a href="read.php?tid=$value[tid]" class="f14">{$value[subject]}</a></dt>
						<dd>{$value[postdate]}<br />回复{$value[replies]},浏览{$value[hits]}</dd>
					</dl>
<!--
EOT;
}print <<<EOT
-->
				</div>
                <div class="tar"><a href="u.php?action=topic&uid=$uid" class="s4">&raquo;&nbsp;更多</a></div>
			</div>
<!--
EOT;
} elseif ($action == 'feed') {print <<<EOT
-->
            <table width="100%">
            	<tr class="vt"><td height="500">
			<div id="minifeed" style="padding:15px 10px;">
					<h6 class="f14 b">
<!--
EOT;
if ($isU) {print <<<EOT
-->
					好友近况
<!--
EOT;
} else {print <<<EOT
-->
					个人动态
<!--
EOT;
}print <<<EOT
-->
					</h6>

<!--
EOT;
if ($feed) {
foreach ($feed as $key => $value) {print <<<EOT
-->
				<dl class="pwB_uList_c">
					<dt><a href="u.php?uid=$value[uid]">$value[username]</a> $value[descrip]</dt>
				</dl>
<!--
EOT;
}} else {print <<<EOT
-->
				<dl class="pwB_uList_c">
					<dt>最近没有动作!</dt>
				</dl>
<!--
EOT;
}print <<<EOT
-->
			</div>
            $pages
            </td></tr></table>
			<div class="c"></div>
<!--
EOT;
} elseif ($action == 'show') {print <<<EOT
-->
        <table width="100%">
            <tr class="vt"><td height="500">
			<div class="pwB_uContent_a">
                <h6 class="f14 b">个人信息</h6>
                <table width="100%" border="0" cellpadding="0" cellspacing="0" class="pwB_uTable_a" style="table-layout:fixed">
<!--
EOT;
if($userdb['groupid']=='6' || $isBan){print <<<EOT
-->
                    <tr><td>系统</td><th class="s3 b" width="75%">
<!--
EOT;
if($userdb['groupid']=='6'){
if($bandb['type']==1){print <<<EOT
-->
被 $bandb[admin] 于 $bandb[startdate] 禁言 $bandb[days] 天
<!--
EOT;
}else{print <<<EOT
-->
被 $bandb[admin] 于 $bandb[startdate] 永久禁言
<!--
EOT;
}}elseif($isBan){
foreach($bandb as $v){
if($v['type']==1){print <<<EOT
-->
在 {$forum[$v[fid]][name]} 被 $v[admin] 于 $v[startdate] 禁言 $v[days] 天<br />
<!--
EOT;
}else{print <<<EOT
-->
在 {$forum[$v[fid]][name]} 被 $v[admin] 于 $v[startdate] 永久禁言<br />
<!--
EOT;
}}}print <<<EOT
-->
                    </th></tr>
<!--
EOT;
}print <<<EOT
-->
                    <tr>
                        <td>UID</td>
                        <th width="75%">$userdb[uid]</th>
                    </tr>
                    <tr>
                    <tr>
                        <td>等级</td>
                        <th width="75%">{$ltitle[$userdb[memberid]]}</th>
                    </tr>
<!--
EOT;
if($systitle){print <<<EOT
-->
                    <tr>
                        <td>身份</td>
                        <th width="75%">{$systitle}</th>
                    </tr>
<!--
EOT;
}print <<<EOT
-->
                    <tr>
                        <td>性别</td>
                        <th width="75%">
<!--
EOT;
if($userdb['gender']==1){print <<<EOT
-->
男
<!--
EOT;
}elseif($userdb['gender']==2){print <<<EOT
-->
女
<!--
EOT;
}else{print <<<EOT
-->
保密
<!--
EOT;
}print <<<EOT
-->
                        </th>
                    </tr>
                    <tr>
                        <td>生日</td>
                        <th>$userdb[bday]<br /></th>
                    </tr>
<!--
EOT;
if($userdb[site]){print <<<EOT
-->
                    <tr>
                        <td>个人主页</td>
                        <th><a href="$userdb[site]" target="_blank">$userdb[site]</a><br /></th>
                    </tr>
<!--
EOT;
}foreach ($customfield as $value) {
if ($winduid != $userdb['uid'] && $value['viewright'] && strpos(",$value[viewright],",",$groupid,")===false) {
continue;
}
$field = "field_$value[id]";
if ($value['type'] == 3) {
foreach ($value['options'] as $v) {
    $v = explode('=',$v);
    $userdb[$field] == $v[0] && $userdb[$field] = $v[1];
}
}
print <<<EOT
-->
                    <tr>
                        <td>$value[title]</td>
                        <th>$userdb[$field]<br /></th>
                    </tr>
<!--
EOT;
}if($md_ifopen){print <<<EOT
-->
                    <tr>
                        <td>勋章</td>
                        <th>
<!--
EOT;
if($userdb['medals']){
foreach($userdb['medals'] as $value){
if($_MEDALDB[$value]['picurl']){print <<<EOT
-->
                        <img src="hack/medal/image/{$_MEDALDB[$value][picurl]}" alt="{$_MEDALDB[$value][name]}" />
<!--
EOT;
}}}else{print <<<EOT
-->
                        该用户还没有获得勋章
<!--
EOT;
}print <<<EOT
-->
                        </th>
                    </tr>
<!--
EOT;
}if($colonydb){print <<<EOT
-->
                    <tr>
                        <td>加入的{$db_hackdb[colony][0]}</td>
                        <th>
<!--
EOT;
foreach($colonydb as $value){print <<<EOT
-->
                            <a href="hack.php?H_name=colony&cyid=$value[id]&job=view&id=$value[id]" target="_blank">$value[cname]</a>
<!--
EOT;
}print <<<EOT
-->
                        </th>
                    </tr>
<!--
EOT;
}if($userdb[oicq]){print <<<EOT
-->
                    <tr>
                        <td>QQ </td>
                        <th>$userdb[oicq]<br /></th>
                    </tr>
<!--
EOT;
}if($userdb[yahoo]){print <<<EOT
-->
                    <tr>
                        <td>Yahoo</td>
                        <th>$userdb[yahoo]<br /></th>
                    </tr>
<!--
EOT;
}if($userdb[msn]){print <<<EOT
-->
                    <tr>
                        <td>Msn</td>
                        <th>$userdb[msn]<br /></th>
                    </tr>
<!--
EOT;
}if($userdb[email]){print <<<EOT
-->
                    <tr>
                        <td>Email</td>
                        <th>$userdb[email]<br /></th>
                    </tr>
<!--
EOT;
}foreach ($custominfo as $key => $value) {
if($value[2]){
$value[2]=str_replace("{{$key}}",$customdata[$key],$value[2]);
$customdata[$key] && $value[4] && $customdata[$key] = $value[4];
$customdata[$key] = "<a href=\"$value[2]\" target=\"_blank\">$customdata[$key]</a>";
}print <<<EOT
-->
                    <tr><td>$value[0]</td><th>{$customdata[$key]}<br /></th></tr>
<!--
EOT;
}print <<<EOT
-->
<tr>
                    <td>自我简介</td>
                        <th><div style="overflow:hidden;">$userdb[introduce]<br /></div></th>
                    </tr>
<!--
EOT;
if ($isU && $db_ads) {print <<<EOT
-->
                    <tr><td>如何获得{$credit->cType[credit]}</td><th>
<!--
EOT;
if ($db_ads == 1) {print <<<EOT
-->
                        <ol><li>使用“推荐”功能将文章推荐给朋友</li><li>将下面的链接发给你的朋友<br />链接一:$db_bbsurl/?a=$userdb[username] <br /> 链接二:$db_bbsurl/?u=$userdb[uid]</li></ol>
<!--
EOT;
} else {print <<<EOT
-->
                        <ol><li>使用“推荐”功能将文章推荐给朋友</li><li>将下面的链接发给你的朋友,并且引导你的朋友注册成为会员<br />链接一:$db_bbsurl/?a=$userdb[username] <br /> 链接二:$db_bbsurl/?u=$userdb[uid]</li></ol>
<!--
EOT;
}print <<<EOT
-->
                    </th></tr>
<!--
EOT;
}print <<<EOT
-->
                </table>
			</div>
			<div class="pwB_uConside_a">
                <h6 class="f14 b">站点资历</h6>
                <table width="100%" border="0" cellpadding="0" cellspacing="0" class="pwB_uTable_a">
                    <tr>
                        <td>注册时间</td>
                        <th>$userdb[regdate]</th>
                    </tr>
                    <tr>
                        <td>会员的历史在线时间</td>
                        <th>$userdb[onlinetime] </th>
                    </tr>
                    <tr>
                        <td>最后登录</td>
                        <th>$userdb[lastvisit]</th>
                    </tr>
<!--
EOT;
if($isGM || $groupid == '3' || $winduid == $userdb['uid']){print <<<EOT
-->
                    <tr>
                        <td>最后登录IP</td>
                        <th>{$userdb[onlineip][0]}</th>
                    </tr>
<!--
EOT;
}print <<<EOT
-->						
                    <tr>
                        <td>综合积分</td>
                        <th>$totalcredit </th>
                    </tr>
                    <tr>
                        <td>发帖</td>
                        <th>$userdb[postnum] </th>
                    </tr>
                    <tr>
                        <td>平均日发帖</td>
                        <th>{$averagepost} (今日:{$userdb[todaypost]})</th>
                    </tr>
                    <tr>
                        <td>精华</td>
                        <th>$userdb[digests] </th>
                    </tr>
                    <tr>
                        <td>{$credit->cType[rvrc]}</td>
                        <th>$userdb[rvrc] {$credit->cUnit[rvrc]} </th>
                    </tr>
                    <tr>
                        <td>{$credit->cType[money]}</td>
                        <th>$userdb[money] {$credit->cUnit[money]} </th>
                    </tr>
                    <tr>
                        <td>{$credit->cType[credit]}</td>
                        <th>$userdb[credit] {$credit->cUnit[credit]} </th>
                    </tr>
                    <tr>
                        <td>{$credit->cType[currency]}</td>
                        <th>$userdb[currency] {$credit->cUnit[currency]} </th>
                    </tr>	
<!--
EOT;
foreach($_CREDITDB as $key => $value){
$ucredit = $usercredit[$key] ? $usercredit[$key] : 0;
print <<<EOT
-->
                    <tr>
                        <td>$value[0]</td>
                        <th>$ucredit $value[1]
                        <br /><span class="gray">($value[2])</span></th>
                    </tr>
<!--
EOT;
}print <<<EOT
-->
                </table>
			</div>
			<div class="c"></div>
			<div class="u-profile" style="padding:5px 10px 10px;">
				<h6 class="f14 b">帖间签名</h6>
				<table width="100%" border="0" cellpadding="0" cellspacing="0" class="pwB_uTable_a">
					<tr>
						<th><div style="overflow:hidden;">$userdb[signature]<br /></div></th>
					</tr>
				</table>
			</div>
			</td></tr>
		</table>
<!--
EOT;
}elseif($action == 'topic'){print <<<EOT
-->
        <table width="100%">
            <tr class="vt"><td height="500">
		<div class="p10">
			<div class="pwB_uNav_b">
            	<ul class="fr">
                	<!--li class="none">排序:</li-->
                    <li><a href="u.php?action=topic&uid=$uid&ordertype=postdate&">按发表时间排序</a></li>
                    <li><a href="u.php?action=topic&uid=$uid&ordertype=lastpost&">回复时间</a></li>
                </ul>
            	<ul>
                	<li class="none">主题分类</li>
                	<li id="ut_index"><a href="u.php?action=topic&uid=$uid">全 部</a></li>
                    <li id="ut_digest"><a href="u.php?action=topic&uid=$uid&type=digest">精 华</a></li>
                    <li id="ut_poll"><a href="u.php?action=topic&uid=$uid&type=poll">投 票</a></li>
                    <li id="ut_sale"><a href="u.php?action=topic&uid=$uid&type=sale">交 易</a></li>
                </ul>
                <div class="c"></div>
            </div>
			<script language="javascript">setCurrent('ut_$type','ut_index','current');</script>
				<table class="pwB_uTable_a" width="100%" cellpadding="0" cellspacing="0" border="0">
                	<tr>
                    	<td>主题</td>
                        <td>所属板块/发布时间</td>
                        <td style="text-align:center;">回复/浏览</td>
                        <td>最后回复</td>
                    </tr>
<!--
EOT;
foreach ($threaddb as $key => $value) {print <<<EOT
-->
					<tr>
						<td><a href="read.php?tid=$value[tid]" target="_blank" class="f14 s4">$value[subject]</a></td>
                        <td><a href="thread.php?fid=$value[fid]" target="_blank">{$value[forum]}</a><br /><span class="gray f9">{$value[postdate]}</span></td>
						<td class="f10" style="text-align:center;">
<!--
EOT;
if($timestamp-$value[lastpost]<=$db_newtime && $value[replies]){print <<<EOT
--><span class="s3">回复$value[replies]</span>/<!--
EOT;
}else{print <<<EOT
--><span class="s3">$value[replies]</span>/<!--
EOT;
}print <<<EOT
-->$value[hits]</td>
                        <td>
                            <a href="u.php?username=$value[encode_lastposter]">$value[lastposter]</a><br /><span class="f10 gray">$value[lastpost]</span>
                        </td>
					</tr>
<!--
EOT;
}print <<<EOT
-->
				</table><div class="cc">$pages</div>
		</div>
			</td></tr>
		</table>
<!--
EOT;
}elseif($action == 'post'){print <<<EOT
-->
        <table width="100%">
            <tr class="vt"><td height="500">
			<div class="p10">
                <div class="pwB_uNav_b">
                    <ul>
                        <li class="none">选择表</li>
                        $p_table
                    </ul>
                    <div class="c"></div>
                </div>
                <script language="javascript">setCurrent('up_post$ptable','up_post','current');</script>
			<div id="u-contentmain">
				<table class="pwB_uTable_a" width="100%" cellpadding="0" cellspacing="0" border="0">
					<tr>
						<td>主题</td>
                        <td>所属板块</td>
						<td>作者:</td>
					</tr>
<!--
EOT;
foreach($postdb as $key => $value){print <<<EOT
-->
					<tr>
						<td style="vertical-align:middle;"><a href="job.php?action=topost&tid=$value[tid]&pid=$value[pid]" target="_blank" class="f14 s4">$value[subject]</a></td>
                        <td><a href="thread.php?fid=$value[fid]" target="_blank">$value[forum]</a><br />
						<span class="gray f9">$value[postdate]</span>
						</td>
						<td><a href="u.php?action=show&uid=$value[authorid]" target="_blank">$value[author]</a></td>
					</tr>
<!--
EOT;
}print <<<EOT
-->
				</table><div class="cc">$pages</div>
			</div>
			</div>
			</td></tr>
		</table>

<!--
EOT;
}elseif($action == 'favor'){print <<<EOT
-->
        <table width="100%">
            <tr class="vt"><td height="500">
			<div class="pwB_uContent_a">
<!--
EOT;
if ($type == 'forum') {
if ($isU) {print <<<EOT
-->
				<form method="post" action="u.php?action=favor&">
				<input type="hidden" name="verify" value="$verifyhash" />
				<input type="hidden" name="job" value="delforum" />
<!--
EOT;
}print <<<EOT
-->
				<table class="pwB_uTable_a" width="100%" cellpadding="0" cellspacing="0" border="0">
					<tr>
						<td>版块名称</td>
						<td class="tac" width="100">今日发帖</td>
						<td>主题</td>
						<td>文章</td>
<!--
EOT;
if ($isU) {print <<<EOT
-->
						<td><br /></td>
<!--
EOT;
}print <<<EOT
-->
					</tr>
<!--
EOT;
foreach ($favordb as $key => $value) {print <<<EOT
-->
					<tr>
						<td><a href="thread.php?fid=$value[fid]">$value[name]</a></td>
						<td class="tac">$value[tpost]</td>
						<td>$value[topic]</td>
						<td>$value[article]</td>
<!--
EOT;
if ($isU) {print <<<EOT
-->
						<td><input type="checkbox" name="selid[]" value="$value[fid]" /></td>
<!--
EOT;
}print <<<EOT
-->
					</tr>
<!--
EOT;
}print <<<EOT
-->
				</table>
<!--
EOT;
if ($isU) {print <<<EOT
-->
				<center style="margin-top:1em">
					<input class="bt" type="button" name="chkall" value="全 选" onclick="CheckAll(this.form)" /> <input class="btn" type="submit" value="提 交" />
				</center>
				</form>
<!--
EOT;
}}else{
if ($isU) {print <<<EOT
-->
				<form method="post" action="u.php?action=favor&">
				<input type="hidden" name="verify" value="$verifyhash" />
<!--
EOT;
}print <<<EOT
-->
				<table class="pwB_uTable_a mb10" width="100%" cellpadding="0" cellspacing="0" border="0">
					<tr>
						<td width="65%">标题</td>
						<td>作者</td>
						<td>目录</td>
<!--
EOT;
if($isU){print <<<EOT
-->
						<td><br /></td>
<!--
EOT;
}print <<<EOT
-->
					</tr>
<!--
EOT;
foreach($favordb as $key => $value){print <<<EOT
-->
					<tr>
						<th><a href="read.php?tid=$value[tid]" target="_blank" class="s4">$value[subject]</a></th>
						<td><a href="u.php?uid=$value[authorid]" target="_blank">$value[author]</a></td>
						<td>$value[sel]<br /></td>
<!--
EOT;
if($isU){print <<<EOT
-->
						<td><input type="checkbox" name="selid[]" value="$value[tid]" /></td>
<!--
EOT;
}print <<<EOT
-->
					</tr>
<!--
EOT;
}print <<<EOT
-->
				</table><div class="cc mb10">$pages</div>
<!--
EOT;
if ($isU) {print <<<EOT
-->
				<div class="tac">
					<input type="radio" name="job" value="change" checked />&nbsp;目录转换
					<select name="type"><option value="0"></option>
<!--
EOT;
foreach ($typeid as $key => $value) {
$k = $key + 1;
print <<<EOT
-->
						<option value="$k">$value</option>
<!--
EOT;
}print <<<EOT
-->
					</select>&nbsp;<input type="radio" name="job" value="clear" />&nbsp;删除
					<div style="margin-top:1em">
						<input class="bt" type="button" name="chkall" value="全 选" onclick="CheckAll(this.form)" /> <input class="btn" type="submit" value="提 交" />
					</div>
				</div>
				</form>
<!--
EOT;
}}print <<<EOT
-->
            </div>
            <div class="pwB_uConside_a">
            	<h6 class="f14 b">收藏分类目录</h6>
                <ul class="pwB_uList_d pwB_uList_e">
                	<li id="uf_forum"><a href="u.php?action=favor&uid=$uid&type=forum">收藏的版块</a></li>
                    <li id="uf_all"><a href="u.php?action=favor&uid=$uid">收藏的帖子</a></li>
                </ul>
              	<ul class="pwB_uList_d pwB_uList_e" style="padding:0 0 10px 1.5em;">
                	<li id="uf_0"><a href="u.php?action=favor&uid=$uid&type=0">默认分类</a></li>
<!--
EOT;
foreach ($typeid as $key => $value) {
$k = $key + 1;
print <<<EOT
-->
					<li id="uf_$k">
<!--
EOT;
if($isU){print <<<EOT
-->
					<a href="u.php?action=favor&job=deltype&type=$k&uid=$uid&verify=$verifyhash" class="fr" style="margin-top:4px;" onclick="return Checkinfo();" title="删除目录"><img src="$imgpath/close.gif" /></a>
<!--
EOT;
}print <<<EOT
-->
					<a href="u.php?action=favor&uid=$uid&type=$k">$value</a></li>
<!--
EOT;
}print <<<EOT
-->
                </ul>
                <script language="javascript">setCurrent('uf_$type','','current');</script>
                <h6 class="f14 b">添加收藏分类</h6>
<!--
EOT;
if ($isU) {print <<<EOT
-->
								<form method="post" name="form" action="u.php?action=favor&">
								<input type="hidden" name="verify" value="$verifyhash" />
								<input type="hidden" name="job" value="addtype" />
								<div style="padding:.5em 0"><input class="input" type="text" name="type" /> <input class="btn" type="submit" value="提 交" /></div>
								</form>
<!--
EOT;
}print <<<EOT
-->
            </div>
			</td></tr>
		</table>
<script language="JavaScript">
var ifcheck = true;
function CheckAll(form){
	for(var i=0;i<form.elements.length;i++){
		var e = form.elements[i];
		if(e.type=='checkbox') e.checked = ifcheck;
	}
	ifcheck = ifcheck == true ? false : true;
}
function Checkinfo() {
	if (confirm('确定要删除该分类吗?')) {
		return true;
	} else {
		return false;
	}
}
</script>
<!--
EOT;
} elseif ($action == 'friend') {
$u_contentmain = ($isU ? 'class="pwB_uContent_a"' : '');
print <<<EOT
-->
        <table width="100%">
            <tr class="vt"><td height="500">
			<div $u_contentmain>
<!--
EOT;
if (empty($job)) {
if ($isU) {print <<<EOT
-->
				<form action="u.php?action=friend" method="post">
				<input type="hidden" name="uid" value="$uid" />
				<input type="hidden" name="verify" value="$verifyhash" />
<!--
EOT;
}print <<<EOT
-->
				<table class="pwB_uTable_a mb10" width="100%" cellpadding="0" cellspacing="0" border="0">
<!--
EOT;
foreach ($frienddb as $key => $value) {print <<<EOT
-->
					<tr>
						<td width="65"><a href="u.php?action=show&uid=$value[muid]"><img src="$value[icon]" class="pwB_uPic_a" width="45" height="45" /></a></td>
						<td><div class="mb10"><a href="u.php?action=show&uid=$value[muid]" class="f14 s4">$value[username]</a>
<!--
EOT;
if ($value['thisvisit'] + $db_onlinetime * 1.5 > $timestamp) {print <<<EOT
-->
							<img src="$imgpath/online.png" title="在线" align="absmiddle" />
<!--
EOT;
} else {print <<<EOT
-->
							<img src="$imgpath/stealth.png" title="离线" align="absmiddle" />
<!--
EOT;
}print <<<EOT
-->
							<a href="message.php?action=write&touid=$value[muid]" target="_blank" title="发短消息"><img src="$imgpath/email.gif" align="absmiddle" /></a>
							</div>$value[descrip]
<!--
EOT;
if (empty($o) && $isU) {print <<<EOT
-->
							<a href="u.php?action=friend&job=edit&touid=$value[muid]" title="对ta描述"><img src="$imgpath/infobox-edit.gif" align="absmiddle" /></a>
<!--
EOT;
}print <<<EOT
-->
                            </td>
						<td class="f10"><span class="gray">$value[joindate]</span></td>
<!--
EOT;
if ($isU) {
$fuidcheck = $value[muid]==$fuid ? 'checked' : '';
print <<<EOT
-->
						<td><input type="checkbox" name="selid[]" value="$value[muid]" $fuidcheck/></td>
<!--
EOT;
}print <<<EOT
-->
					</tr>
<!--
EOT;
}print <<<EOT
-->
				</table>
				<div class="cc">$pages</div>
<!--
EOT;
if ($isU) {print <<<EOT
-->
				<center style="margin-top:1em">
<!--
EOT;
if ($o == 'check') {print <<<EOT
-->
					<input type="radio" name="job" value="acceptadd" onclick="showbox(this.value)" checked /> 接受并加为好友
					<input type="radio" name="job" value="accept" onclick="showbox(this.value)" /> 接受
					<input type="radio" name="job" value="refuse" onclick="showbox(this.value)" /> 拒绝
					<div id="showbox" style="display:none;margin-top:0.5em">拒绝理由 :<textarea name="refusemsg" style="height:60px;width:200px"></textarea></div>
					<div style="margin-top:0.5em;">
						<input class="bt" type="button" name="chkall" value="全 选" onclick="CheckAll(this.form)" /> <input class="btn" type="submit" value="提 交" />
					</div>
<script language="JavaScript">
function showbox(v) {
	getObj('showbox').style.display = v == 'refuse' ? '' : 'none';
}
</script>
<!--
EOT;
} else {print <<<EOT
-->
					<input type="hidden" name="job" value="delete" />
					<input class="bt" type="button" name="chkall" value="全 选" onclick="CheckAll(this.form)" /> <input class="btn" type="submit" value="删除好友" />
<!--
EOT;
}print <<<EOT
-->
				</center>
				</form>
<script language="JavaScript">
var ifcheck = true;
function CheckAll(form){
	for(var i=0;i<form.elements.length;i++){
		var e = form.elements[i];
		if(e.type=='checkbox') e.checked = ifcheck;
	}
	ifcheck = ifcheck == true ? false : true;
}
</script>
<!--
EOT;
}} elseif ($job == 'edit') {print <<<EOT
-->
				<form action="u.php?action=friend" method="post">
				<input type="hidden" name="job" value="edit" />
				<input type="hidden" name="uid" value="$uid" />
				<input type="hidden" name="touid" value="$touid" />
				<input type="hidden" name="step" value="3" />
				<table class="pwB_uTable_a mb10" width="100%" cellpadding="0" cellspacing="0" border="0">
					<tr>
						<td width="30%">好友<b>$friend[username]</b>的描述</td>
						<td><input type="text" name="descrip" value="$friend[descrip]" size="40" class="input" /></td>
					</tr>
				</table>
				<div style="margin-top:0.5em;text-align:center"><input class="btn" type="submit" value="提 交" /></div>
				</form>
<!--
EOT;
}print <<<EOT
-->
			</div>
<!--
EOT;
if ($isU) {print <<<EOT
-->
			<div class="pwB_uConside_a">
				<h6 class="f14 b">好友</h6>
                <ul class="pwB_uList_d">
                	<li id="ud_index"><img src="$imgpath/pwicon/related_li.gif" align="absmiddle" />&nbsp;<a href="u.php?action=friend&uid=$uid">好友列表</a></li>
                    <li id="ud_check"><img src="$imgpath/pwicon/related_li.gif" align="absmiddle" />&nbsp;<a href="u.php?action=friend&uid=$uid&o=check">待验证好友</a></li>
                </ul>
				<script language="javascript">setCurrent('ud_$o','ud_index','current');</script>
			</div>
<!--
EOT;
}print <<<EOT
-->
			</td></tr>
		</table>
<!--
EOT;
} elseif ($action == 'trade') {print <<<EOT
-->
        <table width="100%">
            <tr class="vt"><td height="500">
			<div class="pwB_uContent_a">
<!--
EOT;
if (empty($type)) {print <<<EOT
-->
				<table class="pwB_uTable_a mb10" width="100%" cellpadding="0" cellspacing="0" border="0">
					<tr>
						<td width="65">商品图片</td>
						<td>商品名称</td>
						<td width="13%">价格</td>
						<td width="15%">卖家</td>
						<td width="18%">交易状态</td>
					</tr>
<!--
EOT;
foreach ($trade as $key => $value) {print <<<EOT
-->
					<tr>
						<td><img src="$value[icon]" class="pwB_uPic_a" width="45" height="45" /></td>
						<td><a href="read.php?tid=$value[tid]" class="f14 s4">$value[subject]</a></td>
						<td>$value[price]</td>
						<td><a href="u.php?action=trade&uid=$value[seller]">$value[username]</a></td>
						<td>
<!--
EOT;
if ($value['ifpay'] == 4) {print <<<EOT
-->
						交易失败
<!--
EOT;
} elseif ($value['ifpay'] == 3) {print <<<EOT
-->
						交易完成
<!--
EOT;
} elseif ($value['ifpay'] == 2) {print <<<EOT
-->
						卖家已发货，<br />确认收货
<!--
EOT;
} elseif ($value['ifpay'] == 1) {print <<<EOT
-->
						买家已付款，<br />等待卖家发货
<!--
EOT;
} elseif ($value['ifpay'] == 0) {print <<<EOT
-->
						等待买家付款<br />
<!--
EOT;
}print <<<EOT
-->
							<div><a style="color:blue;" href="trade.php?action=order&oid=$value[oid]">详情</a></div>
						</td>
					</tr>
<!--
EOT;
}print <<<EOT
-->
				</table>
				<div class="cc">$pages</div>
<!--
EOT;
} elseif ($type == 'onsale') {print <<<EOT
-->
				<table class="pwB_uTable_a mb10" width="100%" cellpadding="0" cellspacing="0" border="0">
					<tr>
						<td width="65">商品图片</td>
						<td>商品名称</td>
						<td width="13%">价格</td>
						<td width="12%">商品数量</td>
						<td width="12%">出售数量</td>
					</tr>
<!--
EOT;
foreach ($trade as $key => $value) {print <<<EOT
-->
					<tr>
						<td><img src="$value[icon]" class="pwB_uPic_a" width="45" height="45" /></td>
						<td><a href="read.php?tid=$value[tid]" class="f14 s4">$value[name]</a></td>
						<td>$value[price]</td>
						<td>$value[num]</td>
						<td>$value[salenum]</td>
					</tr>
<!--
EOT;
}print <<<EOT
-->
				</table>
				<div class="cc">$pages</div>
<!--
EOT;
} elseif ($type == 'saled'){print <<<EOT
-->
				<table class="pwB_uTable_a mb10" width="100%" cellpadding="0" cellspacing="0" border="0">
					<tr>
						<td width="65">商品图片</td>
						<td>商品名称</td>
						<td width="13%">价格</td>
						<td width="15%">买家</td>
						<td width="18%">交易状态</td>
					</tr>
<!--
EOT;
foreach ($trade as $key => $value) {print <<<EOT
-->
					<tr>
						<td><img src="$value[icon]" class="pwB_uPic_a" width="45" height="45" /></td>
						<td><a href="read.php?tid=$value[tid]" class="f14 s4">$value[subject]</a></td>
						<td>$value[price]</td>
						<td><a href="u.php?action=trade&uid=$value[seller]">$value[username]</a></td>
						<td>
<!--
EOT;
if ($value['ifpay'] == 4) {print <<<EOT
-->
						交易失败
<!--
EOT;
} elseif ($value['ifpay'] == 3) {print <<<EOT
-->
						交易完成
<!--
EOT;
} elseif ($value['ifpay'] == 2) {print <<<EOT
-->
						卖家已发货，<br />确认收货
<!--
EOT;
} elseif ($value['ifpay'] == 1) {print <<<EOT
-->
						买家已付款，<br />等待卖家发货
<!--
EOT;
} elseif ($value['ifpay'] == 0) {print <<<EOT
-->
						等待买家付款
<!--
EOT;
}print <<<EOT
-->
							<div><a style="color:blue;" href="trade.php?action=order&oid=$value[oid]">详情</a></div>
						</td>
					</tr>
<!--
EOT;
}print <<<EOT
-->
				</table>
				<div class="cc">$pages</div>
<!--
EOT;
}print <<<EOT
-->
			</div>
			<div class="pwB_uConside_a">
            	<h6 class="f14 b">商品</h6>
                <ul class="pwB_uList_d">
                	<li id="uf_onsale"><img src="$imgpath/pwicon/related_li.gif" align="absmiddle" />&nbsp;<a href="u.php?action=trade&uid=$uid&type=onsale">出售中的商品</a></li>
<!--
EOT;
if ($isU) {print <<<EOT
-->
                    <li id="uf_buy"><img src="$imgpath/pwicon/related_li.gif" align="absmiddle" />&nbsp;<a href="u.php?action=trade&uid=$uid">已买入的商品</a></li>
                    <li id="uf_saled"><img src="$imgpath/pwicon/related_li.gif" align="absmiddle" />&nbsp;<a href="u.php?action=trade&uid=$uid&type=saled">已卖出的商品</a></li>
<!--
EOT;
}print <<<EOT
-->
                </ul>
				<div id="u-fav-cate">
				<script language="javascript">setCurrent('uf_$type','uf_buy','current');</script>
			</div></div>
            </td></tr>
        </table>
<!--
EOT;
}print <<<EOT
-->
            </div>
        </div>
    </div>
</div>
<!--
EOT;
?>-->
