<!--#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 
 R_id=clng(request("id"))
 if R_id="" then
 Call Msgbox("对不起，ID号错误！",1)
 Response.end
 end if
 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 = conn.Execute(m_Sql)
 if rs.Eof then
   Response.write "对不起，无此会员！"
   Response.end
 end if

  '查询短讯信息

  
    
    m_Sql_a = "SELECT * FROM T_Message WHERE F_Username_s='" & m_Username&"' and F_send=0 and F_id="&R_id
    Set rs1 = conn.Execute(m_Sql_a)
	if rs1.eof then
	Call Msgbox("对不起，该条信息已经不存在！请重新输入！",1)
	end if
	'更新查看状态
	'if request("active")="view" then
'	sql2="update T_Message set F_active=1 where F_id="&R_id
	'conn.execute(sql2)
'	end if
	
'	set rs2=nothing
	'rs1.close
	
  ' mtitle= checkStr(Trim(Request.Form("title")))
 '  mcontent=HTMLEncode(Request.Form("content"))

   
 ' mSql = "insert into T_message (F_Username_a,F_Title,F_Content,F_regtime,F_username_s,F_active,F_accept,F_send) values ("
'  mSql = mSql+"'"&musername&"',"
 ' mSql = mSql+"'"&mTitle&"',"
 ' mSql = mSql+"'"&mContent&"',"
 ' mSql = mSql+""&date()&","
 ' mSql = mSql+"'"&m_username&"',0,0,0)"
 '  conn.execute(mSql)
 '  Call CloseDatabase()
 ' call MsgBox("祝贺您，您的短讯已经成功发送!","messageout.asp")
 '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%>
                      → <a href="Up.asp"> 
                      <font color="#FF0000">升级为乐扣卡会员</font> </a> 
                      <%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=message_send.asp method=post>
                  <TBODY>
                    <TR bgColor=#f2f2f2> 
                      <TD height=30 colSpan=2><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 bgColor=#f2f2f2> 
                      <TD align=middle height=22>收&nbsp;讯&nbsp;人：</TD>
                      <TD height=22>&nbsp;<%=rs1("F_username_a")%></TD>
                    </TR>
                    <TR bgColor=f2f2f2> 
                      <TD align=middle width=73 height=22>短讯主题：</TD>
                      <TD width=478>&nbsp;<%=rs1("F_title")%></TD>
                    </TR>
                    <TR bgColor=f2f2f2> 
                      <TD align=middle width=73 height=22>发讯时间：</TD>
                      <TD width=478>&nbsp;<%=rs1("F_regtime")%> </TD>
                    </TR>
                    <TR align="left" bgColor=#FFFFFF> 
                      <TD height=22 colspan="2">&nbsp; <%=rs1("F_content")%></TD>
                    </TR>
                  
                    <TR align=center bgColor=#f2f2f2> 
                      <TD height=30 colSpan=2><A 
                  href="javascript:history.back()"><IMG height=22 
                  src="../Images/member/club_back.gif" width=80 align=absMiddle 
                  border=0></A> </TD>
                    </TR>
                </FORM>
              </TABLE></TD>
			  <%
			   rs1.close 
			   
			   %>
          </TR>
      </TABLE> </td>
  </tr>
</table>
<%
rs.close
set rs=nothing
%>
</BODY></HTML>
