📄 news_zt.asp
字号:
<!--#include file = admin_conn.asp -->
<!--#include file = admin/language.asp -->
<!--#include file = admin/titleb.asp -->
<%
ztid=trim(Request("ztid"))
if (not isNumeric(ztid)) then
Response.Write "<Script Language=JavaScript>alert('ID参数错误或有非法字符或没指定参数.');location.href='/';</Script>"
response.end
end if
set rs = Server.CreateObject("ADODB.RecordSet")
rs.Open "select * from [Newszt] where ID="&ZTID&" order by id desc",conn,1,1
if rs.recordcount<>0 then
ZTtitle=rs("title")
ZTmb=rs("mb")
zticon=rs("icon")
end if
rs.close:set rs=nothing
function newslist()
n=trim(request("n"))
list=trim(request("list"))
more=trim(request("more"))
lmname=trim(Request("lmname"))
if lmname="" then lmname=0
if n="" then n=40
n=int(n)
line=trim(request("line"))
if line="" then line=10
if list="" then list=10
if more="" then more=1
if openwindow="0" then
openwindow=" target=_top "
else
openwindow=" target=_blank "
end if
lm=trim(request("lm"))
lm2=trim(request("lm2"))
if lm="" then lm=lm2
if lm2="" then lm2=lm
word=trim(request("word"))
sql= "select * from news where title<>'' and sh=1 and ztid="&ztid&" "
sql=sql & " order by ontop desc , id desc"
%>
<div align="center">
<table border="0" cellpadding="0" cellspacing="0" width="100%">
<%
Set rs = Server.CreateObject("ADODB.RecordSet")
rs.Open sql,conn,1,1
if rs.recordcount<>0 then
page=int(request.QueryString ("page"))
rs.PageSize=5
pagecount=rs.pagesize
if page<=0 then page=1
if request.QueryString("page")="" then page=1
rs.AbsolutePage=page
for i=1 to pagecount
%>
<tr>
<td align=center style='line-height:<%=line%>pt'>
<%
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")
if rs("titlecolor")="默认颜色" or rs("titlecolor")="" then
fontcolor=rs2("fontcolor")
else
fontcolor=rs("titlecolor")
end if
%>
<%=zticon%></td><td align=left style='line-height:<%=moreline%>pt'><%if lmname="1" then response.write "[<a href="&list_html_url(Id)&">"&lm&"</a>] "%><a href=<%=fun_html_url(rs("id"))%> <%=openwindow%>><font color="<%=trim(fontcolor)%>"><%=titleb(rs("title"),n)%></font></a>
<font color=999999>
<%
if newshit="1" then response.write "阅读:"&rs("hit")
if trim(rs("pic"))<>"" and pic="1" then Response.Write "[图]"
%>
</td><td>
<%
if newstime="1" then response.write "("&formatdatetime(rs("time"),1)&")"
%>
</font>
</td></tr>
<%
rs.movenext
if rs.eof then exit for
next
else
response.write "<center><BR><BR><BR>无记录<BR><BR><BR><BR>"
end if
%>
</table><BR><center>
<%
if rs.recordcount<>0 then
if page>1 then%>
<a href='<%=request.servervariables("URL")%>?ztid=<%=ztid%>&page=1&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"))%>'>首页</a>
<a href='<%=request.servervariables("URL")%>?ztid=<%=ztid%>&page=<%=page-1%>&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"))%>'>上一页</a>
<%end if%>
<%if page<rs.pagecount then%>
<a href='<%=request.servervariables("URL")%>?ztid=<%=ztid%>&page=<%=page+1%>&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"))%>'>下一页</a>
<a href='<%=request.servervariables("URL")%>?ztid=<%=ztid%>&page=<%=rs.pagecount%>&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"))%>'>尾页</a>
<%end if%>
共<%=rs.recordcount%>条 每页显示<%=pagecount%>条 第<%=page%>页 共<%=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")%>?ztid=<%=ztid%>&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>
</p>
<%end if
end function
Set rs4 = Server.CreateObject("ADODB.RecordSet")
rs4.Open "select * from [config]",conn,1,1
if rs4.recordcount<>0 then
top=rs4("top")
down=rs4("down")
ztmb=replace(ztmb,"$$通用页头$$",top)
ztmb=replace(ztmb,"$$通用页尾$$",down)
rs4.close
set rs4=nothing
end if
root_path=finddir(request.servervariables("URL")) '取出系统程序的工作目录.
ztmb=replace(ztmb,"$$网站目录$$",root_path)
ztmb=replace(ztmb,"$$专题名$$",ZTtitle)
ztmb=replace(ztmb,"$$ZTID$$",ZTID)
if instr(ztmb,"$$列表$$")<>0 then
nr=split(ztmb,"$$列表$$")
response.write nr(0)
Response.Write newslist()
Response.Write nr(1)
else
Response.Write "模版代码不正确,没有找到“$$列表$$”,不知道应该显示在哪里?"
end if
conn.close:set conn=nothing
%>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -