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

📄 sort.asp

📁 ASP+ACCESS 产品报价系统 开发环境简单 主要是周杰伦FANs的交互活动
💻 ASP
字号:
<!--#include file="top.asp"-->
<%
	
	dim sort_id, sort_name, Nsort_id, Nsort_name
   	dim totalPut   
   	dim CurrentPage, TotalPages
   set rs=server.createobject("adodb.recordset")
        if request("sort_id")<>"" then
		sort_id=request("sort_id")
   	else
		sort_id=0
   	end if
	if request("sort_id")="" then 
	sort_id=1
	end if
   	if not isempty(request("page")) then
      		currentPage=cint(request("page"))
   	else
      		currentPage=1
   	end if

		'rs.close
   	'else
	'	Nsort_id=0
	'	Nsort_name="分类"
   '	end if
 
  	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
%>
<script>
  function openbag(id) { window.open("basket.asp?hw_id="+id,"","height=420,width=460,left=190,top=10,resizable=yes,scrollbars=yes,status=no,toolbar=no,menubar=no,location=no");} 
</script>
<link href="img/style.css" rel="stylesheet" type="text/css">

<title>&#20135;&#21697;&#20869;&#23481;&#39029;&#38754;</title>
<style type="text/css">
<!--
.style3 {color: #804000; font-weight: bold; }
body {
	background-image: url(image/bj2.gif);
}
.style5 {font-size: x-large}
.style9 {
	font-size: larger;
	font-weight: bold;
}
.style10 {font-size: large}
.style11 {color: #804000; font-weight: bold; font-size: 18px; }
.style14 {color: #FFFFFF}
-->
</style>
<body>
<DIV align=center> 
  <TABLE border=0 cellPadding=0 cellSpacing=0 width=470>
    <TBODY>
      <TR> 
        <TD align=middle bgColor=#ffffff vAlign=top width=513> <TABLE border=0 cellPadding=0 cellSpacing=0 width=470>
            <TBODY>
              <TR> 
                <TD width=330 height="70"><a href="index.asp"><img src="image/top2.jpg" width="500" height="180" border="0"></a></TD>
              </TR>
              <TR> 
                <TD ><table width="98%" height="50" border="0" align="right" cellpadding="0" cellspacing="0">
                    <tr> 
                      <td> 
                        <%
				set rs2=server.createobject("adodb.recordset") 
        sql2="select * from sort order by sort_id desc" 
        rs2.open sql2,conn,3,3 
        do while not rs2.eof
         %>
                      <TD align="right" class="style5" ><span class="style10"><span class="style14"><a href="sort.asp?sort_id=<%=rs2("sort_id")%>" class="style9"><%=rs2("sort_name")%></a></span></span>                       | </TD>
                      <%rs2.movenext
           loop
              rs2.close
              set rs1=nothing
              set rs2=nothing
              %>
                    </tr>
                  </table></TD>
              </TR>
              <TR> 
                <TD align=right width=330><IMG height=2 
            src="img/line002.gif" width=308></TD>
              </TR>
              <TR> 
                <TD align=right width=330>                <span class="style11"><%=session("user_name")%>&#27426;&#36814;&#20320;&#65281;</span><BR></TD>
              </TR>
            </TBODY>
          </TABLE>
          <TABLE border=0 cellPadding=0 cellSpacing=0 width=470>
            <TBODY>
              <TR> 
                <TD width=460><div align="center"></div></TD>
              </TR>
              <TR> 
                <TD width=460 align=middle valign="top"> <table width="100%" border="0" cellspacing="0" cellpadding="0" height="117">
                    <tr> 
                      <td width="128" colspan="2"> <div align="center"> <br>
                          <table width="100%" height="5" border="0" cellpadding="0" cellspacing="0" bgcolor="#FFFFFF">
                            <tr> 
                              <td> <p align="center"> <a target="_blank" href="http://www.freedown.net"> 
                                  </a></td>
                            </tr>
                            <%
					
					sort_id=trim(request("sort_id"))
      if sort_id=empty then
          response.redirect "sort.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=3
          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%">&nbsp;</td>
                                    <td height="25" valign="middle" class="style3"><b><%=sort_name%></b> 
                                    >>>></td>
                                  </tr>
                                </table></td>
                            </tr>
                            <tr> 
                              <td width="478"> <table width="100%" border="0" cellspacing="0" cellpadding="0">
                                  <tr> 
                                    <td valign="top"> <div align="center"> </div>
                                      <table width="100%" border="0" cellspacing="0" cellpadding="0" align="center">
                                        <tr> 
                                          <td valign="top"> <table width="425" 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="100" height="127"></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)%>"><font color="#006699"><u><%=hw_name(i)%></u></font></a></td>
                                                          </tr>
                                                          <tr> 
                                                            <td height="28" style="line-height:20px" bgcolor="#FFFFFF" width="75%"><%=hw_content(i)%></td>
                                                          </tr>
                                                          <tr> 
                                                            <td width="75%" height="28" bgcolor="#FFFFFF" class="style3">&#20250;&#21592;VIP&#20215;&#65306;<%=hw_cash(i)%>&#20803;<br>
                                                              <a href='javascript:openbag(<%=hw_id(i)%>)'>&#36141;&#29289;&#36710;<img src="image/gwc.gif" width="20" height="17" border="0" align="middle"></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="img/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="478" height="20"> <div align="right"><br>
                                  <span class="style3">&#31532;<%=page%>&#39029;/&#20849;<%=totalpage%>&#39029;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
                                  <%if page-1>0 then%>
                                  <a href="sort.asp?sort_id=<%=sort_id%>&page=<%=page-1%>">&#19978;&#19968;&#39029;</a> 
                                  <%else%>
&#19978;&#19968;&#39029;
<%end if%> 
                                  </span>| | <span class="style3">
                                  <%if page+1<=totalpage then%>
                                  <a href="sort.asp?sort_id=<%=sort_id%>&amp;page=<%=page+1%>">&#19979;&#19968;&#39029;</a> 
                                  <%else%>
&#19979;&#19968;&#39029; 
                                  <%end if%>
                                  </span> </div></td>
                            </tr>
                          </table>
                        </div></td>
                    </tr>
                  </table></TD>
              </TR>
            </TBODY>
          </TABLE></TD>
      </TR>
    </TBODY>
  </TABLE>
</DIV>

⌨️ 快捷键说明

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