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

📄 productclass.txt

📁 123基于web的网络购物系统附毕业设计论文
💻 TXT
字号:
<%@ LANGUAGE="VBSCRIPT" %>
<!--#include file="conn.asp" -->
<%
ProductClass_2=request("ProductClass_2")
set rs=server.createobject("adodb.recordset")
sqltext="select  * from Product  Where Class_2='"& ProductClass_2 &"' order by regtime desc"
rs.open sqltext,conn,1,1

dim MaxPerPage
MaxPerPage=9

'取得页数,并判断用户输入的是否数字类型的数据,如不是将以第一页显示
dim text,checkpage
text="0123456789"
 Rs.PageSize=MaxPerPage
for i=1 to len(request("page"))
   checkpage=instr(1,text,mid(request("page"),i,1))
   if checkpage=0 then
      exit for 
   end if
next

If checkpage<>0 then
      If NOT IsEmpty(request("page")) Then
        CurrentPage=Cint(request("page"))
        If CurrentPage < 1 Then CurrentPage = 1
        If CurrentPage > Rs.PageCount Then CurrentPage = Rs.PageCount
      Else
        CurrentPage= 1
      End If
      If not Rs.eof Then Rs.AbsolutePage = CurrentPage end if
Else
   CurrentPage=1
End if

%>

<html>

<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<meta name="GENERATOR" content="Microsoft FrontPage 4.0">
<meta name="ProgId" content="FrontPage.Editor.Document">
<STYLE type=text/css>.main {
	FONT-SIZE: 12px
}
.main1 {
	FONT-SIZE: 14px
}
.main2 {
	FONT-SIZE: 16px
}
.main3 {
	FONT-SIZE: 7px
}
.main4 {
	FONT-SIZE: 10px
}
A:link {
	COLOR: #000000; TEXT-DECORATION: none
}
A:visited {
	COLOR: #000000; TEXT-DECORATION: none
}
A:active {
	COLOR: #ff0000; TEXT-DECORATION: none
}
A:hover {
	COLOR: #aa0000; TEXT-DECORATION: underline
}
</STYLE>
<script>
  function openbag(id) { window.open("check.asp?cpbm="+id,"","height=200,width=600,left=190,top=0,resizable=yes,scrollbars=yes,status=no,toolbar=no,menubar=no,location=no");} 
</script>
<title>产品分类</title>
</head>

<body>

<table border="1" cellpadding="0" cellspacing="0" width="100%" bordercolorlight="#000080" bordercolordark="#FFFFFF" height="19">
  <tr>
    <td width="100%" bgcolor="#6d8e4d"  height="20">
      <p align="right"><font color="#FFFFFF" class="main3">●</font><span class="main1"><font color="#FFFFFF"><a href="reg_user.htm">会员注册</a>   
      </font></span><font color="#FFFFFF" class="main3">●</font><span class="main1"><font color="#FFFFFF">订单查询                                                                                   
      </font></span><font color="#FFFFFF" class="main3">●</font><span class="main1"><font color="#FFFFFF"><a href="javascript:openbag()">查看购物车</a></font></span></p>
    </td>
  </tr>
</table>

<table border="1" cellpadding="0" cellspacing="0" width="100%" bordercolorlight="#E6E4C4" bordercolordark="#E8E4C8" >
  <tr>
    <td width="100%" bgcolor="#e6e4c4" class="main1"> </td>
  </tr>
</table>

<div align="center">
  <center>
  <table border="0" cellpadding="0" cellspacing="0" width="100%" height="80" background="images/back.gif">
    <tr>
      <td width="100%" colspan="3" height="18"></td>
    </tr>
    <tr>
      <td width="21%" height="62" valign="top">
         <table border="0" cellpadding="0" cellspacing="0" width="100%" class=main1 height="611" bgcolor="#F7F7F7">
            <tr>
              <td width="100%" bgcolor="#6D8E4D" height="22"><font color="#FFFFFF">&nbsp;会员登录</font></td>
            </tr>
            <tr>
              <td width="100%" height="88"> 
<form method="POST" action="LoginCheck.asp">
<p align="center"><br>
用户:<input type="text" name="UserName" size="11"><br>
密码:<input type="password" name="UserPass" size="11"><br>
<br>
<input type="submit" value="登录" name="B1" tabindex="1" style="font-size: 14px"><input type="reset" value="重置" name="B2" style="font-size: 14px">
</form>
</td>
            </tr>
            <tr>
              <td width="100%" height="22" bgcolor="#6D8E4D">&nbsp;<font color="#FFFFFF">商品检索</font></td>
            </tr>
            <tr>
              <td width="100%" height="60">
<form method='POST' action='ProductSearch.asp'>
<div align='center'><p><br>
请填入商品名称<br>
<input type='text' name='Product_Name' size='11' class='a'><br>
<select name='Product_Class' size='1' tabindex='0' class='a' style="font-size: 14px">
<option value='电脑整机'>台式机</option>
<option value='硬件外设'>CPU</option>
<option value='网络设备'>网卡</option>
<option value="移动数码">MP3</option>
<option value="软件速递">办公软件</option>
</select><br>
<br>
<input type='submit' value='查询' name='Submit' class='a' style="font-size: 14px">&nbsp;<input type='reset' value='重填' name='Reset' class='a' style="font-size: 14px"></p>
</form>
</div>
</td>
            </tr>
            <tr>
              <td width="100%" height="22" bgcolor="#6D8E4D">
                <font color="#FFFFFF">
                &nbsp;订单查询</font>
</td>
            </tr>
            <tr>
              <td width="100%" height="15">
<form method='POST' action='OrderListFind.asp'>
<div align='center'><br>
请填入订单号码<br>
<algin='center'><input type='text' name='Form_Id' size='10'><br>
<br>
<input type='submit' value='查询' name='djB1' class='a' style="font-size: 14px">&nbsp;<input type='reset' value='重填' name='djb2' class='a' style="font-size: 14px">
</div></form>
</td>
            </tr>
            <tr>
              <td width="100%" height="365">
                 
</td>
            </tr>
          </table>
</td>
      <td width="2%" height="62"></td>
      <td width="77%" height="62" valign="top">
        <div align="center">
          <table border="0" cellpadding="0" cellspacing="0" width="100%" class=main1 height="92" >
            <tr>
              <td width="100%" bgcolor="#E6E4C4" height="22" valign="middle">&nbsp;<a href="default.asp">首页</a>                                                    
                &gt;&gt; <%=request("ProductClass_1")%> - <%=ProductClass_2%></td>                                                                      
            </tr>
            <tr>
              <td width="100%" height="15" valign="middle">&nbsp;</td>                                                  
            </tr>
            <tr>
              <td width="100%" height="70">
                <div align="center">
                  <table border="0" cellpadding="0" cellspacing="0" width="100%" height="148" class=main1>
                    <tr>
<%
'假如没有商品时
If rs.eof and rs.bof then 
   response.write "<td><p align='center'><font color='#ff0000'>还没任何商品资料</font></p></td>"
   response.end
End if %>

                    <%row_count=1
                    '显示帖子的子程序
					Sub list()%>
                    <%i=0
                     Do While Not rs.EOF%>
                      <td width="160" align="center"  valign="top">
                        <a href="ProductDetail.asp?ProductNO=<%=rs("Product_No")%>">
                        <img border="0" src="<%=rs("p_pic")%>">
                        </a>
                        <p><a href="ProductDetail.asp?ProductNO=<%=rs("Product_No")%>">
                        <%=rs("Product_Name")%></a></p>
                        <p><font color="#cc0000">市场价:</font><strike><%=rs("P_OldPrice")%>元</strike><font color="#cc0000"><br>
                        会员价:</font><%=rs("P_NewPrice")%>元<br>
                        <a href='javascript:openbag(<%=rs("Product_Id")%>)'><img style="CURSOR: hand" height="22" src="images/che1.gif" width="56" align="absMiddle" border="0"></a></p><br>
                      </td>
                      <%if row_count mod 3 =0 then%></tr><tr><%end if%>
                      <%
                        i=i+1
  					    if i >= MaxPerpage then exit do
				    	rs.MoveNext
					    row_count=row_count+1
						Loop
					end Sub
					  %>
<% call list
   If Rs.recordcount > MaxPerPage then
   call showpages
 end if%>
 				</tr>
                  </table>

     </div>
              </td>
            </tr>
          </table>
        </div>
        </td>
    </tr>
  </table>
</div>
<%
'显示翻页的子程序
sub showpages()%>
<table bgColor="#f8e8a0" border="0" cellPadding="0" cellSpacing="0" width="400" >  
<tr><td >

<form method="POST" action="ProductClass.asp">
<INPUT  type=hidden value=<%=ProductClass_2%> name=ProductClass_2>
<table bgColor="#6D8E4D" border="0" cellPadding="0" cellSpacing="0" width="583" height="30">  
   <tr>
    <td  bgcolor="#E6E4C4" class=main1 width="510">   
<font color="#000000">   
<p align="center">   
<%
   Response.write "<font color='#000000'>页面-> </font>"   
   If currentpage > 1 Then
      response.write "<a href='ProductClass.asp?&page="+cstr(1)+"&ProductClass_2="+Cstr(ProductClass_2)+"'><font color='#000000'>首页</font></a><font color='#000000'><b>-</b></font>"  
      Response.write "<a href='ProductClass.asp?page="+Cstr(currentpage-1)+"&ProductClass_2="+Cstr(ProductClass_2)+"'><font color='#000000'>前页</font></a><font color='#000000'><b>-</b></font>"
   Else
      Response.write "<font color='#000000'>首页-</font>"
      Response.write "<font color='#000000'>前页-</font>" 
   End if
   
   If currentpage < Rs.PageCount Then
      Response.write "<a href='ProductClass.asp?page="+Cstr(currentPage+1)+"&ProductClass_2="+Cstr(ProductClass_2)+"'><font color='#000000'>后页</font></a><font color='#000000'><b>-</b></font>"
      Response.write "<a href='ProductClass.asp?page="+Cstr(Rs.PageCount)+"&ProductClass_2="+Cstr(ProductClass_2)+"'><font color='#000000'>尾页</font></a>&nbsp;&nbsp;"
   Else
      Response.write "<font color='#000000'>后页-</font>"
      Response.write "<font color='#000000'>尾页</font>&nbsp;&nbsp;"       
   End if
   Response.write "<font color='#000000'>页次:</font>" & "<font color=#FF0000>" & Cstr(CurrentPage) &  "</font>" & "<font color='#000000'>/" & Cstr(rs.pagecount) & "</font>&nbsp;"
   Response.write "<font color=#ff0000>" & Cstr(MaxPerPage) & "</font>" & "<font color='#000000'>种商品/页&nbsp" & "共</font>" & "<font color=#FF0000>" & Cstr(Rs.RecordCount) & "</font>" & "<font color='#000000'>种商品</font>&nbsp;&nbsp;"

response.write "</td><td align='right'>"
response.write "<font color='#000000' class=main1>到:</font><input type='text' name='page' size=2 maxlength=3 class=smallInput value="&Currentpage&">&nbsp;"
   response.write "<input class=buttonface type='submit'  value='Go'  name='cndok' style='background-color: #E6E4C4'></span>"   
%>    
</font>    
    </td>  
   </tr>
  </table>
  </center>
</td></tr>
</table>
</form>
<%end sub%>
</body>

</html>

⌨️ 快捷键说明

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