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

📄 replyaction.asp

📁 5237 论坛.rar
💻 ASP
字号:
<!--#include file="Connections/connY.asp" -->
<!--#include file="Inc/Set.asp" -->
<!--#include file="Inc/Level0.asp" -->
<%
RepID=Request.Form("I")
Quote=Request.Form("Quote")
WriteTime=Now()
Set rsGT = Server.CreateObject("ADODB.Recordset")
Sql = "Select *  From tArticleManage Where rID="&RepID
rsGT.Open Sql,ConnY,3,3
If rsGT.Eof And rsGT.Bof Then Response.Redirect "Error.asp?Error=16"
Title="Re:"&rsGT("rTitle")
rsGT.Close
Set rsGT=Nothing
Mood=Request.Form("Mood")
IP=Request.Form("IP")
RepTime=Now()
UserID=Session("SUserID")
NickName=Session("SNickName")

'文章回复次数+1,更新最新回复时间,更新最新回复者.
Set rsReplyU = Server.CreateObject("ADODB.Recordset")
Sql = "Select *  From tArticleManage Where rID="&RepID
rsReplyU.Open Sql,ConnY,3,3
rsReplyU("rReplyNum")=rsReplyU("rReplyNum")+1
rsReplyU("rLastReplyTime")=Now()
rsReplyU("rLastReplyUser")=Session("SNickName")

If Cint(Quote)=0 Then
Content=Request.Form("Content")
Else
Content="[color="&Forum_UFontColor&"]引用回复:"&chr(10)&chr(13)&rsReplyU("rContent")&"[/color]"&chr(10)&chr(13)&chr(10)&chr(13)&Request.Form("Content")
End If

If Title="" Or Content="" Then Response.Redirect "Error.asp?Error=7"

BW=Split(Forum_BadWords,"|")
For I = 0 To Ubound(BW)
Content=Replace(Content,BW(I),String(Len(BW(I)),"*"), 1,-1,1) 
Next
For I = 0 To Ubound(BW)
Title=Replace(Title,BW(I),String(Len(BW(I)),"*"), 1,-1,1) 
Next

Set rsAdd = Server.CreateObject("ADODB.Recordset")
Sql = "Select *  From tArticleManage Order By rPostTime Desc"
rsAdd.Open Sql,ConnY,3,3

rsAdd.AddNew
rsAdd("rTitle")=Title
rsAdd("rContent")=Content
rsAdd("rType")=Forum_TypeID
rsAdd("rSubject")=Forum_ID
rsAdd("rRepID")=RepID
rsAdd("rPostTime")=WriteTime
rsAdd("rLastReplyTime")=RepTime
rsAdd("rPoster")=UserID
rsAdd("rPosterNickName")=NickName
rsAdd("rEmotion")=Mood
rsAdd("rAuthorIP")=IP
rsAdd.Update
rsAdd.Close

'回复者回复文章数加1,经验值+3,财产更新+5
Set rsReplyUserU = Server.CreateObject("ADODB.Recordset")
Sql = "Select *  From tUserManage Where rUserID='"&Session("SUserID")&"'"
rsReplyUserU.Open Sql,ConnY,3,3
rsReplyUserU("rReplyNum")=rsReplyUserU("rReplyNum")+1
rsReplyUserU("rAssets")=rsReplyUserU("rAssets")+Forum_RA
rsReplyUserU("rExp")=rsReplyUserU("rExp")+Forum_RE
rsReplyUserU("rGlamour")=rsReplyUserU("rGlamour")+Forum_RG
rsReplyUserU.Update
rsReplyUserU.Close

'原贴者被回复文章数+1,魅力值+3,经验值+1
If Session("SUserID")<>rsReplyU("rPoster") Then
Set rsReplied = Server.CreateObject("ADODB.Recordset")
Sql = "Select *  From tUserManage Where rUserID='"&rsReplyU("rPoster")&"'"
rsReplied.Open Sql,ConnY,3,3
rsReplied("rRepliedNum")=rsReplied("rRepliedNum")+1
rsReplied("rAssets")=rsReplied("rAssets")+Forum_BA
rsReplied("rExp")=rsReplied("rExp")+Forum_BE
rsReplied("rGlamour")=rsReplied("rGlamour")+Forum_BG
rsReplied.Update
rsReplied.Close
End If

rsReplyU.Update
rsReplyU.Close

BackToURL="Board.asp?S="&Forum_ID
%>
<html>
<head>
<title><%=Forum_Title%></title>
<meta http-equiv="Content-Type" content="text/html;">
<meta http-equiv="Expires" CONTENT="0">
<meta http-equiv="Cache-Control" CONTENT="no-cache">
<meta http-equiv="Pragma" CONTENT="no-cache">
<!--#include file="Inc/Css.asp" -->
</head>
<body leftmargin="0" topmargin="0" bgcolor="<%=Forum_BgColor%>" vlink="<%=Forum_Css_A_Link_Color%>">
<!--#include file="Inc/Top.asp" -->
<table width="<%=Forum_Width%>" border="0" cellspacing="1" cellpadding="0" align="center" bgcolor="<%=Forum_BorderColor%>">
  <tr> 
    <td height="20" bgcolor="<%=Forum_BgColor%>"> 
      <table width="100%" border="0" cellspacing="0" cellpadding="0" class="font">
        <tr> 
          <td>&nbsp;您所在的位置: <a href="../" onFocus="this.blur()">首页</a> &gt;&gt; 
            <a href="List.asp" onFocus="this.blur()">讨论组</a> &gt;&gt; <a href="List.asp?T=<%=Forum_TypeID%>"  onFocus="this.blur()"><%=Forum_TypeName%></a> 
            &gt;&gt; <a href="Board.asp?S=<%=Forum_ID%>" onFocus="this.blur()"><%=Forum_Name%></a> 
            &gt;&gt; <font color="<%=Forum_NavFontColor%>">回复文章</font></td>
          <td width="150"></td>
          <td width="18"> 
          </td>
        </tr>
      </table>
    </td>
  </tr>
</table>
<table width="<%=Forum_Width%>" border="0" cellspacing="0" cellpadding="0" align="center">
  <tr> 
    <td height=1></td>
  </tr>
</table>
<table width="<%=Forum_Width%>" border="0" cellspacing="1" cellpadding="2" align="center" class="font" bgcolor="<%=Forum_BorderColor%>">
  <tr>
    <td bgcolor="<%=Forum_BgColor%>" height="344"> 
      <div align="center">
        <table width="400" border="0" cellspacing="1" cellpadding="2" bgcolor="<%=Forum_BorderColor%>" class="font">
          <tr>
            <td height="100" bgcolor="<%=Forum_AlternateColor1%>">
              <div align="center"><font color="<%=Forum_PFontColor%>">回复文章成功<br>
                </font><br>
                该页面将会在3秒钟后自动返回</div>
            </td>
          </tr>
        </table>
        <script language=javascript>
setTimeout("location.replace('<%=BackToURL%>')",3000)
</script>
        <br>
        <br>
        <br>
        <br>
        <br>
        <br>
      </div>
    </td>
  </tr>
</table>
<!--#include file="Inc/Bottom.asp" -->
</body>
</html>

⌨️ 快捷键说明

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