⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 index.asp

📁 网上购物系统
💻 ASP
字号:
<!--#include file="conn.asp"-->
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<link href="Image/Main.css" rel="stylesheet" type="text/css" />
<title>首页</title>
</head>

<body>
<!--#include file="top.asp"-->
<table width="760" border="0" align="center" cellpadding="0" cellspacing="0">
  <tr>
    <td height="14"></td>
  </tr>
</table>
<table width="760" border="0" align="center" cellpadding="0" cellspacing="0">
  <tr>
    <td width="180" align="center" valign="top"><table width="100%" border="1"align="center" cellpadding="3" cellspacing="1" bordercolor="#CCCCCC" style="border-collapse: collapse">
      <tr>
        <td height="20" align="center" bgcolor="#eeeeee">文章栏目</td>
      </tr>
      <tr>
        <td> ·<a href="showarticle.asp?action=list">全部文章</a></td>
      </tr>
      <%
Set TiaoRs=Server.CreateObject("AdoDb.RecordSet")
TiaoRs.Open "Select * From articleclass",Conn,1,1
Do While Not TiaoRs.eof 
%>
      <tr>
        <td> ·<a href="showarticle.asp?action=list&aclassid=<%=tiaors(0)%>"><%=tiaors(1)%></a></td>
      </tr>
      <%
tiaors.movenext
Loop
TiaoRs.Close
Set TiaoRs=Nothing
%>
    </table>	
      <table width="100%" height="14" border="0" cellpadding="0" cellspacing="0">
        <tr>
          <td></td>
        </tr>
      </table>
      <table width="100%" border="1"align="center" cellpadding="3" cellspacing="1" bordercolor="#CCCCCC" style="border-collapse: collapse">
        <tr>
          <td height="20" align="center" bgcolor="#eeeeee">产品栏目</td>
        </tr>
        <tr>
          <td> ·<a href="showproduct.asp?action=list">全部产品</a></td>
        </tr>
        <%
Set TiaoRs=Server.CreateObject("AdoDb.RecordSet")
TiaoRs.Open "Select * From productclass",Conn,1,1
Do While Not TiaoRs.eof 
%>
        <tr>
          <td> ·<a href="showproduct.asp?action=list&productclassid=<%=tiaors(0)%>"><%=tiaors(1)%></a></td>
        </tr>
        <%
tiaors.movenext
Loop
TiaoRs.Close
Set TiaoRs=Nothing
%>
      </table>
    </td>
    <td width="5">&nbsp;</td>
    <td width="575" align="center" valign="top"><table width="100%" border="1"align="center" cellpadding="3" cellspacing="1" bordercolor="#CCCCCC" style="border-collapse: collapse">
      <tr>
        <td align="center" valign="middle" bgcolor="#eeeeee">最新文章</td>
      </tr>
<%
set rs=server.CreateObject("adodb.recordset")
sql="select top 10 * from article order by aid desc"
rs.open sql,conn,1,1
do while not rs.eof
%>	  
      <tr>
        <td> ·<a target="_blank" href="showarticle.asp?action=show&aid=<%=rs("aid")%>"><%=rs("aname")%></a></td>
      </tr>
<%
rs.movenext
loop
rs.close
set rs=nothing
%>	  
    </table>
      <table width="100%" height="14" border="0" cellpadding="0" cellspacing="0">
        <tr>
          <td></td>
        </tr>
      </table>
      <table width="100%" border="1"align="center" cellpadding="3" cellspacing="1" bordercolor="#CCCCCC" style="border-collapse: collapse">
        <tr>
          <td align="center" valign="middle" bgcolor="#eeeeee">最新产品</td>
        </tr>
        <tr>
          <td><table width="100%" height="10" border="0" cellpadding="0" cellspacing="0">
            <tr>
              <td></td>
            </tr>
          </table>
<%
set rs=server.createobject("adodb.recordset")
sql="select top 12 * from product order by productclassid desc "
rs.open sql,conn,1,1
if rs.recordcount<>0 then
rs.PageSize=12                       '指示recordset中一页包含的记录数
PageCount=rs.PageCount               '使用PageCount属性可确定Recordset对象中数据的页数
Page=Cint(request("Page")) 
if Page<=0 then Page=1
if request("Page")="" then Page=1
rs.AbsolutePage=page                      '指定当前记录所在的页
%>
<table width="100%" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<%  i=1 
 for j=1 to rs.PageSize
  if not rs.eof then %>
  <td><table width="130" height="130" border="1"align="center" cellpadding="3" cellspacing="1" bordercolor="#CCCCCC" style="border-collapse: collapse">
      <tr>
        <td align="center" valign="middle"><a target="_blank" href="showproduct.asp?action=show&productid=<%=rs("productid")%>"><img src="<%=rs("productpicture")%>"  width="120" height="120" border="0"></a></td>
      </tr>
    </table>
    <br>
<a target="_blank" href="showproduct.asp?action=show&productid=<%=rs("productid")%>"><div align="center"><%=rs("productname")%></div></a><br></td>
 <% if (i mod 4)=0 then%>
	<tr>
<% end if
else 
exit for
end if
i=i+1
rs.movenext
next
else
response.Write("·尚无产品")
end if 
%>               
	</tr>
</table>		  
		  </td>
        </tr>
      </table></td>
  </tr>
</table>
<table width="760" border="0" align="center" cellpadding="0" cellspacing="0">
  <tr>
    <td height="5"></td>
  </tr>
</table>
<!--#include file="foot.asp"-->
</body>
</html>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -