⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 newscodejs.asp

📁 强大的后台文章编辑器的功能
💻 ASP
字号:
<!--#include file = admin_conn.asp -->
<!--#include file = titleb.asp -->
<%
lm=trim(request("lm"))
lm2=trim(request("lm2"))
if lm="" then lm=lm2
if lm2="" then lm2=lm
t=trim(request("t"))
hot=trim(request("hot"))
tj=trim(request("tj"))
news=trim(request("new"))
n=trim(request("n"))
more=trim(request("more"))
if n="" then n=30
n=int(n)
open=trim(request("open"))
if open="1" then
    open="_blank"
else
	open="_top"
end if
list=trim(request("list"))
if list="" then list=10
list=int(list)
icon=trim(request("icon"))
if icon="1" then 
icon="<font face=Wingdings>1</font>"
else
icon="<img src="&icon&" border=0>"
end if

sql = "select top "&list&" id,title,titlecolor,hit,pic,ontop,time,lm,lm2 from news where title<>'' and (lm='"&lm&"' or lm2='"&lm2&"') "
if tj="1" then sql=sql&" and tj='推荐' "
if hot="1" then
 sql = sql&" order by hit desc , id desc"
else 
 sql= sql&" order by ontop desc , id desc"
end if

Set rs = Server.CreateObject("ADODB.RecordSet")
rs.Open sql,conn,1,1

while not rs.eof
%>
document.write("<%=icon%>&nbsp;<a href=/news/news_view.asp?newsid=<%=rs("id")%> target=<%=open%> title='<%=rs("title")%>'><font color='<%=rs("titlecolor")%>'><%=titleb(rs("title"),n)%></font></a>");
<% if t="1" then%>
document.write("<font color=999999>(<%=rs("time")%>)</font>");
<% end if %>
<%
if news="1" then
	if datediff("d",rs("time"),date())=0 then 
%>
document.write("<img src=images/new.gif>");
<%
	end if
end if
%>
document.write("<BR>")
<%
rs.movenext
wend

if more="1" then
%>
document.write("<p align=right>")
document.write("<a href=news_more.asp?lm=<%=trim(request("lm"))%>&lm2=<%=trim(request("lm2"))%>&open=<%=trim(request("open"))%>&tj=<%=trim(request("tj"))%>&hot=<%=hot%> target=<%=open%>>更多内容</a>");
document.write("</p>")
<%
end if
%>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -