📄 js.asp
字号:
<!--#include file="conn.asp"-->
<!--#include file="common.asp"-->
<%
dim path,classID,NclassID,showNclass,kind,dateNum,maxLen,listNum,bullet
dim hitColor,new_color,old_color
topType = Request("topType")
if Request("ClassNo") <> "" then
ClassNo = split(Request("ClassNo"),"|")
Classid = ClassNo(1)
Nclassid = ClassNo(0)
end if
num = request.querystring("num")
Session("maxlen") = Request("maxlen")
maxlens = Session("maxlen")
showdate = Request("showdate")
showhits = Request("showhits")
showClass = Request("showClass")
bullet="·" '标题前的图片或符号
hitColor="#FF0000" '点击数的颜色
new_color="#FF0000" '新文章日期的颜色
old_color="#999999" '旧文章日期的颜色
dim rs,sql,str,topic
Path="http://"&request.servervariables("server_name")&replace(request.servervariables("script_name"),"js.asp","")
set rs=server.createObject("Adodb.recordset")
sql = "Select top "& num &" s_id,title,classid,Nclassid,Intime,hits from 2s_list "
if NclassID<>"" then
sql=sql&" where sxs = 0 and NclassID="&NclassID
elseif classID<>"" then
sql=sql&" where sxs = 0 and classID="&classID
end if
select case topType
case "new" sql=sql&" order by s_id desc,s_id"
case "hot" sql=sql&" order by hits desc,s_id"
'case "2" sql=sql&" DATEDIFF('d',intime,Now())<="&dateNum&" order by hits desc,s_id"
end select
set rs = conn.execute(sql)
if rs.bof and rs.eof then
str=str+" "
else
rs.movefirst
do while not rs.eof
' topic=Qcdn.GetString(rs("title"),15)
topic=Qcdn.InterceptString(rs("title"),15)
topic=replace(server.HTMLencode(topic)," "," ")
topic=replace(topic,"'"," ")
str=str+bullet
if showClass = 1 then
str=str+"[<a href='sechand.asp?id="&rs("classid")&"&classid="& rs("Nclassid") &"'>"&Qcdn.Classlist2s(rs("classid"))&"</a>]"
end if
str=str+"<a href='show.asp?Unid="+Cstr(rs("s_id"))+"&id="&rs("classid")&"' target='_blank' title='"&replace(replace(server.HTMLencode(rs("title"))," "," "),"'"," ")&"') >"+Topic+"</a>"
if showdate = 1 then
str=str & "<font color="
if rs("intime")>=date then
str=str & new_color
else
str=str & old_color
end if
str=str &">" & Month(rs("intime"))&"月"&Day(rs("intime"))&"日</font>"
end if
if showhits = 1 then
str=str&"(<font color="& hitcolor &">"& rs("hits") &"</font>)<br>"
else
str=str&"<br>"
end if
rs.moveNext
loop
end if
rs.close : conn.close
set rs=nothing : set conn=nothing
response.write "document.write ("&Chr(34)&str&Chr(34)&");"
%>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -