<?php
#------------------------------------------------------#
#               本程序为zChain.net提供                 #
#                zChain论坛(ZBB)v2.00                  #
#------------------------------------------------------#
# INPUT: $user

require "bin/config.php";
require "bin/common.php";

require_once('core/class_forum_base.php');
CForumBase::setFileBase("$filepath");
require_once('core/base_memo_file.php');
require_once('core/class_user.php');

$user=str_replace('.','',$user);

$oUsr=new CUser;
if(!$oUsr->load($user)){errorview("对不起，此名字没有在本论坛注册过!");}

$oUsr->numpost+=0; $oUsr->numreply+=0;
$tol=$oUsr->numpost+$oUsr->numreply;

if($oUsr->gender == ''){$oUsr->gender="(不告诉您)";}
if($oUsr->ims == ''){$oUsr->ims="(不告诉您)";}
if($oUsr->location == ''){$oUsr->location="(不告诉您)";}
if($oUsr->icon == ''){$oUsr->icon='null';}
if($oUsr->homepage == ''){$oUsr->homepage="　";}
if($oUsr->email == ''){$oUsr->email="　";}
if($oUsr->desc == ''){$oUsr->desc="这家伙很懒,什么都没有留下。";}
if($oUsr->signature == ''){$oUsr->signature="　";}
$qm1=preg_replace("/<([^<])*>/","",$oUsr->signature);
$qm1=preg_replace("/<IMG border=0 SRC=http:\/\/([^;'\"=]+?)>/","",$qm1);

#--- Print header ---
page_header('个人资料',"$imgurl/bei.gif");
print "<CENTER>";
$posText=getRootText()." >> 个人资料";
menu_bar($posText,'');

#--- Print info ---
print <<<EOT
<BR>
<table width=600 border=0 cellspacing=1 cellpadding=3 class=forumLine>
<tr>
 <td class=rowCaption colspan=2>{$oUsr->name} 个人资料 </td>
</tr>
<tr>
 <td class=row1>
 <table border=0 cellspacing=2 cellpadding=0 width=100%>
 <tr>
  <td width=34><img src='$imgurl/face/{$oUsr->icon}.gif' height=32 width=32></td>
  <td>　秘密档案请勿外传 ：）</td>
 </tr>
 </table>
 </td>
 <td class=row1 align=center width=120>
 <a href='mailbox.php?action=add_form&mbid=$user&url=viewuser.php?user=$user'>发送留言</a></td>
</tr>
<tr> 
 <td colspan=2 class=row1>
 <table border=0 cellspacing=5 cellpadding=0 width=100%>
 <tr><td width=50%>
  <table border=0 cellspacing=1 cellpadding=5 width=100% class=forumLine>
  <tr>
   <td class=row2 width=68 align=center>昵　　称</td>
   <td class=row2>$oUsr->name</td>
  </tr>
  <tr>
   <td class=row2 width=68 align=center>性　　别</td>
   <td class=row2>$oUsr->gender</td>
  </tr>
  <tr>
   <td class=row2 width=68 align=center>Email</td>
   <td class=row2><a href='mailto:$oUsr->email'>$oUsr->email</a></td>
  </tr>
  <tr>
   <td class=row2 width=68 align=center>个人主页</td>
   <td class=row2><a href='$oUsr->homepage' target=_blank>$oUsr->homepage</a></td>
  </tr>
  <tr>
   <td class=row2 width=68 align=center>QQ　号码</td>
   <td class=row2>$oUsr->ims</td>
  </tr>
  <tr>
   <td class=row2 width=68 align=center>省　　份</td>
   <td class=row2>$oUsr->location</td>
  </tr>
  <tr>
   <td class=row2 width=68 align=center>职　　业</td>
   <td class=row2>$oUsr->career</td>
  </tr>
  <tr>
   <td class=row2 width=68 align=center>爱　　好</td>
   <td class=row2>$oUsr->hobby</td>
  </tr>
  <tr>
   <td class=row2 width=68 align=center>个性签名</td>
   <td class=row2>$oUsr->signature</td>
  </tr>
  </table>
 </td>
 <td width="50%">
  <table border="0" cellspacing="1" cellpadding="5" width="100%" class="forumLine">
  <tr>
   <td class=row2 width=80 align=center>等　　级</td>
   <td class=row2>$oUsr->levelname</td>
  </tr>
  <tr>
   <td class=row2 width=80 align=center>经　　验</td>
   <td class=row2>$oUsr->level</td>
  </tr>
  <tr>
   <td class=row2 width=80 align=center>发表文章</td>
   <td class=row2>{$oUsr->numpost} 篇</td>
  </tr>
  <tr>
   <td class=row2 width=80 align=center>回复文章</td>
   <td class=row2>{$oUsr->numreply} 篇</td>
  </tr>
  <tr>
   <td class=row2 width=80 align=center height="23">总发表文章</td>
   <td class=row2>{$tol} 篇</td>
  </tr>
  <tr>
   <td class=row2 width=80 align=center>社区注册日期</td>
   <td class=row2>$oUsr->firsttime</td>
  </tr>
  <tr>
   <td class=row2 width=80 align=center>上次登陆日期</td>
   <td class=row2>$oUsr->lasttime</td>
  </tr>
  <tr>
   <td class=row2 width=80 align=center>&nbsp;</td>
   <td class=row2>&nbsp;</td>
  </tr>
  <tr>
   <td class=row2 width=80 align=center>个人信息</td>
   <td class=row2>$oUsr->desc</td>
  </tr>
  </table>
 </td></tr>
 </table>
 </td>
</tr>
</table>
<br>
<a href=javascript:history.back();><IMG src=$imgurl/back.gif border=0></a>
</CENTER>
EOT;

page_footer();

?>