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

$userid=intval($_GET["userid"]);
include_once("memberinfo.php");
?>
<html><head><meta http-equiv=content-type content="text/html; charset=<?=$charset?>">
</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="<?=$syurl?>" class="titlink" title="<?=$username?>的空间"><?=$username?></a></div>
	<div class="desc"><?=$homepagetitle?></div>
	<div id="tabline">&nbsp;</div>
	<div id="tab"><a href="<?=$syurl?>" class="on">主页</a><a href="<?=$bkurl?>">博客</a><span>|</span><a href="<?=$xcurl?>">相册</a><span>|</span><a href="<?=$hyurl?>">好友</a><span>|</span><a href="<?=$zlurl?>">个人档案</a>
	</div>
</div>

<div class="stage">
<table width="100%" border="0" cellspacing="0" cellpadding="0" id="layout">
<tr>
<td valign="top" class="c2t1">
<div class="mod" rel="drag">
	<table width="100%" border="0" cellspacing="0" cellpadding="0" class="modth">
	<tr><td class="modtl" width="7">&nbsp;</td>
	<td class="modtc" nowrap><div class="modhead"><span class="modtit">文章列表</span></div></td>
	<td class="modtc" nowrap align="right"></td>
	<td class="modtr" width="7">&nbsp;</td>
	</tr></table>
<div id="m_blog" class="modbox">
<?
$p = new ft_page;
$sql="select {$tablepre}ftblog.id,{$tablepre}ftblog.blogtitle,{$tablepre}ftblog.blogtypeid,{$tablepre}ftblog.xinqin,{$tablepre}ftblog_type.blogtype,{$tablepre}ftblog.blogcontent,{$tablepre}ftblog.writedate,{$tablepre}ftblog.blogplnum,{$tablepre}ftblog.hits from {$tablepre}ftblog,{$tablepre}ftblog_type where {$tablepre}ftblog.blogtypeid={$tablepre}ftblog_type.id and {$tablepre}ftblog.sign=0 and {$tablepre}ftblog.blogqs=0 and {$tablepre}ftblog.userid=".$userid." and {$tablepre}ftblog_type.blogphoto=0 order by {$tablepre}ftblog.blogtop desc,{$tablepre}ftblog.blogtj desc,{$tablepre}ftblog.id desc";
$rs=mysql_query($sql);
$myrow = mysql_fetch_array($rs);
$numrows = mysql_num_rows($rs);

$p->pvar="page"; 
$p->setvar(array("userid" => $userid)); 
$p->set($blogpagesize,$numrows,$psize); 
$rsx=mysql_query($sql." limit ".$p->limit());
if ($numrows!=0){
while ($myrow = mysql_fetch_array($rsx)){
$blogcontent=substr(nohtml($myrow["blogcontent"]),0,200)
?>
	<div class="line">&nbsp;</div>
	<div class="tit"><a href="myblog.php?id=<?=$myrow["id"]?>&userid=<?=$userid?>&blogtypeid=<?=$myrow["blogtypeid"]?>"><?=$myrow["blogtitle"]?></a></div>
	<div class="date"><?=$myrow["writedate"]?> &nbsp;&nbsp;<?if ($myrow["xinqin"]!=""){?>心情:&nbsp;<?=$myrow["xinqin"]?><?}?></div>
	<div class="cnt"><?=$blogcontent?></div></br>
    <div class="opt"><a href="boker.php?blogtypeid=<?=$myrow["blogtypeid"]?>&userid=<?=$userid?>" title="查看该分类中所有文章">类别：<?=$myrow["blogtype"]?></a> | <a href="myblog.php?id=<?=$myrow["id"]?>&blogtypeid=<?=$myrow["blogtypeid"]?>&userid=<?=$userid?>#comment" title="查看该文章的所有评论">评论(<?=$myrow["blogplnum"]?>)</a> | <a href="myblog.php?id=<?=$myrow["id"]?>&blogtypeid=<?=$myrow["blogtypeid"]?>&userid=<?=$userid?>" title="浏览全文">浏览(<?=$myrow["hits"]?>)</a></div>
<?
}

 echo "<div class=\"line\">&nbsp;</div>";
 if ($numrows>=16){
    echo "<div class=\"more\"><a href=blog.php?userid=".$userid."&page=2 class=\"titlink\">更多文章>></a></div>";
 }
}
else{
echo "<div class=\"date\">数据为空</div>";
}
?>
</div>
<table width="100%" border="0" cellspacing="0" cellpadding="0" height="8">
<tr><td class="modbl" width="7">&nbsp;</td>
<td class="modbc">&nbsp;</td>
<td class="modbr" width="7">&nbsp;</td>
</tr></table>
</div>

</td>
<td class="c2t2">&nbsp;</td>
<td valign="top" class="c2t3">
<div id="mod_profile" class="mod" rel="drag">
<?
include_once("Lblog.php");
?>
</div>
</td>
</tr></table>
</div>
</div>
<br><center>
    <div id="ft"><font color="#000000">&copy;<?=date("Y")?> FTBBS.CN</font></div>
  </center>
</center>
<script src="homehits.php?id=<?=$id?>&userid=<?=$userid?>&ty=home"></script>
</body>
</html>