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

📄 delpic.asp

📁 一个综合类整站
💻 ASP
字号:
<!--#include file="conn.asp"-->
<%if session("china_admin")="" then
response.redirect "login.asp"
end if
%>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<link rel="stylesheet" type="text/css" href="../css/style.css">
<title>无标题文档</title>
<%
set rs1=server.CreateObject("adodb.recordset")
set rs2=server.CreateObject("adodb.recordset")
i=0
Set fdel = CreateObject("Scripting.FileSystemObject")	
rs1.open "select * from upfile",conn,1,3
do while not rs1.eof
rs2.open "select * from china_data where pic='"&rs1("filename")&"'",conn,1,1
if rs2.eof then
rs2.close
rs2.open "select * from china_ad where picname='"&rs1("filename")&"'",conn,1,1
if rs2.eof then
rs2.close
rs2.open "select * from news_data where pic='"&rs1("filename")&"'",conn,1,1
if rs2.eof then
rs2.close
sql="select * from link_img where web='"&rs1("filename")&"'"
end if
end if
end if

if rs2.eof then
if rs1("username")<>"" and not isnull(rs1("username")) then conn.execute("update china_user set delpic=delpic+1 where uid='"&rs1("username")&"'")
fdel.DeleteFile(Server.MapPath("../adpic/"&rs1("filename")&""))
i=i+1
end if
rs2.close
rs1.movenext
loop
set fdel=nothing
rs1.close:set rs2=nothing
conn.execute ("delete from upfile")%>
<table width="98%"  border="0" cellpadding="0" cellspacing="1" bgcolor="#799AE1">
  <tr>
    <td height="20" bgcolor="#799AE1"><div align="center"><font color="#FFFFFF" style="font-size:14px">被 删 除 文 件 会 员 名 单</font></div></td>
  </tr>
  <tr>
    <td bgcolor="#FFFFFF">&nbsp;&nbsp;共删除<%=I%>个无用图片<br>
      <table width="98%"  border="0" align="center" cellpadding="0" cellspacing="1" bgcolor="#D6DFF7">
        <tr bgcolor="#FFFFFF">
          <td width="20%" height="26"><div align="center">会员ID</div></td>
          <td width="20%" height="26"><div align="center">最后登陆IP</div></td>
          <td width="20%" height="26"><div align="center">被删除文件数</div></td>
          <td width="20%" height="26"><div align="center">修改用户</div></td>
          <td width="20%" height="26"><div align="center">删除用户</div></td>
        </tr>
<%rs1.open "select * from china_user where delpic>0",conn,1,1
 if rs1.eof then%>
        <tr bgcolor="#FFFFFF">
          <td width="20%" height="26"><div align="center"></div></td>
          <td width="20%" height="26"><div align="center">暂无</div></td>
          <td width="20%" height="26"><div align="center"></div></td>
          <td width="20%" height="26"><div align="center"></div></td>
          <td width="20%" height="26"><div align="center"></div></td>
        </tr>
        <%else
 do while not rs1.eof%>
        <tr bgcolor="#FFFFFF">
          <td width="20%" height="26" align="center"><%=rs1("uid")%></td>
          <td width="20%" height="26" align="center"><%=rs1("ip")%></td>
          <td width="20%" height="26" align="center"><%=rs1("delpic")%></td>
          <td width="20%" height="26" align="center"><a href="edituser.asp?id=<%=rs1("id")%>"><font color="green">修改</font></a></td>
          <td width="20%" height="26" align="center"><a href="del.asp?del=user&adid=<%=rs1("uid")%>" onClick="return confirm('确定要删除该用户吗?\n\n该操作不可恢复!')"><font color="green">删除</font></a></td>
        </tr>
  <%rs1.movenext
  loop
  end if
  rs1.close
  conn.close:set conn=nothing%>
      </table>
    <br></td>
  </tr>
</table>

⌨️ 快捷键说明

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