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

📄 nsort.asp

📁 商品订单管理:商品分类管理 添加与修改商品 管理订单 投诉订单 反馈信息 商品留言管理 管理网站用户:管理用户 管理后台管理员 新闻公告管理:新闻添加(支持图片新闻) 修改删除 首页公告设置 网站常规
💻 ASP
字号:

<!--#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
	
		dim order
	if request("order")<>"" then 
	    order=request("order")
		else
		order="time"
		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=181 align="center" valign="top"><!--#include file="log.asp"-->
<!--#include file="insearch.asp"-->    
<!--#include file="insort.asp"-->
</td>
    <td height=150 valign="top" align="center"> 
                                 <table width="100%" height="5" border="0" cellpadding="0" cellspacing="0" bgcolor="#FFFFFF">
                   <%set ad=server.CreateObject("adodb.recordset")
          sql="select  * from logo where nsort="&nsort_id&""
            ad.open sql,conn,1,1
 do while not ad.eof
            %>                    <tr> 
                      <td align="center"> 
      <a href="<%=ad("url")%>"target="_blank"><img src="<%=ad("banner")%>" width="575" height="118" border="0"></a></td>
                    </tr>
<% ad.movenext
loop
ad.close
%>

                    <%set rs=server.createobject("adodb.recordset")
sort_id=trim(request("sort_id"))
      if sort_id=empty then
          response.redirect "index.asp"
      end if
	  
	    sql="select * from nsort where nsort_id="&cstr(nsort_id)
   rs.open sql,conn,1,1
	if not rs.eof then
		Nsort_name=rs("Nsort_name")
 	end if
	rs.close
       
      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

if order="time" then
    sql="select * from hw where Nsort_id="+cstr(Nsort_id)+" and sort_id="+cstr(sort_id)+"  order by hw_id desc" 
	elseif order="price1" then
    sql="select * from hw where Nsort_id="+cstr(Nsort_id)+" and sort_id="+cstr(sort_id)+"  order by hw_cash desc , hw_id desc"
	elseif order="price2" then
	sql="select * from hw where Nsort_id="+cstr(Nsort_id)+" and sort_id="+cstr(sort_id)+"  order by hw_cash asc , hw_id desc"
	end if
      
      rs.open sql,conn,3,3
      if rs.eof then
          response.write "Sorry ,there are no products in this sort!"
          response.end
       
      else
          rs.pagesize=16
          totalrec=rs.recordcount
          totalpage=rs.pagecount
          if page>totalpage then page=totalpage
          rs.absolutepage=page
          rs.cachesize=rs.pagesize
          %>
                    <tr> 
                      <td height="2"> 
                        <table width="100%" border="0" cellspacing="0" cellpadding="0">
                          <tr><td width="51%" height="25">
							<div align="center">
								<table width="575" border="0" height="25" bgcolor="#F7F7F7">
                                  <tr> 
                                    <td style="border-left-width: 1px; border-right-width: 1px; border-top: 1px solid #C8C8C8; border-bottom: 1px solid #C8C8C8" height="25"><div align="left">Sort: <b><%=Nsort_name%></b>,Total:<b><%=totalrec%></b> ,These are <%=(page-1)*16+1%>-<%if page+1<=totalpage then%><%=page*16%><%else%><%=totalrec%><%end if%></div></td>
                                  </tr>
                                </table></div>
							</td>
                            </tr>
                        </table>
                      </td>
                    </tr>
                    <tr> 
                      <td width="100%"> 
                                   <table width="100%" border="0" align="center" cellpadding="0" cellspacing="0">
                                                    <tr> 
													<%i=0
          do while not rs.eof and (i<rs.pagesize)
          i=i+1
 								%>
                                                      <td width="25%" height="134" align="left" bgcolor="#FFFFFF">
														<div align="center">
<table width="150" border="0" cellpadding="0" style="border-collapse: collapse" bordercolor="#111111">
                      
                      <tr> 
                        <td align="center" width="150" height="100">
                        <a target="_blank" href="views.asp?hw_id=<%=rs("hw_id")%>">
                        <img border="0" src="<%=rs("hw_pic")%>" width="90" height="90"  style="border: 1px solid #C0C0C0"></a></td>
                      </tr>	<tr> 
                        <td valign="bottom" align="center" height="20"><b><%=rs("hw_name")%></b></td>
                      </tr>
						<tr>
                        <td align="center">Market Price:<s><%=rs("pifa")%></s>RMB</td>
                      </tr>
						<tr>
                        <td align="center">Member Price:<font color="#D03430"><%=rs("hw_cash")%></font>RMB</td>
                      </tr>
					
                      <tr> 
                        <td align="center">Points:<%=rs("isbn")%></td>
                      </tr>
                      <tr> 
                        <td valign="top" align="center">
                        <a target="_blank" href="views.asp?hw_id=<%=rs("hw_id")%>">
						<img border="0" src="img/xiang.gif"></a> 
                        <a href='javascript:openbag(<%=rs("hw_id")%>)'>
						<img border="0" src="img/buy.gif"></a></td>
                      </tr>
                      </table>
</div>
													</td>
														          <%
		if (i mod 4=0) and i>=4 then
%>
                                                    </tr>
													<tr>
													          <%
	end if
rs.movenext
loop
rs.close
%>
                                                       </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:<%=page%> 
                          /Total: <%=totalpage%> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
                          <%if page-1>0 then%> 
                          <font color=666666> 
                          <a href="nsort.asp?sort_id=<%=sort_id%>&nsort_id=<%=Nsort_id%>&page=<%=page-1%>">Last</a></font> 
                          <%else%>
                          Last&nbsp;&nbsp;&nbsp; <%end if%><%if page+1<=totalpage then%></strong> 
                          <font color=666666> 
                          <strong>
                          <a href="nsort.asp?sort_id=<%=sort_id%>&nsort_id=<%=Nsort_id%>&amp;page=<%=page+1%>">Next</a> 
                          <%else%>
                          Next 
                          <%
						  end if
						  end if
						  %>
                          </strong></font></p>
                      </td>
                    </tr>
                  </table>
    </td>
  </tr>
  <tr> 
    <td colspan=4 height=2></td>
  </tr>
  </tbody> 
</table>
<script language="JavaScript" type="text/JavaScript">
<!--
function MM_jumpMenu(targ,selObj,restore){ //v3.0
  eval(targ+".location='"+selObj.options[selObj.selectedIndex].value+"'");
  if (restore) selObj.selectedIndex=0;
}
//-->
</script>
<!--#include file="copy.asp"-->

⌨️ 快捷键说明

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