<!--#include file="../conn.asp" -->
<!--#include file="inc.asp" -->
<html>
<head>
<meta http-equiv="Content-Language" content="zh-cn">
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title><%=sitename%></title>
<meta name="keywords" content="<%=sitegjc%> www.rijiren.com" />
<meta name="description" content="<%=sitems%> www.rijiren.com" />
<link href="<%=alltubg%>css.css" rel="stylesheet" type="text/css">
<script src="<%=alltubg%>alt.js"></script>
</head>
<body background="<%=bgrnd%>" topmargin="0" leftmargin="0" rightmargin="0" bottommargin="0" marginwidth="0">
<table width="985" border="0" cellspacing="0" cellpadding="0" align="center" style="margin:0 auto;">
  <tr> 
    <td> <!--#include file="head.asp" -->
      <table width="985" border="0" cellspacing="0" cellpadding="0" height="452">
        <tr> 
          <td width="20">&nbsp;</td>
          <td height="452" background="<%=alltubg%>bg1.gif" width="703"> 
            <table width="703" border="0" cellspacing="0" cellpadding="0" height="452">
              <tr> 
                <td height="5" width="56"></td>
                <td width="288"></td>
                <td rowspan="3" width="21"></td>
                <td width="284"></td>
                <td width="57"></td>
              </tr>
              <tr> 
                <td height="380" width="56">&nbsp;</td>
                <td width="288"> <img border="0" src="<%=alltubg%>search_img.jpg" width="275" height="355"></td>
                <td align="center">
                  <table border="0" width="100%" id="table6" cellspacing="0" cellpadding="0" height="100%">
                    <tr> 
                      <td height="10"></td>
                    </tr>
                    <tr> 
                      <td> 
                        <div align="center"> 
						<%if request.QueryString("a")<>"s" then%>
                          <table border="0" width="245" id="table7" cellspacing="0" cellpadding="0" background="<%=alltubg%>loing.gif" height="274">
                            <tr> 
                              <td height="84" width="245">　</td>
                            </tr>
                            <tr> 
                              <td height="38" width="245"> 
                                <p align="center"> <img border="0" src="<%=alltubg%>search.gif" width="109" height="17">　
                              </td>
                            </tr>
                            <form method=POST action="search.asp?a=s">
                              <tr> 
                                <td width="245" height="23"> 
                                  <p align="center"><font color="#FFFFFF">
                                    <select size="1" name="sss" style="font-family: 宋体; font-size: 9pt; background-color: #FFFFFF; color: #000064; border: 1 solid #000000">
                                      <option value="日记标题">日记标题</option>
                                    </select>
                                    </font>
                                </td>
                              </tr>
                              <tr> 
                                <td width="245" height="30"> 
                                  <p align="center"><font color="#FFFFFF"> 
                                    <input type="text" onFocus="this.value=''" name="ttt" size="13" style="font-family: 宋体; font-size: 9pt; background-color: #FFFFFF; color: #000064; border: 1 solid #000000" value="输入关键字">
                                    </font>
                                </td>
                              </tr>
                              <tr> 
                                <td width="245"> 
                                  <p align="center"><font color="#FFFFFF"> 
                                    <input type="submit" value="搜 索" name="B3" style="font-family: 宋体; font-size: 9pt; color: #000064; background-color: #FFFFFF; border: 1 solid #000000">
                                    </font>
                                </td>
                              </tr>
                              <tr> 
                                <td width="245">　</td>
                              </tr>
                            </form>
                          </table>

<%else%>						  
<table border="0" width="278" id="table6" cellspacing="0" cellpadding="0" height="100%">
                    <tr> 
                      <td height="19" width="278" colspan="2">　 
<%  
sss=request("sss") 
ttt=request("ttt") 
ttt=LTRIM(RTRIM(ttt))
'if sss="日记标题" then 
set rs=server.CreateObject("adodb.Recordset")
Sql2="Select * From [diary] Where display=1 and title like '%"& ttt &"%' Order By diaryid Desc"
response.write sql2
Rs.Open Sql2,conn,1,1
num=rs.recordcount
if num="" then num=0
'end if
%>
                      </td>
                    </tr>
                    <tr> 
                      <td height="19" width="113"> <img border="0" src="<%=alltubg%>BookOrder.gif" width="103" height="17"></td>
                      <td height="19" width="165"> 
                        <p align="right">　&nbsp;共找到<%=num%>篇文章 
                      </td>
                    </tr>
                    <tr> 
                      <td background="<%=alltubg%>linebg2.gif" width="278" colspan="2" height="1"> 
                        <img border="0" src="<%=alltubg%>linebg2.gif" width="4" height="1"></td>
                    </tr>
                    <tr> 
                      <td height="28" width="278" colspan="2"><font color="#FF0000">【<%=sss%>】</font>您搜索的关键字：<font color="#FF0000"><%=ttt%></font></td>
                    </tr>
                    <tr> 
                      <td width="278" colspan="2" alt="日记人 www.rijiren.com" valign="top"> 
                        <table border="0" width="100%" id="table7" cellspacing="0" cellpadding="0">
                          <%
					IF Rs.Bof And Rs.Eof Then
response.write "<p align='center' class='p1' >【太不可思议了，没有找到您需要的日记！】"
else
rs.pagesize=12
maxpage=rs.pagecount
page=clng(request("page"))


if page="" or page=0 then
   page=1
end if
if page>maxpage then
    page=maxpage
end if

rs.absolutepage = page
do while not rs.eof
xq=rs("xq")
Set rx = Server.CreateObject("ADODB.Recordset")
  sql="select * from xqlist where xqorder="&CInt(xq)
   rx.open sql,conn,3,2
   xq=rx("xqcontent")
   rx.update
   rx.close
%>
                          <tr> 
                            <td> 

                              <table width="272" border="0" cellpadding="0" cellspacing="0"  id="table14" background="img/bg_line.gif">
                                <tr bordercolor="DDE7AB"> 
                                  <td width="2"></td>
                                  <td width="53"><%=xq%></td>
                                  <td width="164"><font color="#51300C"><a target="_blank" href="<%if ishtml="yes" then%><%=diarydir%><%=htmldir%>/riji<%=rs("diaryid")%>.htm<%else%><%=diarydir%>u/play.asp?id=<%=rs("diaryid")%><%end if%>"> 
                                    <%= Replace(rs("title"),ttt,"<font color=red>"&ttt&"</font>") %></a></font></td>
                                  <td width="23"><img src="<%=alltubg%><%=rs("tq")%>" border="0" align="middle"></td>
                                  <td width="31"><a title="<%=rs("diarytime")%>" href="#"> 
                                    <img border="0" src="<%=alltubg%>TIME.gif" width="24" height="20"></a></td>
                                </tr>
                              </table>
                              <%
n=n+1
rs.movenext
if n>=rs.pagesize then exit do    
loop
%>
                              <br>
                              <table width="98%" border="0" cellspacing="0" cellpadding="0" id="table15">
                                <tr> 
                                  <td> 
                                    <p align="right"> 
                                      <%
if cstr(page)=1 then
Response.Write("<font color=#808080>首页&nbsp;上页&nbsp;</font>")
else
if page>1 and page=maxpage then%>
                                      <a href="search.asp?a=s&sss=<%=request("sss")%>&ttt=<%=request("ttt")%>&page=1"> <font color="#5690BE">首页</font></a> 
                                      <a href="search.asp?a=s&sss=<%=request("sss")%>&ttt=<%=request("ttt")%>&page=<%=page-1%>"> 
                                      <font color="#5690BE">上页</font></a> 
                                      <%end if%>
                                      <% if page<>1 and page<>maxpage then%>
                                      <a href="search.asp?a=s&sss=<%=request("sss")%>&ttt=<%=request("ttt")%>&page=1"> <font color="#5690BE">首页</font></a><a href="search.asp?a=s&sss=<%=request("sss")%>&ttt=<%=request("ttt")%>&page=<%=page-1%>"> 
                                      <font color="#5690BE">上页</font></a> 
                                      <%end if
end if


if cstr(page)=cstr(rs.pagecount) then%>
                                      <font color="#808080">下页</font> <font color="#808080">尾页</font> 
                                      <%else%>
                                      <%
			if cstr(page)=1 and cstr(page)<>cstr(rs.pagecount) and cstr(rs.pagecount)<>0 then%>
                                      <a href="search.asp?a=s&sss=<%=request("sss")%>&ttt=<%=request("ttt")%>&page=<%=page+1%>" > 
                                      <font color="#5690BE">下页</font></a> <a href="search.asp?a=s&sss=<%=request("sss")%>&ttt=<%=request("ttt")%>&page=<%=maxpage%>"> 
                                      <font color="#5690BE">尾页</font></a> 
                                      <%end if%>
                                      <%
			if cstr(page)<>1 and cstr(page)<>cstr(rs.pagecount) and cstr(rs.pagecount)<>0 then%>
                                      <a href="search.asp?a=s&sss=<%=request("sss")%>&ttt=<%=request("ttt")%>&page=<%=page+1%>" > 
                                      <font color="#5690BE">下页</font></a> <a href="search.asp?a=s&sss=<%=request("sss")%>&ttt=<%=request("ttt")%>&page=<%=maxpage%>"> 
                                      <font color="#5690BE">尾页</font></a> 
                                      <%end if%>
                                      <%end if%>
                                      <font color="#5690BE"> 页次:<%=page%>/<%=maxpage%>&nbsp; 
                                      &nbsp; </font> 
                                  </td>
                                </tr>
                              </table>
                              <%
Rs.Close
Set Rs=Nothing
End IF
%>
                            </td>
                          </tr>
                        </table>
                      </td>
                    </tr>
                    <tr> 
                      <td width="278" colspan="2">　</td>
                    </tr>
                  </table>
<%end if%>                
						  
                        </div>
                      </td>
                    </tr>
                    <tr> 
                      <td>　</td>
                    </tr>
                  </table>
                </td>
                <td>&nbsp;</td>
              </tr>
              <tr> 
                <td height="67">&nbsp;</td>
                <td>&nbsp;</td>
                <td>&nbsp;</td>
                <td>&nbsp;</td>
              </tr>
            </table>
          </td>
          <td width="272"> 
            <!--#include file="right.asp" -->
          </td>
        </tr>
      </table>
      <!--#include file="bottom.asp" -->
    </td>
  </tr>
  <tr> 
    <td></td>
  </tr>
</table>
</body>

</html>