原帖由 518 于 2007-9-30 11:44:10 发表 callindexpost.asp中限止 |
老大就是老大,解决问题干脆麻利,先谢谢了
就是不知道改哪里。。。。。。
<% function indexpost() indexpost=indexpost+ "<table align=""center"" width="""&Application(BBSInfo&"MB")(1,0)&""" cellspacing=""0"" cellpadding=""0"" class=""table4"" style=""border-collapse: collapse""><tr align=""center"">" indexpost=indexpost+ "<td width=""25%"" class=""td1_title3"">最新公告</td><td width=""25%"" class=""td1_title3"">最新帖子</td><td width=""25%"" class=""td1_title3"">最新精华</td><td width=""25%"" class=""td1_title3"">一周热门</td></tr><tr>" ''''' indexpost=indexpost+ "<td class=""indexpost"">" If DataType=1 Then sql="select top 8 ID,BoardID,Subject,FileName,CreateHtml from LxTel_Topic where IsDel=0 and postsh=0 and gg=1 order by id desc " Else sql="select top 8 ID,BoardID,Subject,FileName,CreateHtml from LxTel_Topic where IsDel=false and postsh=false and gg=true order by id desc " End IF Set rs = Server.CreateObject("ADODB.Recordset") rs.open sql,conn,1,1 while not rs.eof if Application(BBSInfo&"sysinfo")(78,0)=true then indexpost=indexpost+ "·<a href=""post_"&rs("boardid")&"_"&rs("id")&"_1.html"" target=""_blank"">"&InterceptString(rs("subject"),36)&"</a><br>" else indexpost=indexpost+ "·<a href=""dispost.asp?boardid="&rs("boardid")&"&postid="&rs("id")&""" target=""_blank"">"&InterceptString(rs("subject"),30)&"</a><br>" end if rs.movenext wend rs.close set rs=nothing indexpost=indexpost+ "</td>" ''''' indexpost=indexpost+ "<td class=""indexpost"">" If DataType=1 Then sql="select top 8 ID,BoardID,Subject,FileName,CreateHtml from LxTel_Topic where IsDel=0 and postsh=0 order by id desc " Else sql="select top 8 ID,BoardID,Subject,FileName,CreateHtml from LxTel_Topic where IsDel=false and postsh=false order by id desc " End IF Set rs = Server.CreateObject("ADODB.Recordset") rs.open sql,conn,1,1 while not rs.eof if Application(BBSInfo&"sysinfo")(78,0)=true then indexpost=indexpost+ "·<a href=""post_"&rs("boardid")&"_"&rs("id")&"_1.html"" target=""_blank"">"&InterceptString(rs("subject"),36)&"</a><br>" else indexpost=indexpost+ "·<a href=""dispost.asp?boardid="&rs("boardid")&"&postid="&rs("id")&""" target=""_blank"">"&InterceptString(rs("subject"),30)&"</a><br>" end if rs.movenext wend rs.close set rs=nothing indexpost=indexpost+ "</td>" ''''' indexpost=indexpost+ "<td class=""indexpost"">" If DataType=1 Then sql="select top 8 ID,BoardID,Subject,FileName,CreateHtml from LxTel_Topic where IsDel=0 and postsh=0 and isbest=1 order by id desc " Else sql="select top 8 ID,BoardID,Subject,FileName,CreateHtml from LxTel_Topic where IsDel=false and postsh=false and isbest=true order by id desc " End IF Set rs = Server.CreateObject("ADODB.Recordset") rs.open sql,conn,1,1 while not rs.eof if Application(BBSInfo&"sysinfo")(78,0)=true then indexpost=indexpost+ "·<a href=""post_"&rs("boardid")&"_"&rs("id")&"_1.html"" target=""_blank"">"&InterceptString(rs("subject"),36)&"</a><br>" else indexpost=indexpost+ "·<a href=""dispost.asp?boardid="&rs("boardid")&"&postid="&rs("id")&""" target=""_blank"">"&InterceptString(rs("subject"),30)&"</a><br>" end if rs.movenext wend rs.close set rs=nothing indexpost=indexpost+ "</td>" ''''' indexpost=indexpost+ "<td class=""indexpost"">" If DataType=1 Then sql="select top 8 ID,BoardID,Subject,FileName,CreateHtml from LxTel_Topic where IsDel=0 and postsh=0 and datediff(""d"",PostTime,'"&date()&"')<7 order by hits desc " Else sql="select top 8 ID,BoardID,Subject,FileName,CreateHtml from LxTel_Topic where IsDel=false and postsh=false and datediff(""d"",PostTime,'"&date()&"')<7 order by hits desc " End IF Set rs = Server.CreateObject("ADODB.Recordset") rs.open sql,conn,1,1 while not rs.eof if Application(BBSInfo&"sysinfo")(78,0)=true then indexpost=indexpost+ "·<a href=""post_"&rs("boardid")&"_"&rs("id")&"_1.html"" target=""_blank"">"&InterceptString(rs("subject"),36)&"</a><br>" else indexpost=indexpost+ "·<a href=""dispost.asp?boardid="&rs("boardid")&"&postid="&rs("id")&""" target=""_blank"">"&InterceptString(rs("subject"),30)&"</a><br>" end if rs.movenext wend rs.close set rs=nothing indexpost=indexpost+ "</td>" indexpost=indexpost+ "</tr></table>" end function %>
|