?? js1.asp
字號:
<!--#include file="inc/conn.asp"-->
<%
dim path,class1,class2,showNclass,kind,dateNum,maxLen,listNum,bullet
dim hitColor,new_color,old_color
topType = Request("topType")
num = request.querystring("num")
maxlen = Request.querystring("maxlen")
showdate = Request("showdate")
showhot = Request("showhot")
showhit = Request("showhit")
Class1 = Request("Class1")
Class2 = Request("Class2")
bullet="·" '標(biāo)題前的圖片或符號
hitColor="#FF0000" '點(diǎn)擊數(shù)的顏色
new_color="#FF0000" '新文章日期的顏色
old_color="#999999" '舊文章日期的顏色
dim rsjs,sqljs,str,topic
src="" 'www.xj16300.cn/second
set rsjs=server.createObject("Adodb.recordset")
sqljs = "Select top "& num &" * from xinxi"
if class2<>"" then
sqljs=sqljs&" where class2="&class2
elseif class1<>"" then
sqljs=sqljs&" where class1="&class1
end if
select case topType
case "new" sqljs=sqljs&" where yz =1 order by fbsj desc,b desc"
case "hot" sqljs=sqljs&" where yz =1 order by llcs desc,id desc"
case "tj" sqljs=sqljs&" where yz =1 and tui=1 order by fbsj desc,b desc"
case "hit" sqljs=sqljs&" where yz =1 and hfcs>0 order by fbsj desc,id desc"
case "clnew" sqljs=sqljs&" and yz =1 order by id desc"
'case "4" sqljs=sqljs&" where yz =1 DATEDIFF('d',fbsj,Now())<="&dateNum&" order by llcs desc,id"
end select
set rsjs = conn.execute(sqljs)
if rsjs.bof and rsjs.eof then
str=str+"沒有符合條件的文章"
else
rsjs.movefirst
do while not rsjs.eof
topic=left(rsjs("biaoti"),maxlen)
topic=replace(topic,"'"," ")
str=str+bullet
str=str+"<a href='"&Path&"/second/infolist.asp?cnmai="+Cstr(rsjs("id"))+"' target='_blank' title='"&replace(replace(server.HTMLencode(rsjs("biaoti"))," "," "),"'"," ")&"') >"+Topic+"</a>"
if showdate = 1 then
str=str & "<font color="
if rsjs("fbsj")>=date then
str=str & new_color
else
str=str & old_color
end if
str=str &">" & Month(rsjs("fbsj"))&"月"&Day(rsjs("fbsj"))&"日</font>)<br>"
end if
if showhot = 1 then
str=str&"<font color="& hitcolor &">"& rsjs("llcs") &"</font>)<br>"
end if
if showhit = 1 then
str=str&"<font color="& hitcolor &">"& rsjs("hfcs") &"</font>)<br>"
end if
rsjs.moveNext
loop
end if
rsjs.close
set rsjs=nothing
response.write "document.write ("&Chr(34)&str&Chr(34)&");"
%>
?? 快捷鍵說明
復(fù)制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -