<!-- #include file="../inc/301.asp" -->
<!-- #include file="../inc/conn.asp" -->
<!-- #include file="../inc/Nohtml.asp" -->
<!-- #include file="../inc/other.asp" -->
<% 
u_key=request.QueryString("s")
a_key=replace(u_key,"*", "")
b_key=replace(a_key,"'", "")
c_key=replace(b_key,"%", "")
key=RemoveHTML(""&c_key&"",1000)
%>
<%Page=Request.QueryString("Page")
if page="" then
yema=""
else
yema=" - 第"&Page&"页"
end if
%>

<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>

<title>搜索：<%=key%><%=yema%> - <%=web_name%></title>
<meta name="keywords" content="<%=key%>" />
<meta name="description" content="搜索：<%=key%><%=yema%>的结果页。" />
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<!-- #include file="../Config/css.asp" -->
</head>

<body>

      <!-- #include file="../Config/head.asp" -->
     
    <!-- Blog Content
    ================================================== --> 
    <div class="row">

        <!-- Blog Posts
        ================================================== --> 
        <div class="span8 blog">

            <!-- Blog Post 1 -->

<h4 class="title-bg">您查询的关键字： <font color="#DC4900"><%=key%></font></h4>

<% if key="" then %>

<h5 class="title-bg"><br><font color="#DC4900">亲爱的，你好像没有输入关键字！</font><br><br>
提示：用空格隔开多个查找关键词可获取更理想结果，如“熊海 博客”。
<br><br></h5>


<%
else
set rs=server.createobject("adodb.recordset")
sql="select w_title from web_Article where w_title like '%"&key&"%' or (w_author like '%"&key&"%') "
rs.open(sql),conn,1,1
If rs.bof And rs.eof Then
%>
            
<h5 class="title-bg"><br><font color="#DC4900">很抱歉,没有找到与 <%=key%> 相关的信息！</font><br><br>
提示：用空格隔开多个查找关键词可获取更理想结果，如“熊海 博客”。
<br><br></h5>


<%
else
key=request.QueryString("s")
set rs=server.createobject("adodb.recordset")
sql="select w_id,l_id,w_title,w_content,w_keywords,w_images,w_description,w_author,w_time,hit,w_zzip,Publish_Mode from web_Article where (w_title like '%"&key&"%') or (w_author like '%"&key&"%') order by w_id desc"
rs.open(sql),conn,1,1
rs.pagesize=4 
Page=Request.QueryString("Page") 
if Page="" then Page=1
rs.absolutepage=Page 
for t= 1 to rs.pagesize
if rs.eof then
exit for
end if
w_id=rs("w_id")
l_id=rs("l_id")
w_title=rs("w_title")
w_content=rs("w_content")
w_keywords=rs("w_keywords")
w_description=rs("w_description")
w_author=rs("w_author")
w_time=rs("w_time")
hit=rs("hit")
w_zzip=rs("w_zzip")
Publish_Mode=rs("Publish_Mode")
w_keywords=rs("w_keywords")
w_images=rs("w_images")
if w_images<>"" then
a_images=w_images
else
a_images="../img/nopic.png"
end if
%>
<% 
set rs2=server.createobject("adodb.recordset")
sql="select u_aid from web_Article_comment where u_aid="&w_id&""
rs2.open(sql),conn,1,1
plsl=rs2.recordcount
if plsl=0 then
plslxs="暂无"
else
plslxs=""&plsl&" 条"
end if
rs2.close
set rs2=nothing
%>

<% 
set rs3=server.createobject("adodb.recordset")
query="select n_id,n_name from Web_2Navigation where n_id="&l_id&""
rs3.open query,conn,1,1
n_id=rs3("n_id")
n_name=rs3("n_name")
rs3.close
set rs3=nothing
%>

<%
content =replace(w_content,"&nbsp;", "")
content2 =replace(content," ", "")
%>
<%
TimeDifference = DateDiff("s", w_time, Now)
If TimeDifference <60 then  
ti=(TimeDifference & "秒前")  
Elseif TimeDifference <60*60 then  
ti=(TimeDifference\60 & "分钟前")  
Elseif TimeDifference <60*60*24 then  
ti=(TimeDifference\(60*60) & "小时前")  
else if TimeDifference <7*60*60*24 then  
ti=(TimeDifference\(60*60*24) & "天前")
elseif TimeDifference >7*60*60*24 then  
ti=formatdatetime(w_time,2)
end if
End If
Randomize Timer
NumTemp=Int((30*Rnd())+1)
%>
<article>

                <h3 class="title-bg"><% if w_images<>"" then
response.write "<font color='#DC4900'>[ 图 ] </font>"
end if %><a href="/Article/?<%=w_id%>.html"><%=w_title%></a></h3>
<div class="post-summary">
 <div class="clearfix">           
<p> <a href="/Article/?<%=w_id%>.html">

<%if web_simg<>1 then%>
<%if w_images<>"" then%>
<img src="<%=replace(a_images,"..", "")%>" class="thumbnail align-left" alt="<%=w_title%>" title="<%=w_title%>" style="width:260px;height:200px;"/>

<%else%>
<img src="../img/ArticleImg/<%=Numtemp%>.jpg" class="thumbnail align-left" alt="<%=w_title%>" title="<%=w_title%>" style="width:260px;height:200px;"/>
<%end if%>
<%end if%>

<%if web_simg=1 then %>
<%if w_images<>"" then%>
<img src="../img.asp?path=<%=replace(a_images,"..", "")%>&Width=260&height=200" class="thumbnail align-left" alt="<%=w_title%>" title="<%=w_title%>" />
<%else%>
<img src="../img.asp?path=/img/ArticleImg/<%=Numtemp%>.jpg&Width=260&height=200" class="thumbnail align-left" alt="<%=w_title%>" title="<%=w_title%>" />
<%end if%>
<%end if%>
</a>
<%=RemoveHTML(content2,300)%></p>
            </div>
                    
                    <div class="post-summary-footer">
                       <i class="icon-eye-open"></i> <a href="../Article/?<%=w_id%>.html"> 阅读全文</a> ︱<i class="icon-fire"></i> <%=formatNumber(hit,0)%> ℃
                        <ul class="post-data">				
                            <li><i class="icon-calendar"></i><%=ti%></li>
							<li><i class="icon-list-alt"></i> <a href="/List/?<%=n_id%>+1.html"><%=n_name%></a></li>
                            <li><i class="icon-user"></i> <a href="../Search/?s=<%=w_author%>"><%=w_author%></a></li>
                            <li><i class="icon-comment"></i> <a href="/Article/?<%=w_id%>.html#Comment"><%=plslxs%></a></li>
                            <li><i class="icon-tags"></i>
<% 
if w_keywords<>"" then
dim str,strArr
str=w_keywords
strArr=split(str,"，")
for i=0 to ubound(strArr)
Response.Write  "<a href= ""../Search/?s="&strArr(i)&" "">"&strArr(i)&"</a>&nbsp;"
next
else
Response.Write "<a>暂无</a>"
end if
%>
							</li>
                        </ul>
                    </div>
                </div>
            </article>
<%
rs.movenext
next
%>

<div class="pagination">
<div class="post-summary-footer">
<ul class="post-data">
<li ><a>第 <%=Page%> - <%=rs.pagecount%> 页</a> <a>共 <%=rs.recordcount%> 条</a></li>
</ul>
</div>
<ul>
                
<%if Page=1 then%>
<li class="active">
<a>首页</a>
</li>
<%else%>
<li >
<a href="?s=<%=key%>&Page=1">首页</a>
</li>
<%end if%>
                
<%if Page=1 then%>
<li class="active">
<a>上一页</a>
</li>
<%else%>
<li >
<a href="?s=<%=key%>&Page=<%=Page-1%>">上一页</a>
</li>
<%end if%>

<%if rs.pagecount<Page+1 then%>
<li class="active">
<a>下一页</a>
</li>
<%else%>
<li >
<a href="?s=<%=key%>&Page=<%=Page+1%>">下一页</a>
</li>
<%end if%>
 
<%if rs.pagecount<Page+1 then%>
<li class="active">
<a>尾页</a>
</li>
<%else%>
<li >
<a href="?s=<%=key%>&Page=<%=rs.pagecount%>">尾页</a>
</li>
<%end if%>
</ul>
<%
rs.close
set rs=nothing
 %>
</div>
<br />

<%
end if
end if
%>
		
</div>


 <!-- #include file="../Config/sidebar.asp" -->

 <!-- #include file="../Config/foot.asp" -->
    
</body>
</html>
<!-- #include file="../inc/close.asp" -->