sub index_art(num,fontnum,classid,classyes,NewWindows) Response.Write "<TABLE width='100%' cellSpacing=0 cellPadding=0 align=center border=0>" & vbCrLf if classid=0 then sql="select top "&num&" * from art where passed=0 order by art_id DESC" else sql="select top "&num&" * from art where passed=0 and (cat_id="&classid&" or cat_id in(select cat_id from a_cat where sid="&classid&")) order by art_id DESC" end if set rs=server.createobject("adodb.recordset") rs.open sql,conn,1,1 do while not rs.eof dim nnn if NewWindows=True then nnn="target='_blank'" else nnn="" end if sql="select cat_id,cat_name from a_cat where cat_id="&rs("cat_id") set rscat=server.createobject("adodb.recordset") rscat.open sql,conn,1,1 Response.Write "<TR><TD height='22' class=table-xia>" if classyes=True then Response.Write "<a href='art_list.asp?cat_id="&rs("cat_id")&"'>『"&left(rscat("cat_name"),10)&"』</a>" else Response.Write ""&indexdot&"" end if Response.Write "<a href='showart.asp?art_id="&rs("art_id")&"' Title='文章标题:"&rs("art_title")&"
发表时间:"&rs("art_date")&"
阅读次数:"&rs("art_count")&"次
所属分类:"&rscat("cat_name")&"' "& nnn &">"&gotTopic(rs("art_title"),fontnum)&"</a>" & vbCrLf if rs("isimg")=1 then Response.Write "<img src='img/img.gif' alt='图片文章' align=absmiddle border=0>" & vbCrLf end if Response.Write "</TD><TD align=right class=table-xia>" & vbCrLf if DateDiff("h",rs("art_date"),now())<=24 then Response.Write "<FONT color=red>" Response.Write ""&Right("0"&month(rs("art_date")),2)&"/"&right("0"&day(rs("art_date")),2)&"</FONT>" & vbCrLf Response.Write "</TD></TR>" rscat.close set rscat=nothing rs.movenext loop if rs.eof and rs.bof then Response.Write "<TR><TD>暂时没有文章!</TD></TR>" end if rs.close set rs=nothing Response.Write "</TABLE>" & vbCrLf end sub
晕 不知道哪错了 首页文章调用不出来
|