📄 change4.asp
字号:
<!--#include file="conn.asp"-->
<!--#include file="inc/config.asp"-->
<%
dim jf
jf=CheckSql(request("jf"))
CheckSqlnum(jf)
if jf="" then
response.Redirect "user_index.asp"
response.End
end if
sc=int(jf/PointtoAcdCount)
%>
<%dim UserID,UserName
UserID=session("UserID")
UserName=session("UserName")
If UserName="" or UserID="" or IsNull(WordID) Then
Response.Write ("<script>alert(' 操作错误 \n\n 可能您还没有登陆或者登陆超时 \n\n 如果您没有成为会员请先进行会员注册 \n\n 如果您已经是注册会员请重新登陆 ');location.href='userlog_login.asp';</script>")
Response.End
End If
set rsu=server.createobject("adodb.recordset")
sql="select LockUser from [User] where ID="&UserID&""
rsu.open sql,conn,1,1
if rsu.eof and rsu.bof then
Response.Write ("<script>alert(' 操作错误!\n\n 用户不存在。');history.back();</script>")
Response.end
End If
if rsu("LockUser")=1 then
Response.Write ("<script>alert(' 操作错误!\n\n 用户被锁定。');history.back();</script>")
Response.end
End If
rsu.close
set rsu=nothing
%>
<%
set rs3=server.CreateObject("adodb.recordset")
sql3="select userAcdCount,AcdCount,UserPoint from [User] where ID="&UserID&""
rs3.open sql3,conn,1,3
if rs3("UserPoint")<int(jf) then
response.write "<script>alert('对不起,您填写的积分太高!');location.href='user_index.asp';</script>"
Response.end
end if
if rs3("UserPoint")<PointtoAcdCount then
response.write "<script>alert('对不起,您的积分低于"&PointtoAcdCount&"分!');location.href='user_index.asp';</script>"
Response.end
elseif request("jf")<PointtoAcdCount then
response.write "<script>alert('对不起,您填写的积分低于"&PointtoAcdCount&"分!');location.href='user_index.asp';</script>"
Response.end
else
rs3("userAcdCount")=rs3("userAcdCount")+sc
rs3("AcdCount")=rs3("AcdCount")+sc*1
rs3("UserPoint")=rs3("UserPoint")-(sc*PointtoAcdCount)
rs3.update
rs3.close
set rs3=nothing
response.write "<script>alert('已成功将 "&sc*PointtoAcdCount&" 积分转换为 "&sc*1&" 张广告票!');location.href='user_index.asp';</script>"
Response.end
end if
%>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -