% Dim Action If Not BBS.Founduser Then BBS.GoToerr(10) IF SESSION(CacheName& "MyGradeInfo")(37)="0" Then BBS.GoToErr(67) Action=Lcase(Request.querystring("Action")) If Len(Action)>10 then BBS.GoToerr(1) Select Case Action Case"del" DelPlacard Case Else Placard() End Select BBS.Footer() Set BBS =Nothing Sub DelPlacard() Dim ID ID=BBS.Checknum(request.querystring("ID")) IF BBS.MyAdmin=7 Then BBS.execute("Delete From [Placard] where ID="&ID&" and Name='"&BBS.MyName&"'") Else BBS.execute("Delete From [Placard] where ID="&ID&"") End IF BBS.Cache.clean("Placard") BBS.NetLog "删除公告" Response.redirect "Placard.asp" End Sub Sub Placard() Dim Caption,Content,Temp,TmpBoardID,S,Title,Rs,ID If BBS.BoardID>0 Then BBS.CheckBoard() IF BBS.MyAdmin=7 And BBS.IsBoardAdmin=False Then BBS.GoToErr(68) ID=BBS.Checknum(request("ID")) BBS.Head"Placard.asp?Action=Say&BoardID="&BBS.BoardID,BBS.BoardName,"发布公告" Caption=BBS.Fun.Checkbad(BBS.Fun.GetStr("caption")) Content=BBS.Fun.Checkbad(BBS.Fun.GetStr("Content")) IF Caption="" And Content="" Then Title="发布公告" TmpBoardID=BBS.BoardID If ID<>0 Then Set Rs=BBS.execute("select BoardID,Caption,Content,AddTime,Name,hits from [Placard] where ID="&ID&"") IF Not rs.eof Then Title="编辑公告" TmpBoardID=Rs(0) Caption=Rs(1) Content=Rs(2) If BBS.MyAdmin=7 Then If Lcase(BBS.MyName)<>Lcase(Rs(4)) Then BBS.GotoErr(73) End If Else BBS.Gotoerr(69) End If End If S="
" BBS.ShowTable Title,S AdminPlacard() Else TmpBoardID=BBS.Checknum(request("BoardID")) IF len(Content)>16200 or Len(Caption)>250 Then BBS.GoToErr(18) If BBS.Fun.CheckIsEmpty(Content) Then BBS.GoToErr(50) If BBS.Info(60)="1" Then Content=BBS.Fun.Replacehtml(Content) Temp=BBS.Fun.UbbString(Content) If ID<>0 Then Title="编辑公告" BBS.Execute("update [Placard] Set Caption='"&Caption&"',Content='"&Content&"',BoardID="&TmpBoardID&",UbbString='"&Temp&"' where ID="&ID) Else BBS.execute("insert into[Placard](Caption,Content,AddTime,Name,BoardID,UbbString)values('"&Caption&"','"&Content&"','"&BBS.NowBbsTime&"','"&BBS.MyName&"',"&TmpBoardID&",'"&Temp&"')") Title="发布公告" End If Content="