📄 news.asp
字号:
<%@LANGUAGE="VBSCRIPT" CODEPAGE="936"%>
<!--#include file="sub/config.asp"-->
<!--#include file="sub/conn.asp"-->
<!--#include file="sub/getType.asp"-->
<!--#include file="sub/inc.asp"-->
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title><%=Sitename%>-设计动态</title>
<link href="index.css" rel="stylesheet" type="text/css" />
</head>
<body>
<!--#include file="top.asp"-->
<table width="780" height="4" border="0" cellspacing="0" cellpadding="0" align="center">
<tr>
<td background="images/index_11.gif"></td>
</tr>
</table><table width="780" border="0" align="center" cellpadding="0" cellspacing="0" bgcolor="#E8E6DD">
<tr>
<td height="30" colspan="3" rowspan="2"><img src="images/Lv2/Lv2designnews.gif" width="200" height="30" /></td>
<td height="29" colspan="3" bgcolor="#EEFFFF">
<marquee behavior=alternate onmouseover=stop() onmouseout=start() direction="center" scrollamount="1" scrolldelay="8" >
<font class="top"><%=ad1%></font>
</marquee></td>
</tr>
<tr>
<td height="1" colspan="3" bgcolor="#F8981D"></td>
</tr>
<tr>
<td height="80" colspan="3" align="center" valign="top" bgcolor="#EEFFFF"><table width="175" border="0" cellspacing="0" cellpadding="0">
<%
dim i
i = 1
Set RS = Server.CreateObject("ADODB.Recordset")
SQL = "Select * from newsclass"
RS.Open SQL, cn, 1,1,1
Do while not RS.EOF
if i mod 2 <> 0 then
%>
<tr>
<td width="90" height="20"><img src="images/indexdddd.gif" width="6" height="6" /> <a href="news.asp?class=<%=RS("class")%>"><%=RS("classname")%></a></td>
<% i = i + 1
else
%>
<td width="97" height="20"><img src="images/indexdddd.gif" width="6" height="6" /> <a href="news.asp?class=<%=RS("class")%>"><%=RS("classname")%></a></td>
</tr>
<% i = i + 1
end if
RS.movenext
Loop
set RS = nothing
if i mod 2 = 0 then
%>
<%
end if
%>
</table></td>
<td width="431" rowspan="3" valign="top" bgcolor="#FFFFFF"><p>
<span class="date">
<% '右框程序
if Request.QueryString("class")<>"" then
Set rs1 = Server.CreateObject("ADODB.Recordset")
SQL1 = "Select classname from newsclass where class=" & Request.QueryString("class")
rs1.Open SQL1,cn,1,1
Session.Contents("classname")=rs1("classname")
set rs1 = nothing
Set rs2 = Server.CreateObject("ADODB.Recordset")
SQL2 = "Select * from news where class=" & Request.QueryString("class")
rs2.Open SQL2,cn,1,1
Do while not rs2.eof
%>
<br/> <a href="shownews.asp?id=<%=rs2("id")%>"><font color="<%=rs2("color")%>"><%=rs2("title")%></font></a><br />
<span class="date"> 发布日期: <%=rs2("date")%> 来源: <%=rs2("user")%></span><br/>
<%
rs2.movenext
Loop
set rs2 = nothing
else
dim rs,sql
set rs=server.CreateObject("Adodb.recordSet")
sql="select * from news order by date desc"
rs.open sql,cn,1,1
rs.PageSize=30
pagecount=rs.PageCount
page=int(request.QueryString ("page"))
if page<=0 then page=1
if request.QueryString("page")="" then
page=1
end if
rs.AbsolutePage=page
for i=1 to rs.pagesize
if rs.EOF then exit for
response.write("<br/> [<a href='news.asp?class="&rs("class")&"'>"&getMemberDepict(cint(rs("class")))&"</a>] <a href='shownews.asp?id="&rs("id")&"'><font color='"&rs("color")&"'>"&rs("title")&"</font></a><br> 发布日期: "&rs("date")&"<br/>")
rs.movenext
next%>
<br /><br />
<%if page=1 and not page=pagecount then%>
<div align="center">第<%=page%>页 <%for i=1 to pagecount%>
<a href="news.asp?page=<%=i%>"><%=i%></a> <%next%><a href="news.asp?page=<%=page+1%>">下一页</a> </div>
<%elseif page=pagecount and not page=1 then%>
<div align="center">第<%=page%>页 <%for i=1 to pagecount%>
<a href="news.asp?page=<%=i%>"><%=i%></a> <%next%><a href="news.asp?page=<%=page-1%>">上一页</a> </div>
<%elseif page<1 then%><div class="font" align="center"><font color=red>没有任何记录!</font></div>
<%elseif page>pagecount then%><div class="font" align="center"><font color=red>没有任何记录!</font></div>
<%elseif page=1 and page=pagecount then%>
<%else%>
<div align="center">第<%=page%>页 <%for i=1 to pagecount%>
<a href="news.asp?page=<%=i%>"><%=i%></a> <%next%><a href="news.asp?page=<%=page-1%>">上一页</a>
<a href="news.asp?page=<%=page+1%>">下一页</a> </div>
<%end if
end if
rs.close
set rs=nothing
%></td>
<td width="1" rowspan="3" valign="top" bgcolor="#F8981D"></td>
<td width="148" rowspan="3" align="center" valign="top" bgcolor="#FFFFFF">
<%=ad2%></td>
</tr>
<tr>
<td height="30" colspan="3" align="center" valign="top" bgcolor="#EEFFFF"><img src="images/websearch.gif" width="200" height="30" /></td>
</tr>
<tr>
<td colspan="3" align="center" valign="top" bgcolor="#EEFFFF"><% call websearch()%>
<table width="200" border="0" cellspacing="0" cellpadding="0">
<tr>
<td><img src="images/Lv2/lv2dj.gif" width="200" height="30" /></td>
</tr>
<tr>
<td align="left">
<%Set rs = Server.CreateObject("ADODB.Recordset")
SQL = "Select top 10 * from news order by click desc"
rs.Open SQL, cn, 1,1
do while not rs.eof
Response.Write "<br/>"
Response.Write " <img src='images/indexddd.gif' /> <a href='shownews.asp?id="&rs("id")&"'>"&left(rs("title"),15)&"...</a>"
rs.movenext
loop
rs.close
set rs=nothing%>
</td>
</tr>
</table>
</td>
</tr>
</table>
<!--#include file="bottom.asp"-->
</body>
</html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -