⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 js1.asp

📁 手机网址导航网站手机网址导航网站手机网址导航网站
💻 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="·"			 '标题前的图片或符号
hitColor="#FF0000"   '点击数的颜色
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,"'","&nbsp;")
	str=str+bullet
	str=str+"<a href='"&Path&"/second/infolist.asp?cnmai="+Cstr(rsjs("id"))+"' target='_blank'  title='"&replace(replace(server.HTMLencode(rsjs("biaoti"))," ","&nbsp;"),"'","&nbsp;")&"') >"+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)&");"
%>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -