<!--#include file=conn.asp-->
<!--#include file=config.asp-->
<!--#include file=const.asp-->
<%
dim topnum,Jscls,it
dim Usext
topnum=trim(request("topnum"))
Jscls=trim(request("types"))
'Types=1人气2最新3活动
	if topnum<>"" and IsNumeric(topnum) then'显示条数
	topnum=cint(topnum)
	else
	topnum=10
	end if
		Set rs = Server.CreateObject("ADODB.Recordset")
	if Jscls=1 then'人气
		sql="select top "&topnum&" Userid,Username,Usersex,UserBirthday from Ms_User order by UserViews desc,Userid desc"
		rs.open sql,conn,1,1
		if not (rs.eof and rs.bof) then
			it=0
			do while not rs.eof
				it=it+1
			if rs(2)=1 then
				Usext="帅哥"
			else
				Usext="靓女"
			end if
			response.write "document.write(" & chr(34) & "&nbsp;<a href=dispuser.asp?username="&rs(1)&" target=_blank title='"&rs(1)&"资料'>"&rs(1)&"</a>&nbsp;"&Usext&"&nbsp;"&datediff("yyyy",rs(3),Now())&"" & chr(34) & ");"
			response.write "document.write(" & chr(34) & "<br>" & chr(34) & ");"
		rs.movenext
		loop
		else
			response.write("&nbsp;")
		end if
	
	elseif Jscls=2 then
		sql="select top "&topnum&" Userid,Username,Usersex,UserBirthday from Ms_User order by UserViews desc,Userid desc"
		rs.open sql,conn,1,1
		if not (rs.eof and rs.bof) then
			it=0
			do while not rs.eof
				it=it+1
			if rs(2)=1 then
				Usext="帅哥"
			else
				Usext="靓女"
			end if
			response.write "document.write(" & chr(34) & "&nbsp;<a href=dispuser.asp?username="&rs(1)&" target=_blank title='"&rs(1)&"资料'>"&rs(1)&"</a>&nbsp;"&Usext&"&nbsp;"&datediff("yyyy",rs(3),Now())&"" & chr(34) & ");"
			response.write "document.write(" & chr(34) & "<br>" & chr(34) & ");"
		rs.movenext
		loop
		else
			response.write("&nbsp;")
		end if
	elseif Jscls=3 then
	sql="select top "&topnum&" Title,Kid,Enddate from Ms_klatch where Checked=1 order by Addtime desc,Kid desc"
		rs.open sql,conn,1,1
		if not (rs.eof and rs.bof) then
			it=0
			do while not rs.eof
				it=it+1
			response.write "document.write(" & chr(34) & "&nbsp;<a href=klview.asp?id="&rs(1)&" target=_blank>"&rs(0)&"</a>&nbsp;"&datevalue(rs(2))&"" & chr(34) & ");"
			response.write "document.write(" & chr(34) & "<br>" & chr(34) & ");"
		rs.movenext
		loop
		else
			response.write("&nbsp;")
		end if
end if
		rs.close
		conn.close%>