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

📄 pubselectsp.asp

📁 一个很好的在线购物系统
💻 ASP
字号:

<!--#include file="../include/Pubconn.asp"-->

<HTML>
<HEAD>
<META NAME="GENERATOR" Content="Microsoft FrontPage 4.0">

<link href="../cread.css" rel="stylesheet" type="text/css">
<title></title>
</HEAD>
<%'conn=openconn()%>
<%
bcbz=request("bcbz")
spxh=request("f_xh")
spmc=request("f_mc")
bz=request("bz")
ddbh=request("ddbh")
ddate=request("ddate")
xsbm=request("xsbm")
khxh=request("khxh")
khmc=request("khmc")
ywy=request("ywy")

if request("currentpage")<>"" then
   currentpage=cint(request.querystring("currentpage"))
else
   currentpage=1
end if

set rs=server.createobject("adodb.recordset")
 rs.CursorLocation=3  
rs.CursorType = adOpenStatic
sql="select * from a_productinfo "

if bz="1" then
if spxh<>"" then
sql=sql&"where prodcode like '%"&spxh&"%'"
 end if

 if spmc<>"" then
 if spxh="" then
 sql=sql&"where prodname like '%"&spmc&"%'"
 else
 sql=sql&" and prodname like '%"&spmc&"%'"
 end if
 
end if
 end if
' response.write sql
rs.open sql,pubconn,3,3

 if rs.recordcount>=1 then
 rs.pagesize=10
 if currentpage>=rs.pagecount then
   currentpage=rs.pagecount
else
   if currentpage<1 then
      currentpage=1
   end if
end if
rs.absolutepage=currentpage
  pagenum=rs.pagecount
  if pagenum<1 then
 pagenum=1
 end if
end if
%>
<script language="vbscript"> 
   sub win() 
   window.location="pubselectsp.asp?currentpage="+document.form2.page1.value+"&f_xh="+document.form2.hid1.value+"&f_mc="+document.form2.hid2.value+"&bz="+document.form2.hid3.value 
   end sub 
   
  sub winsub() 
  window.form2.submit 
  window.close 
  end sub 
</script>   
<BODY bgcolor="#FFFFFF">
<table border="0" cellpadding="0" cellspacing="0" width="100%">
  <tr>
    <td width="100%"><b><font size="3"><img border="0" src="../pic/it_22.gif"> 
      </font><font size="2">商品信息</font></b><hr width="40%" size="1" align="left">        
              
    </td>        
  </tr>        
</table>  

 <table> 
          <form name=form1 method="post" action="pubselectsp.asp" > 
             <%if bz="1" then%> 
          <td bgcolor="#F1E8DA" bordercolor="#F1E8DA" bordercolorlight="#F1E8DA"> 
                    商品序号:<input type="text" name="f_xh" size=10 value=<%=spxh%>>&nbsp;              
                    &nbsp;              
                    商品名称:<input type="text" name="f_mc" size=10 value=<%=spmc%>>    
                   <%else%>    
                    商品序号:<input type="text" name="f_xh" size=10 >&nbsp;              
                    &nbsp;              
                    商品名称:<input type="text" name="f_mc" size=10 >             
                
                   <%end if%>              
                              
                  <input type="hidden" name="bz" value="1">    
               <input type="submit" name="Search" value="查询" class=hand style="background-color: #D1D1D1; border-style: solid; border-width: 1">          
                   </form></table> <br>   
                  
               <form name=form2 method="post" action="khdd.asp?ddbh=<%=request("ddbh")%>" target="main">           
               <table border=1 cellspacing="0" width="100%">             
                 <tr>             
                    <td width="10%" bgcolor="#DDD2C4" >   
                      <p align="center">&nbsp;选择</p>  
                    </td>  
                    <td width="30%" align="center" bgcolor="#DDD2C4"><font size="2">商品名称</font></td>                                            
                    <td width="30%" align="center" bgcolor="#DDD2C4"><font size="2">规格型号</font></td>                                            
                    <td width="30%" align="center" bgcolor="#DDD2C4"><font size="2">含税单价</font></td>  
                 </tr>      
                   
                     <%if not rs.eof then  
                      for i=1 to rs.pagesize %>  
             <%                    
 if i mod 2=1 then%>                   
  <tr  bgcolor="#f7f7f7"   >                      
  <%else%>                   
  <tr bgcolor="#EDEBEC" >                    
          <%end if%>                          
       <td width="10%"><input type="radio"  name="f_spxh" value=<%=rs("prodcode")%> ></td>                            
       <td width="30%"><%=rs("prodname")%> </td>                        
       <td width="30%"> <%=rs("standard")%></td>                            
       <td width="30%">  <%=rs("saleprice")%> </td>                            
             </tr>    
                 <%  rs.MoveNext                                                                                                                               
		 if  rs.EOF then                                                                                
		   exit for                                                                                                          
		 end if                                                                                                                               
		 next     
		 %>        
		 <%else%>  
		 <tr>                            
       <td width="10%"> </td>                            
       <td width="30%"></td>                        
       <td width="30%"> </td>                            
       <td width="30%"> </td>                            
             </tr>    
	 <%end if%>  
             </table><br>             
    <input type="hidden" name=hid1 value=<%=spxh%>>   
      <input type="hidden" name=hid2 value=<%=spmc%>>    
      <input type="hidden" name=hid3 value=<%=bz%>>           
   
         
                
          <font size="2">共<%=rs.pagecount%>页 &nbsp;&nbsp;第<%=currentpage%>页   
<a href="PubSelectsp.asp?currentPage=1&bcbz=<%=bcbz%>&ywy=<%=ywy%>&khmc=<%=khmc%>&khxh=<%=khxh%>&xsbm=<%=xsbm%>&ddate=<%=ddate%>&ddbh=<%=ddbh%>&bz=<%=bz%>&f_xh=<%=spxh%>&f_mc=<%=spmc%>"><font size="2">首 页</font></a> 
    <%if pagenum<>0 then            
if currentPage<pagenum then%>  
<a href="PubSelectsp.asp?currentPage=<%=currentpage+1%>&bcbz=<%=bcbz%>&ywy=<%=ywy%>&khmc=<%=khmc%>&khxh=<%=khxh%>&xsbm=<%=xsbm%>&ddate=<%=ddate%>&ddbh=<%=ddbh%>&bz=<%=bz%>&f_xh=<%=spxh%>&f_mc=<%=spmc%>">下一页</a>             
   <% else 
  %>         
     <font size="2">下一页</font>
<%end if                  
if currentPage>1 then%>        
<a href="PubSelectsp.asp?currentPage=<%=currentpage-1%>&bcbz=<%=bcbz%>&ywy=<%=ywy%>&khmc=<%=khmc%>&khxh=<%=khxh%>&xsbm=<%=xsbm%>&ddate=<%=ddate%>&ddbh=<%=ddbh%>&bz=<%=bz%>&f_xh=<%=spxh%>&f_mc=<%=spmc%>">上一页</a>                     
  <% else%>         
<font size="2">上一页</font>            
<%end if                  
end if %>         
 <a href="PubSelectsp.asp?currentPage=<%=rs.pagecount%>&bcbz=<%=bcbz%>&ywy=<%=ywy%>&khmc=<%=khmc%>&khxh=<%=khxh%>&xsbm=<%=xsbm%>&ddate=<%=ddate%>&ddbh=<%=ddbh%>&bz=<%=bz%>&f_xh=<%=spxh%>&f_mc=<%=spmc%>"><font size="2">尾 页</FONT></a>
              
         
<input type="hidden" name=bcbz value="<%=bcbz%>">  
  
<%'<input type="hidden" name="ddbh" value=<=ddbh>>%>    
 
      <input type="hidden" name=ddate value=<%=ddate%>>    
      <input type="hidden" name=xsbm value=<%=xsbm%>>    
   <input type="hidden" name=khxh value=<%=khxh%>>    
      <input type="hidden" name=khmc value=<%=khmc%>>    
     <input type="hidden" name=ywy value=<%=ywy%>>    
     <input type="hidden" name=spbz value="1">  <hr> <br>                        
 <input type="button" value="确定"  onclick=winsub() class=hand style="background-color: #D1D1D1; border-style: solid; border-width: 1">    
                       
          </form>    
                       
              
</BODY>                 
</HTML>

⌨️ 快捷键说明

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