新微赢技术网

标题: 利用ASP打造网站论坛DIY[9] [打印本页]

作者: 地上跑    时间: 2009-3-16 21:21
标题: 利用ASP打造网站论坛DIY[9]
当点击了相应文章的联结后,就进入此文章的处理页面managearticle.asp:

< %
articleid=request("articleid")

boardid=request("boardid")
if session("beenthere")< >boardidthen response.redirect "forums.asp"
Set conn = Server.CreateObject("ADODB.Connection")
conn.Open "driver={Microsoft AccessDriver (*.mdb)};dbq=" & Server.MapPath("bbssystem.mdb")
Set cmd = Server.CreateObject("ADODB.Command")
Set cmd.ActiveConnection = conn
cmd.CommandText = "按id查询文章"
ReDim param(0)
param(0) = CLng(articleid)//注:Clng 不可忽略
Set rs = cmd.Execute( ,param )
author=rs("作者id")
title=rs("标题")
data=rs("日期")
rate=rs("推荐度")
boardid=rs("看板id")
topicid=rs("主题id")
boardname=rs("看板名")
topicname=rs("主题名")
content=rs("内容")
content=replace(content,vbCrlf,"</p>< p>")
content="< p>" & content& "< /p>"
set cmd=nothing
%>
< html>
< head>
< title>Untitled Document< /title>
< meta http-equiv="Content-Type"content="text/html; charset=GB2312">
< /head>
< body bgcolor="#E9E9E4">
< table width="89%" border="0"cellspacing="0" cellpadding="0"align="center">
< tr bgcolor="#CCCCCC">
< td>作者:< font color="#FF3366">看板:< font color="#FF3333">< /tr>
< tr bgcolor="#CCCCCC">
< td>标题:< font color="#FF3333"><%=title%>
主题:< a href="qtopic.asp?topicid=<%=topicid%>"> < %=topicname%>< /a> < /font>< /td>
< /tr>
< tr valign="top">
< td>
< hr>
< font color="#FF3366">文章内容:< /font>< br>
< br>
< font color=blue>< %response.writecontent%>< /font>
< br>
< hr>
< /td>
< /tr>
< tr valign="top">
< form method="post" action="manageresult.asp">
< td height="18">
< table width="100%" border="1"cellspacing="1" cellpadding="1">
< tr>
< td width="29%">
< div align="right">
< input type="hidden" name="boardid"value="< %=boardid%>">
< input type="hidden" name="topicid"value="< %=topicid%>">
< input type="hidden" name="articleid"value="< %=articleid%>">
文章处理:< /div>
< /td>
< td width="12%" bordercolor="#006666">删除:
< input type="radio" name="manage"value=1>
< /td>
< td width="30%" bordercolor="#006666">发表:
< input type="radio" name="manage"value=2>




欢迎光临 新微赢技术网 (http://bbs.weiying.cn/) Powered by Discuz! X3.2