首页 >> 读书频道 >> 电脑 >> 简单的浮点论坛
 
· 聊天室自做 Follow
· 巧用ASP技术保护DHT
· 磁盘ID在ASP源码防拷
· 在客户端执行数据库记录的
· 在线实时开通WEB及FT
· 短信发送程序
· .域名登记查询(whoi
· session的几个问题
· 用户状态维护
· 代码例子 - Ask F
· asp中的一个奇怪的函数
· 用划界字符列表来得到字符
 
· 素质教育在美国
· 全唐诗卷四十六
· 韩剧《布拉格恋人》剧情介
· 夜航船[作者:明·张岱]
· 局外人[作者:韩·可爱淘
· 现场流行病学
· 源氏物语[日本:紫式部]
· 红楼梦:120回全本[清
· 武林寓言故事
· 2006高考录取规则
· 首批中国世界名牌产品和2
· 济南美食大全
 
· (出租)中动商场部分及写
· (出租)中动动漫基地&#
· 喜剧学院
· 《善德女王》剧情介绍
· 魔女18号 剧情
· 丑女无敌剧情介绍
· 魔女幼熙剧情介绍
· 龙游天下剧情介绍
· 震撼世界的七日剧情介绍
· 静静的白桦林剧情介绍
· 心情日记—老公今天我想对
· 旗舰剧情介绍
欢迎来到月影社区!如果您觉得这里不错,请推荐给您的朋友们。月影社区:http://wf66.com/

简单的浮点论坛


查看有无更新版本

关键字:ASP 2006-8-28

 

简单的做了一个,扫描一次数据库可得一棵树
-----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>
<br>
<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),"<br>") %></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%" cellspacing="0" cellpadding="0">
<tr>
<td width="12%" class="title"><b>姓 名:</b></td>
<td width="88%">
<input type="text" name="name" size="30" class="name">
</td>
</tr>
<tr>
<td width="12%" class="title"><b>E-mail:</b></td>
<td width="88%">
<input type="text" name="email" size="30" class="box">
</td>
</tr>
<tr>
<td width="12%" class="title"><b>标 题:</b></td>
<td width="88%">
<input type="text" name="title" size="30" class="box">
</td>
</tr>
<tr>
<td width="12%" valign="top" class="title"><b>内 容:</b></td>
<td width="88%">
<textarea rows="5" name="comm" cols="30" class="box"></textarea>
</td>
</tr>
<tr>
<td width="12%"></td>
<td width="88%">
<input type="image" border="0" name="imageField" src="pic/send.gif" width="51" height="19">
</td>
</tr>
</table>
</form></div>
</body>
</html>
-----replay.asp---------
<% id = request("id")%>
<% set dbr = server.createobject("adodb.recordset")%>
<% dbr.open "select * from forum where (id=" & id & ")",application("oledb") ,1,1%>
<html>
<head>
<title>浮点论坛</title></head>
<body bgcolor="#FFFCF0" leftmargin="0" topmargin="0" marginwidth="0" marginheight="0">
<div align="center">
<form method="POST" action="add.asp">
<table border="0" width="90%" cellspacing="0" cellpadding="0">
<tr>
<td width="12%" class="title"><b>姓 名:</b></td>
<td width="88%">
<input type="text" name="name" size="50" class="name">
</td>
</tr>
<tr>
<td width="12%" class="title"><b>E-mail:</b></td>
<td width="88%">
<input type="text" name="email" size="50" class="box">
</td>
</tr>
<tr>
<td width="12%" class="title"><b>标 题:</b></td>
<td width="88%">
<input type="text" name="title" size="50" class="box" value="RE:<%=server.htmlencode(rtrim(dbr("title")))%>">
<input type="hidden" name="id" value="<%=request("id")%>">
</td>
</tr>
<tr>
<td width="12%" valign="top" class="title"><b>内 容:</b></td>
<td width="88%">
<textarea rows="5" name="comm" cols="48" class="box"></textarea>
</td>
</tr>
<tr>
<td width="12%"></td>
<td width="88%">
<input type="image" border="0" name="imageField" src="pic/send.gif" width="51" height="19">
</td>
</tr>
</table>
</form></div>
<% dbr.close %>
<% set dbr = nothing %>
</body>
</html>
-------add.asp------
<% if request("name")="" or replace(request("title"),"RE:","")="" then %>
<html>
<head>
<title>浮点论坛</title></head>
<body background="pic/bg_bbs.gif" leftmargin="0" topmargin="0" marginwidth="0" marginheight="0">
<div align="center">
<table width="450" border="0" cellspacing="0" cellpadding="0">
<tr>
<td height="60" class="title">姓名、标题不能为空</td>
</tr>
<tr>
<td align="center" height="30"><a href="index.asp" class="link">返回</a></td>
</tr>
</table>
</div>
</body>
</html>
<% response.end %>
<% end if %>
<% set dbr= server.createobject("adodb.recordset") %>
<% if request("id")="" then %>
<% dbr.open "select max(id)+1 as maxid from forum" ,application("oledb"),1,1%>
<% tid=cint(dbr("maxid")) %>
<% dbr.close%>
<% dbr.open "select top 0 * from forum",application("oledb"),1,3 %>
<%
dbr.addnew
dbr("id")=tid
dbr("title")=request("title")
dbr("comm")=request("comm")
dbr("name")=request("name")
dbr("email")=request("email")
dbr("ip")=Request.ServerVariables("REMOTE_ADDR")
dbr("isdel")="n"
dbr("thedate")=cdate(now)
dbr.update
dbr.close
%>
<% set dbr = nothing %>
<% response.redirect("index.asp")%>
<% dbr.close %>
<% else %>
<% d = request("id") %>
<% dbr.open "SELECT TOP 2 * FROM forum WHERE (id <= " & d & ") ORDER BY id DESC",application("oledb") ,1,1%>
<% if dbr.recordcount=1 then %>
<% inid=cdbl(dbr("id"))-(cdbl(dbr("id"))-0)/2%>
<% dbr.close %>
<% dbr.open "select top 0 * from forum",application("oledb"),1,3 %>
<%
dbr.addnew
dbr("id")=inid
dbr("title")=request("title")
dbr("comm")=request("comm")
dbr("name")=request("name")
dbr("email")=request("email")
dbr("ip")=Request.ServerVariables("REMOTE_ADDR")
dbr("isdel")="n"
dbr("thedate")=cdate(now)
dbr.update
dbr.close
%>
<% set dbr = nothing %>
<% response.redirect("index.asp")%>
<% elseif dbr.recordcount=2 then %>
<% maxid = cdbl(dbr("id")) %>
<% dbr.movenext %>
<% minid = cdbl(dbr("id")) %>
<% dbr.close %>
<% inid=maxid-(maxid-minid)/2 %>
<%= inid %>
<% dbr.open "select top 0 * from forum",application("oledb"),1,3 %>
<%
dbr.addnew
dbr("id")=inid
dbr("title")=request("title")
dbr("comm")=request("comm")
dbr("name")=request("name")
dbr("email")=request("email")
dbr("ip")=Request.ServerVariables("REMOTE_ADDR")
dbr("isdel")="n"
dbr("thedate")=cdate(now)
dbr.update
dbr.close
%>
<% set dbr = nothing %>
<% response.redirect("index.asp")%>
<% end if %>
<% end if %>

简单的浮点论坛

[ 1 ]
简单的浮点论坛 num

打印本页 关闭

关于我们版权声明本站导航友情连结作品演示 TOP↑