<!--#include file="conn.asp" -->
<!--#include file="bbsuser.asp" -->
<!--#include file="touxianfun.asp" -->
<!--#include file="inc/publicfun.asp" -->
<!--#include file="ftbbs_nav.asp" -->
<%
call FTBBS_HTML_MB
defaulthome=Application("FTBBSMB")(31,0)
homepage=ft_home(defaulthome)
username=Checkstr(request.cookies("name"))
conn.execute("update sms set IsNew=0 where accepter='"&username&"'")
%>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<script language=javascript src="inc/cookies.js"></script>
<script>
var stylecook = getCookie("STYLESHOW");
var style;
var strstyle;
if(stylecook=="")
{
 stylecook=1;
}
else
{
 stylecook++;
}
style="main0"+stylecook+".css";
strstyle="<link href=\"css/"+style+"\"  rel=\"stylesheet\" type=\"text/css\"> ";
document.write(strstyle);
</script>
<title><%=request.cookies("name")%>的收件箱</title>
</head>
<script language="JavaScript" src="inc/Main.js"></script>
<body topmargin="2">
<div align="center">
<%
if request.cookies("ftbbstype")=1 then
  response.write headhtml
end if
%>
  <table width="99%" border="0" cellspacing="0" cellpadding="1" align="center" class="maintbbg">
    <tr> 
    <td>
  <TABLE align=center border=0 cellPadding=0 cellSpacing=0 width="100%">
    <%if request.cookies("ftbbstype")<>1 then%>
      <tr> 
            <td height="26" colspan="3" class="f12bg">&nbsp;<%=userinfo%></td>
      </tr>
   <%end if%>
    <TR> 
      <TD height=25 class="maintbtr1" align="left">&nbsp;<a href="<%=homepage%>">论坛首页</a> >> 我的信箱</TD>
    </TR>
  </TABLE>
  <TABLE align=center border=0 cellPadding=0 cellSpacing=0 width="100%">
    <TR> 
      <TD height=28 class="maintbtr2"> 
        <div align="center"> 
          <form name="form1" method="post" action="" style="MARGIN-BOTTOM: 0px">
            短信搜索: 
            <input name="searchstr" type="text" id="searchstr" size="25">
            <select name="smtype" id="smtype">
              <option value="title" selected>短信标题</option>
              <option value="content">短信内容</option>
            </select>
            <input type="submit" name="Submit" value="查找短信">
            <input name="button" type="button" id="button" value="发送短信" onClick="javascript:window.location.href='postsms.asp'">
            <input name="send" type="button" id="send" value="收件箱" onClick="javascript:window.location.href='mysms.asp'">
            <input name="re" type="button" id="re" value="发件箱" onClick="javascript:window.location.href='mysms.asp?t=my'">
          </form>
          </div></TD>
    </TR>
  </TABLE> 
<form name="selectform" method="post" action="userpldelsms.asp" style="MARGIN-TOP: 0px;margin-bottom:0px">
    <input type="hidden" name="op" value="选择删除">
<input type="hidden" name="returnURL" value="mysms.asp?<%=Request.QueryString%>">
 <script language="JavaScript">
  <!--
  function select_pl_submit(optype){
	var f=document.forms["selectform"]
	f.op.value=optype
	f.submit()
  }
  //-->
  </script>
<%
if request("searchstr")<>"" or request("smtype")<>"" then
searchstr="and "&request("smtype")&" like '%"&Checkstr(request("searchstr"))&"%'"
end if
if request("t")="my" then
sql="select * from sms where sender='"&username&"' "&searchstr&" and bbssystem=0 order by indate desc"
else
sql="select * from sms where (((bbssystem=2 or bbssystem=0) and accepter='"&username&"') or bbssystem=1) "&searchstr&" order by indate desc"
end if
set rs=server.createobject("adodb.recordset")
rs.open sql,conn,1,1
if not rs.eof then
i=1
bbssystem=0
'do while not rs.eof
wzrep =5
wzpage = clng(request.querystring("page"))
if len(wzpage) = 0 or wzpage = 0 then wzpage = 1
rs.PageSize=wzrep
rs.AbsolutePage=wzpage
wzpagecount=rs.PageCount
wzcount=rs.RecordCount
for i = 0 to wzrep-1
    if rs.eof then exit for
 userinfo=""
 bbssystem=rs("bbssystem")
 if bbssystem=0 then
   sender="<div align=""center"">第"&i+1&"条</div>"
   if request("t")="my" then
      str="select * from clubuser where clubuser_name='"&username&"'"
   else
      str="select * from clubuser where clubuser_name='"&rs("sender")&"'"
   end if
   set rsa=server.createobject("adodb.recordset")
   rsa.open str,conn,3,1
   if not rsa.eof then
   jingyuan=rsa("jingyuan")
   tili=rsa("tili")
   img=rsa("userimg")
   if isNull(rsa("jingyuan")) then jingyuan=0
   if isNull(rsa("tili")) then tili=100
   if isNull(rsa("userimg")) then img="cache5.gif"
   clubuser_reg_date=formatdatetime(rsa("clubuser_reg_date"),2)
   touxian=touxianvalue(jingyuan)
   jibie=jibievalue(jingyuan)
   userinfo="<TABLE border=0 cellPadding=0 cellSpacing=0 width=""100%"">"
   userinfo=userinfo+"<TBODY><TR>"
   userinfo=userinfo+"<TD><div align=""center""><IMG height=84 src=userheadimg/cache5.gif width=84></div></TD>"
   userinfo=userinfo+"</TR><TR>" 
   userinfo=userinfo+"<TD height=20 class=""f12"">·网名："&rsa("clubuser_nickname")&"</TD>"
   userinfo=userinfo+"</TR><TR>"
   userinfo=userinfo+"<TD height=20 class=""f12"">·头衔："&touxian&"</TD>"
   userinfo=userinfo+"</TR><TR>" 
   userinfo=userinfo+"<TD height=20 class=""f12"">·级别："&replace(jibie,"../","")&"</TD>"
   userinfo=userinfo+"</TR><TR>" 
   userinfo=userinfo+"<TD height=20 class=""f12"">·资历："&tili&"</TD>"
   userinfo=userinfo+"</TR><TR>" 
   userinfo=userinfo+"<TD height=20 class=""f12"">·资历："&jingyuan&"</TD>"
   userinfo=userinfo+"</TR><TR>" 
   userinfo=userinfo+"<TD height=20 class=""f12"">·注册："&clubuser_reg_date&"</TD>"
   userinfo=userinfo+"</TR></TBODY>"
   userinfo=userinfo+"</TABLE>"
   end if
   rsa.close
 else
   userinfo="<table width=""100%"" border=""0"" cellspacing=""0"" cellpadding=""0"">"
   userinfo=userinfo+"<tr>" 
   userinfo=userinfo+"<td><div align=""center""> <IMG height=84 src=userheadimg/cache5.gif width=84></div></td>"
   userinfo=userinfo+"</tr><tr>" 
   userinfo=userinfo+"<td height=20 class=""f12""><div align=""center"">系统管理员</div></td>"
   userinfo=userinfo+"</tr><tr><td height=""12"">&nbsp;</td></tr>"
   userinfo=userinfo+"</table>"
   sender="<div align=""center"">系统信息</div>" 			     
 end if
%>
          <TABLE align="center" border=0 cellPadding=0 cellSpacing=0 width="100%">
            <TBODY>
      <TR> 
        <TD width="20%" height="23" vAlign=middle class="maintbtr1"><%=sender%></TD>
        <TD class="maintbtr1"><B> 标 题：<%=rs("title")%></B> </TD>
      </TR>
    </TBODY>
  </TABLE>
  <TABLE width="100%" border=0 align="center" cellPadding=0 cellSpacing=0 bgColor="#FFFFFF">
    <TBODY>
      <TR>
        <TD class="maintbtr3" rowSpan=2 vAlign=top width="20%"><DIV align=center>
            <%=userinfo%>
          </DIV></TD>
      </TR>
      <TR>
        <TD class="td004" vAlign=top><TABLE border=0 cellPadding=3 cellSpacing=3 width="100%">
            <TBODY>
              <TR>
                        <TD height="158" vAlign=top class=f14>内 容：<%=rs("content")%></TD>
              </TR>
            </TBODY>
          </TABLE>
          <TABLE border=0 cellPadding=0 cellSpacing=5 width="100%">
            <TBODY>
              <TR>
                <TD background="images/bg_text1.gif" height="1"></TD>
              </TR>
			  <%if bbssystem=0 then%>
              <TR>
                <TD align=left class=f14><table width="100%" border=0 cellspacing=0 cellpadding=0>
                    <tr>
                        <td width="52%" class=f14>&nbsp;<font color="#000000">操作选项：<input type="checkbox" name="checkbox1" value="<%=rs("id")%>">[<a class=a03 href=delsms.asp?id=<%=rs("id")%>>删除</a>][<a class=a03 href=editsms.asp?id=<%=rs("id")%>>编辑</a>]<%if request("t")<>"my" then%>[<%if rs("replysign")=0 then%><a class=a03 href=replysms.asp?id=<%=rs("id")%>>回复</a><%else%><font color="#FF0000">已回复</font><%end if%>]<%end if%>
                          </font></td>
                      <td width="48%" class=f14><div align="right">发信时间:&nbsp;<%=rs("indate")%>&nbsp;</div></td>
                    </tr>
                  </table></TD>
              </TR>
			  <%elseif bbssystem=2 then%>
                <tr>
                  <td width="52%" class=f14><font color="#000000"> 
                    <%if request.cookies("bbsadmin")=1 then%>
                    操作选项：[<a class=a03 href=delsms.asp?id=<%=rs("id")%>>删除</a>][<a class=a03 href=editsms.asp?id=<%=rs("id")%>>编辑</a>]<%end if%><%if rs("sender")<>"" then%>[<a class=a03 href="agree.asp?id=<%=rs("id")%>&postuser=<%=rs("sender")%>&accepter=<%=rs("accepter")%>&agree=Y">同意</a>][<a class=a03 href="disagree.asp?id=<%=rs("id")%>&postuser=<%=rs("sender")%>&accepter=<%=rs("accepter")%>&agree=N">不同意</a>]<%end if%>                    </font></td>
                  <td width="48%" class=f14><div align="right">发信时间:<%=rs("indate")%>&nbsp;</div></td>
                </tr>
			  <%end if%>
            </TBODY>
          </TABLE></TD>
      </TR>
    </TBODY>
  </TABLE>
<%
rs.movenext
next
rs.close
set rs=nothing
conn.close
end if
%>
</form>
  <TABLE align=center border=0 cellPadding=0 cellSpacing=0 width="100%">
    <TR class="maintbtr1"> 
      <TD width="57%" height=25 class="f14">共<font color=red><%= wzcount%></font>条<font color=red><%= wzrep%></font>/页 
        共<font color=red><%= wzpagecount%></font>页
<input name="button" type="button" onclick="selectAll()" value="全选"> 
        <input name="button" type="button" onclick="selectRev()" value="反选">
        <input name="button" type="button" onclick="select_pl_submit('选择删除')" value="将所选删除"></TD>
      <TD width="43%" class="f14" align="right"><%= FtbbsPage(wzpagecount,"t",request("t"),"smtype",request("smtype"))%></TD>
    </TR>
  </TABLE></td>
  </tr>
</table>
  <!--#include file="inc/bbstail.htm" -->
</div>
</body>
</html>
