www.gusucode.com > 仿MOP对开式论坛程序 1.0源码程序 > setimprison.asp
<%@Language="VBScript"%> <!--#include file="title.asp"--> <% Dim matter,cause,handler,endtime contents=contents &"<title>状态异动-"& caption &"</title>"&_ "</head>"&_ "<body>"&_ "<table border=""0"" cellpadding=""0"" cellspacing=""0"" width=""100%"">"&_ "<tr><td width=""5"" height=""15""><img border=""0"" src="""& theme &"01.gif""></td><td background="""& theme &"02.gif""> </td><td width=""14"" height=""15""><img border=""0"" src="""& theme &"03.gif""></td></tr>"&_ "</table>"&_ "<table border=""0"" cellpadding=""0"" cellspacing=""0"" width=""100%"" class=""tdc"">" if bbsadmin>3 then cause=Request.Form("cause") handler=Request.Form("username") if handler="" then handler=Request.QueryString("username") imprison=Request.Form("imprison") if IsNumeric(imprison) then imprison=Abs(Clng(imprison)) else imprison=7 end if endtime=Request.Form("endtime") if IsNumeric(endtime) then endtime=Abs(Clng(endtime)) else endtime=7 end if endtime=DateAdd("d",endtime,Now()) if imprison=0 then matter="" elseif imprison=1 then matter=",并设置为禁止发贴回帖至 "& endtime &"。" elseif imprison=2 then matter=",并设置为禁止使用道具至 "& endtime &"。" elseif imprison=3 then matter=",并设置为禁止发送密信至 "& endtime &"。" elseif imprison=4 then matter=",并设置为禁止发贴回帖和使用道具至 "& endtime &"。" elseif imprison=5 then matter=",并设置为禁止发贴回帖和发送密信至 "& endtime &"。" elseif imprison=6 then matter=",并设置为禁止使用道具和发送密信至 "& endtime &"。" elseif imprison=7 then matter=",并设置为禁止发贴回帖、使用道具和发送密信至 "& endtime &"。" elseif imprison=8 then matter="。" end if if matter<>"" and cause<>"" and handler<>"" then rs.Open "imprison Where gbmaduser='"& handler &"'",conn,1,3 if rs.Eof then rs.AddNew else if rs("imprison")=1 then matter="解除至"& rs("endtime") &"的禁止发贴回帖状态"& matter elseif rs("imprison")=2 then matter="解除至"& rs("endtime") &"的禁止使用道具状态"& matter elseif rs("imprison")=3 then matter="解除至"& rs("endtime") &"的禁止发送密信状态"& matter elseif rs("imprison")=4 then matter="解除至"& rs("endtime") &"的禁止发贴回帖和使用道具状态"& matter elseif rs("imprison")=5 then matter="解除至"& rs("endtime") &"的禁止发贴回帖和发送密信状态"& matter elseif rs("imprison")=6 then matter="解除至"& rs("endtime") &"的禁止使用道具和发送密信状态"& matter elseif rs("imprison")=7 then matter="解除至"& rs("endtime") &"的禁止发贴回帖、使用道具和发送密信状态"& matter end if end if if imprison=8 then rs.Delete else rs("imprison")=imprison rs("gbmaduser")=handler rs("endtime")=endtime rs.Update end if rs.Close rs.Open "report Where id=0",conn,1,3 rs.AddNew rs("gbmaduser")=handler rs("handler")=gbmaduser rs("posttime")=Now() rs("matter")=matter rs("cause")=cause rs.Update rs.Close contents=contents &"<tr class=""toptr""><td class=""tdc"" height=""20"" background="""& theme &"02.gif"" colspan=""3"">状态异动</td></tr>"&_ "<tr class=""tds""><td>异动报告设置完成,并将用户 "& handler &" 设置为:"& matter &_ "<br><a href=""user.asp?username="& handler &""">返回用户管理</a>。"&_ "</td></tr>" elseif handler<>"" and matter="" and cause="" then contents=contents &"<tr class=""toptr""><td class=""tdc"" height=""20"" background="""& theme &"02.gif"">解除状态</td></tr>"&_ "<form name=""setimprison"" onsubmit=""return ivalidinput();"" method=""post"" action=""setimprison.asp"">"&_ "<tr class=""tds""><td>"&_ "<script language=""JavaScript"">"&_ "function ivalidinput()"&_ "{"&_ "if (document.setimprison.cause.value.length==0){"&_ "alert(""请填写状态异动原因。"");"&_ "document.setimprison.cause.focus();"&_ "return false;"&_ "}"&_ "return true;"&_ "}"&_ "</script>"&_ "<input type=""hidden"" name=""imprison"" value=""8""><input type=""hidden"" name=""username"" value="""& handler &""">"&_ "解除"& handler &"的限制状态?<br>"&_ "解除原因:<input name=""cause"" type=""text"" maxlength=""255"" size=""40"" class=""iptwin"" value=""表现佳,提前解除!""> "&_ "<input type=""submit"" value=""提交"" class=""out"" onmouseover=""this.className='over'"" onmouseout=""this.className='out'"">"&_ "</td></tr>"&_ "</form>" elseif matter<>"" and handler<>"" and cause="" then contents=contents &"<tr class=""toptr""><td class=""tdc"" height=""20"" background="""& theme &"02.gif"">出错</td></tr><tr><td><br>你没有填写状态异动的原因,<a href=""JavaScript:history.back();"">返回重新输入后再试</a>。<br><br></td></tr>" else contents=contents &"<tr class=""toptr""><td class=""tdc"" height=""20"" background="""& theme &"02.gif"">出错</td></tr><tr><td><br>非法调用或者程序出错。<br>请确定你是通过正常方式进行操作,如果依旧出错,请<a href=""reporting.asp"">联系管理员报告错误</a>。<br><a href=""JavaScript:history.back();"">返回刚才的页面</a>。<br><br></td></tr>" end if else call connclose Response.Redirect "login.asp" end if contents=contents &"</table>"&_ "<table border=""0"" cellpadding=""0"" cellspacing=""0"" width=""100%"">"&_ "<tr><td width=""5"" height=""15""><img border=""0"" src="""& theme &"02.gif""></td><td background="""& theme &"02.gif""> </td><td width=""14"" height=""15""><img border=""0"" src="""& theme &"02.gif""></td></tr>"&_ "</table>" %> <!--#include file="bottom.asp"-->