⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 adminmsg.asp

📁 网上流行的MOVE站点
💻 ASP
字号:
<!--#include file="articleconn.asp"-->
<!--#include file="security.asp"-->
<%if session("flag")>4 then
    response.write "<script>alert('您的操作权限不够!');history.back();</script>"
    response.end
end if
%>
<%dim action,infoID
action=request.QueryString("action")
infoID=request("infoID")
if action<>"" then%>

<% select case action
  case "del"
   if infoID<>"" then conn.execute "delete from adminMsg where msgID in ("&infoID&")"
 end select
end if
%>
<html>
<head>
<title>短消息管理</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<link rel="stylesheet" type="text/css" href="../css/style.css">
</head>
<body bgcolor=336699>
<table width="90%" border="0" cellspacing="0" cellpadding="0" align="center">
  <tr> 
    <td> 
      <table width="100%" border="0" cellspacing="0" cellpadding="0">
        <tr> 
          <td class="12v"> 
            <table width="100%" border="0" cellspacing="0" cellpadding="0" class="12v">
              <tr> 
                <td class="12v" > 
                  <table border="0" cellpadding="0" cellspacing="0" style="border-collapse: collapse" id="AutoNumber3" height="0" width="100%">
                    <tr> 
                      <td> 
                        <table width="100%" border="0" align="center" cellpadding="0" cellspacing="1" bgcolor="#0099FF">
                          <tr> 
                            <td height="25" bgcolor="#cc0003"> <div align="center"><font color="#FFFFFF">收到的短消息</font></div></td>
                          </tr>
                          <tr bgcolor="#fff000"> 
                            <form name="form1" method="post" action="adminMSG.asp?action=del">
                              <td height="25"> 
                                <%'开始分页
				Const MaxPerPage=40 
   				dim totalPut,admininfoRS  
   				dim CurrentPage
   				dim TotalPages
   				dim j
    				if Not isempty(request("page")) then
      				currentPage=Cint(request("page"))
   				else
      				currentPage=1
   				end if 
                set admininfoRS=server.createobject("adodb.recordset")
                userinfoSQL="select * from adminMsg order by sendDay DESC" 
                admininfoRS.open userinfoSQL,conn,1,1 
 				if err.number<>0 then
				response.write "数据库中无数据"
				end if
				if admininfoRS.eof And admininfoRS.bof then
       			Response.Write "<p align='center' class='contents'> 目前还没有任何信息!</p>"
   				else
	  				totalPut=admininfoRS.recordcount
      				if currentpage<1 then
          				currentpage=1
      				end if

      				if (currentpage-1)*MaxPerPage>totalput then
	   					if (totalPut mod MaxPerPage)=0 then
	     					currentpage= totalPut \ MaxPerPage
	   					else
	      					currentpage= totalPut \ MaxPerPage + 1
	   					end if
      				end if

       				if currentPage=1 then
            			showContent
            			showpage totalput,MaxPerPage,"adminMSG.asp"
       				else
          				if (currentPage-1)*MaxPerPage<totalPut then
            				admininfoRS.move  (currentPage-1)*MaxPerPage
            				dim bookmark
            				bookmark=admininfoRS.bookmark
            				showContent
             				showpage totalput,MaxPerPage,"adminMSG.asp"
        				else
	        				currentPage=1
           					showContent
           					showpage totalput,MaxPerPage,"adminMSG.asp"
	      				end if
	   				end if
   				   				end if

   				sub showContent
       			dim i
	   			i=0
			response.write "<table width=12 height=7 border=0 cellpadding=0 cellspacing=0><tr><td height=7></td></tr></table>"
			%>
                                <table width="95%" border="0" align="center" cellpadding="3" cellspacing="1" bgcolor="#000000">
                                  <tr align="center"> 
                                    <td width="7%" bgcolor=66ccff>状态</td>
                                    <td width="7%" bgcolor=66ccff>选择</td>
                                    <td width="25%" bgcolor=66ccff>发信者</td>
                                    <td width="31%" bgcolor=66ccff>消息主题</td>
                                    <td width="30%" bgcolor=66ccff>发送日期</td>
                                  </tr>
                                  <%admininfoRS.movefirst
								  do while not admininfoRS.eof%>
                                  <tr bgcolor="#E8F1FF" align="center"> 
                                    <td bgcolor=66ccff> 
                                      <% if not admininfoRS("readle") then
										response.write("<img src='images/new.gif'>") 
										end if%>
                                    </td>
                                    <td bgcolor=66ccff><input type="checkbox" name="infoID" id="infoID" value="<%=admininfoRS("MsgId")%>"></td>
                                    <td bgcolor=66ccff><%=admininfoRS("sendBy")%></td>
                                    <td bgcolor=66ccff><a href="#" onClick="window.open('detailMSG.asp?msgID=<%=admininfoRS("msgID")%>','adminMsg','scrollbars=no,resizable=no,width=460,height=380,menubar=no,top=168,left=168')"><%=admininfoRS("msgTitile")%></a></td>
                                    <td bgcolor=66ccff><%=admininfoRS("sendDay")%></td>
                                  </tr>
                                  <%i=i+1
		  if i>=MaxPerPage then Exit Do
		  admininfoRS.movenext
		  loop
		  admininfoRS.close
		  set admininfoRS=nothing
		  set conn=nothing
		  %>
                                  <tr align="center"> 
                                    <td height="25" colspan="5" bgcolor=66ccff> 选中所显示消息 
                                      <input type="checkbox" name="checkbox" value="Check All" onClick="CheckAll(this.form);"> 
                                      &nbsp;&nbsp; <input type="submit" class="button1" name="Submit2" value="删 除"> 
                                    </td>
                                  </tr>
                                 </form>
                                </table>
                                <%  
				End Sub   
  
				Function showpage(totalnumber,maxperpage,filename)  
  				Dim n
  				
				If totalnumber Mod maxperpage=0 Then  
					n= totalnumber \ maxperpage  
				Else
					n= totalnumber \ maxperpage+1  
				End If
				
				Response.Write "<form method=Post action="&filename&">"  
				Response.Write "<p align='center' class='contents'> "  
				If CurrentPage<2 Then  
					Response.Write "<font class='contents'>首页 上一页</font> "  
				Else  
					Response.Write "<a href="&filename&"?page=1 class='contents'>首页</a> "  
					Response.Write "<a href="&filename&"?page="&CurrentPage-1&" class='contents'>上一页</a> "  
				End If
				
				If n-currentpage<1 Then  
					Response.Write "<font class='contents'>下一页 尾页</font>"  
				Else  
					Response.Write "<a href="&filename&"?page="&(CurrentPage+1)&" class='contents'>"  
					Response.Write "下一页</a> <a href="&filename&"?page="&n&" class='contents'>尾页</a>"  
				End If  
					Response.Write "<font class='contents'> 页次:</font><font class='contents'>"&CurrentPage&"</font><font class='contents'>/"&n&"页</font> "  
					Response.Write "<font class='contents'> 共有"&totalnumber&"条记录 " 
					Response.Write "<font class='contents'>" 
					Response.Write "</form>"  
				End Function  
			%>
                              </td>
                            
                          </tr>
                          <tr bgcolor="#fff000" align="center"> 
                            <td ><input type="button" name="senduser" class="button1" id="senduser" value="给所有普通会员发信息" onClick="javascript:window.open('senduser.asp?userName=_alluser2020','sendback','width=550,height=400')">
                                  &nbsp;&nbsp;&nbsp;<input type="button" class="button1" name="senduser2" id="senduser2" value="给所有黄金会员发信息" onClick="javascript:window.open('senduser3.asp?userName=_alluser2020','sendback','width=550,height=400')"><br><br>
                              &nbsp; 
                              <input type="button" name="senduser3" class="button1" id="senduser3" value="给所有VIP和钻石会员发信息" onClick="javascript:window.open('senduser4.asp?userName=_alluser2020','sendback','width=550,height=400')">
							  <br>
							</td>
                          </tr>
                         <tr> 
                      <td> <table width="100%" border="0" align="center" cellpadding="0" cellspacing="0">
                          <tr> 
                            <td height="25" bgcolor="#cc0005"> <div align="center"><font color="#FFFFFF">删除会员短消息</font></div></td>
                          </tr>
                          <tr bgcolor="#fff000" align="center"> 
                            <td >
                              <p align="center"> 
                                <input type="button" name="senduser4" class="button1" id="senduser4" value="删除所有会员的信息" onClick="javascript:window.open('delsenduser5.asp?userName=_alluser','sendback')">
                                &nbsp;&nbsp; &nbsp; 
                                <input type="button" name="senduser22" class="button1" id="senduser22" value="删除所有已读的信息" onClick="javascript:window.open('delsenduser5.asp?userName=_okuser','sendback')">
                                &nbsp; <br>
                              </td>
                          </tr>
                        </table>
                        <br>
                      </td>
                    </tr>
                  </table></td>
                    </tr>
                  </table>
                </td>
              </tr>
            </table>
          </td>
        </tr>
      </table>
    </td>
  </tr>
</table>

</body>
</html>
<script language=javascript>
function CheckAll(form)
  {
  for (var i=0;i<form.elements.length;i++)
    {
    var e = form.elements[i];
    if (e.name != 'checkbox')
       e.checked = form.checkbox.checked;
    }
  }
</script>

</body>
</html>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -