<%dbdns="../"%>
<!--#include file="../inc/conn.asp"-->
<%
'news.asp?aid=分类&bid=条数&cid=每条字数&did=要不要前分类&eid=时间&fid=推荐&gid=分类ID
'aid  0为企业新闻 1为行业新闻
'cid  一个中文字算两个字符
'did  0不要 1要
'eid  0不要 1要
'fid  0为不推荐 1为推荐
'gid  0为不分类

aid=int(request.querystring("aid"))
bid=int(request.querystring("bid"))
cid=int(request.querystring("cid"))
did=int(request.querystring("did"))
eid=int(request.querystring("eid"))
fid=int(request.querystring("fid"))
gid=int(request.querystring("gid"))
if aid=0 then
aa="yp"
elseif aid=1 then
a="xx"
end if
if fid=1 then f=" and dlxf_key3=1"
if gid<>0 then g=" and dlxf_newssort="&gid&""

newsview="<p style=""line-height:150%"">"
set rs=server.createobject("adodb.recordset")
sql="select top "&bid&" * from dlxf_"&a&"news where dlxf_key=1 and dlxf_key1=1 and dlxf_key2=1"&f&g&" order by dlxf_id desc"
rs.open sql,conn,1,1
do while not rs.eof
title=trim(rs("dlxf_title"))

if application("cityHTML")=1 then
webget=application("cityurl")&"Html/"&a&"news/"&year(rs("dlxf_date"))&month(rs("dlxf_date"))&"/"&replace(replace(replace(rs("dlxf_date"),"-",""),":","")," ","")&".html"
else
webget=application("cityurl")&aa&"new_view.asp?id="&rs("dlxf_id")&""
end if

set rs1=server.createobject("adodb.recordset")
sql1="select * from dlxf_"&a&"newssort where dlxf_id="&rs("dlxf_newssort")
rs1.open sql1,conn,1,1
newssort="<a href="&application("cityurl")&aa&"new_list.asp?id="&rs1("dlxf_id")&" class=red target=_blank>"&rs1("dlxf_newssort")&"</a>|"
rs1.close
set rs1=nothing
if did=1 then d=newssort else d="·"

if eid=1 then newdate=" <font color=999999>("&month(rs("dlxf_date"))&"-"&day(rs("dlxf_date"))&")</font>" else newdate=""
newsview=newsview&d&"<a href="&webget&" target=_blank>"&LeftT(title,cid)&"</a>"&newdate&"<br>"
rs.movenext
loop
rs.close
%>
document.write('<%=newsview%>')