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

<!--#include file="function.asp"-->
<%dbpath="../"
dblink

Dim t,t1,c1,c2,c3,Sql,TempText,c,ii,n,q,s,zs,zt,hg,d,rs
t=Strint(Request("t"))
c1=Strint(Request("city_oneid"))
c2=Strint(Request("city_twoid"))
c3=Strint(Request("city_threeid"))

n=Strint(Request("n"))
q=Strint(Request("q"))
s=Strint(Request("s"))
d=Strint(Request("d"))
zs=Strint(Request("zs"))
zt=Strint(Request("zt"))
hg=Strint(Request("hg"))

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
IF t=1 Then
t1="本站公告"
ii=0
Else
t1="新闻动态"
ii=7
End IF

Sql="select top "&s&" title,adid,color,[date] from [news_data] where [type]='"&t1&"' "&c&" order by adid desc" 
Set rs=server.createobject("adodb.recordset")               
Rs.open Sql,Conn,1,1  
IF Rs.eof then
TempText= "暂无"&t1
Else
IF n=1 Then TempText= "<marquee scrollamount=""2"" scrolldelay=""50"" onmouseover=""this.stop()"" onmouseout=""this.start()"" direction=up style=""width:100%;padding:0"" height="&Rs.recordcount*hg&">"
iii=1
TempText=TempText& "<table width=""100%""  border=""0"" cellspacing=""4"" cellpadding=""0"">"
do while not Rs.eof
TempText=TempText& "<tr height="""&hg&"""><td>"
IF q=1 Then
TempText=TempText& "·"
ElseIF q=2 Then
TempText=TempText& iii&"."
iii=iii+1
End IF
TempText=TempText& "<a title="&rs(0)&" href="""&N_path("../",rs(1),"")&""" target=""_blank""><SPAN style=""color:"&rs(2)&";font-size="&zt&"px"">"&CutStr(rs(0),zs)&"</SPAN></a> "
IF d=1 Then TempText=TempText& " <font color=""#008080"" >"&mid(DateValue(rs(3)),8)&"</font>" 
TempText=TempText& "</td></tr>" 
Rs.movenext
i=i+1
loop
TempText=TempText& "</table>"
IF n=1 Then TempText=TempText& "</marquee>"
end IF
Rs.close:set rs=nothing
conn.Close:Set Conn=Nothing
response.write "document.write('"&TempText&"');"%>
