quickbuy.asp

来自「国内第一数字点卡销售程序。功能强大。 完整无错!数据文件经MD5加密!经严格测」· ASP 代码 · 共 234 行

ASP
234
字号
<!--#include file="top.asp"-->
<td width="15" height="3">&nbsp;</td>
<!--#include file="lest.asp"--></td>
  <td width="15" height="30">&nbsp;</td>
			<td width="760" valign="top">
			<div align="center">
			<table border="0" width="760" cellspacing="0" cellpadding="0" height="379">
				<tr>
					<td height="2%" width="610" valign="top" style="padding-left: 5px">
					 <form method="POST" action="quickbuy.asp"   name="myform">
<%dim count
rs.open "select * from shop_Nclass order by Nclassidorder ",conn,1,1%>
<script language = "JavaScript">
var onecount;
onecount=0;
subcat = new Array();
<%
   count = 0
   do while not rs.eof 
%>
subcat[<%=count%>] = new Array("<%= trim(rs("Nclass"))%>","<%= rs("anclassid")%>","<%= rs("Nclassid")%>");
<%
        count = count + 1
        rs.movenext
        loop
        rs.close
%>
		
onecount=<%=count%>;

function changelocation(locationid)
    {
    document.myform.Nclassid.length = 0; 

    var locationid=locationid;
    var i;
    for (i=0;i < onecount; i++)
        {
            if (subcat[i][1] == locationid)
            { //这句不是很理解
             document.myform.Nclassid.options[document.myform.Nclassid.length] = new Option(subcat[i][0], subcat[i][2]);
            }        
        }
        
    }    
</script>
<%
    rs.open "select * from shop_anclass order by anclassidorder",conn,1,1
	if rs.eof and rs.bof then
	response.write "请先添加栏目。"
	response.end
	else
%>
              <font color="#FF6600"><b>大类:</b></font> 
              <select name="anclassid" size="1" id="anclassid" onChange="changelocation(document.myform.anclassid.options[document.myform.anclassid.selectedIndex].value)" class="wenbenkuang">
                <option selected value="<%=rs("anclassid")%>"><%=trim(rs("anclass"))%></option>
                <%      dim selclass
         selclass=rs("anclassid")
        rs.movenext
        do while not rs.eof
%>
                <option value="<%=rs("anclassid")%>"><%=trim(rs("anclass"))%></option>
                <%
        rs.movenext
        loop
	end if
        rs.close
%>
              </select>
               <font color="#FF6600"><b>小类:</b></font>  
              <select name="Nclassid" class="wenbenkuang">
                <%rs.open "select * from shop_Nclass where anclassid="&selclass ,conn,1,1
if not(rs.eof and rs.bof) then
%>
                <option selected value="<%=rs("NclassID")%>"><%=rs("Nclass")%></option>
                <% rs.movenext
do while not rs.eof%>
                <option value="<%=rs("NclassID")%>"><%=rs("Nclass")%></option>
                <% rs.movenext
loop
end if
        rs.close
%>
              </select>           
&nbsp;&nbsp;&nbsp; <input type="submit" value="查询" name="B1" class=input> </form> </td>
				</tr>
				<tr>
					<td height="93%" width="613" valign="top" style="padding-left: 5px">
					<table width="100%" border="0" cellspacing="0" cellpadding="3">
<tr>
<td > 
    <%
      if request("anclassid")="" or request("nclassid")="" then
         sql="select * from hw order by hw_id DESC" 
      else       
         anclassid=srequest(request("anclassid"),1)
         nclassid=srequest(request("nclassid"),1)
         sql="select * from hw where anclassid="&int(anclassid)&" and  nclassid="&int(nclassid)&" order by hw_id DESC"
      end if
      rs.open sql,conn,3,3
      if rs.eof then
          rs.close
          response.write "您所选的类别没有商品"
      %>
      </td></tr></table>
      <br>
      </td>
      </tr>
      </table>
      </td>
		    <td width="1"  background="images/line.jpg"></td>
      </tr>
      </td>
      <!--#include file="copy.asp"-->
      <%
          response.end
      end if
      rs.pagesize=10
      page = cint(request("page"))
      if page = "" then page = 1
      if not(isnumeric(page)) then page=1
      if page<1 then page=1
      if page >= rs.pagecount then page = rs.pagecount
      rs.absolutepage = page
  %> 
</td>
</tr>
<tr>
<td>
<table width="698" border="0" cellspacing="1" cellpadding="3" align="center" bgcolor="#CCCCCC">
<tr bgcolor="#FFFFFF">
<td width="60" align="center"> </td>
<td width="121" align="center">商品名称</td>
<td align="center" width="161">商品简介</td>
<td align="center" width="60">商品类型</td>
<td width="63" align="center">
<div align="center">
市场价格
</div>
</td>
<td width="64" align="center">
<div align="center">
会员价
</div>
</td>
<td width="66" align="center"><% if session("user_vip")="经销商会员" then%>
经销商会员
<%else%>
VIP会员价<%end if%></td>
</tr>
<%
for i=1 to rs.pagesize
%>
<tr bgcolor="#FFFFFF">
<td>
<div align="center">
<a href="basket.asp?hw_id=<%=rs("hw_id")%>"><img border="1" src="picture/<%=rs("hw_pic")%>" width="78" height="82" class="border" alt="详细介绍"></a>
</div>
</td>
<td><div align="center"><a href="basket.asp?hw_id=<%=rs("hw_id")%>"><%=rs("hw_name")%></a><br><br>
	<a href=basket.asp?hw_id=<%=rs("hw_id")%>><img border="0" src="images/p2.jpg" width="93" height="26"></a></div> </td>
<td width="161"> 
          <%if len(rs("hw_content"))>35 then
          rs("hw_content")=left(rs("hw_content"),35)
          response.write rs("hw_content")
          response.write "……"
          else
          response.write rs("hw_content")
          end if
          %>
</td>
<td width="60" align="center">
<%typp=rs("hw_cz")
select case typp
    case 0
      hh="在线取卡"
    case 1
      hh="充值商品"    
   end select
%> 
<font color="#008000"><%=hh%></font>	
</td>
<td>
<div align="center">
¥<s><%=rs("hw_cash")%></s>
</div>
</td>
<td width="64">
<div align="center">
<font color="#ff0000">¥<%=rs("hw_cash1")%></font>
</div>
</td>
<td width="66">
<p align="center">
<font color="#ff0000">¥<% if session("user_vip")="经销商会员" then%><%=rs("hw_cash3")%><%else%><%=rs("hw_cash2")%><%end if%></font>
 </td>
</tr>
<%
rs.movenext
if rs.eof then exit for
next
%>
</table>
</td>
</tr>
<tr>
<td>
                    <p align="center">共有记录<%=rs.recordcount%>条&nbsp;                   
                    <%=page%>/<%=rs.pagecount%>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <A href="<%request.servervariables("document_name")%>?page=<%=page-1%>&nclassid=<%=nclassid%>&anclassid=<%=anclassid%>">上一页</A> <A href="<%request.servervariables("document_name")%>?page=<%=page+1%>&nclassid=<%=nclassid%>&anclassid=<%=anclassid%>">下一页</A>&nbsp;&nbsp;&nbsp; 转到第 <SELECT onchange="window.location='?nclassid=<%=nclassid%>&anclassid=<%=anclassid%>&page='+this.value" name=gopage>              
                    <%for x=1 to rs.pagecount%>
                    <OPTION <%if x=page then%>selected<%end if%> value=<%=x%>><%=x%></OPTION>
                    <%next%>      
                    </SELECT> 页        
                    </div>
                    <%rs.close%> 
</td>
</tr>
</table>	
					
					  </td>
				</tr>
			</table>
			</div>
			</td>
<td width="1" background="images/line.jpg"></td>
		</tr>
		</table>
</div>

</body>

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

⌨️ 快捷键说明

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