📄 index.asp
字号:
<!-- #include file="conn.asp" -->
<!--#include file="webconfig.asp"-->
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title><%=webname%></title>
<link href="style.css" rel="stylesheet" type="text/css">
</head>
<body leftmargin="0" topmargin="0" marginwidth="0" marginheight="0">
<!--#include file="include/top.asp" -->
<table width="778" border="0" align="center" cellpadding="0" cellspacing="0">
<tr valign="top">
<td width="1" bgcolor="#cccccc"></td>
<td width="220" height="100"><!-- #include file="include/left.asp" --></td>
<td width="1" bgcolor="cccccc"></td>
<td>
<!--#include file="include/search.asp" -->
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td align="center">
<%
if tongdisp=1 then
response.write "<img src=admin/show_tong.asp?id="&webid&" width='558' border='0' align='absmiddle'>"
end if
%>
</td>
</tr>
</table>
<table width="100%" border="0" cellspacing="0" cellpadding="2">
<tr>
<td width="15" height="25" align="center">
<TABLE cellSpacing=0 cellPadding=0 width="4px" border=0>
<TBODY>
<TR>
<TD bgColor=#ff6600 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 newflag='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 maxperpage=16 '定义每一页显示的数据记录的常量
dim currentpage '定义当前页的变量
rs.pagesize=maxperpage
currentpage=request.querystring("pageid")
if currentpage="" then
currentpage=1
elseif currentpage<1 then
currentpage=1
else
currentpage=clng(currentpage)
if currentpage > rs.pagecount then
currentpage=rs.pagecount
end if
end if
'如果变量currentpage的数据类型不是数值型
'就1赋给变量currentpage
if not isnumeric(currentpage) then
currentpage=1
end if
dim totalput,n '定义变量
totalput=rs.recordcount
if totalput mod maxperpage=0 then
n=totalput\maxperpage
else
n=totalput\maxperpage+1
end if
if n=0 then
n=1
end if
rs.move(currentpage-1)*maxperpage
%>
<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>
</td>
</tr>
<%
rs.movenext
if rs.eof then exit for
next
%>
</table>
<%
rs.close
set rs=nothing
%>
<table width="100%" border="0" cellspacing="0" cellpadding="2">
<tr>
<td width="15" height="25" align="center"> <TABLE cellSpacing=0 cellPadding=0 width="4px" border=0>
<TBODY>
<TR>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -