<!-- #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=5
end if
set rs=server.createobject("adodb.recordset")
sql="select n_id,n_name,n_description,n_keywords from Web_Navigation where n_id="&id&""
rs.open(sql),conn,1,1
wz_id=rs("n_id")
wz_name=rs("n_name")
wz_description=rs("n_description")
wz_keywords=rs("n_keywords")
rs.close
set rs=nothing
%>

<%
if ( wz_id<>5 ) then
Response.Status = "404 Not Found" 
Response.End 
end if
%>

<%
if pa="" then
yema=""
else
yema=" - 第"&Pa&"页"
end if
idss=5
%>
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title><%=wz_name%><%=yema%> - <%=web_name%></title>
<meta name="keywords" content="<%=wz_keywords%>" />
<meta name="description" content="<%=wz_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" -->
     
    <!-- 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=0 and u_view=1"
rs.open(sql),conn,1,1
If rs.bof And rs.eof Then
response.write "暂时没有任何留言。"
response.end
end if
plsl=rs.recordcount
if plsl=0 then
plslxs="暂时还没有留言，快来抢沙发吧！"
else
plslxs="当前共有 <a>"&plsl&"</a> 条留言"
end if
rs.close
set rs=nothing
%>


 <h5 class="title-bg">
 <div class="post-summary-footer">
<ul class="post-data">
<a href="/FeedBack/?New=Yes#New"  rel="nofollow" >发表留言</a>
</ul>
</div>
 <a name="comments" id="Comment"></a><%=plslxs%>
 </h5>
 				

               <ul>

<% 
set rs=server.createobject("adodb.recordset")
sql="select u_id,u_name,u_touxiang,u_content,u_aid,u_url,u_ip,u_time,u_retime,u_recontent from web_Article_comment where u_aid=0 and u_view=1 order by u_id desc"
rs.open(sql),conn,1,1
rs.pagesize=5 
Page=""&pa&""
if Page="" then Page=1
rs.absolutepage=Page
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_touxiang=rs("u_touxiang")
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")

b=((Page-1)*rs.pagesize)
a=a+1
c=a+b
%>	

<% 
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 <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
%>

<br />

<div class="accordion-heading">
<h3>
<a class="accordion-toggle" data-toggle="collapse" data-parent="#accordion2" href="#Coon" id="New">
&nbsp;我要留言 / 展开表单
</a>
</h3>
                    </div>

<%
Opennew=request.QueryString("New")
if Opennew="Yes" then %>
<div id="Coon" class="accordion-body collapse in">
<%else%>
<div id="Coon" class="accordion-body collapse">
<%end if%>

<form action="../Post/Message.asp" id="contact-form" method="post"/>
<div class="alert alert-success">

<% 
set rs=server.createobject("adodb.recordset")
sql="select lysh from Web_Advanced_Settings"
rs.open(sql),conn,1,1
lysh=rs("lysh") '留言审核开关
rs.close
set rs=nothing
%>
<%if lysh<>1 then%>						   
<i class="icon-ban-circle"></i> 留言审核未开启 
<%else%>
<i class="icon-ok-circle"></i> 留言审核已开启 
<%end if%>
<input name="jizhu" type="checkbox" id="jizhu" value="1" checked class="comment-fuxuna" /> 记住我的个人信息 
<input name="huifu" type="checkbox" id="huifu" value="1" checked class="comment-fuxuna" /> 回复后邮件通知我 
</div>

            
                <div class="input-prepend">
                <span class="add-on"><i class="icon-user"></i></span>
                <input name="u_name" type="text" class="span4" id="u_name" value="<%=Request.Cookies("u_name")%>" size="16" placeholder="您的称呼（必须）" />
				<input name="post_id" type="hidden" id="post_id" value="0" />
                </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" size="16" value="<%=Request.Cookies("u_url")%>" 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> <!--End page content column-->
		</div>

		

        <!-- 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" -->