下面是源代码,高手给看下
<%
dim sql
dim yie
dim lxid
dim lx
dim bm
dim rsPic
lx=Request.QueryString("lx")
lxid=Request.QueryString("lxid")
if Request.QueryString("yie")=null or Request.QueryString("yie")="" then
yie=1
else
yie=cint(Request.QueryString("yie"))
end if
%>
var issj; issj=true; function MM_preloadImages() { //v3.0 var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array(); var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++) if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}} } <%
call getdhlm(lx,lxid,true)
%>
</span></td>
</tr>
</table></td>
</tr>
</table></td>
</tr>
</table></td>
</tr>
</table> </td>
</tr>
</table>
<table width="768" border="0" cellpadding="0" cellspacing="0">
<tr>
<td align="center" valign="top">
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td height="8"></td>
</tr>
</table>
<table width="99%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td align="center" valign="top">
<table width="98%" border="0" cellspacing="0" cellpadding="0" id="tab1">
<tr>
<td height="47"><table width="98%" border="0" cellpadding="0" cellspacing="0">
<tr>
<td height="58" align="center" valign="top"><%
ms=15
dim lb
if Request.QueryString("lx")="1" then
lb="E_typeid"
end if
if Request.QueryString("lx")="2" then
lb="E_bigclassid"
end if
if Request.QueryString("lx")="3" then
lb="E_smallclassid"
end if
set ldrs=Server.CreateObject("ADODB.Recordset")
if yie=1 then
ldrs.open "select top " & ms & " * from EC_News where " & lb & "=" & lxid & " order by UpdateTime desc ,NewsID desc",conn,3,1
else
ldrs.open "select top " & ms & " * from EC_News where " & lb & "=" & lxid & " and NewsID not in ( select top " & ((cint(yie)-1)*ms) & " NewsID from EC_News where " & lb & "=" & id & " order by UpdateTime desc ,NewsID desc ) order by UpdateTime desc ,NewsID desc",conn,3,1
end if
if(ldrs.eof and ldrs.bof) then
%>
<script language='JavaScript' type="text/javascript">
issj=false;
</script>
<table width="100%" height="26" border="0" cellpadding="0" cellspacing="0" class="dh">
<tr>
<td width="6%" align="center" valign="middle"><img src="xin/xximg/2.gif" /></td>
<td width="94%" class="font2" align="left"><span class="black_link">暂时没有信息</span>........</td>
</tr>
</table>
<%
else
do while ldrs.eof=false
zz=ldrs.fields("Title")
if(len(zz)>50) then
zz=mid(zz,1,50) & ".."
end if
%>
<table width="100%" height="26" border="0" cellpadding="0" cellspacing="0" class="dh">
<tr>
<td width="6%" align="center" valign="middle"><img src="xin/xximg/2.gif" /></td>
<td width="94%" height="30" align="left" class="font4"><a class="font2" target="_blank" href="E_ReadNews.asp?NewsId=<%=ldrs.fields("NewsID")%>" title="<%=ldrs.fields("Title")%>"><font color="#000000"><%=zz%></font> </a> <%if lxid=54 or lxid=86 or lxid=87 then %><font class="hd"><%=" [" & month(ldrs("UpdateTime")) & "-" & day(ldrs("UpdateTime")) & "]"%></font><% end if %></td>
</tr>
</table>
<%
ldrs.movenext
loop
end if
ldrs.close
%></td>
</tr>
<tr>
<td height="33" align="center" valign="middle"><table width="98%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td> </td>
</tr>
</table>
<table width="96%" height="23" border="0" cellpadding="0" cellspacing="0">
<tr>
<td align="center" valign="middle"><%
ldrs.open "select count(*)as 数 from EC_News where " & lb & "=" & lxid ,conn,3,1
dim zs
zs=ldrs("数")
ldrs.close
dim ys
ys=((zs-1)/ms) +1
for i= 1 to ys
if i=yie then
Response.Write("<a href=""lx_list.asp?lx=" & Request.QueryString("lx") & "&lxid=" & lxid & "&yie=" & i & """ class=""ysab"">" & i & "</a>")
else
%>
&lxid=<%=lxid%>&yie=<%=i%>" class="ysaa"><%=i%>
<%
end if
next
%>
<%
if Request.QueryString("lx")="1" then
set rsPic=Server.CreateObject("ADODB.Recordset")
rsPic.open sql,conn,1,1
do while not rsPic.eof
%>
<%
rsPic.movenext
loop
rsPic.close
set rsPic=nothing
else
%>
<%
end if
%>
</td>
</tr>
</table></td>
</tr>
</table>
</td>
</tr>
</table></td>
<%
set ldrs=nothing
conn.close
set conn=nothing
%>