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

$query = "SELECT * FROM {$tablepre}ftbbsmb";
$ftbbsmb=makecache('ftbbsmb.html',$query,$expire);
$pagesize=$ftbbsmb[5];

$titleid=intval($_GET["titleid"]);
$p = new ft_page;
$strsql="select * from {$tablepre}ftbbs_bmtb where flag=0 and titleid=".$titleid." order by id desc";
$rs=mysql_query($strsql);
$myrow = mysql_fetch_array($rs);
$numrows = mysql_num_rows($rs);
?>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">

<title>查看报名情况</title>
<script language=javascript src="inc/cookies.js"></script>
<script>
var stylecook = getCookie("STYLESHOW");
var style;
var strstyle;
if(stylecook=="")
{
 stylecook=1;
}
else
{
 stylecook++;
}
style="ftbbs0"+stylecook+".css";
strstyle="<link href=\"css/"+style+"\"  rel=\"stylesheet\" type=\"text/css\"> ";
document.write(strstyle);
</script>
</head>
<body leftmargin="0" topmargin="1" marginwidth="0" marginheight="0">
<table width="100%" border="0" cellspacing="1">
  <tr class=td001> 
    <td height="30" colspan="4" align="center"><strong>查看报名情况</strong></td>
  </tr>
  <tr class="td002"> 
    <td width="24%" height="25" align="right"> <div align="center">姓名</div></td>
    <td width="24%"><div align="center">性别</div></td>
    <td width="26%"><div align="center">来自</div></td>
    <td width="26%"><div align="center">职业</div></td>
  </tr>
<?
$p->pvar="page";
$p->setvar(array("id" => $titleid)); 
$p->set($pagesize,$numrows,$psize); 
$rsx=mysql_query($strsql." limit ".$p->limit());
if ($numrows!=0){
while ($myrow = mysql_fetch_array($rsx)){		  
?>
  <tr> 
    <td height="25" align="center" class="td004"><?=$myrow["username"]?></td>
    <td class="td004" align="center"><?=$myrow["sex"]?></td>
    <td class="td004" align="center"><?=$myrow["address"]?></td>
    <td class="td004" align="center"><?=$myrow["job"]?></td>
  </tr>
<?
}
?>
  <tr> 
    <td height="25" colspan="4" align="center" class="td002"><div align="left">
      <?
    $p->output(0);
    mysql_free_result($rs);
    mysql_free_result($rsx);
	$db->close(); 
?>
      </div></td>
  </tr>
<? }else{?>
  <tr>
    <td colspan="4" height="25" class="td002">还没有任何记录</td>
  </tr>
<? }?>
</table>
</body>
</html>
