<!-- #include file="../inc/301.asp" -->
<!-- #include file="../inc/conn.asp" -->
<!-- #include file="../inc/other.asp" -->
<!-- #include file="../inc/Nohtml.asp" -->
<%
server_v40=Request.ServerVariables("QUERY_STRING")  
id=Int(replace(replace(server_v40,"/",""),".html",""))
set rs=server.createobject("adodb.recordset")
sql="select w_id from web_Article where w_id="&id&""
rs.open(sql),conn,1,1
If rs.bof And rs.eof Then
Response.Status = "404 Not Found" 
Response.End
end if
rs.close
set rs=nothing
set rs=server.createobject("adodb.recordset")
sql="select w_id,l_id,w_title,w_images,w_content,w_keywords,w_description,w_author,w_tuijian,w_time,edit_time,hit,w_zzip,Publish_Mode from web_Article where w_id="&id&""
rs.open(sql),conn,1,1
w_id=rs("w_id")
l_id=rs("l_id")
w_title=rs("w_title")
w_images=rs("w_images")
w_content=rs("w_content")
w_keywords=rs("w_keywords")
w_description=rs("w_description")
w_author=rs("w_author")
w_tuijian=rs("w_tuijian")
w_time=rs("w_time")
edit_time=rs("edit_time")
hit=rs("hit")
w_zzip=rs("w_zzip")
Publish_Mode=rs("Publish_Mode")
xg_title=w_title '相关文章
rs.close
set rs=nothing
%>
<%
'防止刷新文章记数 
'u_hot=session("u_hot")
'if ( u_hot="" or u_hot<>id ) then
set rs=server.createobject("adodb.recordset")
sql="select hit from web_Article where w_id="&id&""
rs.open sql,conn,1,3
rs("hit")=rs("hit")+1
'session("u_hot")=id
rs.update
rs.close
set rs=nothing
'end if

idss=2
%>
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title><%=w_title%> - <%=web_name%></title>
<meta name="keywords" content="<%=w_keywords%>" />
<meta name="description" content="<%=w_description%>" />
<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">
    <!--Container row-->

        <!-- Blog Full Post
        ================================================== --> 
        <div class="span8 blog">

            <!-- Blog Post 1 -->
            <article>
            
            <%
			if w_tuijian=1 then 
			tuijian="id=""tuijian"""
		   else
		   tuijian="class=""title-bg"""
			end if
			if hit>500 then
			hotwz="id=""hotwz"""
			end if
			%>
       
                <h3 <%=tuijian%> ><a title="<%=w_title%>"><%=w_title%></a></h3>
                <div class="post-content">
                
                <div class="post-body" <%=hotwz%>>
<% if w_images<>"" then%>                     
<img src="<%=w_images%>" class="align-left" alt="<%=w_title%>" title="<%=w_title%>" style="width:250px;"> 
<%else%> 
<% 
set rs=server.createobject("adodb.recordset")
sql="select web_ad1 from Web_ad"
rs.open(sql),conn,1,1
web_ad1=rs("web_ad1")
rs.close
set rs=nothing
%>
<%if web_ad1<>"" then%>            
<div class="hidden-phone align-left">
<%=web_ad1%>
</div>
<% end if%>
<% end if%>
<%=w_content%>
 </div>
<% 
set rs=server.createobject("adodb.recordset")
sql="select u_aid from web_Article_comment where u_aid="&id&" and u_view=1"
rs.open(sql),conn,1,1
plsl=rs.recordcount
if plsl=0 then
plslxs="亲，沙发正空着，还不快来抢？"
else
plslxs="<a>"&plsl&"</a> 条评论"
end if
rs.close
set rs=nothing
%>

<% 

set rs=server.createobject("adodb.recordset")
sql="select w_id,w_title from web_Article where w_id >"&id&" and view_yes=1 order by w_id"
rs.open(sql),conn,1,1

If rs.bof And rs.eof Then
w_title="<a title='上一篇：没有了'>没有了</a>"
else
w_title_d=rs("w_title")
w_id=rs("w_id")
w_title="<a href='/Article/?"&w_id&".html' title='上一篇："&w_title_d&"'>"&w_title_d&"</a>"

end if

