📄 voteaction.asp
字号:
<!--#include file="Connections/connY.asp" -->
<!--#include file="Inc/Set.asp" -->
<!--#include file="Inc/Level0.asp" -->
<%
WriteTime=Now()
Title=Request.Form("Title")
Content=Request.Form("Content")
Mood=Request.Form("Mood")
IP=Request.Form("IP")
RepTIme=Now()
UserID=Session("SUserID")
NickName=Session("SNickName")
VContent=Request.Form("Vote")
VType=Cint(Request.Form("VoteType"))
IVote=1
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
For I = 0 To Ubound(BW)
VContent=Replace(VContent,BW(I),String(Len(BW(I)),"*"), 1,-1,1)
Next
If Title="" Or Content="" Then Response.Redirect "Error.asp?Error=7"
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("rPostTime")=WriteTime
rsAdd("rLastReplyTime")=RepTime
rsAdd("rPoster")=UserID
rsAdd("rPosterNickName")=NickName
rsAdd("rEmotion")=Mood
rsAdd("rAuthorIP")=IP
rsAdd("rIsVote")=IVote
rsAdd("rVoteContent")=VContent
rsAdd("rVoteType")=VType
rsAdd.Update
rsAdd.Close
Set rsUpdate = Server.CreateObject("ADODB.Recordset")
Sql = "Select * From tUserManage Where rUserID='"&Session("SUserID")&"'"
rsUpdate.Open Sql,ConnY,3,3
rsUpdate("rPostNum")=rsUpdate("rPostNum")+1
rsUpdate("rExp")=rsUpdate("rExp")+Forum_VE
rsUpdate("rAssets")=rsUpdate("rAssets")+Forum_VA
rsUpdate("rGlamour")=rsUpdate("rGlamour")+Forum_VG
rsUpdate.Update
rsUpdate.Close
rsAdd.Open()
VoteType=rsAdd("rVoteType")
Vote=rsAdd("rVoteContent")
IntArticleManageID=rsAdd("rID")
UserName=Session("SUserID")
VoteUserNickName=Session("SNickName")
Vote=Split(Vote,chr(13)&chr(10))
j=0
For i = 0 to Ubound(Vote)
If Not (Vote(i)="" Or vote(i)=" ") Then
Vote_1=""&Vote_1&""&vote(i)&"|"
j=j+1
End If
If i>8 Then Exit For
Next
For k = 1 To j
VoteNum=""&VoteNum&"0|"
Next
VoteLen=Len(Vote_1)
VoteNumLen=Len(VoteNum)
VoteNum=Left(VoteNum,VoteNumLen-1)
Vote=Left(Vote_1,VoteLen-1)
Set rsVote = Server.CreateObject("ADODB.Recordset")
Sql = "Select * From tVoteManage"
rsVote.Open Sql,ConnY,3,3
rsVote.AddNew
rsVote("rIntBbsID")=IntArticleManageID
rsVote("rVoteChoice")=Vote
rsVote("rVoteNum")=VoteNum
rsVote("rVoteType")=VoteType
rsVote("rVoteUser")=VoteUserNickName
rsVote("rVoteUserNickName")=VoteUserNickName
rsVote.Update
rsVote.Close
BackToURL="Board.asp?S="&Forum_ID
rsAdd.Close
%>
<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> 您所在的位置: <a href="../" onFocus="this.blur()">首页</a> >>
<a href="List.asp" onFocus="this.blur()">讨论组</a> >> <a href="List.asp?T=<%=Forum_TypeID%>" onFocus="this.blur()"><%=Forum_TypeName%></a>
>> <a href="Board.asp?S=<%=Forum_ID%>" onFocus="this.blur()"><%=Forum_Name%></a>
>> <font color="<%=Forum_NavFontColor%>">发起投票</font></td>
<td width="150"></td>
<td width="18">
<div align="center"></div>
</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 + -