<!--#include file="conn.asp" -->
<!--#include file="u/inc.asp" -->
<%
if Trim(request.QueryString("i"))<>"" then
rightpage=2
uid=Trim(request.QueryString("i"))
xinyanlei="book"
user=Trim(request.QueryString("user"))
%>
<%
set rs=server.CreateObject("adodb.Recordset")
sql="Select * From diaryuser where userid="&uid&""
Rs.Open sql,conn,1,1
IF Not Rs.Eof Then
userid=rs("userid")
fenmian=rs("fenmian")
gongao=rs("gongao")
shuyu=rs("shuyu")
name=rs("username")
bookname=rs("bookname")
amount=rs("amount")
showinfo=rs("showinfo")
showbook=rs("showbook")
Musicyesno=rs("musicyesno")
wishopen=rs("wishopen")
shuyu=rs("shuyu")
siren=rs("opi")
bgrnd=rs("bgimg")
if  isnull(bgrnd) or bgrnd="0" then bgrnd=diarydir&"diary/index_bg1.jpg"
'if  isnull(wishopen) or wishopen="" then wishopen="yes"
'response.write wishopen
rs.close
if showinfo="" then showinfo=0
if showbook="" then showbook=1
sql2="select * from diary where userid="&userid&""
if request("fid")="" then
sql2=sql2
else
sql2=sql2&" and typeid="&request("fid")&""
end if
if siren=0 then
sql2=sql2&" and display=1 order by diaryid desc"
else
sql2=sql2&" order by diaryid desc"
end if

%>

<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title><%=bookname%>·分享你我的心情·<%=sitename%></title>
<meta name="keywords" content="<%=sitegjc%>" />
<meta name="description" content="<%=sitems%>" />
<link href="http://www.rijiren.com/favicon.ico" rel="shortcut icon">
<link href="<%=alltubg%>css.css" rel="stylesheet" type="text/css">
<style>
#flist{ 
width:100px;
height:400px;
background-image:url('/diary/flist.gif');
background-repeat:repeat-x;
background-position:0px 40px;
border: 0px solid #849BCA;
margin-top:0px;
margin-left:0px;
float:left;
overflow:hidden;
position:absolute;
left:0px;
top:0px;
cursor:move;
float:left;z-index:100;
/*filter:alpha(opacity=50);*/
}
</style>
</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" --></td>
  </tr>
  <tr> 
    <td> 
      <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="10" width="54"></td>
                <td width="288"></td>
                <td rowspan="3" width="21"></td>
                <td width="284"></td>
                <td width="57"></td>
              </tr>
              <tr> 
                <td height="370">&nbsp;</td>
                <td width="288" valign="top"> 
                  <table border="0" width="288" id="table6" cellspacing="0" cellpadding="0" height="350">
                    <tr> 
                      <td width="68" height="30"> <b> <font color="#00ACF0"> <img border="0" src="diary/diary_name.jpg" width="60" height="24"></font></b></td>
                      <td width="220"><font color="#00ACF0"><b>　<%=bookname%></b></font></td>
                    </tr>
                    <tr> 
                      <td width="68" height="30"> <b> <font color="#FF0000"> <img border="0" src="diary/user.jpg" width="60" height="24"></font></b></td>
                      <td width="220"><font color="#FF0000"><b>　<%=name%></b></font></td>
                    </tr>
                    <tr> 
                      <%
Path=siteurl&diarydir&"?i="&uid
%>
                      <td width="288" colspan="2" height="30"><span class="style1"> 
                        <font color="#00ACF0">日记路径:</font></span><a target="_blank" href=<%=path%>><span class="style1"><font color="#00ACF0"><%=path%></font></span></a></td>
                    </tr>
                    <tr align="center" valign="middle"> 
                      <td width="288" colspan="2" height="208"><img border="0" src="<%=alltubg%><%=fenmian%>"></td>
                    </tr>
                    <tr align="center" valign="top"> 
                      <td width="288" colspan="2" height="52"> 
                        <table border="0" width="95%" id="table7" cellspacing="0" cellpadding="0" align="center">
                          <tr> 
                              <td background="img/bg_line.gif"><font color="#FF0000">&nbsp;&nbsp; 
<%=shuyu%>
                                　</font></td>
                            </tr>
                          </table>                        
                      </td>
                    </tr>
                  </table>
                </td>
                <td height="370" width="284"> 
                  <table border="0" width="278" id="table8" cellspacing="0" cellpadding="0" height="100%">
                    <tr> 
                      <td>　 
                      <td height="19" width="152" colspan="2">　
<div id="flist" onmouseleave="closeed('flist','<%=875+scw%>px','5px','104','120');ssimg('wishimg','100','120');return false;" style="display:none;width:80px;position:absolute;height:200px;left: <%=600+scw%>px; top: 95px"> 
  <table width="100%" border="0" cellspacing="0" cellpadding="0">
    <tr> 
      <td height=25 valign="top"></td>
      <td></td>
      <td valign="top" align="right"><img src="<%=alltubg%>close.gif" width=12 height=12  style="margin-right:5px;margin-top:0px;cursor:hand" onclick = "closeed('flist','<%=875+scw%>px','5px','104','120');ssimg('wishimg','100','120');return false;"></td>
    </tr>
    <tr> 
      <td colspan="3">
        <table width="100%" border="0" cellspacing="0" cellpadding="0">
          <tr>
            <td width="2"></td>
            <td width="*" height=370 valign=top style="padding-left:5px;">
<a href="?i=<%=uid%>">全部日记</a><br/>
<%
set rs22=server.CreateObject("adodb.Recordset")
sql222="select * from diarytype where userid="&uid&" order by id"
Rs22.Open Sql222,conn,1,1
do while not rs22.eof
rjfl=rjfl&"|"&rs22("id")&"|+"&rs22("type")&","
%>				  
<a href="?fid=<%=rs22("id")%>&i=<%=uid%>"><%=rs22("type")%></a><br/>
<%
rs22.movenext
loop
rs22.close
set rs22=nothing
set sql222=nothing
rjfls=split(rjfl,",")
%></td>
            <td width="5"></td>
          </tr>
        </table>
      </td>
    </tr>
  </table>
</div>
</td>
                    </tr>
                    <tr> 
                      <td height="19" width="126"><b><font color="#51300C">&nbsp;</font><font color="#703F15">日记篇数：</font></b><font color="#FF0000"><%=amount%></font><b><font color="#703F15">篇</font></b></td>
                      
                    <td height="19" width="152" align="right"> <a href="#" onmouseover = "show('flist','<%=600+scw%>px','135px','80','200');return false;">日记分类</a> </td>
                    </tr>
                    <tr> 
                      <td background="diary/linebg2.gif" width="278" colspan="2" height="1"> 
                        <img border="0" src="diary/linebg2.gif" width="4" height="1"></td>
                    </tr>
                    <tr valign="top"> 
                      <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"> 
                                    <%
Rs.Open Sql2,conn,3,1
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 alt='日记人 www.rijiren.com'>填写</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
for i=0 to Ubound(rjfls)
if instr(rjfls(i),"|"&rs("typeid")&"|")>0 then
rjflss=split(rjfls(i),"+")
rjflname=rjflss(1)
end if
Next
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="100%" border="0" cellpadding="0" cellspacing="0"  id="table11">
                                    <tr bordercolor="DDE7AB"> 
                                      <td width="2"></td>
                                      <td width="40"> 
                                        <%
			  if siren<>0 then
			  if rs("display")=1 then
			  mi="<font color=#0099CC>开</font>"
			  else
			  mi="<font color=#FF6666>秘</font>"
			  end If
			  Else
			  mi="<font color=#0099CC>开</font>"		  
              end if	  
			  %>
                                        <%=xq%></td>
                                      <td width="135"><font color="#51300C"><a target="_blank" title="<%=rs("title")%>" href="<%if ishtml="yes" then%><%=diarydir%><%=htmldir%>/riji<%=rs("diaryid")%>.htm<%else%>u/play.asp?id=<%=rs("diaryid")%><%end if%>"> 
                                        <font color="#800000"><%= gotTopic(rs("title"),18) %></font></a></font></td>
                                      <td width="55"><a href="<%=diarydir%>?i=<%=uid%>&fid=<%=rs("typeid")%>" title="<%=rjflname%>"><font color="#999999"><%= gotTopic(rjflname,8) %></font></a></td>
                                      <td width="10" align="center"><%=mi%></td>
                                      <td width="20"><img src="<%=alltubg%><%=rs("tq")%>" border="0" align="middle"></td>
                                      <td width="20"><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="right"> 
                                            <%
if cstr(page)=1 then
Response.Write("<font color=#808080>首页&nbsp;上页&nbsp;</font>")
else
if page>1 and page=maxpage then%>
                                            <a href="?i=<%=uid%>&user=<%=user%>&page=1"> 
                                            <font color="#5690BE">首页</font></a> 
                                            <a href="?i=<%=uid%>&user=<%=user%>&page=<%=page-1%>"> 
                                            <font color="#5690BE">上页</font></a> 
                                            <%end if%>
                                            <% if page<>1 and page<>maxpage then%>
                                            <a href="?i=<%=uid%>&user=<%=user%>&page=1"> 
                                            <font color="#5690BE">首页</font></a><a href="?i=<%=uid%>&user=<%=user%>&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="?i=<%=uid%>&user=<%=user%>&page=<%=page+1%>" > 
                                            <font color="#5690BE">下页</font></a> 
                                            <a href="?i=<%=uid%>&user=<%=user%>&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="?i=<%=uid%>&user=<%=user%>&page=<%=page+1%>" > 
                                            <font color="#5690BE">下页</font></a> 
                                            <a href="?i=<%=uid%>&user=<%=user%>&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>
                  <%else%>
                  <%
okstring="<html><head><meta http-equiv=Content-Type content=text/html; charset=gb2312><title>对不起，找不到该用户！</title><meta http-equiv=refresh content=0;URL=mybook.asp><link href=mood8_diary.css rel=stylesheet type=text/css></head>"
okstring=okstring+"<body><font color=#FF6600><div align=center>对不起，找不到该用户！..!正在跳转至日记本首页...<br>如果IE没有自动返回,请点击<a href=mybook.asp>这里</a>！</div></font></body></html>"
response.Write(okstring)
%>
                  <%
end if
%>
                </td>
                <td></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/right1.asp" -->
          </td>
        </tr>
      </table>
    </td>
  </tr>
  <tr> 
    <td><!--#include file="u/bottom.asp" --></td>
  </tr>
</table>
</body>
</html>
<%
else
sqlpian1="xq='11'"
sqlpian2="xq='22'"
sqlpian3="xq='33'"
sqlpian4="xq='44'"
sqlpian5="xq='55'"
sqlpian6="xq='66'"
sqlpian7="xq='77'"
sqlpian=Split("开心,甜蜜,深情,柔情,伤感,沧桑,苦涩",",")
  randomize
  dim k
  k=cint(rnd*36)
  if k=0 then 
    k=k+1
  end if
  if k<10 then 
  k="0"&k
  end if
  fimage="img/"&k&".jpg"
%>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title><%=sitename%></title>
<meta name="description" content="<%=sitegjc%>" />
<meta name="keywords" content="<%=sitems%> www.rijiren.com" />
<link href="<%=alltubg%>css.css" rel="stylesheet" type="text/css">
<SCRIPT Language="JavaScript" src="<%=alltubg%>tabin.js"></SCRIPT>
<script language="JavaScript">
function CheckForm()
{
    if (document.regform.username.value.length == 0) {
		alert("请填写用户名.");
		document.regform.username.focus();
		return false;
	}

    if (document.regform.password.value.length == 0) {
		alert("请输入你的密码.");
		document.regform.password.focus();
		return false;
	}

}
</script>
<style>
<!--
.tableBorder1{width:100%;border: 1px; background-color: #ffffff;}
td.TableBody1{background-color: #f7f7f7;line-height : normal ;}
-->
</style>
<script language="JavaScript">
<!--
function MM_reloadPage(init) {  //reloads the window if Nav4 resized
  if (init==true) with (navigator) {if ((appName=="Netscape")&&(parseInt(appVersion)==4)) {
    document.MM_pgW=innerWidth; document.MM_pgH=innerHeight; onresize=MM_reloadPage; }}
  else if (innerWidth!=document.MM_pgW || innerHeight!=document.MM_pgH) location.reload();
}
MM_reloadPage(true);

// -->
</script>

</head>

<body background="<%=bgrnd%>" oncontextmenu="return false" ondragstart="return false" onselectstart="return false" topmargin="0" leftmargin="0" rightmargin="0" bottommargin="0" marginwidth="0">
<%if request.QueryString("action=err") then response.write("<font color=#FF0000>对不起，你还没有登陆，请登陆！ </font>")%>
<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"> 
                  <table border="0" width="100%" id="table6" cellspacing="0" cellpadding="0" height="370">
                    <tr> 
                      <td height="6" align="center">
					    </td>
                    </tr>
                    <tr> 
                      <% call login %>
                    </tr>
                    <tr> 
                      <td><img border="0" src="diary/<%=fimage%>" width="271" height="208"></td>
                    </tr>
                    <tr> 
                      <td> 
                        <table border="0" width="95%" id="table7" cellspacing="0" cellpadding="0">
                          <tr> 
                            <td>
<div id="tab03"> 
<%
set rs=server.CreateObject("adodb.Recordset")
sql="Select top 30 * from diaryuser order by amount desc" 
rs.open sql,conn,0,1
%>
<%
For booki=1 To 6
%>
<h3><%If booki=1 Then response.write "日记排行榜"%>Top<%=booki*5%></h3>		
<div>
<table border="0" width="100%" id="table11" cellspacing="0" cellpadding="0" background="img/bg_line.gif">
<%
For c=1 To 5
If rs.eof Then Exit for
%>
<tr><% call indextopbook %></tr>
<%
rs.movenext
next
%>
</table>
</div>
<%Next
rs.close
Set rs=Nothing
Set sql=nothing
%>
</div>
</td>
                          </tr>
                        </table>
                      </td>
                    </tr>
                    <tr> 
                      <td height="1" align="center">
					    </td>
                    </tr>
                  </table>
                </td>
                <td> 
                  <table border="0" width="284" id="table8" cellspacing="0" cellpadding="0" height="370">
                    <tr> 
                      <td height="9" width="150"> 
                        <%
set rs=server.CreateObject("adodb.Recordset")
sql2="select count(username) as rb from diaryuser"
Rs.Open Sql2,conn,1,1
rb=rs("rb")
%>
<%
set rs=server.CreateObject("adodb.Recordset")
sql2="select count(diaryid) as rp from diary"
Rs.Open Sql2,conn,1,1
rp=rs("rp")
%>
                      </td>
                      <td height="9" width="134"></td>
                    </tr>
                    <tr> 
                      <td height="23" width="150"> 
                        <p align="center"><b><font color="#77520A">日记本总数</font><font color="#FF0000">13<%=rb%></font><font color="#77520A">本</font></b> 
                      </td>
                      <td height="23" width="134"><b><font color="#77520A">日记总篇数</font><font color="#FF0000">68<%=rp%></font><font color="#77520A">篇</font></b></td>
                    </tr>
                    <tr> 
                      <td width="284" colspan="2" height="50">
<div id="tab01">
<h3>最新</h3>
<div class="jj">
<table border="0" width="100%" id="table11" cellspacing="0" cellpadding="0" background="img/bg_line.gif">
<%
set rs=server.CreateObject("adodb.Recordset")
sql2="select top 20 * from diary where display=1 order by diaryid desc"
Rs.Open Sql2,conn,1,1
do while not rs.eof
%>
<tr><% call news %></tr>
<%
rs.movenext
loop
%></table>
</div>
<%
For xqi=11 To 77 Step 11
%>
<h3><%=sqlpian(Left(xqi,1)-1)%></h3>
<div>
<table border="0" width="100%" id="table11" cellspacing="0" cellpadding="0" background="img/bg_line.gif">
<%
set rs=server.CreateObject("adodb.Recordset")
sql2="select top 20 * from diary where display=1 and xq='"&xqi&"' order by diaryid desc"
Rs.Open Sql2,conn,1,1
do while not rs.eof
%>
<tr><% call news %></tr>
<%
rs.movenext
loop
%></table>
</div>
 <%next%>
	<h3>佳作</h3>		
  <div>
<table border="0" width="100%" id="table11" cellspacing="0" cellpadding="0" background="img/bg_line.gif">           <%
set rs=server.CreateObject("adodb.Recordset")
sql2="select top 20 * from diary where display=1 and good=1 order by diaryid desc"
Rs.Open Sql2,conn,1,1
do while not rs.eof
%>
 <tr><% call news %></tr>
<%
rs.movenext
loop
%>
</div>  
</table>  
</div>
</td>
</tr>
<tr> 
<td width="284" colspan="2" height="19"> 
<div id="tab02"> 
<%
set rsistui=server.CreateObject("adodb.Recordset")
sqlistui="select * from diaryuser where istui='1' order by userid desc"
rsistui.Open sqlistui,conn,1,1
do while not rsistui.eof
%>
	<h3><a href="?i=<%=rsistui("userid")%>" target="_blank"><%=rsistui("bookname")%></a></h3>
  <div>
<table border="0" width="100%" id="table11" cellspacing="0" cellpadding="0" background="img/bg_line.gif">
<%
n=0
set rs=server.CreateObject("adodb.Recordset")
sql2="select top 20 * from diary where display=1 and userid="&rsistui("userid")&" order by diaryid desc"
Rs.Open Sql2,conn,1,1
do while not rs.eof
%>
<tr><% call index %></tr>
<%
n=n+1
rs.movenext
if n>=20 then exit do    
loop
%>
</table>
</div>
<%
nistui=nistui+1
rsistui.movenext
if nistui>=10 then exit do    
loop
%>
</div>
                      </td>
                    </tr>
                    <tr> 
                      <td width="284" colspan="2" height="1"> 
<script type="text/javascript">
<!--
tab("tab01","h3","div","","onmouseover",0);tab("tab02","h3","div","","onmouseover",0);tab("tab03","h3","div","","onmouseover",0);tab("tab04","h3","div","","onmouseover",0);
-->
</script>
                      </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>
<%
end if
%>
