newsr.asp
来自「酷购网上商城~~ 完整的asp源代码.通过少许的改动就可以让你拥有自己的商城~~」· ASP 代码 · 共 74 行
ASP
74 行
<!--#include file="conn.asp"-->
<!--#include file="webconfig.asp"-->
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>无标题文档</title>
<style type="text/css">
<!--
body {
margin-left: 0px;
margin-top: 0px;
margin-right: 0px;
margin-bottom: 0px;
background-color: #ededed;
background-image: url(image/main/main_right2_02.gif);
}
-->
</style>
<link href="images/css.css" rel="stylesheet" type="text/css">
<style type="text/css">
<!--
body,td,th {
font-family: 宋体;
}
.style1 {color: #7995B0}
-->
</style></head>
<body>
<MARQUEE onmouseover=stop(); onmouseout=start();
scrollAmount=1 scrollDelay=1 direction=up><table width="166" border="0" align="right" cellpadding="0" cellspacing="0">
<tr> <td><%set rs=server.createobject("adodb.recordset")
rs.open "select * from shop_News order by adddate desc",conn,1,1
if rs.recordcount=0 then
%> <table width="100%" border="0" cellspacing="0" cellpadding="5" align="center">
<tr> <td align=center>暂无新闻</td></tr> </table><%
else
rs.PageSize =10 '每页记录条数
iCount=rs.RecordCount '记录总数
iPageSize=rs.PageSize
maxpage=rs.PageCount
page=request("page")
if Not IsNumeric(page) or page="" then
page=1
else
page=cint(page)
end if
if page<1 then
page=1
elseif page>maxpage then
page=maxpage
end if
rs.AbsolutePage=Page
if page=maxpage then
x=iCount-(maxpage-1)*iPageSize
else
x=iPageSize
end if
%> <table width="100%" border="0" cellspacing="0" cellpadding="5" align="center">
<%
For i=1 To x
%> <tr> <td height=24 class="table-xia"><IMG SRC="image/msg_getting.gif" WIDTH="16" HEIGHT="16" ALIGN="ABSMIDDLE">
<a href="javascript:;"onClick="javascript:window.open('news.asp?id=<%=rs("newsid")%>','','width=432,height=288,toolbar=no, status=no, menubar=no, resizable=yes, scrollbars=yes');'returnfalse;'"><%=trim(rs("newscontent"))%></a></td><tr>
<td width="20%" height=24 align=center bgcolor="#f7f7f7" class="table-xia style1">发布日期:<%=year(rs("adddate"))&"."&month(rs("adddate"))&"."&day(rs("adddate"))%>
(<%=rs("viewcount")%>)</td></tr> <%
rs.movenext
next
%> <% End if %> </table></td></table></marquee>
</body>
</html>
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?