📄 review_save.asp
字号:
<!--#include file="conn.asp"-->
<!--#include file="admin/config.asp"-->
<!--#include file="admin/inc/char.asp"-->
<!--#include file="chkmember.asp"-->
<%dim rs,sql,id,MyName,Content
id=CInt(Request.QueryString("id"))
MyName=Trim(Request.Form("MyName"))
Content=Trim(Request.Form("Content"))
dim errmsg,founderr
founderr=false
if SiteSetting(8)="yes" and SiteSetting(6)="no" and chkmember=false then
founderr=true
errmsg=errmsg+"<li>只有会员才能发表评论!</li>"
end if
if MyName="" then
founderr=true
errmsg=errmsg+"<li>请填写您的姓名</li>"
elseif strlen(Myname)>10 then
founderr=true
errmsg=errmsg+"<li>姓名不能大于10个字符</li>"
end if
if Content="" then
founderr=true
errmsg=errmsg+"<li>请填写评论内容</li>"
elseif strlen(Content)>100 then
founderr=true
errmsg=errmsg+"<li>评论内容不能大于100个字符</li>"
end if
'if Email<>"" and IsValidEmail(Email)=false then
'founderr=true
'errmsg=errmsg+"<li>您的Email地址不正确</li>"
'end if
if founderr=false then
set rs=server.createobject("ADODB.RecordSet")
sql="select * from Review"
rs.open sql,conn,1,3
rs.addnew
rs("SoftID")=id
rs("MyName")=MyName
rs("Content")=Content
rs("DateTime")=now()
rs.update
rs.close
set rs=nothing
conn.close
set conn=nothing
dim gourl,msg
gourl=request.ServerVariables("HTTP_REFERER")
msg="您的评论提交成功!"
call ok()
else
call error()
end if
%>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -