vote.asp

来自「欢迎使用《雨点下载系统 2.0》! 本系统仅提供给个人网站免费使用」· ASP 代码 · 共 46 行

ASP
46
字号
<!--#include file="conn.asp"-->
<!--#include file="admin/config.asp"-->
<!--#include file="admin/inc/char.asp"-->
<!--#include file="chkmember.asp"-->
<%
dim point,id
point=CInt(Request.Form("point"))
id=CInt(Request.QueryString("id"))
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 request.cookies("vote")(""&id&"")=cstr(id) then
	founderr=true
	errmsg=errmsg+"<li>对不起,您已经打过分了!</li>"
elseif point=0 then
	founderr=true
	errmsg=errmsg+"<li>对不起,请您选择分数!</li>"	
end if

if founderr=false then
	dim points,newpoint,rs,sql
	sql="select Point from Software where ID="&id
	set rs=conn.execute(sql)
	points=Split(rs(0),",")
	points(point-1)=CStr(points(point-1)+1)
	newpoint=points(0)&","&points(1)&","&points(2)&","&points(3)&","&points(4)
	set rs=nothing
	sql="update Software set Point='"&newpoint&"' where ID="&id
	conn.execute(sql)
	dim gourl,msg
	gourl=request.ServerVariables("HTTP_REFERER")
	msg="感谢您作出公正的评分!"
	call ok()
	response.cookies("vote")(""&id&"")=cstr(id)
else
	call error()
end if

conn.close
set conn=nothing
%>

⌨️ 快捷键说明

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