⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 bbs_reply_add.asp

📁 该资料包含大量网络开发的案例和源代码
💻 ASP
字号:
<%@LANGUAGE="VBSCRIPT" CODEPAGE="936"%>
<%option explicit%>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<!--#include file="../include/datatransfer.asp"-->
<!--#include file="../include/functionjs.asp"-->
<!--#include file="../include/functionvb.asp" -->
<!--#include file="../include/dbconn.inc" -->
<!--#include file="../include/refresh.asp"-->
<!--#include file="../include/header.asp" -->
<link href="../include/main.css" rel="stylesheet" type="text/css">
<%
if UserName=empty then
	response.Redirect("../common/showerr.asp?ErrType=1")
end if

dim QuoteId,Quotetype
QuoteId=clng(request("quoteid"))
quotetype=clng(request("quotetype"))	

'dim ForwardPage,StrPage,StrPage2
'forwardpage=request.servervariables("HTTP_REFERER")
'strpage="http://127.0.0.1/032508/bbs/bbs_reply.asp?BoardID="&boardid&"&TopicID="&topicid&"&QuoteID="&quoteid
'if forwardpage<> strpage and forwardpage<> strpage and forwardpage<>"http://127.0.0.1/032508/bbs/bbs_show.asp?BoardID="&boardid&"&TopicID="&topicid then
'	response.Redirect("../common/showerr.asp?ErrType=2")
'end if
%>
	<%
  	dim ReplyId
	
	dim Title,EmImage,Content
	Topicid=clng(request("topicid"))
	Title=trim(request.Form("title"))
	Emimage=trim(request.Form("emimage"))
	Content=request.Form("content")
	content=replace(content,"<","&lt")
	content=replace(content,">","&gt")
	'content=replace(content,""","&quot;")
		
	strSQL="select * from bbs_topic where topic_id="& topicid
	objrs.open strsql,objconn,1,3
	objrs("replycount")=objrs("replycount")+1
	objrs("lastreplyuserid")=userid
	objrs("lastreplyusername")=username
	objrs("lastreplytime")=now()
	Anchor=clng(objrs("replycount"))+1
	objrs.update
	objrs.close	
		
	strSQL="insert into bbs_reply(topic_id,board_id,user_id,user_Name,title,content,emimage,pubtime,anchor) values (" & topicid& "," &boardid& "," & userid& ",'" & username & "','" & title &"'" &",'"&  content &"','"& emimage &"','"& Now() &"', "& Anchor &")"
	objConn.execute(strSQL)	
		
	strSQL="select top 1 * from bbs_reply where title='"& title &"' order by reply_id desc"
	objrs.open strsql,objconn,1,3
  	ReplyId=objRS("reply_id")	
	if not quoteid=0 then
		objRS("isquote")=1
		objRS("quote_id")=quoteid
		objrs("QuoteType")=quotetype
	end if
	objrs.update
	objrs.close
	
	strSQL="select * from webcount"
	objrs.open strsql,objconn,1,3
	objrs("BBS_TtlposCnt")=objrs("BBS_TtlposCnt")+1
	objrs("BBS_TdyPosCnt")=objrs("BBS_TdyPosCnt")+1
	objrs.update
	objrs.close
	
	strSQL="select TtlPosCnt from bbs_board where board_id="&boardId
	objrs.open strsql,objconn,1,3
	objrs("TtlPosCnt")=objrs("TtlPosCnt")+1
	objrs.update
	objrs.close	
	

	strSQL="select bbs_pubcount from user_info where user_id="&userid
	objrs.open strsql,objconn,1,3
  	objrs("bbs_pubcount")=objrs("bbs_pubcount")+1
	objrs.update
	objrs.close
	%>
	<table width="710" border="1" cellpadding="2" cellspacing="0" align="center"  class="tablestyle" bordercolor="#FFFFFF" >
      <tr>
        <td bordercolor="#4C4C4C" background="../resource/images/bbs/bg.gif" class="tablehead"><img src="../resource/images/bbs/li.gif" width="9" height="9"><a href="../blog/main.asp">56Blog</a>→<a href="bbs_main.asp">论坛</a>→回复帖子结果</td>
      </tr>
    </table>
    <br>
    <table width="710" border="1" cellpadding="2" cellspacing="0" align="center"  class="tablestyle"  bordercolor="#FFFFFF">
      <tr>
        <td align="center"   bordercolor="#4C4C4C" background="../resource/images/bbs/bg.gif" class="tablehead">帖子回复成功</td>
      </tr>
      <tr>
        <td bordercolor="#4C4C4C"><table width="100%"  border="0" cellspacing="5" cellpadding="5">
            <tr>
              <td><li><a href="../blog/main.asp">返回56Blog首页</a></td>
            </tr>
            <tr>
              <td><li><a href="../bbs/bbs_main.asp">返回论坛首页</a></td>
            </tr>
            <tr>
              <td><li><a href="bbs_list.asp?BoardID=<%=boardid%>">返回帖子列表</a></td>
            </tr>
            <tr>
              <td><li><a href="bbs_show.asp?BoardID=<%=boardid%>&TopicID=<%=topicid%>">返回您回复的帖子</a></td>
            </tr>
        </table></td>
      </tr>
      <tr>
        <td bordercolor="#4C4C4C" background="../resource/images/bj2.gif">&nbsp;</td>
      </tr>
    </table>
<meta http-equiv='refresh' content=2;url="../bbs/bbs_show.asp?BoardID=<%=boardid%>&TopicID=<%=topicid%>#<%=Anchor%>">
<!--#include file="../include/endconn.inc" -->
<!--#include file="../include/footer.asp" -->

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -