<!--#include file="conn.asp" -->
<!--#include file="u/inc.asp" -->
<%
set rs=server.CreateObject("adodb.Recordset")
sql="select * from diary "
Rs.Open Sql,conn,1,1
rb=rs.recordcount
rs.close
Set Rs=Nothing
%>
<%
set rs=server.CreateObject("adodb.Recordset")
sql2="select * from diary where display=1 order by diaryid desc"
Rs.Open Sql2,conn,3,1
%>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title><%=sitename%></title>
<meta name="keywords" content="<%=sitegjc%>" />
<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="u/head.asp" -->
      <table width="985" border="0" cellspacing="0" cellpadding="0" height="452">
        <tr> 
          <td width="20">&nbsp;</td>
          <td height="452" background="diary/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="diary/NewList_img.jpg" width="275" height="355"></td>
                <td align="center"> 
                  <table border="0" width="98%" id="table6" cellspacing="0" cellpadding="0" height="100%">
                    <tr> 
                      <td>　 
                      <td>　 
                    </tr>
                    <tr> 
                      <td height="19" width="84"><b><font color="#51300C">&nbsp;<img border="0" src="diary/NewList.gif" width="70" height="17"></font></b></td>
                      <td height="19" width="188"> 
                        <p align="right"><b><font color="#703F15">日记篇数：</font><font color="#FF0000"><%=rb%></font><font color="#703F15">篇</font></b> 
                      </td>
                    </tr>
                    <tr> 
                      <td background="diary/linebg2.gif" width="278" colspan="2"> 
                        <img border="0" src="diary/linebg2.gif" width="4" height="1"></td>
                    </tr>
                    <tr> 
                      <td width="278" colspan="2"> 
                        <table border="0" width="100%" id="table9" cellspacing="0" cellpadding="0">
                          <tr> 
                            <td> 
                              <table width="100%" border="0" cellspacing="0" cellpadding="0" id="table10">
                                <tr> 
                                  <td align="center" style="font-size: 9pt; font-family: Verdana; color: #000000; letter-spacing: 1pt; word-break: break-all" background="img/bg_line.gif"> 
                                    <%
IF Rs.Eof and rs.bof Then
if session("username")="user" then
response.Write("<br><font color=FF6600>你还没有填写任何日记！<a href=u/add.asp?userid="&userid&" target=_parent>填写</a></font><br><br><br><br><br><br>")
else
response.Write("<br><font color=FF6600>你还没有填写任何日记！<a href=u/login.asp?userid="&userid&" target=_parent>登陆填写</a></font><br><br><br><br><br><br>")
end if
else


rs.pagesize=showdiary
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
%>
                                    <table width="272" border="0" cellpadding="0" cellspacing="0"  id="table11">
                                      <tr bordercolor="DDE7AB"> 
                                        <td width="2"></td>
                                        <td width="53"><%=xq%></td>
                                        <td width="170"><font color="#51300C"><a target="_blank" title="<%= rs("title") %>" href="<%if ishtml="yes" then%><%=diarydir%><%=htmldir%>/riji<%=rs("diaryid")%>.htm<%else%><%=diarydir%>u/play.asp?id=<%=rs("diaryid")%><%end if%>"> 
                                          <%= gottopic(rs("title"),24) %></a></font></td>
                                        <td width="26"><img src="<%=alltubg%><%=rs("tq")%>" border="0" align="middle"></td>
                                        <td width="23"><a title="<%=rs("diarytime")%>" href="#"> 
                                          <img border="0" src="diary/TIME.gif" width="24" height="20"></a></td>
                                      </tr>
                                    </table>
                                    <%
n=n+1
rs.movenext
if n>=rs.pagesize then exit do    
loop
%>
                                    <table width="98%" border="0" cellspacing="0" cellpadding="0" id="table13">
                                      <tr> 
                                        <td> 
                                          <p align="center"> 
                                            <%
if cstr(page)=1 then
Response.Write("<font color=#808080>首页&nbsp;上页&nbsp;</font>")
else
if page>1 and page=maxpage then%>
                                            <a href="NewList.asp?page=1"> <font color="#5690BE">首页</font></a> 
                                            <a href="NewList.asp?page=<%=page-1%>"> 
                                            <font color="#5690BE">上页</font></a> 
                                            <%end if%>
                                            <% if page<>1 and page<>maxpage then%>
                                            <a href="NewList.asp?page=1"> <font color="#5690BE">首页</font></a><a href="NewList.asp?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="NewList.asp?page=<%=page+1%>" > 
                                            <font color="#5690BE">下页</font></a> 
                                            <a href="NewList.asp?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="NewList.asp?page=<%=page+1%>" > 
                                            <font color="#5690BE">下页</font></a> 
                                            <a href="NewList.asp?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>
                        </table>
                      </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="u/right.asp" -->
          </td>
        </tr>
      </table>
      <!--#include file="u/bottom.asp" -->
    </td>
  </tr>
  <tr> 
    <td></td>
  </tr>
</table>
</body>

</html>



