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

📄 news_home.asp

📁 网上购物系统 asp+sql server 2005
💻 ASP
字号:
<!--#include file="include/dbopenbd.asp" -->
<HTML>
<HEAD>
<TITLE>新闻中心</TITLE>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<meta name="description" content="<%=sitedescription%>">
<meta name="keywords" content="<%=sitekeywords%>">
<link rel="stylesheet" href="include/css.css" type="text/css">
</HEAD>
<center>
<!--#include file="a_top.asp"-->
<table width="760" border=0 cellspacing=0 cellpadding=0 align=center bgcolor="#FFFFFF"  class="grayline">  
<tr><td bgcolor="FFFBF7" align=center valign=top width=185> 
	<!--#include file="a_login.asp" -->
	<!--#include file="a_tree.asp" -->
</td>
<td bgcolor="#CCCCCC" width="1"></td>
<td width=569 align=center valign=top>
<table cellspacing=0 cellpadding=0 width=566 bgcolor=#FFFFFF border=0 class="new" align="center">
 <%
dim newstitle(5)
Set rs = conn.Execute("select * from s_config") 
newstitle(1)=rs("newstitle1")
newstitle(2)=rs("newstitle2")
newstitle(3)=rs("newstitle3")
newstitle(4)=rs("newstitle4")
newstitle(5)=rs("newstitle5")
set rs=nothing
%>
<tbody><tr><td  height=30>目前位置:<a href=main.asp>首页</a> > 新闻中心</td></tr> 

<tr><td height="1" background="images/small/bgline.gif"></td></tr>
<tr><td>&nbsp;</td></tr>

<%
set rs=conn.execute ("select * from s_news where online='1' and getdate()<OffDate and getdate()>=PubDate")
if rs.eof and rs.bof then
response.write "<tr><td height=50 align=center>暂时没有新闻文章</td></tr>"
else

for i=1 to 5
set rs=conn.execute ("select top 10 * from s_news where online='1' and getdate()<OffDate and getdate()>=PubDate and NewsClass='"&i&"'  order by uup desc,Pubdate desc")

if newstitle(i)<>"" then
if not (rs.eof and rs.bof) then
%>
<tr><td width=98%  valign=top>
<table border=0  width=165>
<tr><td width=165 height=28 background=images/small/newsbar.gif align=center><a href='allnews.asp?class=<%=i%>' alt="浏览更多<%=newstitle(i)%>"><%=newstitle(i)%></a></td></tr>
</table>
<table   cellpadding="2"  cellspacing="0" border=0  width=95% align=center bgcolor=#FFFFFF>
<%
	Do while Not rs.eof
	%>
        <tr><td width=55%>&nbsp;&nbsp;&nbsp;&nbsp;<a href="news.asp?NewsId=<%=Cstr(rs("NewsId"))%>"  ><%=lleft(rs("NewsTitle"),40)%></a></td><td  width=25%><%=rs("PubDate")%></td><td  width=20%>人气值:<%=rs("cktimes")%></td></tr>
	<%
	rs.movenext
	loop
set rs=nothing
%>
</table>
</td></tr><tr><td align=right><a href='allnews.asp?class=<%=i%>' alt="浏览更多<%=newstitle(i)%>"><img src=images/small/more.gif border=0></a>&nbsp;&nbsp;&nbsp;&nbsp;</td></tr>
<%
end if
end if
next
end if
%>

</tbody> 
</table></td></tr>
        </table>
      </td>
    </tr>

  </table>
<!--#include file="a_bottom.asp"-->
</BODY></CENTER>

</HTML>
<%
conn.close
set conn=nothing
%>

⌨️ 快捷键说明

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