<!--#include file="Include/Const.Asp" -->
<!--#include file="Include/NoSQL.Asp" -->
<!--#include file="Include/ConnSiteData.Asp" -->
<%
Call SiteInfo()
If ISHTML = 1 Then
    Response.expires = 0
    Response.expiresabsolute = Now() - 1
    Response.addHeader "pragma", "no-cache"
    Response.addHeader "cache-control", "private"
    Response.CacheControl = "no-cache"
End If
If Request.QueryString("SortID") = "" Then
    SeoTitle = "公司产品"
ElseIf Not IsNumeric(Request.QueryString("SortID")) Then
    SeoTitle = "参数错误"
ElseIf conn.Execute("Select * From Qianbo_ProductSort Where ViewFlag And  ID = " & Request.QueryString("SortID")).EOF Then
    SeoTitle = "参数错误"
Else
    Set rs = server.CreateObject("adodb.recordset")
    sql = "Select * From Qianbo_ProductSort Where ViewFlag And ID = " & Request.QueryString("SortID")
    rs.Open sql, conn, 1, 1
    SeoTitle = rs("SortName")
	SortPath = rs("SortPath")
    rs.Close
    Set rs = Nothing
End If
%>
<!DOCTYPE html>
<html lang="zh-CN">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=Edge,chrome=1">
<meta name="renderer" content="webkit">
<meta name="viewport" content="initial-scale=1.0,user-scalable=no,maximum-scale=1,width=device-width">
<title><% =SeoTitle %> - <% =SiteTitle %></title>
<meta name="keywords" content="<% =Keywords %>" />
<meta name="description" content="<% =Descriptions %>" />
<link rel="stylesheet" id="rs-plugin-settings-css"  href="/Images/assets/css/settings.css?ver=5.2.5" type="text/css" media="all" />
<style id="rs-plugin-settings-inline-css" type="text/css">
.tp-caption a { color: #ff7302; text-shadow: none; -webkit-transition: all 0.2s ease-out; -moz-transition: all 0.2s ease-out; -o-transition: all 0.2s ease-out; -ms-transition: all 0.2s ease-out; }
.tp-caption a:hover { color: #ffa902; }
.tp-caption a { color: #ff7302; text-shadow: none; -webkit-transition: all 0.2s ease-out; -moz-transition: all 0.2s ease-out; -o-transition: all 0.2s ease-out; -ms-transition: all 0.2s ease-out; }
.tp-caption a:hover { color: #ffa902; }
.tp-caption a.btn, .tp-caption a.btn:hover { color: #fff; }
</style>
<link rel="stylesheet" id="stylesheet-css"  href="/Images/themes/css/style.css?ver=1.5" type="text/css" media="all" />
<script type="text/javascript" src="/Images/themes/js/jquery.min.js?ver=1.11.3"></script>
<script type="text/javascript" src="/Images/assets/js/jquery.themepunch.tools.min.js?ver=5.2.5"></script>
<script type="text/javascript" src="/Images/assets/js/jquery.themepunch.revolution.min.js?ver=5.2.5"></script>
<meta name="applicable-device" content="pc,mobile">
<style>
a, .page-title .title span, .sidebar .widget-title span, .header-1 .header-menu .navbar-nav > li.active > a, .header-1 .header-menu .navbar-nav > li.active > a:hover, .header-1 .header-menu .navbar-nav > li > a:hover, .header-1 .header-menu .navbar-nav > li > a:focus, .header-1 .header-menu .navbar-nav > li > a:active, .header-1 .header-menu .navbar-nav > li:hover > a, .sec-title span, .tel-title, .tel-num, .tell-icon, .header-2 .navbar-nav > li.active > a, .header-2 .search-icon:hover { color: #0088cc; }
a:hover, .sidebar .widget ul a:hover, .sidebar .widget ol a:hover, .post-list .entry-title a:hover, .sec-title .more:hover, .p-item-wrap:hover .title a, .news-list a:hover, .bookmarks a:hover, .header-2 .navbar-nav > li a:hover { color: #0077cc; }
.search-form input.submit, .header-1 .header-menu, .header-1 .header-menu .dropdown-menu > li > a:hover, .header-1 .header-menu .dropdown-menu > li > a:focus, .q-href .q-img:after, .pagination .current, .pagination a:hover, .sidebar .widget_nav_menu, .action .contact-title, .flex-control-paging li a.flex-active, .navbar-default .navbar-toggle:active .icon-bar, .navbar-default .navbar-toggle:hover .icon-bar, .navbar-default .navbar-toggle:focus .icon-bar, .header-1 .navbar-collapse, .dropdown-menu > .active > a, .dropdown-menu > .active > a:hover, .dropdown-menu > .active > a:focus, .form-submit .submit { background-color: #0088cc; }
.search-form input.submit:hover, .sidebar .widget_nav_menu ul li.current-menu-item a, .sidebar .widget_nav_menu ul li.current-post-parent a, .sidebar .widget_nav_menu ul li a:hover, .sidebar .widget_nav_menu ul li.current-menu-item .sub-menu a:hover, .sidebar .widget_nav_menu ul li.current-post-parent .sub-menu a:hover, .action .a-box:hover, .header-1 .header-menu .search-index .search-form input.submit, .flex-control-paging li a:hover, .form-submit .submit:hover { background-color: #0077cc; }
.header-2 .navbar-nav > li.active > a { border-top-color: #0088cc; }
.header-2 .navbar-nav > li a:hover { border-top-color: #0077cc; }
.sec-title span, .sidebar .widget-title span, .page-title .title span { border-bottom-color: #0088cc; }
.p-item-wrap:hover { border-color: #0077cc; }
.tell-icon, .comment-respond input:focus, .comment-form-comment textarea:focus { border-color: #0088cc; }
.j-share { position: fixed !important; top: 50% !important; }
.footer { color: #666; background: #f3f3f3; }
.footer a { color: #666; }
.footer a:hover { color: #333; }
.footer .menu li, .footer .footer-menu li { border-right-color: #666; }
</style>
<script> (function() {if (!/*@cc_on!@*/0) return;var e = "abbr, article, aside, audio, canvas, datalist, details, dialog, eventsource, figure, footer, header, hgroup, mark, menu, meter, nav, output, progress, section, time, video".split(', ');var i= e.length; while (i--){ document.createElement(e[i]) } })()</script>
<!--[if lte IE 8]><script src="/Images/themes/js/respond.min.js"></script><![endif]-->
</head>
<body class="home blog">
<!--#include file="Header.Asp"-->
<div id="wrap">
  <div class="banner"><img src="/Images/themes/images/banner.jpg" alt="内页Banner"></div>
  <div class="container wrap">
    <div class="main">
      <div class="page-title clearfix" id="j-post-head">
        <ol class="breadcrumb">
          <li class="home"><i class="fa fa-map-marker"></i> <a href="/">首页</a></li>
          <%=WebLocation %>
        </ol>
        <h1 class="title pull-left" id="j-title"><span><%=SeoTitle %></span></h1>
      </div>
<%=WebContent("Qianbo_ProductSort",Request.QueryString("SortID"),"")%>
    </div>
    <aside class="hidden-xs sidebar">
      <div id="nav_menu-4" class="widget widget_nav_menu">
        <h3 class="widget-title"><span>快捷导航</span></h3>
        <div>
          <ul class="menu">
            <%=WebMenu()%>
          </ul>
        </div>
      </div>
<!--#include file="Left.Asp"-->
    </aside>
  </div>
</div>
<!--#include file="Footer.Asp"-->
</body>
</html>
<%
Function WebMenu()
    Dim rs, sql
    Set rs = server.CreateObject("Adodb.Recordset")
    sql = "Select * From Qianbo_ProductSort Where ViewFlag And ParentID = 0 Order By ID Asc"
    rs.Open sql, conn, 1, 1
    If Not rs.EOF Then
        Do
            If ISHTML = 1 Then
                AutoLink = "" & ProSortName & Separated & rs("ID") & Separated & "1." & HTMLName & ""
            Else
                AutoLink = "ProductList.Asp?SortID=" & rs("ID") & ""
            End If
			Response.Write"          <ul class=""menu"">" & vbCrLf
			Response.Write"            <li class=""menu-item menu-item-type-taxonomy menu-item-object-category current-menu-item menu-item-has-children""><a href=""" & AutoLink & """>" & rs("SortName") & "</a>" & vbCrLf
			ChildCount = conn.Execute("Select Count(*) From Qianbo_ProductSort Where ViewFlag And ParentID = " & rs("ID"))(0)
			If ChildCount > 0 Then
				Response.Write"              <ul class=""sub-menu"">" & vbCrLf
				SubWebMenu(rs("ID"))
				Response.Write"              </ul>" & vbCrLf
			End If
			Response.Write"            </li>" & vbCrLf
			Response.Write"          </ul>" & vbCrLf
            rs.movenext
        Loop Until rs.EOF
    End If
    rs.Close
    Set rs = Nothing
End Function

Function SubWebMenu(ParentID)
    Dim rs, sql
    Set rs = server.CreateObject("Adodb.Recordset")
    sql = "Select * From Qianbo_ProductSort Where ViewFlag And ParentID = " & ParentID & " Order By ID Asc"
    rs.Open sql, conn, 1, 1
    If Not rs.EOF Then
        Do
            If ISHTML = 1 Then
                AutoLink = "" & ProSortName & Separated & rs("ID") & Separated & "1." & HTMLName & ""
            Else
                AutoLink = "ProductList.Asp?SortID=" & rs("ID") & ""
            End If
            Response.Write "<li class=""menu-item menu-item-type-taxonomy menu-item-object-category""><a href=""" & AutoLink & """>" & rs("SortName") & "</a></li>"
            rs.movenext
        Loop Until rs.EOF
    End If
    rs.Close
    Set rs = Nothing
End Function

Function WebLocation()
    WebLocation = "<li class=""active""><a href=""Products.html"">公司产品</a></li>"
    If Request.QueryString("SortID") = "" Then
        WebLocation = WebLocation
    ElseIf Not IsNumeric(Request.QueryString("SortID")) Then
        WebLocation = WebLocation & "参数错误"
    ElseIf conn.Execute("Select * From Qianbo_ProductSort Where ViewFlag And ID = " & Request.QueryString("SortID")).EOF Then
        WebLocation = WebLocation & "参数错误"
    Else
        Dim rs, sql
        Set rs = server.CreateObject("Adodb.Recordset")
        sql = "Select * From Qianbo_ProductSort Where ViewFlag And ID=" & Request.QueryString("SortID")
        rs.Open sql, conn, 1, 1
        WebLocation = WebLocation & SortPathTXT("Qianbo_ProductSort", rs("ID"))
        rs.Close
        Set rs = Nothing
    End If
End Function

Function SortPathTXT(DataFrom, ID)
    Dim rs, sql
    Set rs = server.CreateObject("Adodb.Recordset")
    sql = "Select * From " & DataFrom & " Where ViewFlag and ID = " & ID
    rs.Open sql, conn, 1, 1
    If Not rs.EOF Then
        If ISHTML = 1 Then
            AutoLink = "" & ProSortName & Separated & rs("ID") & Separated & "1." & HTMLName & ""
        Else
            AutoLink = "ProductList.Asp?SortID=" & rs("ID") & ""
        End If
        SortPathTXT = SortPathTXT(DataFrom, rs("ParentID")) & "<li><a href=""" & AutoLink & """>" & rs("SortName") & "</a></li>"
    End If
    rs.Close
    Set rs = Nothing
End Function

Function WebContent(DataFrom,ID,SortPath)
    Dim rs,sql
    Dim HideSort
    Set rs=server.CreateObject("Adodb.Recordset")
    If ID="" Then
        SortPath="0,"
    ElseIf Not IsNumeric(ID)Then
        Response.Write "暂无相关信息"
        Exit Function
    ElseIf conn.Execute("Select * From " & DataFrom & " Where ViewFlag And  ID = " & ID).EOF Then
        Response.Write "暂无相关信息"
        Exit Function
    Else
        SortPath=conn.Execute("Select * From " & DataFrom & " Where ViewFlag And ID = " & ID)("SortPath")
        conn.Execute("Update " & DataFrom & " Set ClickNumber = ClickNumber + 1 Where ID = " & ID)
    End If
    sql="Select * From " & DataFrom & " Where Not(ViewFlag) And Instr(SortPath,'" & SortPath & "') > 0"
    rs.Open sql,conn,1,1
    While Not rs.EOF
    HideSort="And Not(Instr(SortPath,'" & rs("SortPath") & "') > 0) " & HideSort
    rs.movenext
    Wend
    rs.Close
    Dim idCount
    Dim pages
    pages=ProInfo
    Dim pagec
    Dim page
    page=CLng(Request("Page"))
    Dim pagenc
    pagenc=5
    Dim pagenmax
    Dim pagenmin
    Dim pageprevious
    Dim pagenext
    datafrom="Qianbo_Products"
    Dim datawhere
    datawhere="where ViewFlag and Instr(SortPath,'" & SortPath & "')>0 " & HideSort & " "
    Dim sqlid
    Dim Myself,PATH_INFO,QUERY_STRING
    PATH_INFO=Request.servervariables("PATH_INFO")
    QUERY_STRING=Request.ServerVariables("QUERY_STRING")'
    If QUERY_STRING="" Then
        Myself=PATH_INFO & "?"
    ElseIf InStr(PATH_INFO & "?" & QUERY_STRING,"Page=")=0 Then
        Myself=PATH_INFO & "?" & QUERY_STRING & "&"
    Else
        Myself=Left(PATH_INFO & "?" & QUERY_STRING,InStr(PATH_INFO & "?" & QUERY_STRING,"Page=")-1)
    End If
    Dim taxis
    taxis="Order By ID Desc "
    Dim i
    sql="Select Count(ID) As IDCount From [" & datafrom & "]" & datawhere
    Set rs=server.CreateObject("Adodb.Recordset")
    rs.Open sql,conn,0,1
    idCount=rs("idCount")
    If(idcount>0)Then
        If(idcount Mod pages=0)Then
            pagec=Int(idcount/pages)
        Else
            pagec=Int(idcount/pages)+1
        End If
        sql="Select ID From [" & datafrom & "] " & datawhere & taxis
        Set rs=server.CreateObject("Adodb.Recordset")
        rs.Open sql,conn,1,1
        rs.pagesize=pages
        If page<1 Then page=1
        If page>pagec Then page=pagec
        If pagec>0 Then rs.absolutepage=page
        For i=1 To rs.pagesize
            If rs.EOF Then Exit For
            If(i=1)Then
                sqlid=rs("ID")
            Else
                sqlid=sqlid & "," & rs("ID")
            End If
            rs.movenext
        Next
    End If
    If(idcount>0 And sqlid<>"")Then
        sql="Select * From [" & datafrom & "] Where ID IN(" & sqlid & ") " & taxis
        Set rs=server.CreateObject("Adodb.Recordset")
        rs.Open sql,conn,0,1
        Response.Write"      <ul class=""p-list clearfix"">" & vbCrLf
        While Not rs.EOF
        If ISHTML=1 Then
            AutoLink="" & ProName & Separated & rs("ID") & "." & HTMLName & ""
        Else
            AutoLink="ProductView.Asp?ID=" & rs("ID") & ""
        End If
		Response.Write"        <li class=""col-xs-6 col-md-4 col-sm-6 p-item"">" & vbCrLf
		Response.Write"          <div class=""p-item-wrap""><a class=""thumb"" href=""" & AutoLink & """ title=""" & rs("ProductName") & """><img src=""" & rs("BigPic") & """ width=""480"" height=""320"" alt=""" & rs("ProductName") & """></a>" & vbCrLf
		Response.Write"            <h2 class=""title""><a href=""" & AutoLink & """ title=""" & rs("ProductName") & """>" & rs("ProductName") & "</a></h2>" & vbCrLf
		Response.Write"          </div>" & vbCrLf
		Response.Write"        </li>" & vbCrLf
        rs.movenext
        Wend
        Response.Write"      </ul>" & vbCrLf
    Else
        Response.Write "暂无相关信息"
        Exit Function
    End If
    Response.Write"      <div class=""pagination clearfix"">" & vbCrLf
    Response.Write "        <span>共" & idcount & "条记录 页次：" & page & "/" & pagec & " 每页" & pages & "条记录</span>"
    pagenmin=page-pagenc
    pagenmax=page+pagenc
    If(pagenmin<1)Then pagenmin=1
    If ISHTML=1 Then
        If ID="" Then
            If(page>1)Then Response.Write"<a href=""" & ProSortName & "" & Separated & "1." & HTMLName & """>首页</a>"
        Else
            If(page>1)Then Response.Write"<a href=""" & ProSortName & "" & Separated & "" & ID & "" & Separated & "1." & HTMLName & """>首页</a>"
        End If
    Else
        If(page>1)Then Response.Write"<a href=""" & myself & "Page=1"">首页</a>"
    End If
    If page-(pagenc*2+1)<=0 Then
        pageprevious=1
    Else
        pageprevious=page-(pagenc*2+1)
    End If
    If ISHTML=1 Then
        If ID="" Then
            If(pagenmin>1)Then Response.Write"<a href=""" & ProSortName & "" & Separated & "" & pageprevious & "." & HTMLName & """>上一页</a>"
        Else
            If(pagenmin>1)Then Response.Write"<a href=""" & ProSortName & "" & Separated & "" & ID & "" & Separated & "" & pageprevious & "." & HTMLName & """>上一页</a>"
        End If
    Else
        'If(pagenmin>1)Then Response.Write"<a href=""" & myself & "Page=" & pageprevious & """>上一页</a>"
    End If
    If(pagenmax>pagec)Then pagenmax=pagec
    For i=pagenmin To pagenmax
        If(i=page)Then
            Response.Write"<span class=""current"">" & i & "</span>"
        Else
            If ISHTML=1 Then
                If ID="" Then
                    Response.Write"<a href=""" & ProSortName & "" & Separated & "" & i & "." & HTMLName & """>" & i & "</a>"
                Else
                    Response.Write"<a href=""" & ProSortName & "" & Separated & "" & ID & "" & Separated & "" & i & "." & HTMLName & """>" & i & "</a>"
                End If
            Else
                Response.Write"<a href=""" & myself & "Page=" & i & """>" & i & "</a>"
            End If
        End If
    Next
    If page+(pagenc*2+1)>=pagec Then
        pagenext=pagec
    Else
        pagenext=page+(pagenc*2+1)
    End If
    If ISHTML=1 Then
        If ID="" Then
            If(pagenmax<pagec)Then Response.Write"<a href=""" & ProSortName & "" & Separated & "" & pagenext & "." & HTMLName & """>尾页</a>"
            If(page<pagec)Then Response.Write" <a href=""" & ProSortName & "" & Separated & "" & pagec & "." & HTMLName & """>尾页</a>"
        Else
            If(pagenmax<pagec)Then Response.Write"<a href=""" & ProSortName & "" & Separated & "" & ID & "" & Separated & "" & pagenext & "." & HTMLName & """ title=""跳转到第" & pagenext & "页"">尾页</a>"
            If(page<pagec)Then Response.Write"<a href=""" & ProSortName & "" & Separated & "" & ID & "" & Separated & "" & pagec & "." & HTMLName & """>尾页</a>"
        End If
    Else
        'If(pagenmax<pagec)Then Response.Write"<a href=""" & myself & "Page=" & pagenext & """>尾页</a>"
        If(page<pagec)Then Response.Write"<a href=""" & myself & "Page=" & pagec & """>尾页</a>"
    End If
    Response.Write"      </div>" & vbCrLf
    rs.Close
    Set rs=Nothing
End Function
%>