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

📄 news_js.asp

📁 功能最强大的ASP网站
💻 ASP
字号:
<!--#include file="conn.asp"-->

document.write("<head><meta http-equiv='Content-Language' content='zh-cn'><meta http-equiv='Content-Type' content='text/html; charset=gb2312'><meta name='robots' content='none'></head>");
document.write("<table border=0 cellpadding=<%=line%> cellspacing=0 width=100%>");

<%
n=request("n")
news=trim(request.QueryString("news"))
font=trim(request.QueryString("font"))
tag=trim(request.QueryString("tag"))
xiangguan=trim(request.QueryString("xiangguan"))
timeshow=trim(request.QueryString("timeshow"))
classshow=trim(request.QueryString("classshow"))
newpicshow=trim(request.QueryString("newpicshow"))

if n="" then
n=10
end if


if news<>"" and tag="" and xiangguan="" then
sql="select * from NEWS where infor='"&news&"' order by bh desc"
set rs=conn.execute(sql)
end if

if news<>"" and tag<>"" and xiangguan="" then
sql="select * from NEWS where infor='"&news&"' and tag='"&tag&"'order by bh desc"
set rs=conn.execute(sql)
end if

if news<>"" and tag="" and xiangguan<>"" then
sql="select * from NEWS where infor='"&news&"' and xiangguan='"&xiangguan&"'order by bh desc"
set rs=conn.execute(sql)
end if

if news<>"" and tag<>"" and xiangguan<>"" then
sql="select * from NEWS where infor='"&news&"' and tag='"&tag&"' and xiangguan='"&xiangguan&"' order by bh desc"
set rs=conn.execute(sql)
end if
%>
document.write("<table border=0 cellpadding=<%=line%> cellspacing=0 width=100%>");
<% 
if rs.eof and rs.bof then
%>
document.write("没有相关新闻")
<%else%>
<%
do while not rs.eof
if rs("url")<>"" then
url=rs("url")
else
url="files/"&rs("bh")&".html"
end if
title=rs("title")
path="image/topic_no_new.gif"
picpath="image/gif-0299.gif"
font="9"
time1=year(rs("time"))& "-" & month(rs("time")) & "-" & day(rs("time")) 
classname=rs("bigclassname")
hot=rs("hits")
if rs("color")<>"" then
color=rs("color")
else
color="#666666"
end if
%>
document.write("<tr><td width=1 align=left align=center ></td><td>");
document.write("</td><td align=left><img src=<%=path%>>");
<% if timeshow="1" then%>
document.write("</td><td align=left><font color=<%=color%> style='font-size:<%=font%>pt'>[<%=time1%>]</font><td>");
<%end if%>
<% if classshow="1" then%>
document.write("</td><td align=left><font color=<%=color%> style='font-size:<%=font%>pt'>[<%=classname%>]</font><td>");
<%end if%>
document.write("<a href=<%=url%> target=_blank><font color=<%=color%> style='font-size:<%=font%>pt'><%=title%></font></a>&nbsp;");
<%if newpicshow="1" then%>
<%if year(rs("time"))=year(now) and month(rs("time"))=month(now) and day(rs("time"))=day(now) then%>
document.write("</td><td align=left><img src=<%=picpath%>></td>");
<%end if%>
<%end if%>
<%if rs("hits")>1000 then%>
document.write("<td align=left><img src=<%=hotpicpath%>></td>");
<%end if%>
document.write("</td>");
<%
 n=n-1
 if n<1 then exit do

 rs.movenext
 loop
%>
<%
end if
%>
document.write("</table>");

⌨️ 快捷键说明

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