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

📄 admin_oa_del.asp

📁 一个比较完整的企业erp系统
💻 ASP
字号:
<!--#include file="../inc/conn.asp"-->
<link href="../inc/setup.css" rel="stylesheet" type="text/css">
<link href="../inc/textbox.css" rel="stylesheet" type="text/css">
<table cellpadding="6" cellspacing="1" border="0" width="100%"  align=center>
    <tr bgcolor=ffffff> 
      <th width="100%" height=12 align="center" bgcolor="ffffff">公文删除</th>
    </tr>
</table>
            <form method="POST" action="admin_oa_del.asp?id=<%=request("oa_id")%>">
              <p align="center">真的删除此记录! 
              <p align="center">
                <input type="submit" value=" 是 " name="d">
                <input type="submit" value=" 否 " name="d">
              </p>
            </form>


<%
  if request.form("d")=" 是 " then
       dim id,j
	   	
	   ID=replace(trim(request("ID")),"'"," ")
    dim rs,sql,path,path1,path0
    set rs=Server.CreateObject("ADODB.RECORDSET")
sql="Select oa_id,oa_title,oa_content,oa_author,uploadfiles,filename,filecount,filesize,fileext,oa_updatetime,oa_fruit from [oa_data] where oa_id="&id
   rs.open sql,conn,1,3    
   if rs.bof and rs.eof then
	     response.write(  "<li>找不到该文件! </li>")
		else 
	      if instr(rs("uploadfiles"),"|")=1 then
             path=right(rs("uploadfiles"),len(rs("uploadfiles"))-1)
	        path0=split(path,"|")
		for j=0 to ubound(path0)
		   path1=path0(j)
			call delpath(path1)
		next
		 end if
	     conn.execute("Delete From [oa_data] Where oa_id="&ID )
		end if
	rs.close
set rs=nothing 
call CloseConn
    response.redirect "admin_oa_list.asp"
end if
   
   
sub delpath(path)
Set Fs = Server.CreateObject("Scripting.FileSystemObject")
If Fs.FileExists(server.mappath(Path)) Then
Set Os = Fs.GetFile(server.mappath(Path))
Os.Delete
Response.Write Path&"已被删除!<br>"
Else
Response.Write Path&"该不存在!数据已被删除<br>"
End If
end sub


if request.form("d")=" 否 " then
         response.redirect "admin_oa_list.asp"
end if



%>

⌨️ 快捷键说明

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