📄 newscode-news.asp
字号:
<!--#include file = admin_conn.asp -->
<!--#include file = admin/titleb.asp -->
document.write("<head><meta http-equiv='Content-Language' content='zh-cn'><meta http-equiv='Content-Type' content='text/html; charset=gb2312'></head>");
<%
id=trim(request("id"))
font=trim(request("font"))
nr=trim(request("nr"))
nrtop=trim(request("nrtop"))
nrcolor=trim(request("nrcolor"))
titlesize=trim(Request("titlesize"))
titleface=trim(Request("titleface"))
titlebold=trim(Request("titlebold"))
titlen=trim(Request("titlen"))
titlecolor=trim(Request("titlecolor"))
lm=trim(request("lm")) '06_12_13,添加。可以显示每个栏目新闻标题+内容调用开始
lm2=trim(request("lm2"))
if lm="" then lm=lm2
if lm2="" then lm2=lm
list=trim(request("list"))
if list="" then list=1 '06_12_13,添加。可以显示每个栏目新闻标题+内容调用结束
if titlecolor="" then titlecolor="000000"
if titlen="" then titlen=30
titlen=int(titlen)
if titlebold="" then titlebold=100
if nrcolor="" then nrcolor="999999"
if nr="" then nr=0
if nrtop="" then nrtop=150
nrtop=int(nrtop)
if font="" then font=9
if titlesize="" then titlesize=font
'path=config("path")
if id="" then id=0
if nr="" then nr=0
if id<>0 then%>
document.write("<table border='0' cellspacing='0' cellpadding='0'>");
<%
sql="select * from [news] where [sh]=1 and [id]="&id&" "
set rs = Server.CreateObject("ADODB.RecordSet")
'rs.Open "select * from [news] where id="&id,conn,1,1
rs.Open sql,conn,1,1
while not rs.eof
newsid=rs("id")
title=glhtml(rs("title"))
title=titleb(title,titlen)
title=replace(title,"""","")
content=glhtml(rs("content"))
for i=1 to 31
content=replace(content,chr(i),"")
next
content=glhtml(titleb(content,nrtop))
%>
// 豪--取消这句 20006-9-14 改为下面一句:
//document.write("<a href=<%=path%>news_view.asp?newsid=<%=newsid%> target=_blank><font face='<%=titleface%>' style='font-size:<%=titlesize%>pt;font-weight:<%=titlebold%>;color=<%=titlecolor%>'><%=title%></font></a>");
<%
'href_url=fun_html_url(newsid) '豪-增,取出静态文件的路径. 2006-9-14
%>
document.write("<tr><td align='center'><a href='<%=fun_html_url(newsid) %>' target='_blank'><font face='<%=titleface%>' style='font-size:<%=titlesize%>pt;font-weight:<%=titlebold%>;color=<%=titlecolor%>'><%=title%></font></a></td></tr>");
<%if nr="1" then%>
document.write("<tr><td> <font color=<%=nrcolor%> style='font-size:<%=font%>pt'><%=content%></font></td></tr>");
//document.write("<a href='<%=fun_html_url(newsid) %>' target='_blank'><font face='<%=titleface%>' style='font-size:<%=titlesize%>pt;font-weight:<%=titlebold%>;color=<%=titlecolor%>'><%=title%></font></a>");
//document.write("<BR> <font color=<%=nrcolor%> style='font-size:<%=font%>pt'><%=content%></font>");
<%
end if
rs.movenext
wend
rs.close
set rs=nothing
%>
document.write("</table>");
<%else '06_12_13,添加。可以显示每个栏目新闻标题+内容调用开始
%>
document.write("<table border='0' cellspacing='0' cellpadding='0'>");
<%
sql = "select top "&list&" id,title,content,lm,lm2,lm3 from news where title<>'' and sh=1 "
if lm2<>"0" then
sql=sql&" and (lm='"&lm2&"' or lm2='"&lm2&"' or lm3='"&lm2&"') "
end if
sql= sql&" order by ontop desc , id desc"
set rs = Server.CreateObject("ADODB.RecordSet")
rs.Open sql,conn,1,1
if rs.recordcount<>0 then
while not rs.eof
newsid=rs("id")
title=glhtml(rs("title"))
title=titleb(title,titlen)
title=replace(title,"""","")
content=glhtml(rs("content"))
for i=1 to 31
content=replace(content,chr(i),"")
next
content=glhtml(titleb(content,nrtop))
%>
document.write("<tr><td align='center'><a href='<%=fun_html_url(newsid) %>' target='_blank'><font face='<%=titleface%>' style='font-size:<%=titlesize%>pt;font-weight:<%=titlebold%>;color=<%=titlecolor%>'><%=title%></font></a></td></tr>");
<%if nr="1" then%>
document.write("<tr><td align='left'> <font color=<%=nrcolor%> style='font-size:<%=font%>pt'><%=content%></font><a href='<%=fun_html_url(rs("id"))%>' target='<%=open%>'>【阅读全文】</a></td></tr>");
<%
end if
rs.movenext
wend
else
%>
document.write("<tr><td width='100%' height='15'><font style='font-size:9pt'>暂无内容!</font></td></tr>");
<%
end if
rs.close
set rs=nothing
%>
document.write("</table>");
<%end if '06_12_13,添加。可以显示每个栏目新闻标题+内容调用结束
%>
<%
conn.close:set conn=nothing
%>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -