<!-- #include file="../inc/301.asp" -->
<!-- #include file="../inc/conn.asp" -->
<!-- #include file="../inc/other.asp" -->
<!-- #include file="../inc/nohtml.asp" -->
<%
ida=Request.ServerVariables("QUERY_STRING")
id1=replace(ida,".html","")
if instr(id1,"-")>0 then
id2=split(id1,"-")
id=id2(0)
pa=id2(1)
else
id=id1
end if

set rs=server.createobject("adodb.recordset")
sql="select w_id,l_id,w_title,w_content,w_keywords,w_description,w_author,w_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_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")
rs.close
set rs=nothing
%>


<%
if pa="" then
yema=""
else
yema=" - 第"&Pa&"页"
end if
%>
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>评论：<%=w_title%><%=yema%> - <%=web_name%></title>
<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" -->
     
    <!-- Page Content
    ================================================== --> 
    <div class="row"><!--Container row-->

        <div class="span8 contact"><!--Begin page content column-->


			
        <!-- Post Comments
        ================================================== --> 
            <section class="comments">
<% 
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=""&plsl&" 条评论"
end if
rs.close
set rs=nothing
%>
 
  <h4 class="title-bg">以下为文章：<a href="/Article/?<%=id%>.html">《 <%=w_title%> 》</a>的  <%=plslxs%>：</a></h4>	
 				

               <ul>

<% 
set rs=server.createobject("adodb.recordset")
sql="select u_id,u_name,u_content,u_aid,u_url,u_touxiang,u_ip,u_time,u_retime,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
rs.pagesize=7 '每页记录条数
Page=""&pa&"" '将URL参数curpage传给curpage变量
if Page="" then Page=1
rs.absolutepage=Page '将本页设为curpage设置的页数
for t= 1 to rs.pagesize
if rs.eof then
exit for
end if
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 TimeDifference <60 then  
u_ti=(TimeDifference & "秒前")  
Elseif TimeDifference <60*60 then  
u_ti=(TimeDifference\60 & "分钟前")  
Elseif TimeDifference <60*60*24 then  
u_ti=(TimeDifference\(60*60) & "小时前")  
else if TimeDifference <7*60*60*24 then  
u_ti=(TimeDifference\(60*60*24) & "天前")
elseif TimeDifference >7*60*60*24 then  
u_ti=formatdatetime(u_time,2)
end if
End If
%>

<%
TimeDifference = DateDiff("s", u_retime, Now)
If TimeDifference <60 then  
ru_ti=(TimeDifference & "秒前")  
Elseif TimeDifference <60*60 then  
ru_ti=(TimeDifference\60 & "分钟前")  
Elseif TimeDifference <60*60*24 then  
ru_ti=(TimeDifference\(60*60) & "小时前")  
else if TimeDifference <7*60*60*24 then  
ru_ti=(TimeDifference\(60*60*24) & "天前")
elseif TimeDifference >7*60*60*24 then  
ru_ti=formatdatetime(u_retime,2)
end if
End If
if now()-u_time <0.5 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">第<%=c%>条</span>
						<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"><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
next
%>
<%
fenye="?"&id&""
%>
</ul>
</section>

            <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="<%=fenye%>-1.html">首页</a>
</li>
<%end if%>
                
<%if Page=1 then%>
<li class="active">
<a>上一页</a>
</li>
<%else%>
<li >
<a href="<%=fenye%>-<%=Page-1%>.html">上一页</a>
</li>
<%end if%>

<%if rs.pagecount<Page+1 then%>
<li class="active">
<a>下一页</a>
</li>
<%else%>
<li >
<a href="<%=fenye%>-<%=Page+1%>.html">下一页</a>
</li>
<%end if%>
 
<%if rs.pagecount<Page+1 then%>
<li class="active">
<a>尾页</a>
</li>
<%else%>
<li >
<a href="<%=fenye%>-<%=rs.pagecount%>.html">尾页</a>
</li>
<%end if%>
            </ul>
 
            </div>
<%
rs.close
set rs=nothing
%>
 
        </div> <!--End page content column-->
		
        <!-- Sidebar
        ================================================== --> 
         <!-- #include file="../Config/sidebar.asp" -->
        <!-- End sidebar column -->

    </div><!-- End container row -->
    
    </div> <!-- End Container -->

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