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

<!--#include file="function.asp"-->
<%
Dim c,c1,c2,c3,t,Temp,TempText,p,s,hg,rs
c1=Strint(Request("city_oneid"))
c2=Strint(Request("city_twoid"))
c3=Strint(Request("city_threeid"))
s=Strint(Request("s"))
p=strint(Request("p"))
hg=strint(request("hg"))
t=HtmlEncode(Request("t"))
IF t="" then Response.End
IF c1=0 then
c=""
elseIF c3>0 then
c=" and city_oneid="&c1&" and city_twoid="&c2&" and city_threeid="&c3
elseIF c2>0 then
c=" and city_oneid="&c1&" and city_twoid="&c2
Else
c=" and city_oneid="&c1
End IF

dbpath="../"
dblink


Set Rs=Conn.Execute("Select adid,[color],[title],[date],cu,hits From News_Data Where [type]='"&t&"' "&c&" order by [top] desc")
IF Not Rs.Eof Then typeData=Rs.Getrows
Rs.close:set Rs=Nothing
Conn.Close:Set Conn=Nothing

IF IsArray(typeData) Then
TempText="<table width=""100%""  border=0 cellpadding=4 cellspacing=0>"
			MaxperPage=s
			Page=p
			IF Page=0 Then Page=1
			DataCount=Ubound(typeData,2)
			IF MaxperPage>=DataCount Then
			DataPage=1
			Else
			DataPage=DataCount\MaxperPage
			IF DataCount/MaxperPage<>DataPage Then DataPage=DataPage+1		
			End IF
			IF DataCount>=MaxperPage*Page Then
			s=MaxperPage*Page-1
			Else
			s=DataCount
			End IF
			IF s<1 Then s=0		
			For ii=MaxperPage*(Page-1) To s
TempText=TempText&"<tr height="""&hg&""">"
TempText=TempText&"<td style=""font-size:"&zt&"px;border-bottom:1px dotted #E1E1E1;""  width=""80%"">"
Temp="·<a href="""&N_path("../",TypeData(0,ii),"")&""" target=""_blank""><font color="""&TypeData(1,ii)&""">"&TypeData(2,ii)&"</font></a>"
IF TypeData(4,ii)="yes" Then Temp="<STRONG>"&Temp&"</STRONG>"
TempText=TempText&Temp&"</td><td style=""border-bottom:1px dotted #E1E1E1;"">"&TypeData(3,ii)&"</td><td style=""border-bottom:1px dotted #E1E1E1;"">"&TypeData(5,ii)&"</td></tr>"
Next

Dim id
id="&city_oneid="&c1&"&city_twoid="&c2&"&city_threeid="&c3&"&news="&t
TempText=TempText&"<tr align=center><td colspan=3>页次："&Page&"/"&DataPage&"  每页"&MaxperPage&"条  共刊登"&Ubound(typeData,2)+1&"条信息 "&PageSplit(Page,DataPage,"news_more.asp",id)&"</td></tr></table>"
Else
TempText="<div align=center>暂无本类信息</div>"
End IF
Response.Write "document.write('"&TempText&"');"
%>
