<!--#include file="../Include/Conno.asp" -->
<!--#include file="../Include/char.asp" -->
<!--#include file="../Include/const.asp" -->
<!--#include file="IsLogin.asp" -->
<%
 dim rs,m_Sql
 dim m_ID 
 m_ID = Session("CurUserID")
 m_username= Session("CurUserName")
 m_Sql = "SELECT F_LoginCount,F_Integral,F_MyImage,F_Grade,F_LastLoginTime,F_RegTime FROM T_Member WHERE F_ID=" & m_ID
 set rs=server.createobject("adodb.recordset")
 rs.open m_sql,conn
 'Set rs = conn.Execute(m_Sql)
 if rs.Eof then
   Response.write "对不起，无此会员！"
   Response.end
 end if

  '更新兴趣爱好信息
 
 '个人形象图片
 Session("m_Integral") = rs("F_Integral")
 m_MyImage = rs("F_MyImage")
 if m_MyImage = "" then m_MyImage = "DefaultMyImage.jpg"
 session("m_MyImage") = m_MyImage

					sql_m="select count(f_id) as n_count from t_message where F_username_a='"&m_username&"' and F_accept=0"
					Set rs_m = conn.Execute(sql_m)
					m_count=rs_m("n_count")
					sql_m="select count(f_id) as n_count from t_message where F_username_a='"&m_username&"' and F_accept=0 and  F_active=0 "
					Set rs_m = conn.Execute(sql_m)
					m_newcount=rs_m("n_count")
					rs_m.close
					%>
<HTML><HEAD><TITLE>会员俱乐部发讯箱</TITLE>
<META content="text/html; charset=gb2312" http-equiv=Content-Type>
<link href="../css/member.css" rel="stylesheet" type="text/css">
<script language="JavaScript" src="../Include/function.js"></script>
<SCRIPT language=JavaScript1.2>
<!--
function confirm_delete()
{
if (confirm("你确定要删除所选择的短讯吗？")){
		return true;
	}
	return false;
}
//-->
</SCRIPT>
<% if cint(m_newcount)>0 then %>
<bgsound src="../images/wav/mail.wav" loop="1">
<% end if %>
</HEAD>
<BODY leftMargin=0 topMargin=0>
<!--#include file="../include/top.asp" -->
<!--#include file="../include/member_top.asp" --><!--#include file="club_top.asp" -->
<!--#include file="Top.asp" -->
<table width="780" border="0" align="center" cellpadding="0" cellspacing="0" bgcolor="#FFFFFF">
  <tr> 
    <td width="183" align="center" valign="top"><!--#include file="left.asp" --></td>
    <td width="597" align="center" valign="top"><table width="96%"  border="0" cellspacing="0" cellpadding="0">
        <tr> 
          <td width="100%" height="10" align="right">&nbsp;</td>
        </tr>
       
      </table>
      <TABLE width="96%" 
      border=0 align="center" cellPadding=0 cellSpacing=0 
      borderColor=#111111 bgcolor="#FFFFFF" id=AutoNumber7 style="BORDER-COLLAPSE: collapse">
        <TBODY>
          <TR valign="top"> 
            <TD colSpan=2>
<TABLE  
                              borderColor=#111111 cellSpacing=1 cellPadding=3 
                              width="100%" border=0>
                <TBODY>
                  <TR> 
                    <TD height="20" colspan="4"><font color="#FF6600">·用户活动信息： 
                      </font></TD>
                  </TR>
                  <TR> 
                    <TD width="13%" align="right" bgcolor="f2f2f2">登陆次数：</TD>
                    <TD width="37%" bgcolor="f2f2f2"><font color="#FF6600">[<%=rs("F_LoginCount")%>]</font> 
                      次</TD>
                    <TD width="18%" align="right" bgcolor="f2f2f2">最后登陆时间：</TD>
                    <TD width="32%" bgcolor="f2f2f2"><%=rs("F_LastLoginTime")%></TD>
                  </TR>
                  <TR> 
                    <TD align="right" bgcolor="f2f2f2">用户积分：</TD>
                    <TD bgcolor="f2f2f2"><font color=#FF6600><%=rs("F_Integral")%>分</font></TD>
                    <TD align="right" bgcolor="f2f2f2">用户注册时间：</TD>
                    <TD bgcolor="f2f2f2"><%=rs("F_RegTime")%></TD>
                  </TR>
                  <TR> 
                    <TD align="right" bgcolor="f2f2f2">用户等级：</TD>
                    <TD bgcolor="f2f2f2"> 
                      <%if rs("F_Grade") = 1 then Response.write "<font color=red><b>本站VIP会员</b></font>" else Response.write "普通会员"%>
                      <%if rs("F_Grade") <> 1 then%>
                      →  
                      <font color="#FF0000">欢迎升级为VIP会员</font> 
                      <%end if%>
                    </TD>
                    <TD align="right" bgcolor="f2f2f2">我的短信息：</TD>
                    <TD bgcolor="f2f2f2">
                      
                      <a href="message.asp">共(<%=m_count%>)短信/<font color="#FF0000">(<%=m_newcount%>)未查看</font></a></TD>
                  </TR>
                </TBODY>
              </TABLE>
              <br>
              <TABLE cellSpacing=3 cellPadding=0 width=100% border=0>
                <FORM name=message action="messagedel.asp?type=send" method=post>
                  <TBODY>
                    	<%
					dim PerPage
					set rs_c=server.createobject("adodb.recordset")
					sql_c="select * from t_message where F_username_s='"&m_username&"' and F_send=0 order by f_regtime 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='#ff0000'>还没任何新闻</font></p>"
                 ' response.end
                 ' End if
					'取得页数,并判断用户输入的是否数字类型的数据，如不是将以第一页显示
                    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					
				%>
					
					<TR bgColor=#f2f2f2> 
                      <TD height=30 colSpan=5>&nbsp;<A 
                  href="message.asp?kind=1"><IMG 
                  height=25 src="../Images/member/club_messagein.gif" width=70 
                  align=absMiddle border=0></A><A 
                  href="message_out.asp"><IMG 
                  height=25 src="../Images/member/club_messageout.gif" width=70 
                  align=absMiddle border=0></A><a href="message_send.asp"><IMG height=25 
                  src="../Images/member/club_messagewrite.gif" width=70 
                  align=absMiddle border=0></a></TD>
                    </TR>
                    <TR> 
                      <TD align=middle colSpan=5 
                  height=25>您的发讯箱里存放着&nbsp;<B><%=Cstr(rs_c.RecordCount)%></B>&nbsp;条已经发送的短讯,共&nbsp;<B><%=Cstr(rs_c.pagecount)%></B>&nbsp;页/每页&nbsp;<B><%=PerPage%></B>&nbsp;条</TD>
                    </TR>
                    <TR bgColor=#f2f2f2> 
                      <TD width=28 height=25 align=middle>选择</TD>
                      <TD width=70 align=middle>收讯人</TD>
                      <TD align=middle width=293>短讯主题</TD>
                      <TD width=121 align=middle>发讯时间</TD>
                      <TD width=30 align=middle>已读</TD>
                    </TR>
				
<%
if not rs_c.eof then
i=0
do while not rs_c.eof
%>
                    <TR bgColor=#f9f9f9> 
                      <TD height=22 align=middle> 
                        <INPUT type=checkbox value=<%=rs_c("f_id")%> 
                  name=ArticleID>
                      </TD>
                      <TD height=22 align=middle><A 
                  href="club_member.asp?username=<%=rs_c("f_username_a")%>" 
                  target=blank><U><%=rs_c("f_username_a")%></U></A> </TD>
                      <TD height=22>&nbsp;<A title=<%=rs_c("f_title")%> 
                  href="lookmessage_s.asp?id=<%=rs_c("f_ID")%>"><U><%=rs_c("f_title")%></U></A></TD>
                      <TD height=22 align=middle><%=rs_c("f_regtime")%></TD>
                      <TD height=22 align=middle>
					  <% if rs_c("F_active") then %>
					  是
					  <% else %>
                     <font color="#FF0000">否</font> 
                        <% end if %> </TD>
                    </TR>
<%
i=i+1
if i >= Perpage then exit do
rs_c.movenext
loop
end if
%>
                    <TR> 
                      <TD align=middle colSpan=5 height=25>
					  <% If currentpage > 1 Then  %>					  
					  &nbsp;<a href='message_out.asp?page=<%=cstr(1)%>'><SPAN style="FONT-SIZE: 15px; COLOR: #000000; FONT-FAMILY: webdings">9</SPAN></a>
					  &nbsp;<a href='message_out.asp?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='message_out.asp?page=<%=n%>'><FONT color=#ff0000><B><%=n%></B></FONT></a>
					  <%
					  next
					  %>
					  <% If currentpage < Rs_c.PageCount Then %>					 
					  &nbsp;<a href='message_out.asp?page=<%=Cstr(currentPage+1)%>'><SPAN  style="FONT-SIZE: 15px; COLOR: #000000; FONT-FAMILY: webdings">8</SPAN></a>
					  &nbsp;<a href='message_out.asp?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>
                    <TR bgColor=#f2f2f2> 
                      <TD height=30 colSpan=5 align=middle>选择本页所有短讯 
                        <INPUT 
                  onclick=CheckAll(this.form) type=checkbox value=on 
                  name=chkall> <INPUT style="HEIGHT: 22px" onClick="return confirm_delete();" type=submit value=删除所选择的短讯 name=Submit>
                      </TD>
                    </TR>
                </FORM>
              </TABLE> </TD>
          </TR>
      </TABLE> </td>
  </tr>
</table>
<%
rs_c.close
rs.close
set rs=nothing
%>
<!--#include file="../include/bottom.asp" -->