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

$userid=intval(get_cookie('clubuser_id'));
$pltype=intval($_GET["pltype"]);
$query = "SELECT * FROM {$tablepre}ftbbsmb";
$ftbbsmb=makecache('ftbbsmb.html',$query,$expire);
$pagesize=$ftbbsmb[5];
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?>">
<link rel="stylesheet" type="text/css" href="blogcss/blogpage.css">
<?
include_once("usernav.php");
if ($pltype==0){
include_once("bokerhead.php");
}
elseif ($pltype==1){
include_once("photohead.php");
}
elseif ($pltype==2){
include_once("haoyouhead.php");
}
?>
<div class="stage">
<table width="100%" border="0" cellspacing="0" cellpadding="0" id="layout">
<tr>
<td valign="top" class="c2t3">
<div id="m_blog" class="modbox">
<?
include_once("usercalog.php");
?>
</div>
</td>
<td valign="top" class="c2t1">
<div id="m_blog" class="modbox">
              <table width="100%"  border="0" cellspacing="0" cellpadding="0">
                <tr valign="middle"> 
                  <td height="50" colspan="5" class=new14> 
                    <div align="center">
					<?
					if ($pltype==0){
					echo "日志";
					}
					else{
					echo "相册";
					}
					?>评论管理</div></td>
                </tr>
                <tr> 
                  <td height="1" colspan="5" bgcolor="#336699" class=new14><spacer height="1" type="block"></td>
                </tr>
                <tr> 
                  <td width="78%" height="25"> <div align="left"><strong>内容</strong></div></td>
                  <td width="7%" ><div align="center">状态</div></td>
                  <td width="8%" ><div align="center">编辑</div></td>
                  <td width="7%" ><div align="center">删除</div></td>
                </tr>
                <tr> 
                  <td height="1" colspan="5" background="blogimages/dotbg.gif"><spacer height="1" type="block"></td>
                </tr>
<?
$sql="select * from {$tablepre}ftblog_pl where userid=".$userid." and pltype=".$pltype." order by pldate desc";
$rs=mysql_query($sql);
$myrow = mysql_fetch_array($rs);
$numrows = mysql_num_rows($rs);
$p = new ft_page;

$p->pvar="page"; 
$p->setvar(array("pltype" => $pltype)); 
$p->set($pagesize,$numrows,$psize); 
$rsx=mysql_query($sql." limit ".$p->limit());
if ($numrows!=0){
while ($myrow = mysql_fetch_array($rsx)){
?>
                <tr> 
                  <td height="25" ><div class="opt">(<?=$myrow["netname"]?>)<br>
                    <a href="myblog.php?id=<?=$myrow["blogid"]?>&userid=<?=$myrow["userid"]?>" target="_blank"><?=$myrow["plcontent"]?></a></div></td>
                  <td height="25" align="center"><div class="opt"> 
                      <? if ($myrow["plqs"]==0){?>
                      <a href="plop.php?id=<?=$myrow["id"]?>&op=top&v=1&pltype=<?=$pltype?>">显示</a> 
                      <? }else{?>
                      <a href="plop.php?id=<?=$myrow["id"]?>&op=top&v=0&pltype=<?=$pltype?>"><font color="#FF0000">隐藏</font></a> 
                      <? }?>
                    </div></td>
                  <td height="25" align="center"><div class="opt"><a href="blog_editpl.php?id=<?=$myrow["id"]?>&pltype=<?=$pltype?>">编辑</a></div></td>
                  <td height="25" align="center"><div class="opt"><a href="plop.php?id=<?=$myrow["id"]?>&op=del&pltype=<?=$pltype?>">删除</a></div></td>
                </tr>
                <tr> 
                  <td height="1" colspan="5" background="blogimages/dotbg.gif"><spacer height="1" type="block"></td>
                </tr>
<?
}
?>
                <tr> 
                  <td colspan="5" height="35">
<?
$p->output(0);
?>
				  </td>
                </tr>
<?
}
else{
?>
                <tr> 
                  <td colspan="5" height="25">记录为空</td>
                </tr>
<? }?>
              </table>
            </div>
</td>
</tr></table>
</div>
</div>
<br><center>
<?
include_once("tail.php");
?>
  </center>
</center>
</body>
</html>