<!--#include file="Include/Const.Asp" -->
<!--#include file="Include/NoSQL.Asp" -->
<!--#include file="Include/ConnSiteData.Asp" -->
<%
Call SiteInfo()
SeoTitle = "站内搜索"
%>
<!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>
<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">
        <ol class="breadcrumb">
          <li class="home"><i class="fa fa-map-marker"></i> <a href="/">首页</a></li>
          <li class="active"><%=SeoTitle %></li>
        </ol>
        <h1 class="title pull-left" id="j-title"><span><%=SeoTitle %></span></h1>
      </div>
<%=WebContent(Trim(Request("Keyword")), Trim(Request("Range")))%>
    </div>
    <aside class="hidden-xs sidebar">
      <div id="nav_menu-3" 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_NewsSort 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 = "" & NewSortName & Separated & rs("ID") & Separated & "." & HTMLName & ""
            Else
                AutoLink = "NewsList.Asp?SortID=" & rs("ID") & ""
            End If
            If SortPath = rs("SortPath") Then
                tmpCss = " current-menu-item"
            Else
                tmpCss = ""
            End If
            Response.Write "<li class=""menu-item menu-item-type-post_type menu-item-object-page" & tmpCss & """><a href=""" & AutoLink & """>" & rs("SortName") & "</a></li>"
            rs.movenext
        Loop Until rs.EOF
    End If
    rs.Close
    Set rs = Nothing
End Function

Function WebContent(Keyword, Range)
    If Range = "Void" Or Range = "" Or CheckBadChar(request("Keyword")) <> True Then
        Range = "News"
    End If
    Dim idCount
    Dim pages
    pages = 12
    Dim pagec
    Dim page
    page = CLng(request("Page"))
    Dim pagenc
    pagenc = 5
    Dim pagenmax
    Dim pagenmin
    Dim pageprevious
    Dim pagenext
    Dim datafrom
    Dim datawhere
    Select Case Range
        Case "Product"
            datafrom = "Qianbo_Products"
            datawhere = "Where ViewFlag And ProductName Like '%" & KeyWord & "%'"
        Case "News"
            datafrom = "Qianbo_News"
            datawhere = "Where ViewFlag And NewsName Like '%" & KeyWord & "%'"
    End Select
    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
    Dim rs, sql
    Set rs = server.CreateObject("Adodb.Recordset")
    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=""post-list clearfix"">" & vbCrLf
    While Not rs.EOF
        If ISHTML = 1 Then
            ProAutoLink = "" & ProName & "" & Separated & "" & rs("ID") & "." & HTMLName & ""
            NewAutoLink = "" & NewName & "" & Separated & "" & rs("ID") & "." & HTMLName & ""
        Else
            ProAutoLink = "ProductView.Asp?ID=" & rs("ID") & ""
            NewAutoLink = "NewsView.Asp?ID=" & rs("ID") & ""
        End If
        Select Case Range
            Case "Product"
                Response.Write"        <article class=""post-item clearfix"">" & vbCrLf
                Response.Write"          <header class=""article-title"">" & vbCrLf
                Response.Write"            <h2 class=""entry-title""><a href=""" & ProAutoLink & """>" & rs("ProductName") & "</a></h2>" & vbCrLf
                Response.Write"            <div class=""entry-meta""><span><i class=""fa fa-calendar""></i> " & FormatDate(rs("Addtime"),13) & "<i></i></span></div>" & vbCrLf
                Response.Write"          </header>" & vbCrLf
                Response.Write"          <div class=""entry-excerpt"">" & vbCrLf
                Response.Write"            <p>" & rs("SeoDescription") & "</p>" & vbCrLf
                Response.Write"          </div>" & vbCrLf
                Response.Write"          <div class=""read-more""><a class=""entry-more"" href=""" & ProAutoLink & """>阅读更多»</a></div>" & vbCrLf
                Response.Write"        </article>" & vbCrLf
            Case "News"
                Response.Write"        <article class=""post-item clearfix"">" & vbCrLf
                Response.Write"          <header class=""article-title"">" & vbCrLf
                Response.Write"            <h2 class=""entry-title""><a href=""" & NewAutoLink & """>" & rs("NewsName") & "</a></h2>" & vbCrLf
                Response.Write"            <div class=""entry-meta""><span><i class=""fa fa-calendar""></i> " & FormatDate(rs("Addtime"),13) & "<i></i></span></div>" & vbCrLf
                Response.Write"          </header>" & vbCrLf
                Response.Write"          <div class=""entry-excerpt"">" & vbCrLf
                Response.Write"            <p>" & rs("SeoDescription") & "</p>" & vbCrLf
                Response.Write"          </div>" & vbCrLf
                Response.Write"          <div class=""read-more""><a class=""entry-more"" href=""" & NewAutoLink & """>阅读更多»</a></div>" & vbCrLf
                Response.Write"        </article>" & vbCrLf
        End Select
        rs.movenext
    Wend
    Response.Write "      </ul>" & vbCrLf
    Else
        Response.Write "暂无相关信息"
        Exit Function
    End If
    Response.Write"      <div class=""pagination clearfix"">"
    Response.Write "<span>共" & idcount & "条记录 页次：" & page & "/" & pagec & " 每页：" & pages & "条记录</span>" & vbCrLf
    pagenmin = page - pagenc
    pagenmax = page+pagenc
    If(pagenmin<1) Then pagenmin = 1
    If(page>1) Then Response.Write ("<a href=""" & myself & "Page=1"">首页</a> ")
    If page - (pagenc * 2 + 1)<= 0 Then
        pageprevious = 1
    Else
        pageprevious = page - (pagenc * 2 + 1)
    End If
    If(pagenmin>1) Then Response.Write ("<a href=""" & myself & "Page=" & pageprevious & """>上一页</a>")
    If(pagenmax>pagec) Then pagenmax = pagec
    For i = pagenmin To pagenmax
        If(i = page) Then
        Response.Write ("<span class=""current"">" & i & "</span>")
    Else
        Response.Write ("<a href=""" & myself & "Page=" & i & """>" & i & "</a>")
    End If
    Next
    If page+(pagenc * 2 + 1)>= pagec Then
        pagenext = pagec
    Else
        pagenext = page+(pagenc * 2 + 1)
    End If
    If(pagenmax<pagec) Then Response.Write (" <a href=""" & myself & "Page=" & pagenext & """>尾页</a>")
    If(page<pagec) Then Response.Write (" <a href=""" & myself & "Page=" & pagec & """ title=""跳转到第" & pagec & "页"">尾页</a>")
    Response.Write"      </div>" & vbCrLf
    rs.Close
    Set rs = Nothing
End Function
%>