<%
'商易仿淘宝4.0(多用户)
'ACCESS版演示网站：http://www.ftaobao.com(商易仿淘宝商城)
'SQL版演示网站：http://sql.ftaobao.com
'电话：0571-56907100
'QQ：1147100
%>
<%qx=4%>
<!--#include file="../store/top.asp"-->
<!--#include file="../leaguer/check.asp"-->
<!--#include file="../../include/conn.asp"-->
<!--#include file="../../include/page.asp"-->
<!--#include file="../../include/config.asp"-->
<%
if request("key")<>"" and request("lx")<>"" then
if shopnet("lx")<>"0" then
s="where name1 like '%"&shopnet("key")&"%'"
else
s="where name2 like '%"&shopnet("key")&"%'"
end if
else
s=""
end if
Set rs = Server.CreateObject("ADODB.Recordset")
sql="Select * From duanxin "&s&" Order By id DESC"
rs.open sql,conn,3,1 
page1("15")
%><html>
<head> 
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<link rel="stylesheet" href="../../include/css.css" type="text/css">
<style type="text/css">
<!--
.STYLE1 {color: #FF0000}
-->
</style>
<br>

    <table width="98%" border="0" align="center" cellpadding="4" cellspacing="1" bgcolor="#183789" >
  <tr valign="middle">
    <td height="25" colspan="6" align="center" background="../images/admin_bg_4.gif" bgcolor="#FFFFFF">&nbsp;</td>
  </tr>
  <tr valign="middle"> 
    <td width="70" height="21" align="center" bgcolor="#FFFFFF">ID</td>
    <td width="230" height="21" align="center" bgcolor="#FFFFFF">发信人</td>
    <td width="130" height="21" align="center" bgcolor="#FFFFFF">收信人</td>
    <td width="120" height="21" align="center" bgcolor="#FFFFFF">发送时间</td>
    <td width="50" height="21" align="center" bgcolor="#FFFFFF">状态</td>
    <td width="50" height="21" align="center" bgcolor="#FFFFFF">删除</td>
  </tr>
<%
if rs.eof then
response.Write("  <tr valign=""middle"" bgcolor=""#CCCCCC""><td height=""21"" colspan=""6"" align=""center""  bgcolor=""#FFFFFF"">当前没有站内短信！</td></tr>")
else
i=1
do while not rs.eof and i<=rs.pagesize%>
  <tr valign="middle"> 
    <td height="25" align="center" bgcolor="#FFFFFF"><font color="#FF0000"><%=rs("id")%></font></td>
    <td height="25" bgcolor="#FFFFFF">
  <%
  set name1=conn.execute("select id from huiyuan where huiyuan='"&rs("name2")&"'")
  if name1.eof then
  response.write""&rs("name2")&""
  else
  response.write"<a href=""user.asp?abc=xs&page=1&id="&name1(0)&""">"&rs("name2")&"</a>"
  end if
  %>
	</td>
    <td height="25" align="center" bgcolor="#FFFFFF"><a href="user.asp?abc=xs&page=1&id=<%=conn.execute("select id from huiyuan where huiyuan='"&rs("name1")&"'")(0)%>"><%=rs("name1")%></a></td>
    <td align="center" bgcolor="#FFFFFF"><font color="#666666"><%=rs("sj")%></font></td>
    <td align="center" bgcolor="#FFFFFF"><%If rs("zt") Then Response.Write("已读") else Response.Write("<font color=red>未读</font>")%></td>
    <td height="25" align="center" bgcolor="#FFFFFF"><a href="del.asp?del=a&id=<%=rs("id")%>&page=<%=page%>">删除</a></td>
  </tr>
  <tr valign="middle"> 
    <td colspan="6" bgcolor="#FFFFFF" style="WORD-WRAP: break-word"><%=rs("nr")%></td>
  </tr>
<%i=i+1
rs.MoveNext                                              
loop%>
  <tr align="center" valign="middle"> 
      <td height="25" colspan="6" bgcolor="#FFFFFF">
<%page2("key="&request("key")&"&lx="&request("lx")&"&")

rs.close
set rs=nothing
conn.close
set conn=nothing
%> </td>
  </tr>
  <tr valign="middle" bgcolor="#CCCCCC"> 
    <form name="del" method="post" action="del.asp?del=b">
      <td height="25" colspan="2" align="center" bgcolor="#FFFFFF"> <script language=javascript>
function onlyNum()
{
  if(!((event.keyCode>=48&&event.keyCode<=57)||(event.keyCode>=96&&event.keyCode<=105)))
//考虑小键盘上的数字键
    event.returnValue=false;
}
</script>
        批量删除 
        <input name="sj" type="text" class="wenbenkuang" id="sj" size="5" maxlength="3" onKeyDown="onlyNum();">
        天以前站内信 
        <input name="2" type="submit" class="go-wenbenkuang" id="22" value="确定">
      &nbsp;&nbsp;</td>
    </form><form name="del" method="post" action="del.asp?del=c">
      <td height="25" colspan="4" align="center" bgcolor="#FFFFFF">批量删除 
        <input name="huiyuan" type="text" class="wenbenkuang" id="huiyuan" size="15" maxlength="16">
        发送的站内信 
      <input name="2" type="submit" class="go-wenbenkuang" id="22" value="确定"></td>
    </form>
  </tr>
  <tr valign="middle" bgcolor="#CCCCCC">
    <td height="21" colspan="6" align="center" bgcolor="#FFFFFF">&nbsp;</td>
  </tr>
  <%end if%>
</table>



<table width="600" border="0" align="center" cellpadding="2" cellspacing="0">
  <form action="?" method="post" name="form" id="form"><tr>
    <td align="right">
        <input name="key" type="text" class="wenbenkuang" id="key">
        <select name="lx" class="wenbenkuang" id="lx">
          <option value="0" selected>发信人</option>
          <option value="1">收信人</option>
        </select>
      <input name="Submit" type="submit" class="go-wenbenkuang" value="查询"></td>
  </tr></form>
</table>

<table width="90%" border="0" align="right" cellpadding="0" cellspacing="0">
  <tr>
    <td>提示：系统会自动删除大于<span class="STYLE1">15</span>天数据</td>
  </tr>
</table>
</body>
</html>
