📄 index.asp
字号:
<TD bgColor=#99cc00 height=18></TD>
</TR>
</TBODY>
</TABLE></td>
<td width="60" class="centertitle">特价商品</td>
<td> <TABLE cellSpacing=0 cellPadding=0 width="100%" border=0>
<TBODY>
<TR>
<TD bgColor=#a7afc3 height=3></TD>
</TR>
</TBODY>
</TABLE></td>
</tr>
</table>
<%
sql="select top 6 * from Net008_productlist where hotprice='1'order by adddate desc"
set rs=server.CreateObject("adodb.recordset")
rs.open sql,conn,1,2
if rs.recordcount<0 then
response.write "暂无商品!"
end if
const maxperpage1=15 '定义每一页显示的数据记录的常量
dim currentpage1 '定义当前页的变量
rs.pagesize=maxperpage1
currentpage1=request.querystring("pageid")
if currentpage1="" then
currentpage1=1
elseif currentpage1<1 then
currentpage1=1
else
currentpage1=clng(currentpage1)
if currentpage1 > rs.pagecount then
currentpage1=rs.pagecount
end if
end if
'如果变量currentpage的数据类型不是数值型
'就1赋给变量currentpage
if not isnumeric(currentpage1) then
currentpage1=1
end if
dim totalput1,n1 '定义变量
totalput1=rs.recordcount
if totalput1 mod maxperpage1=0 then
n=totalput1\maxperpage1
else
n=totalput1\maxperpage1+1
end if
if n=0 then
n=1
end if
rs.move(currentpage1-1)*maxperpage1
%>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<%
for j=1 to rs.pagesize/2
%>
<tr>
<td width="50%" align="left" valign="top">
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="130" valign="top"> <table width="100%" border="0" cellspacing="0" cellpadding="2">
<tr>
<td align="center"><a href="showproduct.asp?id=<%=rs("id")%>" target="_blank"><img src="admin/show_productimg.asp?id=<%=rs("id")%>" width="93" height="93" border="0" align="absmiddle"></a></td>
</tr>
<tr>
<td height="30" align=center>[ <a href="showproduct.asp?id=<%=rs("id")%>" class="LeftTypeTitle">详细查看</a>
]</td>
</tr>
</table></td>
<td valign="top"><table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td align="center" class="producttitle" height="30"><%=rs("productname")%></td>
</tr>
<tr>
<td>采用超稳定A级Flash芯片 外观时尚</td>
</tr>
<tr>
<td height="25"> </td>
</tr>
</table>
<table width="100%" border="0" cellspacing="0" cellpadding="2">
<tr>
<td width="50" align="right">市场价:</td>
<td>¥<%=rs("marketprice")%>元</td>
</tr>
<tr>
<td align="right">会员价:</td>
<td>¥<%=rs("newprice")%>元</td>
</tr>
</table>
<table width="100%" border="0" cellspacing="0" cellpadding="2">
<tr>
<td align="center"><a href="shopping.asp?id=<%=rs("id")%>" target="_blank"><img src="images/shopcart.gif" width="74" height="23" border="0"></a></td>
</tr>
</table></td>
</tr>
</table>
<table width="100%">
<tr>
<td background="images/dot.gif" height="1"></td>
</tr>
</table>
<%
rs.movenext
if rs.eof then exit for
%>
</td>
<td background="images/dot.gif" width="1%"></td>
<td width="50%" align="left" valign="top">
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="130" valign="top"> <table width="100%" border="0" cellspacing="0" cellpadding="2">
<tr>
<td align="center"><a href="showproduct.asp?id=<%=rs("id")%>" target="_blank"><img src="admin/show_productimg.asp?id=<%=rs("id")%>" width="93" height="93" border="0" align="absmiddle"></a></td>
</tr>
<tr>
<td height="30" align=center>[ <a href="showproduct.asp?id=<%=rs("id")%>" class="LeftTypeTitle">详细查看</a>
]</td>
</tr>
</table></td>
<td valign="top"><table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td align="center" class="producttitle" height="30"><%=rs("productname")%></td>
</tr>
<tr>
<td>采用超稳定A级Flash芯片 外观时尚</td>
</tr>
<tr>
<td height="25"> </td>
</tr>
</table>
<table width="100%" border="0" cellspacing="0" cellpadding="2">
<tr>
<td width="50" align="right">市场价:</td>
<td>¥<%=rs("marketprice")%>元</td>
</tr>
<tr>
<td align="right">会员价:</td>
<td>¥<%=rs("newprice")%>元</td>
</tr>
</table>
<table width="100%" border="0" cellspacing="0" cellpadding="2">
<tr>
<td align="center"><a href="shopping.asp?id=<%=rs("id")%>" target="_blank"><img src="images/shopcart.gif" width="74" height="23" border="0"></a></td>
</tr>
</table></td>
</tr>
</table>
<table width="100%">
<tr>
<td background="images/dot.gif" height="1"></td>
</tr>
</table>
<%
rs.movenext
if rs.eof then exit for
next
%>
</td>
</tr>
</table>
<%
rs.close
%>
</td>
<td width="1" bgcolor="cccccc"></td>
</tr>
</table>
<!-- #include file="include/bottom.asp" -->
<%
//保存来访人的IP地址
sql="select * from Net008_userip order by adddate desc"
set rs=server.createobject("adodb.recordset")
rs.open sql ,conn,1,2
userip_old=rs("userip")
adddate_old=day(rs("adddate"))
nowdate=day(now())
rs.close
userip=request.ServerVariables("REMOTE_ADDR")
sql="select * from Net008_userip where userip='"&userip&"' order by adddate desc"
set rs=server.createobject("adodb.recordset")
rs.open sql ,conn,1,2
if rs.recordcount<1 then
rs.addnew
rs("userip")=userip
rs("adddate")=now()
rs.update
rs.close
set rs=nothing
elseif adddate_old<>nowdate then
rs.addnew
rs("userip")=userip
rs("adddate")=now()
rs.update
rs.close
set rs=nothing
else
rs("adddate")=now()
rs.update
rs.close
set rs=nothing
end if
%>
</body>
</html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -