📄 news.asp
字号:
<%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 SMT_key3=1"
if gid<>0 then g=" and SMT_newssort="&gid&""
newsview="<p style=""line-height:150%"">"
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="<a href="&application("cityurl")&aa&"new_list.asp?id="&rs1("SMT_id")&" class=red target=_blank>"&rs1("SMT_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("SMT_date"))&"-"&day(rs("SMT_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%>')
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -