转至繁体中文版     | 网站首页 | 图文教程 | 资源下载 | 站长博客 | 图片素材 | 武汉seo | 武汉网站优化 | 
最新公告:     敏韬网|教学资源学习资料永久免费分享站!  [mintao  2008年9月2日]        
您现在的位置: 学习笔记 >> 图文教程 >> 站长学院 >> 网页制作 >> 正文
论坛设计         ★★★★

论坛设计

作者:闵涛 文章来源:闵涛的学习笔记 点击数:1720 更新时间:2009/4/23 12:33:02
d=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"><a href="qauthor.asp?author=< %=author%>">< %=author%> < /a>< /font>发表日期:< font color="#FF3333"><%=data%>< /font>
看板:< font color="#FF3333"><a href="qboard.asp?boardid=< %=boardid%>">< %=boardname%>< /a>< /font>板主推荐:< font color="#FF3333">#rate#</font>< /td>
< /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>
推荐等级
< select name="select">
< option value="1">1</option>
< option value="2">2</option>
< option value="3" selected>3</option>
< option value="4">4</option>
< option value="5">5</option>
< /select>
< /td>
< td width="20%" bordercolor="#006666">以后再处理:
< input type="radio" name="manage"value=3>
< /td>
< td width="9%">
< input type="submit" name="Submit"value="确定">
< /td>
< /tr>
< /table>
< /td>
< /form>
< /tr>
< /table>
< /body>
< /html>
< %
set rs=nothing
conn.close
set conn=nothing
%>
  注:这一页和文章显示模块中的article.asp基本上是一样的,仅仅是多加入了版主处理的窗体,在这儿就不多讲了。
  下面,要根据版主的处理过程,修该数据库相应部分

< %response.buffer=true%>
< html>
< head>
< title>文章处理< /title>
< meta http-equiv="Content-Type"content="text/html; charset=GB2312">
< /head>
< body bgcolor="#E9E9E4">
< %
articleid=request("articleid")
boardid=request("boardid")
topicid=request("topicid")
manage=request("manage")
''接受窗体内容
response.write manage ''显示斑竹ID
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")
根据上页中版主的操作,下面进行相应的处理。
if CLng(request("manage"))=1 then
sql="delete from 内容表 where id="& articleid
conn.execute sql
response.write "< h1>文章已经被删除</h1>"
response.write "< a href=>back</a>"
elseif CLng(request("manage"))=2then
sql="update 内容表 set 发表=true whereid=" & articleid
conn.execute sql
sql="update 主题表 set 文章数=文章数+1where id=" & topicid
conn.execute sql
response.write "< h1>文章已经发表</h1>"
response.write "< a href=>back</a>"
else
response.clear
response.redirect "boardmanager.asp?boardid="& boarded
end if
%>
< /body>
< /html>
< %
conn.close
set conn=nothing
%>   经过上面几步,所有的部分就算是基本完成了,当然,这时还不能拿来用,摆不上台面的。如果想要能够拿得出来的话,还要在版面设计,客户端资料验证等方面多下一些功夫。不过那都是HTML的内容了,和ASP没多大的关系,这儿我就不多讲了。

上一页  [1] [2] [3] 


没有相关教程
教程录入:mintao    责任编辑:mintao 
  • 上一篇教程:

  • 下一篇教程:
  • 【字体: 】【发表评论】【加入收藏】【告诉好友】【打印此文】【关闭窗口
      注:本站部分文章源于互联网,版权归原作者所有!如有侵权,请原作者与本站联系,本站将立即删除! 本站文章除特别注明外均可转载,但需注明出处! [MinTao学以致用网]
      网友评论:(只显示最新10条。评论内容只代表网友观点,与本站立场无关!)

    同类栏目
    · Web开发  · 网页制作
    · 平面设计  · 网站运营
    · 网站推广  · 搜索优化
    · 建站心得  · 站长故事
    · 互联动态
    更多内容
    热门推荐 更多内容
  • 没有教程
  • 赞助链接
    更多内容
    闵涛博文 更多关于武汉SEO的内容
    500 - 内部服务器错误。

    500 - 内部服务器错误。

    您查找的资源存在问题,因而无法显示。

    | 设为首页 |加入收藏 | 联系站长 | 友情链接 | 版权申明 | 广告服务
    MinTao学以致用网

    Copyright @ 2007-2012 敏韬网(敏而好学,文韬武略--MinTao.Net)(学习笔记) Inc All Rights Reserved.
    闵涛 投放广告、内容合作请Q我! E_mail:admin@mintao.net(欢迎提供学习资源)

    站长:MinTao ICP备案号:鄂ICP备11006601号-18

    闵涛站盟:医药大全-武穴网A打造BCD……
    咸宁网络警察报警平台