📄 refreshlistjs.asp
字号:
<% Domain=Request.ServerVariables("SERVER_NAME")
gFilePath=Request.ServerVariables("PATH_INFO")
gFilePath=lcase(left(gFilePath,instrRev(gFilePath,"/")))
CountN=len(gFilePath)
gFilePath=lcase(left(gFilePath,CountN-1))
gFilePath=lcase(left(gFilePath,instrRev(gFilePath,"/")))
AllPath="http://"+Domain&gfilepath
%>
<!--#include file="mdb_path_info.asp"-->
<%
tid=request("tid")
set rs=server.CreateObject("ADODB.RecordSet")
rs.open "select * from infotype where id="&tid,conn,1,1
if not rs.eof then
jschalen=rs("jschalen")
jssort=rs("jssort")
jsshu=rs("jsshu") '每个分类显示最新文章数
ts=rs("ts")
TN=split(rs("tname"),"|")
TI=split(rs("ts"), ",")
for i = 0 to ubound(TN)-1
if i=ubound(TN)-2 and ubound(TN)>1 then
TTY_id=TI(i)
TTY_name=TN(i)
end if
all_type_top_id=TI(i)
all_type_name=TN(i)
thistype=thistype & "-> <a href=""../infosort/c_"&TI(i)&"_1.htm"">"&TN(i)&"</a>"
thistitle=thistitle & " - "&TN(i)&""
next
end if
rs.close
sql="select * from infotype where ts like '"&ts&"%'"
rs.open sql,conn,1,1
if not rs.eof then
do while not rs.eof
sqqq=sqqq& ""&rs("id")&", "
rs.MoveNext
loop
end if
rs.close
set fs=server.CreateObject("Scripting.FileSystemObject")
FilePath=server.MapPath("../infosortjs/"&tid&".js")
set JSFile=fs.CreateTextFile(FilePath)
sql="select * from info where tid in("&sqqq&") order by date desc"
rs.open sql,conn,1,1
if rs.eof then
Txtop="·还没有文章"
JSFile.writeline("document.write(" & chr(34) & ""&Txtop&"" & chr(34) & ")")
else
do while not rs.eof
fileming=year(rs("date"))&month(rs("date"))&day(rs("date"))&hour(rs("date"))&minute(rs("date"))&second(rs("date"))
if instr(rs("Title"),"<font")>0 then
jschalen1=jschalen+20
if len(rs("Title"))>jschalen1 then
titlex=left(rs("Title"),jschalen1)&"</font>"&"..."
else
titlex=rs("Title")&"</font>"
end if
else
if len(rs("Title"))>jschalen then
titlex=left(rs("Title"),jschalen)&"..."
else
titlex=rs("Title")
end if
end if
h=h+1
if rs("dj")=6 then
if jssort="1" then
set rs_type=server.CreateObject("ADODB.RecordSet")
rs_type.open "select * from infotype where id="&rs("tid"),conn,1,1
if not rs_type.EOF then
TN=split(rs_type("tname"),"|")
Txtop="[<a href=../infosort/c_"&rs("tid")&"_1.htm>"&TN(ubound(TN)-1)&"</a>]<a href="&AllPath&"info/"&fileming&"-1.htm>"&titlex&"</a><br>"
end if
rs_type.close
end if
if jssort="2" then
Txtop="·<a href="&AllPath&"info/"&fileming&"-1.htm>"&titlex&"</a><br>"
end if
else
if jssort="1" then
set rs_type=server.CreateObject("ADODB.RecordSet")
rs_type.open "select * from infotype where id="&rs("tid"),conn,1,1
if not rs_type.EOF then
TN=split(rs_type("tname"),"|")
Txtop="[<a href=../infosort/c_"&rs("tid")&"_1.htm>"&TN(ubound(TN)-1)&"</a>]<a href="&AllPath&"info/shownews.asp?id="&rs("id")&">"&titlex&"</a><br>"
end if
rs_type.close
end if
if jssort="2" then
Txtop="·<a href="&AllPath&"info/shownews.asp?id="&rs("id")&">"&titlex&"</a><br>"
end if
end if
JSFile.writeline("document.write(" & chr(34) & ""&Txtop&"" & chr(34) & ")")
if h>=jsshu then exit do
rs.movenext
loop
h=0
end if
rs.close
set rs=nothing
conn.close
set conn=nothing%>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -