old_del_ok.asp
来自「房地产管理系统 vb写的,很不错!!!!!!!!!!!」· ASP 代码 · 共 73 行
ASP
73 行
<!--#include file="../inc/conn.asp"-->
<%
'┌─ 风云ASP在线 ────────────────────────┐
'│ │
'│ 作者:赵振波. http://www.fyasp.com │
'│ │
'│ Q Q:176189168 │
'│ │
'│ Email:fy96@163.com │
'│ │
'│ 程序定做,系统开发,网站制作,提供高质量的网络产品、技术和服务!│
'│ │
'│ │
'└─────────────────── http://www.fyasp.com ──┘
%><%
if session("manager")="" then
response.redirect "manage.asp"
response.end
end if
%>
<%
'=================================================
'fy_DelFiles(strFiles)
'strdir ----(要删除的文件)
'删除指定文件
'=================================================
Sub fy_DelFiles(strFiles)
if strFiles="" then Exit Sub
dim fso,arrFiles,i
'On Error Resume Next
Err=0
Set fso = CreateObject("Scripti"&"ng.File"&"SystemO"&"bject")
if fso.FileExists(server.MapPath(strFiles)) then
fso.DeleteFile(server.MapPath(strFiles))
if 0=Err then
response.write "清除文件("&strFiles&")成功"
else
response.write "清除文件("&strFiles&")失败!"
end if
end if
Set fso = Nothing
Err=0
End Sub
opendataconn
ids=split(request("id"),",")
for i=0 to ubound(ids)
tt=trim(ids(i))
set rs=server.createobject("adodb.recordset")
sql="select * from oldsc where id="&tt&""
rs.open sql,conn,1,1
if not rs.eof then
stype=trim(rs("stype"))
bimg=trim(rs("bimg"))
conn.execute "update oldtype2 set [number]=[number]-1 where stype='"&stype&"'"
if bimg<>"" then
bimg="../uppic/"&bimg
response.write bimg
call fy_DelFiles(bimg)
end if
rs.close
set rs=nothing
end if
conn.execute"delete from oldsc where id="&tt&""
next
response.redirect"old_del.asp"
closedataconn
%>
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?