[此贴子已经被作者于2004-11-18 10:09:14编辑过]
<%
strSQL="select top 4 BigClassID,SmallClassID,SmallClassName,NewsID,SpecialID,Title from viewname where bigclassid=28 order by newsid desc " Set rsMessage = Server.CreateObject("ADODB.RecordSet") rsMessage.open strSQL,conn,adOpenForwardOnly,adLockReadOnly Do While not rsMessage.EOF bigClassID = rsMessage("BigClassID") %> <tr> <td width="22%" height="20" class="a">[<a href="smallclass.asp?bigclassid=28&smallclassid=<%=rsMessage("SmallClassID")%>" target="_blank"><font color="#006600"><%=left(rsMessage("SmallClassName"),4)%></font></a>]</td> <td width="70%" class="a"> <%If Session("g_UserPower")<>"1" AND (bigClassID="28" ) Then%> <a class="white_bg" title="<%=Server.HTMLEncode(rsMessage("Title"))%>" href="javascript:showDetail()"> <%ELse%><a class="white_bg" href="ReadNews.asp?NewsID=<%=rsMessage("NewsID")%>&BigClassID=28&SmallClassID=<%=rsMessage("SmallClassID")%>&SpecialID=<%=rsMessage("SpecialID")%>" target=_blank title="<%=Server.HTMLEncode(rsMessage("Title"))%> "> <%end if%> <%=Server.HTMLEncode(Left(rsMessage("Title"),17))%> </a> <img src="Images/anyuanWeb/blank.gif" width="1" height="9"> </td> </tr> <% rsMessage.MoveNext Loop rsMessage.Close() Set rsMessage = Nothing %>