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

📄 productclass2.asp

📁 一套很早的多用户电子商务程序
💻 ASP
📖 第 1 页 / 共 2 页
字号:
        <div align="center"> 
          <center>
            <table width="170" height="147" border="0" align="center" cellpadding="0" cellspacing="0">
              <tr> 
                <td bgcolor="#ffcc39" height="17" valign="bottom"> <p align="center"><b><font color="#FFFFFF">商 品 分 类</font></b> 
                </td>
              </tr>
              <tr> 
                <td height="3"> </td>
              </tr>
              <tr> 
                <td height="250" valign="top" > 
                  <%
set rs_class_1=server.createobject("adodb.recordset")
sqltext2="select * from Class_1 "
rs_class_1.open sqltext2,conn,1,1
While Not rs_class_1.EOF
%>
                  <table width="100%" border="0" cellspacing="3" cellpadding="0">
                    <tr> 
                      <td> 
                        <%
set rs_p2=server.createobject("adodb.recordset")               
sqltext3="select * from Class_2 where Class_1_Name='" & rs_class_1("Class_1_Name") & "'"               
rs_p2.open sqltext3,conn,1,1				                
%>
                        <%=rs_class_1("Class_1_Name")%><br> 
                        <%While Not rs_p2.EOF%>
                        <a href="ProductClass.asp?ProductClass_1=<%=rs_class_1("Class_1_Name")%>&ProductClass_2=<%=rs_p2("Class_2_Name")%>"><%=rs_p2("Class_2_Name")%></a> 
                        <%               
rs_p2.MoveNext               
j=j+1               
Wend               
rs_p2.close               
%>
                        <table width="153" border="0" cellspacing="0" cellpadding="0">
                          <tr> 
                            <td height="3"></td>
                          </tr>
                          <tr> 
                            <td height="1" bgcolor="#EAAF00"></td>
                          </tr>
                          <tr> 
                            <td height="3"></td>
                          </tr>
                        </table></td>
                    </tr>
                  </table>
                  <%               
rs_class_1.MoveNext               
Wend               
rs_class_1.close          
%>
                </td>
              </tr>
            </table>
          </center>
        </div></td>
      <td width="7" height="62"></td>
      <td width="600" height="62" valign="top"> 
        <div align="center"> 
          <table border="0" cellpadding="0" cellspacing="0" width="100%" class=main1 height="83" >
            <tr> 
              <td width="15%" height="22" valign="top"><%=ProductClass_1%>===&gt;&gt;</td>
              <td width="85%" height="22" valign="top"> 
	<% 
	set rs_class_2=server.createobject("adodb.recordset")               
	sqltext3="select * from Class_2 where Class_1_Name='" & ProductClass_1 & "'"               
	rs_class_2.open sqltext3,conn,1,1
	do while not rs_class_2.eof%>
	<><a href="productclass.asp?ProductClass_1=<%=rs_class_2("Class_1_Name")%>&ProductClass_2=<%=rs_class_2("Class_2_Name")%>"><%=rs_class_2("Class_2_Name")%></a> 
	<%rs_class_2.movenext  
	loop  
	rs_class_2.close  
	%>
              </td>
            </tr>
            <tr> 
              <td height="1" colspan="2" valign="middle" bgcolor="#999999"> </td>
            </tr>
            <tr> 
              <td height="15" valign="middle" colspan="2"> </td>
            </tr>
            <tr> 
              <td height="31" colspan="2"> <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>"                                                      
End if %>
<%                                                    
'/////////////////////////////////////显示帖子的子程序////// ///////////////////////////////////                                                     
row_count=1  
Sub list()
i=0                                                      
 Do While Not rs.EOF%>
  <td width="160" align="center"  valign="top"><a href="<%=rs("p_shop")%>/default.asp?sb=product&Product_id=<%=rs("Product_id")%>" target="_blank"><img src="<%=rs("small_pic")%>" name="small" width="75"  height="78" border="0"  ></a>
  <br>
	<a href="<%=rs("p_shop")%>/default.asp?sb=product&Product_id=<%=rs("Product_id")%>"><%=rs("Product_Name")%></a><br>
	<font color="#cc0000">销售商:</font><%=rs("p_shop")%><font color="#cc0000"><br>
	会员价:</font><%=rs("P_NewPrice")%>元<br> <a href="javascript:openbag('check.asp?cpbm=<%=rs("Product_Id")%>&amp;shopname=<%=rs("p_shop")%>')"><img style="CURSOR: hand" height="22" src="images/che1.gif" width="56" align="absMiddle" border="0"></a> 
	<br> <br> </td>
  <%if row_count mod 4 =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>                                                     
  <table width="778" border="0" cellpadding="0" cellspacing="0" bgcolor="#B8A194">
    <tr>
      <td height="1"> </td>
    </tr>
  </table>
</div>                                                     
<%                                                     
'显示翻页的子程序                                                     
sub showpages()%>                   
<table  border="0" cellPadding="0" cellSpacing="0" width="96%" >            
<form method="POST" action="ProductClass2.asp"> 
<tr>            
<td width="100%" height="28"> </td>            
</tr>                                                      
<tr>                             
<td >                                                     
<INPUT  type=hidden value=<%=ProductClass_1%> name=ProductClass_1>                                                     
<table border="0" cellPadding="0" cellSpacing="0" width="100%" height="30">                                
                                                     
   <tr>                               
                                                   
            <td> <div align="center"><font color="#000000"> 
                <%                                                     
   If currentpage > 1 Then                                                     
      response.write "<a href='ProductClass2.asp?&page="+cstr(1)+"&ProductClass_1="+Cstr(ProductClass_1)+"'><font color='#000000'>首页</font></a><font color='#000000'><b>-</b></font>"                                                       
      Response.write "<a href='ProductClass2.asp?page="+Cstr(currentpage-1)+"&ProductClass_1="+Cstr(ProductClass_1)+"'><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='ProductClass2.asp?page="+Cstr(currentPage+1)+"&ProductClass_1="+Cstr(ProductClass_1)+"'><font color='#000000'>后页</font></a><font color='#000000'><b>-</b></font>"                                                     
      Response.write "<a href='ProductClass2.asp?page="+Cstr(Rs.PageCount)+"&ProductClass_1="+Cstr(ProductClass_1)+"'><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 "<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>&nbsp;&nbsp;"                                                        
%>
                </font> </div></td>                                                       
   </tr>                                                     
  </table>                                                     
                                                   
</td></tr>
</form>                                                      
</table>                                                                                                          
<%end sub%> 
<!--#include file="bottom.asp" -->                                                                            
</body>                                                     
                                                     

⌨️ 快捷键说明

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