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

📄 review_save.asp

📁 欢迎使用《雨点下载系统 2.0》! 本系统仅提供给个人网站免费使用
💻 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 + -