        <!-- Blog Sidebar
        ================================================== --> 
        <div class="span4 sidebar">

            <!--Search-->
            <section>
                <div class="input-append">
                    <form action="/Search/" method="get" />
                        <input name="s" type="text" id="appendedInputButton" value="<%=key%>" size="16" placeholder="请输入关键字" />
                      <button class="btn" type="submit"><i class="icon-search"></i></button>
                    </form>
                </div>
            </section>

            <!--Categories-->
<% 
set rs=server.createobject("adodb.recordset")
sql="select s_time from web_shuoshuo where view_yes=1 order by s_id desc"
rs.open(sql),conn,1,1
sssl=rs.recordcount
rs.close
set rs=nothing
%> 

<% 
set rs=server.createobject("adodb.recordset")
sql="select w_time from web_Article where view_yes=1 order by w_id desc"
rs.open(sql),conn,1,1
wzsl=rs.recordcount
rs.close
set rs=nothing
%>             
         <h5 class="title-bg">时光隧道</h5>
            <ul class="post-category-list">


                    <img class="thumbnail align-left" src="../img/admin-avatar.jpg" style="width:65px;height:65px;" />
                    <h4><%=web_author%></h4> 
<h6>说说：<a title="共有 <%=sssl%> 条说说"><%=sssl%></a> 文章：<a title="共有 <%=wzsl%> 篇文章"><%=wzsl%></a></h6>

                     <h6><a href="<%=web_url%>" title="<%=web_name%>"><%=web_name%></a> 已正常运行 <a title="<%=web_name%> 已正常运行 <%=cint(date()- web_jztime)%> 天"><%=cint(date()- web_jztime)%></a> 天</h6>
<p></p>
<%
set rs=server.createobject("adodb.recordset")
sql="select top 2 w_title,w_id,w_time from web_Article where day(w_time)=day("&chatime&") and month(w_time)=month("&chatime&") and year(w_time)<>year("&chatime&") order by w_id desc"
rs.open(sql),conn,1,1
jrwzsl=rs.recordcount
%>
<%
set rs2=server.createobject("adodb.recordset")
sql="select top 2 s_content,s_id,s_time from web_shuoshuo where day(s_time)=day("&chatime&") and month(s_time)=month("&chatime&") and year(s_time)<>year("&chatime&") order by s_id desc"
rs2.open(sql),conn,1,1
jrsssl=rs2.recordcount
zong=jrwzsl+jrsssl
%>
<li>历史上的今天（<a><%=zong%></a>）</li>
<%
do while not rs.eof
w_title=rs("w_title")
w_id=rs("w_id")
w_time=rs("w_time")
%>
<li><a title="<%=year(w_time)%>年 发表 <%=w_title%>"><%=year(w_time)%>年</a> 文章：<a href="../Article/?<%=w_id%>.html" title="<%=w_title%>"><%=left(w_title,(s_cd-5))%></a></li>
<%
rs.movenext
loop
rs.close
set rs=nothing
%>  

<%
do while not rs2.eof
s_content=rs2("s_content")
s_id=rs2("s_id")
s_time=rs2("s_time")
%>
<li><a title="<%=year(s_time)%>年 发表 <%=RemoveHTML(s_content,s_cd-2)%>"><%=year(s_time)%>年</a> 说说：<a href="../shuos/?<%=s_id%>.html"><%=RemoveHTML(s_content,s_cd-5)%></a></li>
<%
rs2.movenext
loop
rs2.close
set rs2=nothing
if zong=0 then
%> 
<li>历史上的今天没有发表任何内容。</li>
<%end if%>
            </ul>
            <!--Popular Posts-->
            <h5 class="title-bg">随机图文</h5>
            <ul class="popular-posts">
<% 
'set rs=server.createobject("adodb.recordset")
'sql="select top 3 im_id,im_name,im_image,im_description,im_time from web_images where view_yes=1 and im_tuijian=1 "&Random_img&""
'rs.open(sql),conn,1,1
'do while not rs.eof
'im_id=rs("im_id")
'im_name=rs("im_name")
'im_image=rs("im_image")
'im_description=rs("im_description")
'im_time=rs("im_time")

set rs=server.createobject("adodb.recordset")
sql="select top 3 w_id,w_title,w_images,w_description,w_time from web_Article where w_images<>'' and view_yes=1 and w_tuijian=1 "&Random_article&""
rs.open(sql),conn,1,1
do while not rs.eof
im_id=rs("w_id")
im_name=rs("w_title")
im_image=rs("w_images")
im_description=rs("w_description")
im_time=rs("w_time")
%> 
<%
TimeDifference = DateDiff("s", im_time, Now)
if datediff("d",im_time,date)=0 then
ti="今天 " &formatdatetime(im_time,4)
elseif datediff("d",im_time,date)=1 then
ti="昨天 "&formatdatetime(im_time,4)
elseif datediff("d",im_time,date)=2 then
ti="前天 "&formatdatetime(im_time,4)
elseif datediff("d",im_time,date)< 8 then
ti=datediff("d",im_time,date)&"天前"
else
ti=formatdatetime(im_time,2)
end if
%>

			                  <li>
                    <a href="/Picture/?<%=im_id%>.html">
                    <%if web_simg=1 then %>
                    <img src="../img.asp?path=<%=replace(im_image,"..", "")%>&Width=85" class="thumbnail align-center" alt="<%=im_name%>" title="<%=im_name%>" />
                    <%else%>
                    <img src="<%=im_image%>" alt="<%=im_name%>" title="<%=im_name%>" class="thumbnail align-center" style="width:85px;height:70px;"/>
                    <%end if%>
                    </a>
                    <h6><a href="/Picture/?<%=im_id%>.html"><%=im_name%></a><br><a title="<%=im_description%>"><%=left(im_description,20)%> </a>...</h6>
                    <em><%=ti%> &nbsp;<%=formatdatetime(im_time,4)%></em>
              </li>
   
 <%
rs.movenext
loop
rs.close
set rs=nothing
%>            
            </ul>
			
            <!--Tabbed Content-->
            <h5 class="title-bg">互动信息</h5>
            <ul class="nav nav-tabs">
                <li class="active"><a href="#comments" data-toggle="tab">说说评论</a></li>
                <li><a href="#hot" data-toggle="tab">点击排行</a></li>
                <li><a href="#tui" data-toggle="tab">随机推荐</a></li>
            </ul>

            <div class="tab-content">
                <div class="tab-pane active" id="comments">
                     <ul class="popular-comment">
<% 
set rs=server.createobject("adodb.recordset")
sql="select top 6 su_id,su_name,su_content,su_touxiang,su_sid,su_url from web_shuoshuo_comment where (su_sid<>0 and su_view=1) order by su_id desc"
rs.open(sql),conn,1,1
do while not rs.eof
u_id2=rs("su_id")
u_name=rs("su_name")
u_content=rs("su_content")
u_aid=rs("su_sid")
u_url=rs("su_url")
u_touxiang=rs("su_touxiang")
%> 				 
 <li>
<%if u_url<>"" then %>
 <a href="../url/?<%=replace(u_url,"http://", "")%>" target="_blank" rel="nofollow" title="去 <%=u_name%> 的网站看看 ?">
 <%else%>
 <a title="<%=u_name%>，没有登记网站.">
 <%end if%>
 <img src="../img/Portrait/<%=u_touxiang%>.jpg" />
 </a>
<i class="icon-comment"></i> <%=u_name%><br/>
<a href="../shuos/?<%=u_aid%>.html#Comment-<%=u_id2%>" title="<%=u_content%>" ><%=left(u_content,cbpl_cd)%>..</a>
</li>
<%
rs.movenext
loop
rs.close
set rs=nothing
%>	

                    </ul>
                </div>
                <div class="tab-pane" id="hot">
                    <ul>
<% 
set rs=server.createobject("adodb.recordset")
sql="select top 8 w_id,hit,w_title from web_Article where view_yes=1 order by hit desc"
rs.open(sql),conn,1,1
do while not rs.eof
w_id=rs("w_id")
hit=rs("hit")
w_title=rs("w_title")
%>					
                        
						<li><i class="icon-star-empty"></i> <a href="/Article/?<%=w_id%>.html" title="<%=w_title%>"><%=left(w_title,15)%>..</a> ( <%=formatNumber(hit,0)%> )</li>

<%
rs.movenext
loop
rs.close
set rs=nothing
%>	
                    </ul>
                </div>
				
                <div class="tab-pane" id="tui">
                    <ul>
<% 
set rs=server.createobject("adodb.recordset")
sql="select top 8 w_id,hit,w_title from web_Article where (view_yes=1 and w_tuijian=1) "&Random_article&""
rs.open(sql),conn,1,1
do while not rs.eof
w_id=rs("w_id")
hit=rs("hit")
w_title=rs("w_title")
%>					
                        
						<li><i class="icon-thumbs-up"></i> <a href="/Article/?<%=w_id%>.html" title="<%=w_title%>"><%=left(w_title,15)%>..</a> ( <%=formatNumber(hit,0)%> )</li>

<%
rs.movenext
loop
rs.close
set rs=nothing
%>	
                    </ul>
                </div>
            </div>
						            <!--Popular link-->
 

            </ul>
<!--Popular link-->
<% 
set rs=server.createobject("adodb.recordset")
sql="select web_ad2 from Web_ad"
rs.open(sql),conn,1,1
web_ad2=rs("web_ad2")
rs.close
set rs=nothing
if web_ad2<>"" then
%>
<h5 class="title-bg">广告链接</h5>
<ul class="popular-posts">
<%=web_ad2%>
            </ul>
<%end if%>

        </div>

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

    <!-- Footer Area
        ================================================== -->