'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 SMT_key3=1"
if gid0 then g=" and SMT_newssort="&gid&""
newsview=""
set rs=server.createobject("adodb.recordset")
sql="select top "&bid&" * from SMT_"&a&"news where SMT_key=1 and SMT_key1=1 and SMT_key2=1"&f&g&" order by SMT_id desc"
rs.open sql,conn,1,1
do while not rs.eof
title=trim(rs("SMT_title"))
if application("cityHTML")=1 then
webget=application("cityurl")&"Html/"&a&"news/"&year(rs("SMT_date"))&month(rs("SMT_date"))&"/"&replace(replace(replace(rs("SMT_date"),"-",""),":","")," ","")&".html"
else
webget=application("cityurl")&aa&"new_view.asp?id="&rs("SMT_id")&""
end if
set rs1=server.createobject("adodb.recordset")
sql1="select * from SMT_"&a&"newssort where SMT_id="&rs("SMT_newssort")
rs1.open sql1,conn,1,1
newssort=""&rs1("SMT_newssort")&"|"
rs1.close
set rs1=nothing
if did=1 then d=newssort else d="·"
if eid=1 then newdate=" ("&month(rs("SMT_date"))&"-"&day(rs("SMT_date"))&")" else newdate=""
newsview=newsview&d&""&LeftT(title,cid)&""&newdate&""
rs.movenext
loop
rs.close
%>
document.write('')