<%dim TP,act
TP=request("TP")
if TP="1" then
dim num,book,gettxt
num=request("num")
st=request("st")
act=request("act")
if num="" or Isnumeric(num)=False then
Call Error("币数无效!")
end if
if st="" or Isnumeric(st)=False then
Call Error("选择类型出错!")
st=clng(st)
end if
if act<>"ok" then
if st=0 then
Response.Write "确定要发放"&num&getcent&"到所有版主?
"
else
Response.Write "确定要发放"&num&getcent&"到所有管理员?
"
end if
Response.write "是的,我决定了"
Response.write ""
Response.write ""
Response.write ""
Response.write ""
Response.write "
"
Response.Write "取消,我要返回"
Response.write "
"
Response.end
end if
if st=0 then
conn.execute("update Users Set myjb = myjb + "&abs(int(num))&" where skey > 0")
else
conn.execute("update Users Set myjb = myjb + "&abs(int(num))&" where keys = 1")
end if
dim usid
set rs=Server.CreateObject("ADODB.Recordset")
if st=0 then
rs.open"select ID from users where skey>0 order by id desc",conn,1,1
else
rs.open"select * from users where keys=1 order by id desc",conn,1,1
end if
Do While Not rs.EOF
usid=rs("id")
call qfmsg
rs.MoveNext
Loop
rs.close
set rs=nothing
sub qfmsg
dim msgx,rsmsg
if st=0 then
msgx = "版主您好,您辛苦了!"
else
msgx = "管理员您好,您辛苦了!"
end if
msgx = msgx & "\您已获得本月工资"&num&getcent&",感谢您对"&waptitle&"的支持!"
set rsmsg=server.createobject("adodb.recordset")
rsmsg.open "select * from Guest",conn,1,2
rsmsg.addnew
rsmsg("sid") = usid
rsmsg("fid") = 0
rsmsg("fnr") = msgx
rsmsg.update
rsmsg.close
set rsmsg=Nothing
end sub
'==========系统消息==============
if st=0 then
Response.Write "发放"&num&getcent&"到所有版主成功!