www.gusucode.com > 仿MOP对开式论坛程序 1.0源码程序 > tooladd.asp

    <%@language="VBScript"%>
<!--#include file="title.asp"-->
<%
contents=contents &"<title>道具预置-"& caption &"</title>"&_
"</head>"&_
"<body>"&_
""&_
"<table border=""0"" cellpadding=""0"" cellspacing=""0"" width=""100%"" class=""tdc"">"
if bbsadmin>4 then
Dim toolname,amount
toolname=Request.Form("toolname")
gbmaduser=Request.Form("username")
amount=Request.Form("amount")
if IsNumeric(amount) then
amount=Abs(Clng(amount))
else
amount=0
end if
contents=contents &"<tr class=""toptr""><td class=""tdc"" height=""20"" background="""& theme &"02.gif"">道具预置</td></tr>"&_
"<form name=""tooladd"" method=""post"" action=""tooladd.asp"">"&_
"<tr class=""tds""><td>"
if gbmaduser<>"" and toolname<>"" and amount>0 then
rs.Open "tools Where toolname='"& toolname &"' and gbmaduser='"& gbmaduser &"'",conn,1,3
if rs.Eof then
rs.AddNew
rs("gbmaduser")=gbmaduser
rs("toolname")=toolname
rs("amount")=amount
else
rs("amount")=rs("amount")+amount
end if
rs.Update
rs.Close
contents=contents &" 成功给予用户 "& gbmaduser &" 道具:"& toolname &" "& amount &" 个。<br><a href=""JavaScript:history.back();"">返回道具预置</a>。"
else
contents=contents &"尽量不要使用此方法给予道具,在浏览帖子时已经能随机获取道具了,尽量让市场宏观调控,当发行新道具时在使用吧。<br>注意请勿填错道具名称和用户名,否则将造成不可预知错误。<br>"&_
"给予用户:<input name=""username"" type=""text"" maxlength=""255"" size=""20"" class=""iptwin""><br>"&_
"道具名称:<input name=""toolname"" type=""text"" maxlength=""255"" size=""20"" class=""iptwin""><br>"&_
"道具数量:<input name=""amount"" type=""text"" maxlength=""5"" size=""5"" class=""iptwin""> <input type=""submit"" value=""提交"" class=""out"" onmouseover=""this.className='over'"" onmouseout=""this.className='out'"">"
end if
contents=contents &"</td></tr>"&_
"</form>"
else
call connclose
Response.Redirect "login.asp"
end if
contents=contents &"</table>"&_
""
%>
<!--#include file="bottom.asp"-->