delmessage.asp

来自「国内第一数字点卡销售程序。功能强大。 完整无错!数据文件经MD5加密!经严格测」· ASP 代码 · 共 123 行

ASP
123
字号
<!--#include file="conn.asp"-->

<%
if session("admin_rank")<>1 and session("admin_rank")<>5 then
response.write("<script>alert('您无权查看本页,SORRY!');window.location=('login.asp')</script>")
response.end
end if
%>
<%
set rs=server.createobject("adodb.recordset")
%><head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<link rel="stylesheet" type="text/css" href="css.css">
</head>
<%
if request("action")="del" then
    sql="select * from [message] where id="&int(request("id"))
    rs.open sql,conn,3,3
    if rs.eof then
        response.redirect "delnews.asp"
    else
    rs.delete
    rs.update
    end if
    rs.close
    response.write "<script language=javascript>alert('删除成功!');</script>"
end if
%>
<body style="background-color: #F0FBF1">

<div align="center">
<table border="1" width="780" cellspacing="0" height="10" bordercolorlight="#C0C0C0" bordercolordark="#FFFFFF" cellpadding="0" bordercolor="#FFFFFF">
               <tr> 
                <form method="POST" action="delmessage.asp">
       <td colspan="8" align="left" height="30"> 
		<p>客户留言查询:<input type="text" name="keywords" size="12" class=ipt>&nbsp;&nbsp;
        <input type="image" border="0" name="b12" src="../IMAGES/search.jpg" width="81" height="20"></td>
                  
                </form>
              </tr>
  <%
  keywords=srequest(trim(request("keywords")),0)  
  sql="select * from [message] where spbh like '%"&keywords&"%' order by id desc"
  rs.open sql,conn,3,3
  if rs.eof then
      response.write "暂且没有相关客户留言!"
      response.end
  end if
      rs.pagesize=15
      page = cint(request("page"))
      if page = "" then page = 1
      if page < 1 then page=1
      if page >= rs.pagecount then page = rs.pagecount
      rs.absolutepage = page
  %>
  <tr>
    <td width="124" align="center" height="30">
      所挂游戏ID/密码<p><FONT color=#ff0000>充卡类型(按月/秒):<FONT/><p/></td>      
    <td width="236" align="center" height="30">
      挂 机 介 绍:<p><FONT color=#ff0000>介 绍:<FONT/><p/></td>      
    <td width="65" align="center" height="30">
      姓名<p><FONT color=#ff0000>商品名称<FONT/><p/></td>      
    <td width="79" align="center" height="30">
      联系QQ<p><FONT color=#ff0000>游戏帐户/ID<FONT/><p/></td>      
    <td width="77" align="center" height="30">
      所挂游戏<p><FONT color=#ff0000>游戏服务器/分区:<FONT/><p/></td>      
    <td width="71" align="center" height="30">
      联系地址<p><FONT color=#ff0000>确认游戏帐户/ID:<FONT/><p/></td>      
    <td width="62" align="center" height="30">
      加入日期</td>      
    <td width="57" align="center" height="30">
      是否删除</td>      
  </tr>
<%
for i=1 to rs.pagesize
%>
  <tr>
    <td width="124" align="center" height="30">
       <%=rs("spbh")%></td>      
    <td width="236" align="center" height="30">
       <%=rs("content")%></td>      
    <td width="65" align="center" height="30">
       <%=rs("name")%></td>      
    <td width="79" align="center" height="30">
       <%=rs("tel")%></td>      
    <td width="77" align="center" height="30">
       <%=rs("email")%></td>      
    <td width="71" align="center" height="30">
       <%=rs("address")%></td>      
    <td width="62" align="center" height="30">
       <%=rs("time")%></td>      
    <td width="57" align="center" height="30">
      <a href="delmessage.asp?id=<%=rs("id")%>&action=del" onClick="return confirm('您确定进行删除操作吗?')">
		<font color="#FF0000">删除</font></a></td>      
  </tr>
<%
rs.movenext
if rs.eof then exit for
next
%>
                  <tr>         
                    <td width="84%" style="padding-left: 10px" colspan="8" height="30">        
                    <p align="center">共有记录<%=rs.recordcount%>条&nbsp;                   
                    <%=page%>/<%=rs.pagecount%>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <A href="<%request.servervariables("document_name")%>?page=<%=page-1%>&keywords=<%=keywords%>">上一页</A> <A href="<%request.servervariables("document_name")%>?page=<%=page+1%>&keywords=<%=keywords%>">下一页</A>&nbsp;&nbsp;&nbsp; 转到第 <SELECT onchange="window.location='?keywords=<%=keywords%>&page='+this.value" name=gopage>              
                    <%for x=1 to rs.pagecount%>
                    <OPTION <%if x=page then%>selected<%end if%> value=<%=x%>><%=x%></OPTION>
                    <%next%>      
                    </SELECT> 页        
                    </div>
                    <%rs.close%> 

                    </td>     
                  </tr>  
  
</table>
</div>

<%
set rs=nothing
conn.close
set conn=nothing
%>

⌨️ 快捷键说明

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