📄 news_list.asp
字号:
<style>
}
.pagesnow {
FONT-SIZE: 14px; COLOR: #ff6600; TEXT-DECORATION: none
}
.pagesinfo {
FONT-SIZE: 12px; COLOR: #555555
}
.pages {
FONT-SIZE: 14px; COLOR: #555555; TEXT-DECORATION: none
}
</style>
<%
function newslist(lm_id,ll,tt,lmname,openwindow,icon,copen,ccount,ccolor,csize,tbold,tface,tcolor,tsize,moreline)
'lmid=trim(request("lm"))
'lm2=trim(request("lm2"))
'if lm="" then lm=lm2
'if lm2="" then lm2=lm
'n=trim(request("n"))
'list=trim(request("list"))
'hot=trim(request("hot"))
'tj=trim(request("tj"))
'more=trim(request("more"))
if lmname="" then lmname=0
'if n="" then n=20
'if list="" then list=10
'if more="" then more=1
if openwindow="1" then
openwindow=" target=_blank "
else
openwindow=" target=_top "
end if
%>
<%
'lm=trim(request("lm"))
'lm2=trim(request("lm2"))
'if lm="" then lm=lm2
'if lm2="" then lm2=lm
'if (not isNumeric(lm)) then
'lm=0
'end if
'word=trim(request("word"))
sql= "select * from news where title<>'' and sh=1 "
if lm2<>"0" then
sql=sql&" and (lm='"&lm_id&"' or lm2='"&lm_id&"' or lm3='"&lm_id&"') "
end if
if tj="1" then
sql= sql & " and tj='推荐' "
end if
if hot="1" then
sql=sql & " order by hit desc , updat desc , id desc"
else
sql=sql & " order by ontop desc , updat desc , id desc"
end if
%>
<div id="newslist">
<%
Set rs = Server.CreateObject("ADODB.RecordSet")
rs.Open sql,conn,1,1
if rs.recordcount<>0 then
page=int(request.QueryString ("page"))
rs.PageSize=ll
pagecount=rs.pagesize
if page<=0 then page=1
if request.QueryString("page")="" then page=1
rs.AbsolutePage=page
for i=1 to pagecount
lm2=rs("lm3")
if lm2="0" or lm2="" then lm2=rs("lm2")
if lm2="0" or lm2="" then lm2=rs("lm")
sql2 = "select * from lm where id="&lm2
Set rs2 = Server.CreateObject("ADODB.RecordSet")
rs2.Open sql2,conn,1,1
lm=rs2("lm")&rs2("lm2")&rs2("lm3")
pic=rs2("pic")
%>
<ul style="padding-bottom:<%=moreline%>pt;">
<li class="title">
<span class="icon"><%=icon%></span>
<%if lmname="1" then response.write "<span class=lmname>[<a href="&list_html_url(rs2("id"))&">"&lm&"</a>]</span>"%>
<span class="news"><a href="<%=fun_html_url(rs("id"))%>" <%=openwindow%>><% if copen="1" then%><font color="<%=trim(tcolor)%>" style='font-size:<%=trim(tsize)%> pt;font-family:<%=trim(tface)%>;font-weight:<%=trim(tbold)%>'><%else%><font color="<%=trim(titlecolor)%>"><%end if%><%=titleb(rs("title"),tt)%></font></a></span>
<% if newshit="1" then response.write "<span class=hit>阅读:"&rs("hit")%></span>
<span class="pic"><% if trim(rs("pic"))<>"" and pic="1" then Response.Write "[图]" %></span>
</li>
<%if newstime="1" then %><li class=time><%= Format_Time(rs("time"),2) %></li><%end if%>
</ul>
<%
if copen="1" then
content=glhtml(rs("content"))
content=glhtml(titleb(content,cint(ccount)))%>
<ul>
<li class="cont"><font color=<%=trim(ccolor)%> style='font-size:<%=trim(csize)%> pt'><%=content%></font><a href="<%=fun_html_url(rs("id"))%>" <%=openwindow%>>【阅读全文】</a><li>
</ul>
<%
end if
rs.movenext
if rs.eof then exit for
next
else
response.write "<ul><li>对不起!没有相关内容</li><ul>"
end if
%>
</div>
<% if rs.recordcount<>0 then
page=int(page)
%>
<TABLE height=43 cellSpacing=0 cellPadding=4 width="100%" align=center background=<%config("path")%>images/showpage.gif border=0>
<TBODY>
<TR>
<TD class=pagesinfo width=300>共<%=rs.recordcount%>条 每页显示<%=pagecount%>条 共<%=rs.pagecount%>页
<script language="JavaScript">
<!--
function FP_jumpMenu(el,frm,sel) {//v1.0
var href=el.options[el.selectedIndex].value; if(sel) el.selectedIndex=0;
if('_new'==frm) open(href); else eval(frm+".location='"+href+"'");
}
// -->
</script>
<select size="1" onchange="FP_jumpMenu(this,'window',false)" id="id1" name="D1" style="font-size: 9pt; border-style: solid; border-width: 1px">
<%for i=1 to rs.pagecount%>
<option value="<%=request.servervariables("URL")%>?page=<%=i%>&word=<%=word%>&lm=<%=trim(request("lm"))%>&lm2=<%=trim(request("lm2"))%>&lmname=<%=trim(request("lmname"))%>&open=<%=trim(request("open"))%>&n=<%=trim(request("n"))%>&hot=<%=trim(request("hot"))%>&tj=<%=trim(request("tj"))%>" <%if page=i then response.write "selected"%>>第<%=i%>页</option>
<%next%>
</select>
</TD>
<TD class=pages align=right>
<TABLE cellSpacing=1>
<TBODY>
<TR>
<% if page>1 then%>
<TD><a onmouseover="javascript:idd1.src='<%config("path")%>images/2arrow_l_off.gif';" onmouseout="idd1.src='<%config("path")%>images/2arrow_l_on.gif'" href='<%=request.servervariables("URL")%>?page=1&lm=<%=trim(request("lm"))%>' title='首页' ><IMG id=idd1 src="images/2arrow_l_on.gif" border=0></A></TD>
<TD><A onmouseover="javascript:idd2.src='<%config("path")%>images/1arrow_l_off.gif';" onmouseout="idd2.src='<%config("path")%>images/1arrow_l_on.gif'" href='<%=request.servervariables("URL")%>?page=<%=page-1%>&lm=<%=trim(request("lm"))%>' title='上一页'><IMG id=idd2 src="images/1arrow_l_on.gif" border=0></A></TD>
<%else%>
<TD><IMG src="<%config("path")%>images/2arrow_l_off.gif" border=0></TD>
<TD><IMG src="<%config("path")%>images/1arrow_l_off.gif" border=0></TD>
<%end if%>
<TD width=3></TD>
<TD class=pagesnow><B>[<%=page%>]</B></TD>
<TD width=3></TD>
<%if page<rs.pagecount then%>
<TD><a onmouseover="javascript:idd3.src='<%config("path")%>images/1arrow_r_off.gif';" onmouseout="idd3.src='<%config("path")%>images/1arrow_r_on.gif'" href='<%=request.servervariables("URL")%>?page=<%=page+1%>&lm=<%=trim(request("lm"))%>' title='下一页'><IMG id=idd3 src="images/1arrow_r_on.gif" border=0></A></TD>
<TD><A onmouseover="javascript:idd4.src=<%config("path")%>'images/2arrow_r_off.gif';" onmouseout="idd4.src='<%config("path")%>images/2arrow_r_on.gif'" href='<%=request.servervariables("URL")%>?page=<%=rs.pagecount%>&lm=<%=trim(request("lm"))%>' title='尾页'><IMG id=idd4 src="images/2arrow_r_on.gif" border=0></A></TD>
<%else%>
<TD><IMG src="<%config("path")%>images/1arrow_r_off.gif" border=0></TD>
<TD><IMG src="<%config("path")%>images/2arrow_r_off.gif" border=0></TD>
<%end if%>
</TR>
</TBODY>
</TABLE>
</TD>
</TR>
</TBODY>
</TABLE>
<%end if%>
<%end function%>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -