<!--#include file="inc/conn.asp"-->
<!--#include file="config.asp"-->
<%

dim path,class1,class2,showNclass,kind,dateNum,maxLen,listNum,bullet,lx
dim hitColor,new_color,old_color

topType = Request("topType")


num = request.querystring("num")
maxlen = Request.querystring("maxlen")
showdate = Request("showdate")
showhot = Request("showhot")
Class1 = Request("Class1")
Class2 = Request("Class2")

bullet="·"			 '标题前的图片或符号
hitColor="#FF0000"   '点击数的颜色
new_color="#FF0000"  '新文章日期的颜色
old_color="#999999"  '旧文章日期的颜色


dim rscnmai,sqlcnmai,str,topic
Path=""



set rscnmai=server.createObject("Adodb.recordset")
sqlcnmai = "Select top "& num &" * from xinxi where yz =1"

if class2<>"" then
	sqlcnmai=sqlcnmai&" and class2="&class2
elseif class1<>"" then
	sqlcnmai=sqlcnmai&" and class1="&class1
end if

select case topType
	case "new" sqlcnmai=sqlcnmai&" order by fbsj desc,b desc"
	case "hot" sqlcnmai=sqlcnmai&" order by llcs desc,id desc"
	'case "2" sqlcnmai=sqlcnmai&" DATEDIFF('d',fbsj,Now())<="&dateNum&" order by llcs desc,id"
end select

set rscnmai = conn.execute(sqlcnmai)
if rscnmai.bof and rscnmai.eof then 
str=str+"没有符合条件的文章"
else
b=trim(rscnmai("b"))
bb=len(b)
rscnmai.movefirst
do while not rscnmai.eof
Select Case rscnmai("leixing")
Case "1"
lx=leixing1
Case "2"
lx=leixing2
Case "3"
lx=leixing3
Case "4"
lx=leixing4
Case "5"
lx=leixing5
Case "6"
lx=leixing6
Case "7"
lx=leixing7
Case "8"
lx=leixing8
Case Else
lx=leixing9
End Select
	topic=left(rscnmai("biaoti"),maxlen)
	topic=replace(topic,"'","&nbsp;")
	str=str+"&nbsp;"
	str=str+lx
	str=str+bullet
    if rscnmai("tupian")<>"0" then
    str=str+"<font color=#FF0000>图-</font>"
    else
    end if
    if rscnmai("a")="0" or rscnmai("a")="" then
	str=str+"<a class='nei' href='"&Path&"/xinximemo.asp?cnmai="+Cstr(rscnmai("id"))+"' target='_blank'  title='"&replace(replace(server.HTMLencode(rscnmai("biaoti"))," ","&nbsp;"),"'","&nbsp;")&"')><u>"+Topic+"</u></a>&nbsp;"
	else
	str=str+"<a class='nei' href='"&Path&"/xinximemo.asp?cnmai="+Cstr(rscnmai("id"))+"' target='_blank'  title='"&replace(replace(server.HTMLencode(rscnmai("biaoti"))," ","&nbsp;"),"'","&nbsp;")&"')><font color=#"&rscnmai("a")&"><u>"+Topic+"</u></font></a>&nbsp;"
	end if 

if b<>0 then
str=str&"<img src=""images/num/jsq.gif"">"
for i=1 to bb
str=str&"<img src=""images/num/"&Mid(b,i,1)&".gif"">"
next
end if

	if showdate = 1 then
		str=str & "<font color="
			if rscnmai("fbsj")>=date then
				str=str & new_color
		 	else
				str=str & old_color
			end if
			str=str &">" &Month(rscnmai("fbsj"))&"/"&Day(rscnmai("fbsj"))&"</font>"
	end if
	if showhot = 1 then
		str=str&"<font color="& hitcolor &">"& rscnmai("llcs") &"</font>)<br>"
	else
		str=str&"<br>"
	end if

	rscnmai.moveNext
loop
end if
rscnmai.close
set rscnmai=nothing

response.write "document.write ("&Chr(34)&str&Chr(34)&");"
%>