<?php
include_once("inc/config.php");
include_once("inc/ftbbsdbclass.php");
include_once("inc/publicfun.php");
include_once("inc/ftcode.php");
include_once("conn.php");
include_once("checkuser.php");
include_once("bbsuser.php");

$userid=intval(get_cookie('clubuser_id'));
$query = "SELECT * FROM {$tablepre}ftbbsmb";
$ftbbsmb=makecache('ftbbsmb.html',$query,$expire);
$url=$ftbbsmb[10];

include_once("memberinfo.php");
?>
<html><head><meta http-equiv=content-type content="text/html; charset=utf-8>">
</head>
<body>
<center>
<title><?=$username?>的个人中心</title>
<link rel="stylesheet" type="text/css" href="<?=$cssfile?>">
<?
include_once("usernav.php");
?>
<div id="main" align="left">
<script language=javascript src="js/windowsize.js"></script>
	<div id="header">
	<div class="lc"><div class="rc"></div></div>
	<div class="tit"><a href="home.php?userid=<?=$userid?>" class="titlink" title="<?=$username?>的空间"><?=$username?></a></div>
	<div class="desc"><?=$homepagetitle?></div>
	<div id="tabline">&nbsp;</div>
	<div id="tab"><a href="home.php?userid=<?=$userid?>" class="on">主页</a><a href="boker.php?userid=<?=$userid?>">博客</a><span>|</span><a href="myphoto.php?userid=<?=$userid?>">相册</a><span>|</span><a href="haoyou.php?userid=<?=$userid?>">好友</a><span>|</span><a href="myinfo.php?userid=<?=$userid?>">个人档案</a>
	</div>
</div>
<div class="stage">
<table width="100%" border="0" cellspacing="0" cellpadding="0" id="layout">
<tr>
<td valign="top" class="c2t3">
<div id="mod_profile" class="mod" rel="drag">
<?
include_once("usercalog.php");
?>
</div>
</td>
<td valign="top" class="c2t1">
<div id="m_blog" class="modbox">
<?
$sql="select * from {$tablepre}clubuser where clubuser_id=".$userid;
$rs=mysql_query($sql);
$row = mysql_fetch_array($rs);
//$numrows = mysql_num_rows($rs);
//if ($numrows!=0){
   $username=$row["clubuser_name"];
   $userimg=$row["userimg"];
   $homepagetitle=$row["homepagetitle"];
   $cssfile="blogcss/".$row["cssfile"];
   $bokeer=$row["bokeer"];
   if ($cssfile=="" || empty($cssfile) || $cssfile=="blogcss/"){
   $cssfile="blogcss/2.css";
   }
   if ($userimg==""){
      $blogheadimg="blogimages/nophoto.gif";
   }
   else{
      $blogheadimg="userheadimg/".$userimg;
   }
?>
              <table width="96%"  border="0" cellspacing="0" cellpadding="0">
                <tr> 
                  <td width="24%"> 
                    <div align="center"><img src="<?=$blogheadimg?>" width="84" height="84" alt="修改头像请先进入论坛然后进入个人资料修改"><br>
                      </div></td>
                  <td width="76%" rowspan="2"> 
                    <table width="100%"  border="0" cellspacing="0" cellpadding="0">
                      <tr> 
                        <td width="51%" height="23" class=new14>用户名： <?=$username?></td>
                        <td width="49%">&nbsp;</td>
                      </tr>
                      <tr> 
                        <td height="23" class=new14>身 &nbsp;份：
                          <?
						  if ($row["payuser"]==1){
						   echo "VIP用户";
						   }
						  else{
						   echo "普通用户";
						  }
						  ?>
                        </td>
                        <td>&nbsp;</td>
                      </tr>
                      <tr> 
                        <td height="23" class=new14>等 &nbsp;级： 
                          <?=$row["tili"]?>
                        </td>
                        <td>&nbsp;</td>
                      </tr>
                      <tr> 
                        <td height="23" class=new14>认 &nbsp;证：
                          <?
						  if ($row["payuser"]==0){
						     echo "<font color=red>已通过</font>";
						  }
						  else{
						     echo "未通过";
						  }
						  ?>
                        </td>
                        <td>&nbsp;</td>
                      </tr>
                    </table></td>
                </tr>
                <tr> 
                  <td height="25" align="center"> 
                    <div class="opt">用户当前头像</div></td>
                </tr>
              </table>
              <br>
              <table width="96%"  border="0" cellspacing="0" cellpadding="0">
                <tr> 
                  <td height="35" align="center" class=new14> 
                    <div class="opt"><strong>您的个人博客网址:　<A href="<?=$url?>/home.php?userid=<?=$userid?>"><?=$url?>/home.php?userid=<?=$userid?></A></strong></div></td>
                </tr>
                <tr> 
                  <td height="35"> 
                    <div align="center"><SPAN style="FONT-WEIGHT: normal; FONT-SIZE: 12px">为便于记忆，请将您的主页网址填入QQ或MSN的个人资料中。</SPAN></div></td>
                </tr>
              </table>
              <br>
<?
$sql="select * from {$tablepre}sms where accepter='".$username."' and IsNew=0";
$rs1=mysql_query($sql);
$row1 = mysql_fetch_array($rs1);
$smsnum = mysql_num_rows($rs1);
?>
              <table width="96%"  border="0" cellpadding="1" cellspacing="1">
                <tr> 
                  <td width="12%" height="30" class=new14>
<div align="left">收件箱</div></td>
                  <td width="88%" class=new14><div class="opt">你收件箱有 <font color=red><?=$smsnum?></font> 
                      条信息 (<a href="blogsms.php">查看信息</a>)</div></td>
                </tr>
                <tr> 
                  <td height="30" class=new14>
<div align="left">人气指数</div></td>
                  <td class=new14> 
                    <?
					if ($row["homepagehits"]==""){
					  echo 0;
					}
					else{
					  echo $row["homepagehits"];
					}?>
                  </td>
                </tr>
              </table>
              <br>
              <table width="96%"  border="0" cellspacing="0" cellpadding="0">
<?
$sql="SELECT * from {$tablepre}bbs_cate,{$tablepre}bbstitle where {$tablepre}bbs_cate.BBS_Cate_ID = {$tablepre}bbstitle.BoardID_2 and {$tablepre}bbstitle.deleted=0 and {$tablepre}bbstitle.huati=1 order by {$tablepre}bbstitle.redate desc limit 0,10";
$rs=mysql_query($sql);
$myrow = mysql_fetch_array($rs);
$numrows = mysql_num_rows($rs);
if ($numrows!=0){
while ($myrow = mysql_fetch_array($rs)){
  $id=$myrow["id"];
  $title=$myrow["title"];
  $boardid_1=$myrow["BoardID_1"];
  $boardid_2=$myrow["BoardID_2"];
  $BBS_Cate_Name=$myrow["BBS_Cate_Name"];
  $htmfilename=$myrow["htmfilename"];
  $tk1="default.php?a=".$boardid_1."&b=".$boardid_2;
?>
                <tr> 
                  <td height="25" align="left"><LI>
                      <div class="opt"><a class=new14 href="<?=$htmfilename?>" target="_blank">论坛热贴：<?=$title?></a> 
                        [<a class=new14 href="<?=$tk1?>">进入论坛</a>]</div>
                    </LI>
                  </td>
                </tr>
<?
  }
}
?>
              </table>
              <table width="96%"  border="0" cellspacing="0" cellpadding="0">
                <tr> 
                  <td width="16%" height="30"><div align="left">随机推荐博客</div></td>
                  <td width="84%" height="30"> 
                    <div align="right"> &nbsp; </div></td>
                </tr>
                <tr valign="top"> 
                  <td height="120" colspan="2"> 
                    <table width="100%" border="0" cellspacing="0" cellpadding="0">
                      <tr>
<?
$sql="select clubuser_id,clubuser_name,userimg,homepagetitle from {$tablepre}clubuser where bokeer=1 order by clubuser_id desc limit 0,2";
$rs=mysql_query($sql);
$row = mysql_fetch_array($rs);
$numrows = mysql_num_rows($rs);
if ($numrows!=0){
do{
   $userimg=$row["userimg"];
   if ($userimg==""){
      $headimg="blogimages/nophoto.gif";
   }
   else{
      $headimg="userheadimg/".$userimg;
   }
?>
                        <td> 
                          <table width="100%"  border="0" cellspacing="0" cellpadding="0">
                            <tr> 
                              <td width="32%" rowspan="2"><div align="center"><img src="<?=$headimg?>" width="84" height="84"></div><br></td>
                              <td width="68%" height="23"><div class="opt"><a href="home.php?userid=<?=$row["clubuser_id"]?>" target="_blank"><?=$row["clubuser_name"]?></a></div></td>
                            </tr>
                            <tr> 
                              <td valign="top">
							  <?
							  if ($row["homepagetitle"]==""){
							     echo "这家伙很懒什么没有填写";
							  }
							   else{
							     echo $row["homepagetitle"]; 
							  }
							  ?></td>
                            </tr>
                          </table>
						</td>
<?
  }
  while ($row = mysql_fetch_array($rs));
}
?>
                      </tr>
                    </table></td>
                </tr>
              </table>
            </div>

</td>
</tr></table>
</div>
</div>
<br><center>
<?
include_once("tail.php");
?>
  </center>
</center>
</body>
</html>