📄 index.asp
字号:
<!--#include file="nt80.inc"--><html>
<head>
<title><%=name%></title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<LINK href="style.css" rel=Stylesheet type=text/css>
</head>
<body bgcolor="#F3F3F3" text="#000000">
<!--#include file="top.asp"-->
<table width="759" border="0" cellspacing="0" cellpadding="0" align="center" height="447" bgcolor="#FFFFFF">
<tr>
<td height="34" colspan="3">
<!--#include file="gun.asp"--></td>
</tr>
<tr>
<td width="1" bgcolor="#CCCCCC"></td>
<td width="749">
<table width="100%" border="0" cellspacing="0" cellpadding="0" height="412">
<tr>
<td width="27%">
<table width="100%" border="0" cellspacing="0" cellpadding="0" height="100%">
<tr>
<td> <!--#include file="indexuse.asp"-->
<table width="100%" border="0" cellspacing="0" cellpadding="0" height="235">
<tr>
<td bgcolor="#EBEBEB" height="7"></td>
</tr>
<tr>
<td bgcolor="#990000" height="32"><b><font color="#FFFFFF">站内新闻</font></b></td>
</tr>
<tr>
<td bgcolor="#EBEBEB" height="7"></td>
</tr>
<tr>
<td>
<% set rs=server.createobject("adodb.recordset")
sql="SELECT top 10 ntime, * from news where lei=0 order by ntime desc"
rs.open sql,conn,1,3
for x=1 to int(rs.recordcount)
%>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="16%">
<div align="center"><img src="img/go.gif" width="13" height="13"></div>
</td>
<td width="68%"><a href="#" onclick="javascript:window.open('news.asp?id=<%=rs("id")%>','','width=400,height=170,scrollbars=yes');"><%=rs("nname")%></a></td>
</tr>
<% rs.movenext
next %>
</table>
</td>
</tr>
<tr>
<td> </td>
</tr>
</table>
<!--#include file="indextop.asp"--></td>
</tr>
</table>
</td>
<td width="73%">
<table width="100%" border="0" cellspacing="0" cellpadding="0" height="213">
<tr>
<td> <table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td><!--#include file="sou.asp"--></td>
</tr>
</table><% set rs=server.createobject("adodb.recordset")
sql="SELECT * from sp where slei=1 order by stime desc"
rs.open sql,conn,1,3
page=1 ' 设置变量PAGE=1
rs.pagesize=5
if Not IsEmpty(Request("Page")) then '如果PAGE已经初始化...
Page = CInt(Request("Page")) '接收PAGE并化为数字型赋给PAGE变量
if Page > rs.PageCount then '如果接收的页数大于总页数
rs.AbsolutePage = rs.PageCount '设置当前显示页等于最后页
else
rs.AbsolutePage = Page '显示当前页等于接收的页数
end if
else
Page = 1 '如果page未被初始化则设为1
End if
rs.AbsolutePage=page
%>
<%
For i = 1 to rs.PageSize
if rs.EOF then
Exit For
end if '利用for next 循环依次读出记录
%>
<table width="100%" border="1" cellspacing="0" cellpadding="0" height="75" bordercolor="#F3F3F3">
<tr>
<td width="30%" rowspan="4">
<% if rs("img")<>"" then %>
<div align="center"><a href="voo.asp?id=<%=rs("id")%>"><img src="<%=rs("img")%>" border="0" width="100"></a></div>
<% end if %>
</td>
<td width="44%"><img src="img/image001.gif" width="15" height="15">名称:<a href="voo.asp?id=<%=rs("id")%>"><%=rs("sname")%></a></td>
<td width="26%"><a href="voo.asp?id=<%=rs("id")%>"><img src="img/more2.gif" width="42" height="13" border="0" alt="查看本商品详细情况"></a></td>
</tr>
<tr>
<td colspan="2">简介:<%=server.htmlencode(left(rs("jianjie"),100))%><%if len(rs("jianjie"))>100 then response.write "……"%></td>
</tr>
<tr>
<td colspan="2"><img src="img/2.gif" width="12" height="11">价格:<%=rs("scun1")%>/元</td>
</tr>
<tr>
<td width="44%"><img src="img/0.gif" width="12" height="11">会员价:<%if session("daili")>1 then %><%=rs("scun2")%>/元<%else%>会员可见<%end if %></td>
<td width="26%"><a href="shop.asp?id=<%=rs("id")%>"><img src="img/gwc.gif" width="70" height="19" border="0" alt="开始购买!"></a></td>
</tr>
</table>
<div align="right"><br>
<%rs.movenext
next %>
<%if request("page")>1 then%>
<a Href="index.asp?Page=<% = 1%>">首页</a> <a Href="index.asp?Page=<% =request("page") -1 %>">上一页</a>
<%end if %>
<%if request("page")<>rs.pagecount then %>
<a Href="index.asp?Page=<% =request("page") + 1%>">下一页</a>
<a Href="index.asp?Page=<% = rs.PageCount%>">尾页</a>
<% end if %>
</div>
</td>
</tr>
</table>
</td>
</tr>
</table>
</td>
<td width="7" background="img/b2.jpg"></td>
</tr>
</table><!--#include file="di.asp"-->
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -