<%@LANGUAGE="VBSCRIPT" CODEPAGE="936"%>
<!--#include file="inc/function.asp"-->
<!--#include file="inc/conn.asp"-->
<!--#include file="inc/config.asp"-->
<!--#include file="inc/Conn_User.asp"-->
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title><%=SiteName%> >>> 日志</title>
<link href="img0415/css.CSS" rel="stylesheet" type="text/css">
<style type="text/css">
<!--
.STYLE1 {
	color: #FF6600;
	font-weight: bold;
}
.STYLE2 {
	color: #993300;
	font-weight: bold;
}
-->
</style>

</head>

<body leftmargin="0" topmargin="0" marginwidth="0" marginheight="0">
<table width="900" border="0" align="center" cellpadding="0" cellspacing="0">
  <tr>
    <td width="5" bgcolor="f2f2f2"></td>
    <td width="1" bgcolor="cccccc"></td>
    <td width="888" align="center" bgcolor="#FFFFFF"> 
      <table width="870" border="0" cellspacing="0" cellpadding="0">
        <tr> 
          <td width="4" rowspan="2" valign="top"><img src="img0415/top1.gif" width="4" height="6"></td>
          <td height="6" background="img0415/topbg.gif"><img src="img0415/topbg2.gif" width="8" height="6"></td>
          <td width="223" rowspan="2" valign="top">
<table width="100%" border="0" cellspacing="0" cellpadding="0">
              <tr>
                <td width="23"><img src="img0415/top2.gif" width="23" height="25"></td>
                <td background="img0415/topbbg.gif"><table width="100%" border="0" cellspacing="0" cellpadding="0">
                    <tr align="center"> 
                      <td><a href=# onClick="this.style.behavior='url(#default#homepage)';this.setHomePage('<%=SiteUrl%>');">设为首页</a></td>
                      <td width="1"><img src="img0415/hline.gif" width="1" height="24"></td>
                      <td><a target=_top href=javascript:window.external.AddFavorite('<%=SiteUrl%>','<%=SiteName%>')>
加入收藏</a></td>
                      <td width="1"><img src="img0415/hline.gif" width="1" height="24"></td>
                      <td><a href=mailto:<%=WebmasterEmail%>>联系我们</a></td>
                    </tr>
                  </table></td>
                <td width="11"><img src="img0415/top3.gif" width="11" height="25"></td>
              </tr>
            </table></td>
        </tr>
        <tr> 
          <td><table width="100%" height="60" border="0" cellpadding="0" cellspacing="0">
              <tr>
                <td width="130"><img src="img0415/logo.gif" width="115" height="31"></td>
                <td width="60"><strong><font color="#FF6600">注册~</font></strong><br>
                  Register</td>
                <td valign="bottom">
<table border="0" align="right" cellpadding="0" cellspacing="0">
                    <tr>
                      <td><a href="index.asp"><img src="img0415/home.gif" width="67" height="43" border="0"></a></td>
                      <td><a href="zone.asp"><img src="img0415/zone.gif" width="80" height="43" border="0"></a></td>
                      <td><a href="photo_index.asp"><img src="img0415/photo.gif" width="80" height="43" border="0"></a></td>
                      <td><a href="blog.asp"><img src="img0415/blog2.gif" width="80" height="43" border="0"></a></td>
                      <td><a href="shop.asp"><img src="img0415/shop.gif" width="83" height="43" border="0"></a></td>
                    </tr>
                  </table></td>
              </tr>
            </table></td>
        </tr>
      </table></td>
    <td width="1" bgcolor="#CCCCCC"><img src="img0415/space.gif" width="1" height="1"><img src="img0415/space.gif"></td>
    <td width="5" bgcolor="f2f2f2"></td>
  </tr>
</table>
<table width="900" border="0" align="center" cellpadding="0" cellspacing="0">
  <tr> 
    <td width="5" bgcolor="f2f2f2"></td>
    <td width="1" bgcolor="cccccc"></td>
    <td width="888" align="center" bgcolor="#FFFFFF"><table width="870" border="0" cellspacing="0" cellpadding="0">
        <tr> 
          <td width="7"><img src="img0415/menu1.gif" width="7" height="31"></td>
          <td align="left" background="img0415/menubg.gif"><strong><font color="#FFFFFF">
            <% call ShowUserLogin2() %>
          </font></strong></td>
          <td width="50" background="img0415/menubg.gif"><a href="help.asp" target="_blank"><img src="img0415/faq.gif" width="42" height="15" border="0"></a></td>
          <td width="7"><img src="img0415/menu2.gif" width="7" height="31"></td>
        </tr>
      </table> 
      
    </td>
    <td width="1" bgcolor="#CCCCCC"><img src="img0415/space.gif" width="1" height="1"><img src="img0415/space.gif"></td>
    <td width="5" bgcolor="f2f2f2"></td>
  </tr>
</table>
<!--#include file="ad.asp"-->
<table width="900" border="0" align="center" cellpadding="0" cellspacing="0">
  <tr> 
    <td width="5" bgcolor="f2f2f2"></td>
    <td width="1" bgcolor="cccccc"></td>
    <td width="888" align="center" bgcolor="#FFFFFF"><table width="870" border="0" cellspacing="0" cellpadding="0">
        <tr>
          <td valign="top">
<table width="100%" height="8" border="0" cellpadding="0" cellspacing="0">
              <tr>
                <td height="9"><img src="img0415/space.gif"></td>
              </tr>
            </table>
            <table width="100%" border="0" align="center" cellpadding="0" cellspacing="0">
              <tr> 
                <td width="1" height="1"><img src="img0415/space.gif" width="1" height="1"></td>
                <td bgcolor="#CCCCCC"></td>
                <td width="1"></td>
              </tr>
              <tr> 
                <td width="1" bgcolor="#CCCCCC"><img src="img0415/space.gif" width="1" height="1"></td>
                <td height="40" bgcolor="f2f2f2"><table width="98%" border="0" align="center" cellpadding="0" cellspacing="0">
                  <form action='blog_search.asp' method='post' name='form'>
                    <tr>
                      <td width="28" align="center"><img src="img0415/search.gif" width="15" height="16"></td>
                      <td width="225"><input name="keywords" type="text" class="input2" size="38">
                      </td>
                      <td width="70"><table width="100%" border="0" cellspacing="0" cellpadding="0">
                          <tr>
                            <td height="1"><img src="img0415/space.gif" width="1" height="1"></td>
                          </tr>
                        </table>
                          <input name="imageField2" type="image" src="img0415/search2.gif" width="56" height="19" border="0">
                      </td>
                      <td><strong><font color="#FF6600">热门:</font></strong></td>
                    </tr>
                  </form>
                </table></td>
                <td width="1" bgcolor="#CCCCCC"><img src="img0415/space.gif" width="1" height="1"></td>
              </tr>
              <tr> 
                <td width="1" height="1"><img src="img0415/space.gif" width="1" height="1"></td>
                <td bgcolor="#CCCCCC"></td>
                <td width="1"></td>
              </tr>
            </table> 
            <table width="100%" height="8" border="0" cellpadding="0" cellspacing="0">
              <tr> 
                <td height="9"><img src="img0415/space.gif"></td>
              </tr>
            </table>
            <table width="100%" height="8" border="0" cellpadding="0" cellspacing="0">
              <tr> 
                <td><table width="100%" border="0" cellspacing="0" cellpadding="0">
                    <tr> 
                      <td width="1" height="1"><img src="img0415/space.gif" width="1" height="1"></td>
                      <td colspan="2" bgcolor="#CCCCCC"></td>
                      <td width="1"></td>
                    </tr>
                    <tr> 
                      <td width="1" bgcolor="#CCCCCC"><img src="img0415/space.gif" width="1" height="1"></td>
                      <td width="330" height="26" bgcolor="f2f2f2">&nbsp;&nbsp;
                        
                        <font color="#666666" style='FONT-SIZE: 12px'>关键字中含有"<font color="#ff6600" style='FONT-SIZE: 12px'><strong><%=Request("keywords")%></strong></font>"的日志</font>&nbsp;<font color='#999999' style='FONT-SIZE: 10px'>Blog
                        List</font> </td>
                      <td align="right" bgcolor="f2f2f2">&nbsp;</td>
                      <td width="1" bgcolor="#CCCCCC"><img src="img0415/space.gif" width="1" height="1"></td>
                    </tr>
                  </table>
                  <table width="100%" border="0" cellpadding="5" cellspacing="1" bgcolor="#CCCCCC">
                    <tr> 
                      <td align="center" bgcolor="#FFFFFF" > 
                        <%
myPagesize=20
keywords=Request("keywords")
set rs=server.createobject("adodb.recordset")
classidd=request("classid")
rs.open "select * from article where title like '%"&keywords&"%' order by articleid desc",conn,1,1 
call myPages(rs,myPagesize)
%>
                        <%line=myPagesize
do while not rs.eof and line>0
%>
                        <table width="98%" height="29" border="0" cellpadding="0" cellspacing="0">
                          <tr> 
                            <td ></td>
                            <td height="25" align="center" bgcolor="ffffff"><table width="99%" cellpadding="0" cellspacing="0">
                                <tr> 
                                  <Td width="2%"><img src=user/head.gif></td>
                                  <Td> 
                                    <%
set rsu=server.createobject("adodb.recordset")
rsu.open "select * from [user] where username='"&rs("Editor")&"' order by userid desc",conn_user,1,1 
%>
                                    <a href="user.asp?userid=<%=rsu("userid")%>&mdid=logs&htm=article_show.asp?articleid=<%=rs("articleid")%>&menu=userlogs.asp?userid=<%=rsu("userid")%>" target="_blank"> 
                                    <% if rs("TitleFontColor")<>"" then%>
                                    <font color=<%=rs("TitleFontColor")%>><%=left(rs("title"),24)%> 
                                    <%if len(rs("title"))>24 then%>
                                    ... 
                                    <%else%>
                                    <%end if%>
                                    </font> 
                                    <%else%>
                                    <%=left(rs("title"),24)%> 
                                    <%if len(rs("title"))>24 then%>
                                    ... 
                                    <%else%>
                                    <%end if%>
                                    <%end if%></a>&nbsp;&nbsp;<font style='FONT-SIZE: 11px' color='#666666'>点击:<%=rs("hits")%></font> 
                                    <%if FormatDateTime(rs("UpdateTime"),1)=FormatDateTime(now,1) then%>
                                    &nbsp;<img src=user/ico_new.gif border="0"> 
                                    <%else%>
                                    <% end if%>
                                  </td>
                                  <Td width="13"><img src="img0415/b1.gif"></td>
                                  <Td width="90"><a href=user.asp?userid=<%=rsu("userid")%> target=_blank><%=rsu("username")%></a></td>
                                  <Td width=1% align="right"><img src="isky/time.gif" width="13" height="10"></td>
                                  <Td width=11% align="left"><font color='#666666' style='FONT-SIZE: 10px'><%=year(rs("UpdateTime"))%>-<%=month(rs("UpdateTime"))%>-<%=day(rs("UpdateTime"))%></font></td>
                                </tr>
                              </table></td>
                            <td ></td>
                          </tr>
                          <tr> 
                            <td width="1" height="1" bgcolor="#BCBCBC"></td>
                            <td height="1"  background="user/li_x_02.gif"></td>
                            <td width="1" height="1" bgcolor="#BCBCBC"></td>
                          </tr>
                        </table>
                        <%rs.movenext
   line=line-1
loop
  %>
                        <table width="100%" height="6" border="0" cellpadding="0" cellspacing="0">
                          <tr> 
                            <td height="6"><img src="img0415/space.gif"></td>
                          </tr>
                        </table></td>
                    </tr>
                  </table></td>
              </tr>
            </table>
            <table width="100%" border="0" cellspacing="0" cellpadding="0">
              <tr> 
                <td width="1" bgcolor="#CCCCCC"><img src="img0415/space.gif" width="1" height="1"></td>
                <td height="26" align="center" bgcolor="f2f2f2">
                  <%call listpages(mycondition)%>
                  <%rs.close
set rs=nothing%>
                </td>
                <td width="1" bgcolor="#CCCCCC"><img src="img0415/space.gif" width="1" height="1"></td>
              </tr>
              <tr> 
                <td width="1" height="1"><img src="img0415/space.gif" width="1" height="1"></td>
                <td bgcolor="#CCCCCC"></td>
                <td width="1"></td>
              </tr>
            </table>
            <table width="100%" height="8" border="0" cellpadding="0" cellspacing="0">
              <tr> 
                <td height="9"><img src="img0415/space.gif"></td>
              </tr>
            </table></td>
          <td width="9"></td>
          <td width="220" valign="top" bgcolor="fafafa" class="line1">
<table width="100%" height="8" border="0" cellpadding="0" cellspacing="0">
              <tr> 
                <td height="9"><img src="img0415/space.gif"></td>
              </tr>
            </table>
            <table border="0" align="center" cellpadding="0" cellspacing="0">
              <tr> 
                <td><img src="img0415/logintop.gif" width="200" height="7" /></td>
              </tr>
              <tr> 
                <td background="img0415/loginbg.gif" bgcolor="#FFFFFF"><table width="90%" border="0" align="center" cellpadding="0" cellspacing="0">
                    <tr> 
                      <td height="25"><span class="STYLE1">&raquo;&nbsp;热门日志</span>&nbsp;&nbsp;<font color="#999999" style='FONT-SIZE: 9px'>Hot 
                        Blog </font> </td>
                    </tr>
                    <tr> 
                      <td height="1" background="img0415/linef.gif"></td>
                    </tr>
                  </table>
                  <table width="98%" border="0" align="center" cellpadding="0" cellspacing="5">
                    <%
set rs=server.createobject("adodb.recordset")
rs.open "select top 10 * from [article] order by hits desc",conn,1,1 
%>
                    <tr> 
                      <%

						i=1
do while not rs.eof
%>
                      <td height="22" bgcolor="fafafa"><table width="100%" border="0" cellspacing="0" cellpadding="0">
                          <tr> 
                            <td width="20" align="center"><img src="img0415/d<%=i%>.gif"></td>
                            <td> 
                              <%
set rsu=server.createobject("adodb.recordset")
rsu.open "select * from [user] where username='"&rs("Editor")&"' order by userid desc",conn_user,1,1 
%>
                              <a href="user.asp?userid=<%=rsu("userid")%>&mdid=logs&htm=article_show.asp?articleid=<%=rs("articleid")%>&menu=userlogs.asp?userid=<%=rsu("userid")%>" target="_blank"><%=left(replace(rs("title"),"&nbsp;",""),8)%> 
                              <%
				  if len(rs("title"))>8 then
				   response.Write"..."
				   else 
				   end if%>
                              </a> <font color="#FF6600" style="font-size:10" ><%=rs("hits")%></font></td>
                          </tr>
                        </table></td>
                    </tr>
                    <%
						i=i+1
						if i>10 then exit do
						rs.movenext
						loop
						rs.close
						set rs=nothing%>
                  </table></td>
              </tr>
              <tr> 
                <td><img src="img0415/loginend.gif" width="200" height="8" /></td>
              </tr>
            </table>
            <table width="100%" height="8" border="0" cellpadding="0" cellspacing="0">
              <tr> 
                <td height="9"><img src="img0415/space.gif"></td>
              </tr>
            </table>
            </td>
        </tr>
      </table> </td>
    <td width="1" bgcolor="#CCCCCC"><img src="img0415/space.gif" width="1" height="1"><img src="img0415/space.gif"></td>
    <td width="5" bgcolor="f2f2f2"></td>
  </tr>
</table>
<%sub listpages(mycondition)

	response.write "<table height=22  border=0 cellpadding=0 cellspacing=0><Tr><td><table width='100%' border=0 cellspacing=0 cellpadding=0><tr><td height=3></td></tr></table>"
	if pages<1 then
		exit sub
	end if
	
	
	if p>0 then
		response.write	"<a href="&request.ServerVariables("script_name")&"?classid="&classidd&"&currentpage=10&p="&p-1&mycondition&"><img src=user/prepre.gif alt=前十页 border=0></a>&nbsp;&nbsp;&nbsp;"
    else
	response.write	"<img src=user/prepre.gif alt=前十页 border=0>&nbsp;&nbsp;&nbsp;"
    end if
	'-------------------下面写出当前十个页码
	response.write "</td><td><img src=user/lined.gif border=0><img src=user/k.gif border=0 width=5>"
	for i=1 to 10
		if (p*10+i)>pages then exit for
		if currentpage=i then
		
			response.write "<b><a style='color:ff6600'"
		else
			response.write "<a"
		end if 
		dates=request("dates")
		response.write " href="&request.ServerVariables("script_name")&"?classid="&classidd&"&currentpage="&i&"&p="&p&mycondition&"><font class=no >"&(p*10+i)&"</font></a></b>&nbsp;&nbsp;<img src=user/lined.gif border=0><img src=user/k.gif width=5 border=0>"	
     next
	 response.write "</td><td><table width='100%' border=0 cellspacing=0 cellpadding=0><tr><td height=3></td></tr></table>"
	 '--------------------察看下十页的连接
    if (p*10+10)<pages then
		response.write "<img src=user/k.gif border=0><a href="&request.ServerVariables("script_name")&"?classid="&classidd&"&currentpage=1&p="&p+1&mycondition&"><img src=user/nextnext.gif alt=后十页 border=0></a>" 
		else
		response.write "<img src=user/k.gif border=0><img src=user/nextnext.gif alt=后十页 border=0>"
	end if
	'-----------------------------------------------上下页导航
	response.write "</td>"
	

	  response.write "</tr></table>"
end sub

sub myPages(myRS,mysize)  '------mysize为内部变量（主页面没有定义），myRS为主页面传递过来的RS对象（地址传递）
	if myRS.eof and myRS.bof then str="没有纪录"
	if str="" then
		if mysize="" or NOT IsNumeric(mysize) then
			mysize=15
		end if
		myRS.PageSize=mysize
		pages=myRS.pagecount
		records=myRS.recordcount
		On Error Resume Next '取得数字
		currentPage=request("currentPage")
		if currentPage="" then
			currentPage=1
		end if
		currentPage=CInt(currentPage)
		if Err.Number <> 0 Then
			currentPage=1
			Err.Clear
		end if
		if currentPage<1 then
			currentPage=1
		elseIf currentPage>10 then
			currentPage=10
		end if
		'----------------处理p
		p=request("p")
		if p="" then
			p=0
		end if
		p=CLng(p)
		if Err.Number <> 0 Then
			p=0
			Err.Clear
		end if
		if p<0 then
			p=0
		end if
		'--判断是否出了页数范围
		nowPage=p*10+currentPage
		if nowPage>pages then
			p=(pages-1)\10
			currentPage=((pages-1) mod 10)+1
		end if
		myRS.absolutepage=p*10+currentPage
	else
	   currentPage=1
	   records=0
	   pages=1
	end if
end sub

dim pages,records,currentPage,p '--------定义变量，这些变量在主页面中，进行地址传递%>
<!--#include file="end.asp"-->
</body>
</html>
