📄 article.asp
字号:
<%@LANGUAGE="VBSCRIPT" CODEPAGE="936"%>
<!--#include file="conn.asp"-->
<!--#include file="include.asp"-->
<HTML><HEAD><TITLE><%
If WebTitle="" Then
Response.Write WebName
Else
Response.Write WebName&" --> "&WebTitle
End if
%></TITLE>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<meta name="keywords" content="<%=W_WebSiteKeyword%>">
<meta name="description" content="<%=W_WebSiteIntr%>">
<LINK href="css.css" type=text/css rel=stylesheet>
<script language="JavaScript" src="images/js.js"></script>
</head>
<body onLoad="MM_preloadImages('images/index_03_011.gif','images/index_03_021.gif','images/index_03_031.gif','images/index_03_041.gif','images/index_03_051.gif','images/index_03_061.gif')">
<table width="1000" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="14" rowspan="2" valign="top"><img src="images/index_01.gif" width="14" height="600" alt=""></td>
<td width="298" height="83" valign="top"><a href="Index.asp"><img src="images/index_021.gif" alt="" width="298" height="83" border="0"></a></td>
<td valign="top" background="images/index_03_07.gif"><a href="News.asp" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage('Image1','','images/index_03_011.gif',1)"><img src="images/index_03_01.gif" width="101" height="83" border="0" name="Image1"></a><a href="Article.asp" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage('Image2','','images/index_03_021.gif',1)"><img src="images/index_03_02.gif" width="110" height="83" border="0" name="Image2"></a><a href="Product.asp" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage('Image3','','images/index_03_031.gif',1)"><img src="images/index_03_03.gif" width="117" height="83" border="0" name="Image3"></a><a href="Download.asp" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage('Image4','','images/index_03_041.gif',1)"><img src="images/index_03_04.gif" width="116" height="83" border="0" name="Image4"></a><a href="Aboutus.asp" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage('Image5','','images/index_03_051.gif',1)"><img src="images/index_03_05.gif" width="109" height="83" border="0" name="Image5"></a><a href="Gbook.asp" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage('Image6','','images/index_03_061.gif',1)"><img src="images/index_03_06.gif" width="103" height="83" border="0" name="Image6"></a></td>
</tr>
<tr>
<td height="517" colspan="2" valign="top" background="images/bg.jpg"><table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td height="503"><table width="700" height="192" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<td width="50" valign="top" background="images/bg2.jpg"><img src="images/index_v5_doc.gif" width="50" height="492"></td>
<td valign="top" background="images/bg2.jpg">
<table width="95%" border="0" align="center" cellpadding="5" cellspacing="0">
<tr>
<td height="30">
<br>
<table width="99%" border="0" cellspacing="0" cellpadding="3">
<tr>
<td align="right">
<!-- 开始 -->
<%
set rsa=server.createobject("adodb.recordset")
sqla="select * from HN_newscla where CLid=4 and MidCls<>'' order by id ASC"
rsa.open sqla,conn,1,1
DO WHILE Not rsa.eof
%>
<a href="Article.asp?id=<%=rsa("id")%>"><%=RSa("MidCls")%></a>
<%
rsa.movenext
LOOP
rsa.close
set rsa=nothing
%>
<!-- 结束 -->
</td>
</tr>
<%
cid=request("id")
if cid="" then
sql="select * from HN_news where cstr(class)<>'2' and cstr(class)<>'3' and kinds=true order by id desc"
else
sql="select * from HN_news where cstr(class)='"&cid&"' and kinds=true order by id desc"
end if
set rsnews=server.createobject("adodb.recordset")
rsnews.open sql,conn,1,1
if rsnews.eof then
Response.Write " <div align='center' class='font1'>暂无新闻!</div></td></tr></table>"
end if
IF Not rsnews.eof Then
proCount=rsnews.recordcount
rsnews.PageSize=20 '定义显示数目
if not IsEmpty(Request("ToPage")) then
ToPage=CInt(Request("ToPage"))
if ToPage>rsnews.PageCount then
rsnews.AbsolutePage=rsnews.PageCount
intCurPage=rsnews.PageCount
elseif ToPage<=0 then
rsnews.AbsolutePage=1
intCurPage=1
else
rsnews.AbsolutePage=ToPage
intCurPage=ToPage
end if
else
rsnews.AbsolutePage=1
intCurPage=1
end if
intCurPage=CInt(intCurPage)
For i = 1 to rsnews.PageSize
if rsnews.EOF then
Exit For
end if
%>
<tr>
<td width="90%" class="font1" height=12>·<a href="Article_View.asp?id=<%=rsnews("id")%>" target="_blank">
<% = Left(rsnews("title"),30) %>
<% if Len(rsnews("title"))>30 then %>
…
<% end if %>
</a>(<%=rsnews("time")%>)</td>
</tr>
<%
rsnews.MoveNext
next
%>
<tr>
<td>
<table width="100%" align="center" cellpadding="0" cellspacing="0" border="0">
<tr>
<td align="right" width="51%"><span style="font-size: 9pt;"> 总共:<%=rsnews.PageCount%>页, <%=proCount%>条新闻, 当前页:<%=intCurPage%>
<%
if intCurPage<>1 then
%>
<a href="?id=<%=cid%>&ToPage=1">首页</a> | <a href="?id=<%=cid%>&ToPage=<%=intCurPage-1%>">上一页</a> |
<% end if
if intCurPage<>rsnews.PageCount then %>
<a href="?id=<%=cid%>&ToPage=<%=intCurPage+1%>">下一页</a> | <a href="?id=<%=cid%>&ToPage=<%=rsnews.PageCount%>"> 最后页</a> |
<% end if%>
</span> </td>
</tr>
</table>
</td>
</tr>
</table>
<%end if%>
<%
rsnews.close
set rsnews=nothing
%>
</td>
</tr>
</table></td>
</tr>
</table></td>
</tr>
<tr>
<td align="center" valign="baseline"><img src="images/copyright.jpg" width="330" height="13"></td>
</tr>
</table></td>
</tr>
</table>
</body>
</html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -