% dim ID dim sqlAnnounce dim rsAnnounce dim AnnounceNum dim ChannelID ID=Trim(request("ID")) ChannelID=Trim(request("ChannelID")) sqlAnnounce="select * from Announce where IsSelected=True and (ChannelID=0 or ChannelID=" & ChannelID & ")" if ID<>"" then sqlAnnounce=sqlAnnounce & " and (ShowType=0 or ShowType=1) and ID=" & Clng(ID) else sqlAnnounce=sqlAnnounce & " and (ShowType=0 or ShowType=2)" end if sqlAnnounce=sqlAnnounce & " order by ID Desc" Set rsAnnounce= Server.CreateObject("ADODB.Recordset") rsAnnounce.open sqlAnnounce,conn,1,1 %>
![]() |
|||
| <%
if rsAnnounce.bof and rsAnnounce.eof then
response.write " 没有通告或找不到指定的通告 " else AnnounceNum=rsAnnounce.recordcount dim i do while not rsAnnounce.eof response.Write "" & rsAnnounce("title") & " " & ubbcode(dvHTMLEncode(rsAnnounce("Content"))) & " " & rsAnnounce("Author") & " |
|||