简单的浮点论坛[简单的做了一个,扫描一次数据库可得一棵树]

80酷酷网    80kuku.com

  数据|数据库-----index.asp------

<html>

<head>
<title>浮点论坛</title></head>

<body marginwidth="0" marginheight="0">
<div align="center">
  <table width="100%" border="0" cellspacing="0" cellpadding="0" height="24" >
    <tr>
      <td width="80"> </td>
      <td><a href="#form">发新贴</A></td>
    </tr>
  </table>
  
  

  <table border="0" width="90%" cellspacing="0" cellpadding="0">
    <% set dbr = server.createobject("adodb.recordset")%>
    <% dbr.pagesize = 50 %>
    <% dbr.CacheSize = dbr.pagesize %>
    <% dbr.open "select * from forum where (isdel = 'n') order by id desc",application("oledb") ,1,1%>
    <% msgcount=dbr.recordcount %>
    <% msgpcount=dbr.pagecount %>
    <% pagelist=request("pagelist") %>
    <% if CINT(pagelist) > dbr.pagecount then pagelist = dbr.pagecount %>
    <% if CINT(pagelist) < 1 then pagelist=1 %>
    <% dbr.AbsolutePage=pagelist %>
    <% for i= 1 to dbr.pagesize %>
    <tr>
      <td width="100%" valign="top" align="left" colspan="2">
        <table border="0" width="100%" cellspacing="0" cellpadding="0">
          <tr>
            <td width="25%" >姓名:<%=rtrim(dbr("name")) %></td>
            <td width="25%" ><% if rtrim(dbr("email"))<>"" then %><%rtrim(dbr("email"))%><% end if %></td>
            <td width="25%" >时间:<%= datevalue(dbr("thedate")) %></td>
            <% a= cdbl(dbr("id")) %>
            <% next %>
            <td width="25%"><a href="reply.asp?id=<%=a%>">回复</a></td>
          </tr>
        </table>
      </td>
    </tr>
    <tr>
      <td width="100%" valign="top" align="left" colspan="2"><%=rtrim(dbr("title")) %></td>
    </tr>
    <tr>
      <td width="100%" valign="top" align="left"  colspan="2"><%=replace(server.htmlencode(rtrim(dbr("comm"))),chr(13),"
") %></td>
    </tr>
    <% dbr.movenext %>
    <% if dbr.EOF Then Exit For %>
    <% next %>
    <tr>
      <td align="right" height="30" width="500"><a href="index.asp?pagelist=<%=CINT(pagelist)+1%> "><span class="link">>>更多</span></td>
      <td align="right" height="30"> </td>
    </tr>
  </table>
<form method="POST" action="add.asp">
    <table border="0" width="90%&q

分享到
  • 微信分享
  • 新浪微博
  • QQ好友
  • QQ空间
点击: