<%
'程序名称：千纸鹤网站管理系统
'程序作者：千纸鹤
'作者邮箱：qzhxxw@sina.com
'作者 Q Q：138999501
'作者电话：0000000000
'官方主页：http://www.qqzzhh.com/
'官方论坛：http://www.qqzzhh.com/bbs
%>
<!--#include file="inc/conn.asp"-->
<!--#include file="inc/set.asp"-->
<!--#include file="inc/dll.asp"-->
<%call hacker()
if session("superlogin")<>yecao then
response.Write "<script>alert('您还没有登陆！');this.location.href='index.asp';</script>"
Response.End
elseif session("superadmin")<>"admin" then
response.Write "<script>alert('\n错误提示：您的权限不足！\n\n您不是超级管理员！');this.location.href='index.asp';</script>"
Response.End
end if%>
<html><head><meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<link rel="STYLESHEET" type="text/css" href="img/admin.css">
<script src=img/adminjs.js></script>
<body>
<%
select case request("action")
case "list"
call list()
case "newmenu"
call newmenu()
case else
call list()
end select
sub list()
%>
<table align=center width=100% border="0" cellpadding="0" cellspacing="0" bordercolor="<%=border%>" rules=none class=3d>
<tr><td height="22" colspan="8" class=title><b>&nbsp;<img src=img/ie.gif border=0 width=15 height=15 align=absMiddle>&nbsp;会员短信管理</b></td></tr>
<tr class=bg height="25">
<td width=30 align=center>选定</td>
<td width=60 align=center>发信人</td>
<td width=60 align=center>收信人</td>
<td  width=80 align=center>标题</td>
<td align=center>内容</td>
<td align=center >时间</td>
</tr><tr><td class=hr colspan=6></td></tr>
<form  method="post" name="form" id="form" action="del.asp" onsubmit="return downdel();">
<%
sql="select * from [YC_sms] order by id asc"
set rs=server.CreateObject("adodb.recordset")
rs.open sql,conn,1,1
if not rs.bof and not rs.eof then
rs.pagesize=cint(adminpage)
i=1
mypage=request("page")
if mypage="" then
mypage=1
else
mypage=cint(mypage)
end if
pages=rs.pagecount
rs.absolutepage=mypage
do while not rs.eof%>
<tr class=bg height="25">
<td width=30 align=center>
<input name='SoftID' type='checkbox' onclick="unselectall()" id="SoftID" value='<%=rs("id")%>'></td>
<td width=60 align=center><%=rs("from_user")%></td>
<td width=70 align=center><%=rs("to_user")%></td>
<td  width=100 align=center><%=rs("title")%></td>
<td align=center><a href="#" title="<%=rs("content")%>">
<%if len(rs("content"))>20 then response.Write left(rs("content"),20)&"..." else response.Write rs("content") end if%></a></td>
<td align=center title="<%=rs("date")%>" width=60><%=left(rs("date"),9)%></td>
</tr><tr><td class=hr colspan=6></td></tr>
<%
if i=rs.pagesize then exit do end if
i=i+1
rs.movenext
loop
end if
if rs.eof and rs.bof then
response.write"<tr><td colspan=6 height=100 align=center>暂时没有短信！</td></tr>"
else%>
<tr class=bg><td  height=25 colspan=6>
<table width=100% border=0><tr><td width=200>
&nbsp;<input name="chkAll" type="checkbox" id="chkAll" onclick=CheckAll(this.form) value="checkbox">
<input name="submit" type="submit" onClick="document.form.Action.value='Del'" value="删 除" class=adminbutton>
<input name="Action" type="hidden" id="Action" value="Del">
<input name="tab" type="hidden" id="tab" value="YC_sms">
<input name="url" type="hidden" id="url" value="admin_sms.asp">
</td><td>
&emsp;&emsp;共有短信<font color=red><%=rs.recordcount%></font>条，每页<font color=red><%=rs.pagesize%></font>条，分<font color=red><%=mypage%></font><%=rs.pagecount%>页&emsp;&emsp;&emsp;
<script language="javascript">
function showPageLink(sUrl,iPage,iCount){
var i;
i=Math.max(1,iPage-1);
document.write("<a href=\""+sUrl+"1\"><FONT face=Webdings>9</FONT></a> ");
document.write("<a href=\""+sUrl+i+"\"><FONT face=Webdings>7</FONT></a> <b>");
for(i=Math.max(1,iPage-5);i<iPage;i++){
document.write("<a href=\""+sUrl+i+"\">"+i+"</a> ");}
document.write("<font color='#ff3333'>"+iPage+"</font> ");
for(i=iPage+1;i<=Math.min(iCount,iPage+5);i++){
document.write("<a href=\""+sUrl+i+"\">"+i+"</a> ");}
i=Math.min(iCount,iPage+1);
document.write("</b><a href=\""+sUrl+i+"\"><FONT face=Webdings>8</FONT></a> ");
document.write("<a href=\""+sUrl+iCount+"\"><FONT face=Webdings>:</FONT></a> ");}
showPageLink("?action=list&page=",<%=mypage%>,<%=pages%>);
</script>
</td></tr>
</table>
</td></tr>
</form>
<%end if%>
<%end sub%>
