<!--#include file="../Include/Conno.asp" -->
<!--#include file="../Include/const.asp" -->
<!--#include file="../Include/char.asp" -->
<!--#include file="../diary/ubbcode.asp" -->
<%
m_grade=Session("Curgrade")
m_ID = Session("CurUserID")
m_username=CheckStr(request("username"))
m_username_a=Session("CurUserName")
	 if m_username="" then
     Call Msgbox("对不起，参数不足错误！",1)
    Response.end
     end if
	mc_sql="SELECT f_id,f_username,f_realname,f_erealname,f_sex,f_birthday,f_edu,f_regtime,f_grade,f_cardnumber,f_regtime,f_lastlogintime FROM T_Member where f_username='"&m_username&"'"
	set rs=server.createobject("adodb.recordset")
    rs.open mc_sql,conn,1,1
	if rs.eof then
	Call Msgbox("对不起，无此会员信息！",5)
    Response.end
	end if
%>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>心情日记:</title>
<link href="../css/member.css" rel="stylesheet" type="text/css">
<script language="JavaScript" type="text/JavaScript">
<!--
function MM_preloadImages() { //v3.0
  var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
    var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
    if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}

function MM_swapImgRestore() { //v3.0
  var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
}

function MM_findObj(n, d) { //v4.01
  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
  if(!x && d.getElementById) x=d.getElementById(n); return x;
}

function MM_swapImage() { //v3.0
  var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
   if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
}
//-->
</script>
<style type="text/css"></style>
</head>

<body onLoad="MM_preloadImages('../images/member/hy_b_1b.gif','../images/member/hy_b_3b.gif','../images/member/cl_03.gif','../images/member/cl_04.gif','../images/member/cl_05.gif','../images/member/cl_06.gif','../images/member/cl_07.gif','../images/member/cl_08.gif','../Images/member/cl_03.gif','../Images/member/cl_04.gif','../Images/member/cl_05.gif','../Images/member/cl_06.gif','../Images/member/cl_07.gif','../Images/member/cl_08.gif')">
<!--#include file="../include/top.asp" -->
<!--#include file="../include/member_top.asp" --><!--#include file="club_top.asp" -->
<table width="780" border="0" align="center" cellpadding="0" cellspacing="0">
  <tr>
    <td width="112" rowspan="3"><img src="../Images/member/cl_01.gif" width="112" height="200"></td>
    <td width="132" rowspan="3"><img src="../Images/member/cl_02.gif" width="132" height="200"></td>
    <td width="536"><table width="536" border="0" cellspacing="0" cellpadding="0">
        <tr>
          <td width="85"><a href="club_member.asp?username=<%=m_username%>" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage('Image9','','../Images/member/cl_03.gif',1)"><img src="../Images/member/cl_03.gif" name="Image9" width="85" height="37" border="0"></a></td>
          <td width="90"><a href="club_member_hide.asp?username=<%=m_username%>" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage('Image10','','../Images/member/cl_04.gif',1)"><img src="../Images/member/club_a_04.gif" name="Image10" width="90" height="37" border="0"></a></td>
          <td width="88"><a href="club_member_ilike.asp?username=<%=m_username%>" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage('Image11','','../Images/member/cl_05.gif',1)"><img src="../Images/member/club_a_05.gif" name="Image11" width="88" height="37" border="0"></a></td>
          <td width="88"><a href="club_member_amity.asp?username=<%=m_username%>" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage('Image12','','../Images/member/cl_06.gif',1)"><img src="../Images/member/club_a_06.gif" name="Image12" width="88" height="37" border="0"></a></td>
          <td width="89"><a href="club_member_photo.asp?username=<%=m_username%>" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage('Image13','','../Images/member/cl_07.gif',1)"><img src="../Images/member/club_a_07.gif" name="Image13" width="89" height="37" border="0"></a></td>
          <td width="86"><a href="club_member_diary.asp?username=<%=m_username%>" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage('Image14','','../Images/member/cl_08.gif',1)"><img src="../Images/member/club_a_08.gif" name="Image14" width="86" height="37" border="0"></a></td>
          <td><img src="../Images/member/cl_09.gif" width="10" height="37"></td>
        </tr>
    </table></td>
  </tr>
  <tr>
    <td><img src="../Images/member/cl_10.gif" width="536" height="5"></td>
  </tr>
  <tr>
    <td><table width="536" border="0" cellspacing="0" cellpadding="0">
        <tr>
          <td width="10"><img src="../Images/member/cl_11.gif" width="16" height="158"></td>
          <td width="493" bgcolor="#FFFFFF"><table width="100%"  border="0" cellspacing="0" cellpadding="0">
              <tr>
                <td width="69" height="30" class="p1">编　　号：</td>
                <td width="98">
                  <%
				m_id=(rs("f_id")*574)-int(rs("f_id")/7)'ID算法
				%>
                  <%=m_id%></td>
                <td width="68" class="p1">会 员 名:</td>
                <td width="112"><%=rs("f_username")%></td>
                <td width="68" class="p1">会员类型：</td>
                <td width="78">
                  <% if rs("f_grade")=1 then %>
                  <font color="#FF0000">VIP会员</font>
                  <% else %>
                  普通会员
                  <% end if %>
                </td>
              </tr>
              <tr>
                <td height="1" colspan="6" background="images/line.gif"></td>
              </tr>
              <tr>
                <td height="30" class="p1">注册时间：</td>
                <td><%=rs("F_RegTime")%></td>
                <td class="p1">最后登陆：</td>
                <td colspan="3"><%=rs("F_LastLoginTime")%></td>
              </tr>
              <tr>
                <td height="1" colspan="6" background="images/line.gif"></td>
              </tr>
              <tr>
                <td height="1" colspan="6" background="images/line.gif"></td>
              </tr>
              <tr>
                <td height="50" colspan="6"><table width="72%"  border="0" align="center" cellpadding="0" cellspacing="0">
                    <tr>
                      <td width="180"><a onclick="return confirm('您确定要将“<%=rs("f_username")%>”加为好友吗？他将有可能看到您的个人隐私。')" href="addfriend.asp?username=<%=rs("f_username")%>&flag=1"><img src="../Images/member/club_b_5.gif" width="120" height="30" border="0"></a></td>
                      <td width="180"><a onclick="return confirm('您确定要将“<%=rs("F_username")%>”打入您的黑名单吗？他将无法给您发送短讯。')" href="addfriend.asp?username=<%=rs("f_username")%>&flag=0"><img src="../Images/member/club_b_6.gif" width="120" height="30" border="0"></a></td>
                      <td width="180"><a href="message_send.asp?re_username=<%=rs("f_username")%>"><img src="../Images/member/club_b_7.gif" width="120" height="30" border="0"></a></td>
                    </tr>
                </table></td>
              </tr>
          </table></td>
          <td width="27"><img src="../Images/member/cl_13.gif" width="27" height="158"></td>
        </tr>
    </table></td>
  </tr>
  <tr bgcolor="#59C601">
    <td height="1" colspan="3"></td>
  </tr>
</table>
<table width="780" border="0" align="center" cellpadding="0" cellspacing="0" bgcolor="#FFFFFF">
  <tr>
    <td height="10" valign="top"></td>
  </tr>
</table>
<TABLE cellSpacing=0 cellPadding=0 width=780 align=center border=0>
  <TBODY>
    <TR> 
      <TD bgColor=#ffffff colSpan=7><IMG height=83 
      src="../Images/member/club_diary1.gif" width=780></TD>
    </TR>
    <TR> 
      <TD width=30 bgColor=#f6f6f6></TD>
      <TD width=6 bgColor=#ffffff></TD>
      <TD width=12 bgColor=#f7f7f7></TD>
      <TD align=middle width=690 bgColor=#ffffff height=150>
	    <%   If m_ID="" then
       response.write "<p align='center'><font color=#666666 size=2><strong>登录后才能查看该会员心情日记！</strong></font></p>"
      else
	  
	 
		   	set rs_cn=server.createobject("adodb.recordset")
			mSql = "Select f_id From my_friend where F_flag='0' and F_username_a='"&m_username&"' and f_username='"&m_username_a&"'"
			rs_cn.open msql,conn,1,1
			if not rs_cn.eof then
		  response.write "<p align='center'><font color=#666666 size=2><strong>对不起，您已经被该会员打入黑名单，暂无法查看心情日记！</strong></font></p>"
             else

					dim PerPage
					set rs_c=server.createobject("adodb.recordset")
					sql_c="select f_userid,f_title,f_content,f_weather,f_addtime,F_HeartPic from rj_diarylist where f_userid="&rs("f_id")&" and f_islock=1 order by F_Addtime desc"
					rs_c.open sql_c,conn,1,1
					'flag="尚未处理"
                    PerPage=15
				
                   '假如没有数据时
                  If rs_c.eof and rs_c.bof then
                 response.write "<p align='center'><font color=#666666 size=2><strong>该会员还未公开的心情日记！</strong></font></p>"
                   else
                
					'取得页数,并判断用户输入的是否数字类型的数据，如不是将以第一页显示
                    text="0123456789"
                    Rs_c.PageSize=PerPage
					
                    for i=1 to len(request("page"))
                    checkpage=instr(1,text,mid(request("page"),i,1))
                    if checkpage=0 then
                    exit for
                    end if
                    next

                  If checkpage<>0 then
                  If NOT IsEmpty(request("page")) Then
                  CurrentPage=Cint(request("page"))
                  If CurrentPage < 1 Then CurrentPage = 1
                  If CurrentPage > Rs_c.PageCount Then CurrentPage = Rs_c.PageCount
                  Else
                  CurrentPage= 1
                  End If
                 If not Rs_c.eof Then Rs_c.AbsolutePage = CurrentPage end if
                 Else
                 CurrentPage=1
                 End if					
				%>
	   <TABLE cellSpacing=0 cellPadding=0 width=660 border=0>
          <TBODY>
            <TR> 
              <TD vAlign=top align=middle width=660 
            height=25>该会员总共有&nbsp;<B><%=Cstr(rs_c.RecordCount)%></B>&nbsp;篇公开的心情日记，每页&nbsp;<B><%=PerPage%></B>&nbsp;篇，共&nbsp;<B><%=Cstr(rs_c.pagecount)%></B>&nbsp;页，当前是第&nbsp;<B><%=CurrentPage%></B>&nbsp;页</TD>
            </TR>
          </TBODY>
        </TABLE>
        <TABLE style="TABLE-LAYOUT: fixed" cellSpacing=1 cellPadding=0 width=660 
      bgColor=#CCCCCC border=0>
          <TBODY>
            <%
if not rs_c.eof then
i=0
do while not rs_c.eof
%>
            <TR> 
              <TD width=660 bgColor=#f2f2f2 
            height=25>&nbsp;&nbsp;<%=rs_c("F_title")%>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;|&nbsp;<%= formatdatetime(rs_c("F_Addtime"),1) %>&nbsp;|&nbsp;&nbsp;<%= rs_c("F_Weather") %>&nbsp;&nbsp;|</TD>
            </TR>
            <TR> 
              <TD 
          style="PADDING-RIGHT: 8px; PADDING-LEFT: 8px; PADDING-BOTTOM: 8px; WORD-BREAK: break-all; LINE-HEIGHT: 150%; PADDING-TOP: 8px" 
          bgColor=#FFFFFF><img src="<%=rs_c("F_HeartPic")%>" width="40" height="40">&nbsp;&nbsp;<font color="#666666"><%=ubbCode(rs_c("F_Content"))%></font></TD>
            </TR>
            <%
i=i+1
if i >= Perpage then exit do
rs_c.movenext
loop
end if
%>
          </TBODY>
        </TABLE>
        <TABLE cellSpacing=0 cellPadding=0 width=660 border=0>
          <TBODY>
            <TR> 
              <TD vAlign=bottom align=middle width=660 height=25>  <% If currentpage > 1 Then  %>					  
					  &nbsp;<a href='club_member_diary.asp?username=<%=m_username%>&page=<%=cstr(1)%>'><SPAN style="FONT-SIZE: 15px; COLOR: #000000; FONT-FAMILY: webdings">9</SPAN></a>
					  &nbsp;<a href='club_member_diary.asp?username=<%=m_username%>&page=<%=Cstr(currentpage-1)%>'><SPAN style="FONT-SIZE: 15px; COLOR: #000000; FONT-FAMILY: webdings">7</SPAN></a>
					  &nbsp;<% Else  %>
					  &nbsp;<SPAN style="FONT-SIZE: 15px; COLOR: #000000; FONT-FAMILY: webdings">9</SPAN>
					  &nbsp;<SPAN style="FONT-SIZE: 15px; COLOR: #000000; FONT-FAMILY: webdings">7</SPAN>
					 <% end if %>
					  <%
			  if rs_c.pagecount>8 then
			  n_star=currentpage
			  n_end=currentpage+7
			  else
			  n_star=1
			  n_end=rs_c.pagecount			  
			  end if
			  %>
              <% FOR n=n_star to n_end %>
					 <% if n>rs_c.pagecount then  exit for  end if%>
					  &nbsp;<a href='club_member_diary.asp?username=<%=m_username%>&page=<%=n%>'><FONT color=#ff0000><B><%=n%></B></FONT></a>
					  <%
					  next
					  %>
					  <% If currentpage < Rs_c.PageCount Then %>					 
					  &nbsp;<a href='club_member_diary.asp?username=<%=m_username%>&page=<%=Cstr(currentPage+1)%>'><SPAN  style="FONT-SIZE: 15px; COLOR: #000000; FONT-FAMILY: webdings">8</SPAN></a>
					  &nbsp;<a href='club_member_diary.asp?username=<%=m_username%>&page=<%=Cstr(Rs_c.PageCount)%>'><SPAN  style="FONT-SIZE: 15px; COLOR: #000000; FONT-FAMILY: webdings">:</SPAN></a>
					  <% else %>
					  &nbsp;<SPAN  style="FONT-SIZE: 15px; COLOR: #000000; FONT-FAMILY: webdings">8</SPAN>
					  &nbsp;<SPAN  style="FONT-SIZE: 15px; COLOR: #000000; FONT-FAMILY: webdings">:</SPAN>
			  		  <% end if %> 
              </TD>
            </TR>
          </TBODY>
        </TABLE>
		<%    end if
		    end if
			rs_cn.close
			set rs_cn=nothing
		  End if
		  
		%>
	  </TD>
      <TD width=8 bgColor=#f7f7f7></TD>
      <TD width=7 bgColor=#ffffff></TD>
      <TD width=27 bgColor=#f6f6f6></TD>
    </TR>
    <TR> 
      <TD bgColor=#ffffff colSpan=7><IMG height=55 
      src="../Images/member/club_memberbottem.gif" width=780></TD>
    </TR>
    <TR bgColor=#ffffff> 
      <TD colSpan=7 height=5></TD>
    </TR>
  </TBODY>
</TABLE>
<table width="780" border="0" align="center" cellpadding="0" cellspacing="0" bgcolor="#FFFFFF">
  <tr>
    <td height="10" valign="top"></td>
  </tr>
</table>
<!--#include file="../Include/Bottom.asp" -->
</body>
</html>