set rs2=server.createobject("adodb.recordset")
sql="select w_id,w_title from web_Article where w_id <"&id&" and view_yes=1 order by w_id desc"
rs2.open(sql),conn,1,1
If rs2.bof And rs2.eof Then
w_title_up="<a title='下一篇：没有了'>没有了</a>"
else
w_id_up=rs2("w_id")
w_title_u=rs2("w_title")
w_title_up="<a href='/Article/?"&w_id_up&".html' title='下一篇："&w_title_u&"'>"&w_title_u&"</a>"


end if
rs.close
set rs=nothing
rs2.close
set rs2=nothing
%>	
<% 
set rs2=server.createobject("adodb.recordset")
query="select country from user_ip where (ip1<=" &w_zzip& " and ip2>=" &w_zzip&")"
rs2.open query,conn,1,1
If rs2.bof And rs2.eof Then
country="未知位置"
else
country=rs2("country")
end if
rs2.close
set rs2=nothing
if Publish_Mode=1 then
fbfs="PC"
elseif Publish_Mode=2 then
fbfs="iPhone"
elseif Publish_Mode=3 then
fbfs="Linux"
elseif Publish_Mode=4 then
fbfs="Android"
else
fbfs="未知设备"
end if
%>

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

<%
TimeDifference = DateDiff("s", w_time, Now)
if datediff("d",w_time,date)=0 then
ti="今天"
elseif datediff("d",w_time,date)=1 then
ti="昨天"
elseif datediff("d",w_time,date)=2 then
ti="前天"
elseif datediff("d",w_time,date)< 8 then
ti=datediff("d",w_time,date)&"天前"
else
ti=formatdatetime(w_time,2)
end if
%>

                    <div class="post-summary-footer">
                        <ul class="post-data">
                            <li><i class="icon-calendar"></i><%=ti%>&nbsp;<%=formatdatetime(w_time,4)%></li>
                            <li><i class="icon-list"></i> <a href="../List/?<%=n_id%>+1.html" title="归类：<%=n_name%>"><%=n_name%></a></li>
                            <li><i class="icon-user"></i> <a href="../Search/?s=<%=w_author%>" title="本文作者：<%=w_author%>"><%=w_author%></a></li>
                            <li><i class="icon-comment"></i> <a href="#Comment" title="转到评论"><%=plsl%> 条评论</a></li>
                            <li><i class="icon-tags"></i>
<% 
if w_keywords<>"" then
str=w_keywords
strArr=split(str,"，")
for i=0 to ubound(strArr)
Response.Write  "<a href= ""../Search/?s="&strArr(i)&" "" title=""标签："&strArr(i)&" "">"&strArr(i)&"</a>&nbsp;"		 
next
else
Response.Write  "<a>暂无标签</a>"	
end if
%>
							</li>
                        </ul>
                    </div>
                </div>
            </article>

 <section class="post-content" id="New">
<div class="post-body about-author">
<div class="post-summary-footer">
<ul class="post-data">
<% if edit_time<>"" then%>
<i class="icon-edit"></i><a title="最后编辑：<%=formatdatetime(edit_time,2)%>&nbsp;<%=formatdatetime(edit_time,4)%>"><%=formatdatetime(edit_time,2)%>&nbsp;<%=formatdatetime(edit_time,4)%>
</a>&nbsp;
<%end if%>

</ul>
</div>


<i class="icon-fire"></i><a title="已有 <%=hit%> 次浏览"><%=formatNumber(hit,0)%></a> ° <i class="icon-share"></i><a title="通过 <%=fbfs%> 发表">来自：<%=fbfs%></a>  <i class="icon-map-marker"></i><a title="<%=w_author%> 当前位于：<%=country%>"><%=country%></a> 
 </div>
</section>
    
            <!-- About the Author -->
<section class="post-content" id="New2">
<div class="post-body about-author">
<div class="post-summary-footer">
<ul class="post-data">
<!-- Baidu Button BEGIN -->
<div id="bdshare" class="bdshare_t bds_tools_32 get-codes-bdshare">
<a class="bds_tsina"></a>
<a class="bds_qzone"></a>
<a class="bds_tqq"></a>
<a class="bds_tsohu"></a>
<a class="bds_t163"></a>
<span class="bds_more"></span>
<a class="shareCount"></a>
</div>
<script type="text/javascript" id="bdshare_js" data="type=tools&amp;uid=0" ></script>
<script type="text/javascript" id="bdshell_js"></script>
<script type="text/javascript">
document.getElementById("bdshell_js").src = "http://bdimg.share.baidu.com/static/js/shell_v2.js?cdnversion=" + Math.ceil(new Date()/3600000)
</script>
<!-- Baidu Button END -->
</ul>
</div>
<i class="icon-arrow-up"></i>上一篇： <%=w_title%> <br /> <i class="icon-arrow-down"></i>下一篇： <%=w_title_up%>


                </div>

            </section>
            
<h5 class="title-bg">您可能还喜欢这些：</h5>
<div class="row">
<%
'if plsl<1 then
'sqlsl=8
'else
sqlsl=4
'end if

if w_keywords<>"" then
set rs=server.createobject("adodb.recordset")
keyss=w_keywords
keys=split(keyss,"，")
suliang=ubound(keys)
str1=keys(0)

if suliang=>1 then
str2=keys(1)
k2="or w_title like '%"&str2&"%'"
end if

if suliang =>2 then
str3=keys(2)
k3="or w_title like '%"&str3&"%'"
end if

if suliang=>3 then
str4=keys(3)
k4="or w_title like '%"&str4&"%'"
end if

if suliang=>4 then
str5=keys(4)
k5="or w_title like '%"&str5&"%'"
end if


sql= "select top "&sqlsl&" w_id,w_title,w_description,w_images from web_Article where w_id<>"&id&" and (w_title like '%"&str1&"%' "&k2&" "&k3&" "&k4&" "&k5&") "&Random_article&""
rs.open(sql),conn,1,1
sl=rs.recordcount
do while not rs.eof
w_id=rs("w_id")
w_title=rs("w_title")
w_description=rs("w_description")
w_images=rs("w_images")
if w_images<>"" then
a_images=w_images
else
a_images="../img/nopic.png"
end if

Randomize Timer
NumTemp=Int((50*Rnd())+1)

%>

<div class="span2">
<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%>" />
<%else%>
<img src="../img/ArticleImg/<%=Numtemp%>.jpg" class="thumbnail align-left" alt="<%=w_title%>" title="<%=w_title%>"/>

<%end if%>
<%end if%>

<%if web_simg=1 then%>
<%if w_images<>"" then%>

<img src="../img.asp?path=<%=replace(a_images,"..", "")%>&Width=400&height=308" class="thumbnail align-left" alt="<%=w_title%>" title="<%=w_title%>" />
<%else%>
<img src="../img.asp?path=/img/ArticleImg/<%=Numtemp%>.jpg&Width=400&height=308" class="thumbnail align-left" alt="<%=w_title%>" title="<%=w_title%>" />

<%end if%>
<%end if%>

</a>


<h5><a href="../Article/?<%=w_id%>.html" title="<%=left(w_description,50)%>..."><%=left(w_title,10)%></a></h5>
</div>
<%
rs.movenext
loop
rs.close
set rs=nothing
end if

if sl<=4  or w_keywords="" then

asb=sqlsl-sl
if asb<>0 then
set rs=server.createobject("adodb.recordset")
sql = "select top "&asb&" * from web_Article where w_id<>"&id&" and l_id="&l_id&" "&Random_article&"" 
rs.open(sql),conn,1,1

do while not rs.eof
w_id=rs("w_id")
w_title=rs("w_title")
w_description=rs("w_description")
w_images=rs("w_images")
if w_images<>"" then
a_images=w_images
else
a_images="../img/nopic.png"
end if
Randomize Timer
NumTemp=Int((50*Rnd())+1)
%>

<div class="span2">
<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%>"/>
<%else%>
<img src="../img/ArticleImg/<%=Numtemp%>.jpg" class="thumbnail align-left" alt="<%=w_title%>" title="<%=w_title%>"/>

<%end if%>
<%end if%>

<%if web_simg=1 then%>
<%if w_images<>"" then%>

<img src="../img.asp?path=<%=replace(a_images,"..", "")%>&Width=400&height=308" class="thumbnail align-left" alt="<%=w_title%>" title="<%=w_title%>" />
<%else%>
<img src="../img.asp?path=/img/ArticleImg/<%=Numtemp%>.jpg&Width=400&height=308" class="thumbnail align-left" alt="<%=w_title%>" title="<%=w_title%>" />

<%end if%>
<%end if%>

</a>
<h5><a href="../Article/?<%=w_id%>.html" title="<%=left(w_description,50)%>..."><%=left(w_title,10)%></a></h5>
</div>
<%
rs.movenext
loop
rs.close
set rs=nothing
end if
end if
%>


</div>

<% 
set rs=server.createobject("adodb.recordset")
sql="select web_ad3 from Web_ad"
rs.open(sql),conn,1,1
web_ad3=rs("web_ad3")
rs.close
set rs=nothing
if web_ad3<>"" then
%>
<section class="post-content">
<div class="post-body about-author center"  style="overflow:hidden">
<%=web_ad3%>
</div>
</section>
<% end if%>
        <!-- Post Comments
        ================================================== --> 
<section class="comments">
 <h4 class="title-bg">
<%if plsl > 5 then %>
<ul class="post-data"><a href="/Comment/?<%=id%>-1.html">浏览所有评论</a></ul>
<% end if%>
<a name="comments" id="Comment"></a> <%=plslxs%>
</h4>	
<ul>

<% 
set rs=server.createobject("adodb.recordset")
sql="select top 5 u_id,u_name,u_content,u_aid,u_url,u_ip,u_time,u_retime,u_touxiang,u_recontent from web_Article_comment where u_aid="&id&"  and u_view=1 order by u_id desc"
rs.open(sql),conn,1,1
do while not rs.eof
u_id=rs("u_id")
u_name=rs("u_name")
u_content=rs("u_content")
u_aid=rs("u_aid")
u_url=rs("u_url")
u_ip=rs("u_ip")
u_time=rs("u_time")
u_retime=rs("u_retime")
u_recontent=rs("u_recontent")
u_touxiang=rs("u_touxiang")
%>	

<% 
set rs2=server.createobject("adodb.recordset")
query="select country from user_ip where (ip1<=" &u_ip& " and ip2>=" &u_ip&")"
rs2.open query,conn,1,1
If rs2.bof And rs2.eof Then
country="未知位置"
else
country=rs2("country")
end if
rs2.close
set rs2=nothing
%>
<%
TimeDifference = DateDiff("s", u_time, Now)
if datediff("d",u_time,date)=0 then
u_ti="今天"
elseif datediff("d",u_time,date)=1 then
u_ti="昨天"
elseif datediff("d",u_time,date)=2 then
u_ti="前天"
elseif datediff("d",u_time,date)< 8 then
u_ti=datediff("d",u_time,date)&"天前"
else
u_ti=formatdatetime(u_time,2)
end if
%>

<%
if u_retime<>"" then
TimeDifference = DateDiff("s", u_retime, Now)
if datediff("d",u_retime,date)=0 then
ru_ti="今天" 
elseif datediff("d",u_retime,date)=1 then
ru_ti="昨天"
elseif datediff("d",u_retime,date)=2 then
ru_ti="前天"
elseif datediff("d",u_retime,date)< 8 then
ru_ti=datediff("d",u_retime,date)&"天前"
else
ru_ti=formatdatetime(u_retime,2)
end if
end if
if now()-u_time <1 then
neti="id=""New2"""
else
neti=""
end if

%>
   
                    <li <%=neti%>>
<%if u_url<>"" then %>
<a href="../url/?<%=replace(u_url,"http://", "")%>" id="Comment-<%=u_id%>" target="_blank" rel="nofollow" title="去 <%=u_name%> 的网站看看?">
<%else%>
<a id="Comment-<%=u_id%>" title="<%=u_name%> 没有登记网站?">
<%end if%>
<img src="../img/Portrait/<%=u_touxiang%>.jpg" alt="<%=u_name%>"/>
</a>
<span class="comment-name"><i class="icon-user"></i> <a title="<%=u_name%>"><%=u_name%></a></span>
 
                        <span class="comment-date"><i class="icon-calendar"></i> <%=u_ti%>&nbsp; <%=formatdatetime(u_time,4)%> | <i class="icon-map-marker"></i> <a title="<%=u_name%> 当前位于：<%=country%>"><%=country%></a></span>
                        <div class="comment-content"><%=u_content%></div>
                        <!-- Reply -->
						<%if u_recontent<>"" then%>
                        <ul>
						
                            <li>
                                <img src="../img/admin-avatar.jpg" alt="<%=web_author%>" title="<%=web_author%>"/><img src="../img/ok.png">
                                <span class="comment-name"><span class="comment-name"><i class="icon-user"></i> <a href="<%=web_url%>" target="_blank"><%=web_author%></a></span>
                                <span class="comment-date"><i class="icon-calendar"></i> <%=ru_ti%>&nbsp; <%=formatdatetime(u_retime,4)%> 回复 <a href="#Comment-<%=u_id%>">@<%=u_name%></a> 中说道：</span>
                                <div class="comment-content"><a href="#Comment-<%=u_id%>"><%=u_recontent%></a></div>
                                </li>

                         </ul>
						 <%end if%>
						 
                    </li>
<%
rs.movenext
loop
rs.close
set rs=nothing
%>
					
</ul>
<div class="accordion-heading">
<h3>
<a class="accordion-toggle" data-toggle="collapse" data-parent="#accordion2" href="#Coon" id="New">
&nbsp;我要评论 / 展开表单
</a>
</h3>
</div>
<%if plsl <> 0 then %>
<div id="Coon" class="accordion-body collapse">
<%else%>
<div id="Coon" class="accordion-body collapse in">
<%end if%>
<form action="../Post/Message.asp" id="comment-form"  method="post" />
<div class="alert alert-success">
<% 
set rs=server.createobject("adodb.recordset")
sql="select plsh from Web_Advanced_Settings"
rs.open(sql),conn,1,1
plsh=rs("plsh") '评论审核开关
rs.close
set rs=nothing
%>
<%if plsh<>1 then%>						   
<i class="icon-ban-circle"></i> 评论审核未开启  
<%else%>
<i class="icon-ok-circle"></i> 评论审核已开启  
<%end if%>
<input name="jizhu" type="checkbox" value="1" checked class="comment-fuxuna"/> 记住我的个人信息 
<input name="huifu" type="checkbox" value="1" checked class="comment-fuxuna"/> 回复后邮件通知我   
</div>

                <!-- Comment Form -->
                <div class="comment-form-container">
                    
                        <div class="input-prepend">
                            <span class="add-on"><i class="icon-user"></i></span>
                            <input name="u_name" type="text" class="span4" id="prependedInput" value="<%=Request.Cookies("u_name")%>" size="16" placeholder="您的称呼（必须）" />
							<input name="post_id" type="hidden" id="post_id" value="<%=id%>" />
                        </div>
                        <div class="input-prepend">
                            <span class="add-on"><i class="icon-envelope"></i></span>
                            <input name="u_mail" type="text" class="span4" id="prependedInput" value="<%=Request.Cookies("u_mail")%>" size="16" placeholder="您的邮箱（必须）" />
                        </div>
                        <div class="input-prepend">
                            <span class="add-on"><i class="icon-globe"></i></span>
                            <input name="u_url" type="text" class="span4" id="prependedInput" value="<%=Request.Cookies("u_url")%>" size="16" placeholder="您的网站（选填）" />
                        </div>
                        <textarea name="u_content" class="span6" id="txaArticle" placeholder="评论内容（必须）"></textarea>
                        <div class="input-prepend">
                            <span class="add-on"><i class="icon-question-sign"></i></span>
                            <input name="txt_check" type="text" class="span1" id="prependedInput" size="16" placeholder="验证码" /> <span class="add-on">
                            <img src="../inc/checkcode.asp " title="点击刷新验证码?"  onClick="this.src='../inc/checkcode.asp?t='+(new Date().getTime());" > </span> 
                        </div>
                        <div class="row">
                            <div class="span2">
                      <input type="submit" class="btn btn-inverse" value="提交评论" /> 
                            </div>
                        </div>
                    </form>
                </div>
                </div>
        </section><!-- Close comments section-->
        </div><!--Close container row-->

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