📄 index.asp
字号:
<!--#include file="top.asp"-->
<center>
<table border="0" width="760" cellspacing="0" cellpadding="0" height="312">
<tr>
<td width="190" height="312" valign="top" align="left">
<table border="0" width="190" cellspacing="0" cellpadding="0">
<tr>
<td width="190" valign="top" align="left"><!--#include file="left.asp"--></td>
</tr>
</table>
</td>
<td width="380" valign="top" align="left">
<table border="0" width="380" cellspacing="0" cellpadding="0" height="230" bordercolor="#66CCFF">
<tr>
<td width="380" bgcolor="#FF9933" height="18">
最新加入商品
</td>
</tr>
<tr>
<td width="570" valign="top" align="left" bgcolor="#66CCFF">
<table border="0" width="380" cellspacing="1">
<tr>
<%
sql="select top 2 * from hw order by hw_id DESC"
rs.open sql,conn,3,3
if rs.eof then
%>
<td width="380" valign="top" align="left" bgcolor="#FFFFFF">暂且没有商品</td>
<%end if
do while not rs.eof%>
<td width="190" valign="top" align="left" height="140" bgcolor="#FFFFFF">
<p align="center"><a href="<%=rs("hw_pic")%>" target="blank"><img border="0" src="<%=rs("hw_pic")%>" width="100" height="100">
</a>
</center>
<p>商品名称:<%=rs("hw_name")%><br>商品原价:<%=rs("hw_oldcash")%>元<br>商品价格:<%=rs("hw_cash")%>元<br>浏览次数:<%=rs("hw_views")%><br>商品介绍:
<%if len(rs("hw_content"))>30 then
hw_content=left(rs("hw_content"),30)
response.write hw_content
response.write "……"
else
response.write rs("hw_content")
end if
%><br><center><a href="views.asp?hw_id=<%=rs("hw_id")%>">详细资料</a><br><a href='javascript:openbag(<%=rs("hw_id")%>)'><img border="0" src="images/shop.gif"></a></center></td>
<center>
<%rs.movenext
loop
rs.close%>
</tr>
</table>
</center>
</td>
</tr>
<tr>
<td width="380" valign="top" align="left" height="5"></td>
</tr>
<tr>
<td width="380" height="18" bgcolor="#FF9933">最新内容</td>
</tr>
<tr>
<td width="380" valign="top" align="left" bgcolor="#66CCFF">
<table border="0" width="380" cellspacing="1">
<tr>
<td width="100%" bgcolor="#FFFFFF"><%sql="select top 10 * from news order by news_id DESC"
rs.open sql,conn,3,3
if rs.eof then
response.write "暂且没有内容"
end if
do while not rs.eof
if len(rs("news_title"))>28 then
news_title=left(rs("news_title"),28)
%>
<a href="news.asp?news_id=<%=rs("news_id")%>"><%=news_title%>……</a><br>
<%
else
%>
<a href="news.asp?news_id=<%=rs("news_id")%>"><%=rs("news_title")%></a><bR>
<%
end if
rs.movenext
loop
rs.close
%></td>
</tr>
</table>
</td>
</tr>
<tr>
<td width="380" valign="top" align="left" height="5"></td>
</tr>
<%
sql="select * from sort"
rs.open sql,conn,3,3
if rs.eof then
response.write "暂且没有分类"
end if
do while not rs.eof%>
<tr>
<td width="380" height="18" bgcolor="#FF9933"><%=rs("sort_name")%></td>
</tr>
<tr>
<td width="380" valign="top" align="left" bgcolor="#66CCFF">
<table border="0" width="380" cellspacing="1">
<tr>
<%
dim rs1,sql1
sort_id=rs("sort_id")
set rs1=server.createobject("adodb.recordset")
sql1="select top 2 * from hw where sort_id='"&sort_id&"' order by hw_id DESC"
rs1.open sql1,conn,3,3
if rs1.eof then
%>
<td width="380" valign="top" align="left" bgcolor="#FFFFFF">暂且没有商品</td>
<%end if
do while not rs1.eof%>
<td width="190" valign="top" align="left" height="140" bgcolor="#FFFFFF">
<p align="center"><a href="<%=rs1("hw_pic")%>" target="blank"><img border="0" src="<%=rs1("hw_pic")%>" width="100" height="100">
</a>
<p>商品名称:<%=rs1("hw_name")%><br>商品原价:<%=rs1("hw_oldcash")%>元<br>商品价格:<%=rs1("hw_cash")%>元<br>浏览次数:<%=rs1("hw_views")%><br>商品介绍:
<%if len(rs1("hw_content"))>30 then
hw_content=left(rs1("hw_content"),30)
response.write hw_content
response.write "……"
else
response.write rs1("hw_content")
end if
%><br><center><a href="views.asp?hw_id=<%=rs1("hw_id")%>">详细资料</a><br><a href='javascript:openbag(<%=rs1("hw_id")%>)'><img border="0" src="images/shop.gif"></a></center></td>
<%rs1.movenext
loop
rs1.close
set rs1=nothing
%>
</tr>
</table>
</td>
</tr>
<tr>
<td width="570" valign="top" align="left" height="5"></td>
</tr><%rs.movenext
loop
rs.close
set rs1=nothing
%>
<tr>
<td width="380" valign="top" align="left" height="18"></td>
</tr>
<tr>
<td width="380" valign="top" align="left" height="18"></td>
</tr>
<tr>
<td width="380" valign="top" align="left" height="18"></td>
</tr>
<tr>
<td width="380" valign="top" align="left" height="18"></td>
</tr>
<tr>
<td width="380" valign="top" align="left" height="18"></td>
</tr>
<tr>
<td width="380" valign="top" align="left" height="18"></td>
</tr>
</table>
</td>
<td width="190" valign="top" align="left">
<table border="0" width="190" cellspacing="0" cellpadding="0">
<tr>
<td width="190"><!--#include file="right.asp"--></td>
</tr>
</table>
</td>
</tr>
</table>
<!--#include file="copy.asp"-->
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -