📄 savereview.asp
字号:
<!--#include file="HMconnection.asp"-->
<!--#include file="webconfig.asp"-->
<!--#include file="inc/articlechar.inc"-->
<link rel="stylesheet" href="style/style.css" type="text/css">
<body bgColor=#d6d3ce
style="BORDER-BOTTOM: 0px; BORDER-LEFT: 0px; BORDER-RIGHT: 0px; BORDER-TOP: 0px; MARGIN: 0px">
<%
if request.form("rvauthor")="" then%>
<script language="javascript">
alert ( "对不起,您可能忘了填上您的大名啦!");
history.go(-1);
</script>
<%response.end
end if
if trim(request.form("rvcontent"))="" then%>
<script language="javascript">
alert ("对不起,评论内容不能为空!");
history.go(-1);
</script>
<%response.end
end if
if len(request.form("rvcontent"))>800 then%>
<script language="javascript">
alert( "对不起,评论内容不能大于800个字节")
history.go(-1);
</script>
<%response.end
end if
dim rvauthor,rvemail,filmid,rvmail,reviewtitle
rvauthor=htmlencode2(request.form("rvauthor"))
rvemail=htmlencode2(request.form("rvemail"))
review=htmlencode2(request.form("rvcontent"))
filmid=request("filmID")
reviewtitle=request("rvname")
dim savrRS,savrSQL,user1RS
set savrRS=server.createobject("adodb.recordset")
savrSQL="select * from filmReview"
savrRS.open savrSQL,conn,1,3
set user1RS=server.createobject("adodb.recordset")
user1RS.open "select id from user where UserName='"&rvauthor&"'",conn,1,1
savrRS.addnew
savrRS("reviewName")=reviewtitle
savrRS("userName")=rvauthor
savrRS("movieID")=filmid
savrRS("reviewCont")=review
savrRS("userID")=user1RS("id")
savrRS("filmName")=trim(request("filmName"))
savrRS.update
user1RS.close
set user1RS=nothing
savrRS.close
set savrRS=noting
conn.execute "update film set ifReviews=true where id="&filmid
set conn=nothing
%>
<script language=vbscript>
msgbox "发表成功,谢谢你的参与!"
location.href="javascript:self.close()"
</script>
</body>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -