<%qx="05"%>
<!--#include file="../login/0.asp"-->
<!--#include file="../../mycartconn/conn.asp"-->
<!--#include file="../../mycartconn/page.asp"-->
<TABLE>
 <TR>
 	<TD height=5></TD>
 </TR>
 </TABLE> 
<table width="90%" border="0" align="center" cellpadding="0" cellspacing="0">
  <tr valign="middle"> 
    <td width="100%" height="45"><a href="guanli.asp">站内短信</a>　|　<b>系统提示</b>　|　<a href="guanli_2.asp">网站公告</a></td>
  </tr>
</table>
<%
Dim pageSet
pageSet=request("pageSet")
If pageSet="" Then pageSet=10
If Not IsNumeric(pageSet) Then pageSet=10
s=" where lx=5"
if request("key")<>"" and request("lx")<>"" then
	if request("lx")<>"0" then
		s = s & "and name1 like '%"&request("key")&"%'"
	else
		s = s & "and name2 like '%"&request("key")&"%'"
	end if
else
	s=" where lx=5"
end if
Set rs = Server.CreateObject("ADODB.Recordset")
sql="Select * From duanxin "&s&" Order By id DESC"
rs.open sql,conn,3,1 
page1(pageSet)
%><html>
<head> 
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<link rel="stylesheet" href="../../mycartconn/admin.css" type="text/css">
<script>
function dokeydown(key,lx,num){
  self.location.href="?key=" + key + "&lx=" + lx + "&pageSet=" + num;
}
</script>
<table width="600" border="0" align="center" cellpadding="2" cellspacing="0">
  <form action="?" method="post" name="form" id="form"><tr>
    <td>
        <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="OK,查询显示">
		　　　　　每页显示&nbsp;<input name="pageSet" type="text" class="wenbenkuang" id="pageSet" onkeydown="javascript:if(event.keyCode==13)dokeydown('<%=request("key")%>','<%=request("lx")%>',this.value);" value="<%=pageSet%>" size="3" maxlength="4">&nbsp;条
      </td>
  </tr></form>
</table>
<table width="650" align="center" style="TABLE-LAYOUT: fixed">
  <tr valign="middle"> 
    <td width="70" height="25" align="center" bgcolor="#CCCCCC">ID</td>
    <td width="230" height="25" align="center" bgcolor="#CCCCCC">发信人</td>
    <td width="130" height="25" align="center" bgcolor="#CCCCCC">收信人</td>
    <td width="120" align="center" bgcolor="#CCCCCC">发送时间</td>
    <td width="50" align="center" bgcolor="#CCCCCC">状态</td>
    <td width="50" height="25" align="center" bgcolor="#CCCCCC">删除</td>
  </tr>
<%i=1
do while not rs.eof and i<=rs.pagesize%>
  <tr valign="middle"> 
    <td height="25" align="center" bgcolor="#f1f1f1"><font color="#FF0000">NO:<%=rs("id")%></font></td>
    <td height="25" bgcolor="#f1f1f1"><a href="huiyuan.asp?abc=xs&page=1&id=<%=conn.execute("select id from huiyuan where huiyuan='"&rs("name2")&"'")(0)%>"><%=rs("name2")%></a></td>
    <td height="25" align="center" bgcolor="#f1f1f1"><a href="huiyuan.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="#f1f1f1"><font color="#666666"><%=rs("sj")%></font></td>
    <td align="center" bgcolor="#f1f1f1"><%If rs("zt") Then Response.Write("已读") else Response.Write("<font color=red>未读</font>")%></td>
    <td height="25" align="center" bgcolor="#f1f1f1"><a href="del.asp?del=a&id=<%=rs("id")%>&page=<%=page%>&home=guanli_1.asp">删除</a></td>
  </tr>
  <tr valign="middle"> 
    <td colspan="6" bgcolor="#f1f1f1" style="WORD-WRAP: break-word"><%=rs("nr")%></div></td>
  </tr>
<%i=i+1
rs.MoveNext                                              
loop%>
  <tr align="center" valign="middle"> 
      <td height="25" colspan="6" bgcolor="#f1f1f1">
<%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"> <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&home=guanli_1.asp">
      <td height="25" colspan="4" align="center">批量删除 
        <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>
</table>
<table width="650" border="0" align="center" cellpadding="0" cellspacing="0">
  <tr>
    <td>提示：系统会自动删除大于15天数据</td>
  </tr>
</table>
</body>
</html>