📄 manhbdelok.asp
字号:
<%@ LANGUAGE=VBScript.Encode codepage ="936" %>
<%
On Error Resume Next
Response.Buffer = True
Response.Expires = 0
Response.CacheControl = "Private"
Sub Msg (v)
Response.Write "<html><head><meta http-equiv='Content-Type' content='text/html; charset=gb2312'><meta http-equiv='pragma' content='no-cache'><style type=text/css>body{color:black;font-family:宋体;font-size:9pt;background-color:buttonface;border-bottom:medium none;border-left:medium none;border-right:medium none;border-top:medium none;padding-bottom:0px;padding-left:0px;padding-right:0px;padding-top:0px}</style></head><body leftMargin=0 topMargin=0 marginheight=0 marginwidth=0>"
Response.Write "<script Language=JavaScript>alert('" & v & "');history.go(-1);</script></body></html>"
Response.End
End Sub
nickname=Session("hxf_u_nickname")
grade=Int(Session("hxf_u_grade"))
inthechat=Session("hxf_u_inthechat")
userip=Request.ServerVariables("REMOTE_ADDR")
If nickname = "" Then Msg "不在聊天室中,不能罚款。"
If inthechat<>"1" Then Msg "不在聊天室中,不能罚款。"
If inthechat<>"1" and nickname<>"聊天室管理员" Then Msg "不在聊天室中,不能罚款。"
If grade <> 12 Then
qx = Split(Application("wsaxhxf_c_grade" & grade), "{]")
If qx(22) <> "1" Then Msg "无权执行此操作。"
End If
f1 = Trim(Request.Form("f1"))
f2 = Trim(Request.Form("f2"))
f3 = Trim(Request.Form("f3"))
f4 = Request.Form("f4")
If f1 = "" Or f2 = "" Or f4 = "" Then Msg "请将内容填写完整。"
If Len(f1) > 10 Or Len(f4) > 8 Then Msg "格式有误。"
If f1 = nickname Then Msg "不能对自己执行罚款操作。"
If Not IsNumeric(f4) Then Msg "罚款金额必须为大于 50 的正整数。"
f4 = Int(f4)
If f4 < 50 Then Msg "罚款金额必须为大于 50 的正整数。"
If f3 <> "no" Then f3 = "yes"
If Len(f2) > 50 Then f2 = Left(f2, 50)
f2 = Replace(f2, Chr(13) & Chr(10), "")
f2 = Server.HTMLEncode(f2)
f2 = Replace(f2, "\", "\\")
f2 = Replace(f2, "/", "\/")
f2 = Replace(f2, "'", "\'")
f2 = Replace(f2, Chr(34), "\" & Chr(34))
f2 = Replace(f2, "'", "''")
lowmanagehigh = Application("wsaxhxf_c_lowmanagehigh")
Set conn=Server.CreateObject("ADODB.CONNECTION")
Set rs=Server.CreateObject("ADODB.RecordSet")
connstr=Application("wsaxhg_connstr")
conn.open connstr
sql="SELECT username,grade,hb FROM reginfo WHERE kill='0' and username = '" & f1 & "'"
rs.Open sql, conn, 1, 3
If rs.Eof And rs.Bof Then
rs.Close
conn.Close
Set rs = Nothing
Set conn = Nothing
Msg "用户名不存在,不能罚款!"
End If
f1 = rs("username")
jb = Int(rs("grade"))
hb = Int(rs("hb"))
n = Year(Date)
y = Month(Date)
r = Day(Date)
s = Hour(Time())
f = Minute(Time())
m = Second(Time())
If Len(y) = 1 Then y = "0" & y
If Len(r) = 1 Then r = "0" & r
If Len(s) = 1 Then s = "0" & s
If Len(f) = 1 Then f = "0" & f
If Len(m) = 1 Then m = "0" & m
sjsfm = s & ":" & f & ":" & m
sj = n & "-" & y & "-" & r & " " & sjsfm
If lowmanagehigh <> 1 And nickname <> "聊天室管理员" And jb >= grade Then
rs.Close
conn.Close
Set rs = Nothing
Set conn = Nothing
Msg "对方的级别不比你低,操作不能完成!"
End If
If hb >= f4 Then
f1upmoney = f4
Else
f1upmoney = hb
If f1upmoney < 0 Then f1upmoney = 0
End If
hb = hb - f4
IF hb < 0 Then hb = 0
rs("hb") = hb
rs.Update
rs.Close
If f1upmoney > 0 Then
sql = "SELECT value FROM system WHERE name='chatmoney'"
rs.open sql, conn, 1, 3
chatmoney = Int(rs("value")) + f1upmoney
rs("value") = chatmoney
rs.Update
rs.Close
Application.Lock
Application("wsaxhxf_c_chatmoney") = chatmoney
Application.UnLock
Else
chatmoney = Application("wsaxhxf_c_chatmoney")
End If
If f3 = "yes" Then
sql = "INSERT INTO logs (type, logtime, name, ip, opertion) VALUES ('1', '" & sj & "', '" & nickname & "', '" & userip & "', '扣除 <font color=red>" & f1 & "</font> 的货币:<font color=red>" & f4 & "¥</font> 上缴资金库。<br><font class=yy>【原因:" & f2 & "】</font>')"
conn.Execute sql
End If
conn.Close
Set rs = Nothing
Set conn = Nothing
vshow = "■ 操作完成 ■\n\n已经扣除 [" & f1 & "] 的货币 [" & f4 & "¥] 上缴资金库。\n\n当前聊天室资金库剩余:" & chatmoney & "¥。"
Response.Write "<html><head><meta http-equiv='Content-Type' content='text/html; charset=gb2312'><meta http-equiv='pragma' content='no-cache'><style type=text/css>body{color:black;font-family:宋体;font-size:9pt;background-color:buttonface;border-bottom:medium none;border-left:medium none;border-right:medium none;border-top:medium none;padding-bottom:0px;padding-left:0px;padding-right:0px;padding-top:0px}</style></head><body leftMargin=0 topMargin=0 marginheight=0 marginwidth=0>"
Response.Write "<script Language=JavaScript>alert('" & vshow & "');window.close();</script></body></html>"
Response.End
%>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -