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

📄 commendproduct.asp

📁 相对于流通企业
💻 ASP
📖 第 1 页 / 共 2 页
字号:
<!--#include file="Head.asp"-->
<div align="center">
  <table width="868" border="0" cellspacing="0" cellpadding="0" class="Outside">
    <tr>
      <td width="200" height="300" valign="top" bgcolor="#F2F2F2"><table width="100%" border="0" cellspacing="0" cellpadding="0">
        <tr>
          <td width="200"><img src="Images/Pro_menu_title.gif" width="200" height="40"></td>
        </tr>
        <tr>
          <td bgcolor="#F2F2F2">&nbsp;</td>
        </tr>
        <tr>
          <td align="center" bgcolor="#F2F2F2"></td>
        </tr>
        <tr>
          <td align="center" bgcolor="#F2F2F2"><% =WebMenu("suqun_Productsort",0)%></td>
        </tr>
        <tr>
          <td height="30" bgcolor="#F2F2F2">&nbsp;</td>
        </tr>
        <tr>
          <td><img src="Images/Search_title.gif" width="200" height="14"></td>
        </tr>
        <tr>
          <td bgcolor="#F2F2F2">&nbsp;</td>
        </tr>
        <tr>
          <td align="center" bgcolor="#F2F2F2"><%=SearchForm()%></td>
        </tr>
        <tr>
          <td bgcolor="#F2F2F2">&nbsp;</td>
        </tr>
    <td bgcolor="#DEDEDE"><img src="Images/Index_Left_Quick.gif" alt="快速查看" width="190" height="30" /></td>
  </tr>
  <tr>
    <td height="88" align="center"><table width="100" border="0" cellspacing="0" cellpadding="0" class="Index-Left-Bot1">
      <tr>
        <td width="24" height="21"><img src="Images/Arrow_03.gif" alt="信息检索" width="13" height="13" /></td>
        <td width="76" height="21"><a href="CommendProduct.asp">推 荐 产 品</a></td>
      </tr>
      <tr>
        <td height="21"><img src="Images/Arrow_03.gif" alt="信息检索" width="13" height="13" /></td>
        <td height="21"><a href="HotProduct.asp">热 门 产 品</a></td>
      </tr>
      <tr>
        <td height="21"><img src="Images/Arrow_03.gif" alt="信息检索" width="13" height="13" /></td>
        <td height="21"><a href="NewProduct.asp">新 出 产 品</a></td>
      </tr>
    </table></td>
  </tr>
  <tr>
      </table></td>
      <td width="4"></td>
      <td valign="top" class="AllCenter">
	  <table width="664" border="0" cellspacing="0" cellpadding="0">
        <tr>
          <td width="30" height="32" align="center" bgcolor="#F4F4F4"><img src="Images/Arrow_01.gif" width="14" height="11"></td>
          <td bgcolor="#F4F4F4" class="Location"><a href="../index.asp">首页</a><img src="Images/Arrow_02.gif" width="13" height="12" align="absmiddle"><a href='CommendProduct.asp'>推荐产品</a><% if not request.QueryString("SortID")="" then WebLocation(request.QueryString("SortID")) %></td>
          <td width="80" bgcolor="#F4F4F4" class="Location">
            <select name="ShowStyle" onChange="window.location.href('ProductOption.asp?Style='+this.value+'&<%=Request.ServerVariables("QUERY_STRING")%>');">
              <option selected>查看方式</option>
              <option value="Shopwindow">橱窗</option>
              <option value="List">列表</option>
              <option value="Brief">简介</option>
            </select>
          </td>
          </tr>
      </table>
      <table width="664" border="0" cellspacing="0" cellpadding="0">
		<% ChildSort() %>
        <tr>
          <td height="4" bgcolor="#FFFFFF"></td>
          <td height="4" bgcolor="#FFFFFF"></td>
          <td height="4" bgcolor="#FFFFFF"></td>
        </tr>
      </table>
      <table width="664" border="0" cellspacing="0" cellpadding="0">
        <tr>
          <td width="30" height="12"></td>
          <td></td>
          <td width="30"></td>
        </tr>
        <tr>
          <td>&nbsp;</td>
          <td><%=ContentList()%></td>
          <td>&nbsp;</td>
        </tr>
        <tr>
          <td height="30"></td>
          <td></td>
          <td></td>
        </tr>
      </table>
	  </td>
    </tr>
  </table>
</div>
<%
Function WebMenu(DataFrom,ID)
  Dim rs,sql
  Set rs=server.CreateObject("adodb.recordset")
  sql="Select * From "&DataFrom&" where ParentID="&id&" and ViewFlag"&LangData&" order by id"
  rs.open sql,conn,1,1
  response.write("<table width='160' border='0' cellspacing='0' cellpadding='0'>")
  if id=0 and rs.bof and rs.eof then
    response.write "<tr><td align='center'>暂无相关信息</td></tr>"
  else
    while not rs.eof
      response.write "<tr class='WebMenu'><td width='24'><img src='Images/Arrow_03.gif' width='13' height='13'></td>"
      response.write "<td><a href='ProductList.asp?SortID="&rs("ID")&"&SortPath="&rs("SortPath")&"'>"&rs("SortName"&LangData)&"</a></td></tr>"
      rs.movenext
	wend
  end if
  response.write("</table>")
  rs.close
  set rs=nothing
end function

Function WebLocation(ID)
  Dim rs,sql,LocationText
  Set rs=server.CreateObject("adodb.recordset")
  sql="Select * From suqun_Productsort where ViewFlag"&LangData&" and ID="&ID
  rs.open sql,conn,1,1
  if rs.bof and rs.eof then
    response.write "<img src='Images/Arrow_02.gif' align='absmiddle'>错误"
    exit function
  end if
  LocationText="<img src='Images/Arrow_02.gif' align='absmiddle'><a href='ProductList.asp?SortID="&rs("ID")&"&SortPath="&rs("SortPath")&"'>"&rs("SortName"&LangData)&"</a>"
  if rs("ParentID")<>0 then WebLocation rs("ParentID")
  response.write LocationText
End Function

function ChildSort()
  dim ParentID
  ParentID=request.QueryString("SortID")
  if ParentID="" or (not isnumeric(ParentID)) then exit function
  dim rs,sql
  set rs = server.createobject("adodb.recordset")
  sql="select * from suqun_Productsort where ViewFlag"&LangData&" and ParentID="&ParentID&" order by ID desc"
  rs.open sql,conn,1,1
  if rs.bof and rs.eof then
    exit function
  else
    response.write "<tr><td width='30'></td><td height='22'></td><td class='ListTitle' align='center'>"
	while not rs.eof
	response.write "&nbsp;<font color='#FF0000'>|</font>&nbsp;<a href='ProductList.asp?SortID="&rs("ID")&"&SortPath="&rs("SortPath")&"'>"&rs("SortName"&LangData)&"</a>&nbsp;<font color='#FF0000'>|</font>"
	rs.movenext
	wend
    response.write "</td><td width='30'></td></tr>"    
  end if
  rs.close
  set rs=nothing
end function

function ContentList()
  dim SortPath
      SortPath=request.QueryString("SortPath")
  dim idCount'记录总数
  dim pages'每页条数
      if request.cookies("Style")="Shopwindow" or request.cookies("Style")="" then
          pages=12
        elseif request.cookies("Style")="List" then
          pages=10
        elseif request.cookies("Style")="Brief" then
          pages=5
        end if 
  dim pagec'总页数
  dim page'页码
      page=clng(request("Page"))
  dim pagenc'每页显示的分页页码数量=pagenc*2+1
      pagenc=2
  dim pagenmax'每页显示的分页的最大页码
  dim pagenmin'每页显示的分页的最小页码
  dim datafrom'数据表名
      datafrom="suqun_Products"
  dim datawhere'数据条件
      if SortPath<>"" then'是否查看的分类产品
		 datawhere="where CommendFlag and ViewFlag"&LangData&" and Instr(SortPath,'"&SortPath&"')>0 "
      else
		 datawhere="where CommendFlag and ViewFlag"&LangData&" "
	  end if
  dim sqlid'本页需要用到的id
  dim Myself,PATH_INFO,QUERY_STRING'本页地址和参数

⌨️ 快捷键说明

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