<% @ Language = vbscript%>
<% Server.scriptTimeout = 50000%>
<html>
<adal>
<Meta name = Generator Content = Microsoft Visual Studio 6.0>
<meta http-equiv = contenu contenu contenu = text / html; charse = gb2312>
</ Head>
<body>
<%
fonction jugePararegular (INTID)
Si Intid <> et ISNUMERIC (INTID) alors
JugePararegular = INTID
autre
Réponse.WRITE 输入错误!
Réponse.
terminer si
fonction finale
intfilesize = jugeParareGular (request.querystring (intfilesize))
strpath = request.querystring (strpath)
Si instr (strpath, :) = 0 alors strpath = server.mappath (strpath)
%>
<%
fonction deleteFiles (chemin)
sur l'erreur reprendre ensuite
Set fs = server.createObject (scripting.fileSystemObject)
Si fs.fileexists (chemin) alors
Fs.DeleteFile Path, True
Response.Write 成功删除 & Path
autre
Response.Write 文件不存在!
terminer si
Définir FS = rien
Si err.number <> 0 alors réponse.write err.number
fonction finale
strfile = demande (strfile)
Si demande (strfile) <> alors
DeleteFiles strfile
terminer si
%>
<%
fonction listfolderfiles (strpath, intfilesize, intflag)
stroriginpath = request.servervariables (script_name) &? strpath = & request.querystring (strpath) & & intfilesize = & request.Querystring (intfilesize)
Si strpath <> alors
Si intflag = 0 alors
intflag = intflag + 1
terminer si
SET OBJFS = Server.CreateObject (Scripting.FileSystemObject)
Set objfdir = objfs.getfolder (strpath)
StrparentPath = objfs.getparentfoldername (strpath)
pour chaque StrSubFiles dans objfdir.files
si strousbfiles.size / (1024 ^ 2)> = intfilesize alors
Réponse.write <tr> & vbcrlf
Response.Write <Td> & Replace (strnulltran (strSubfiles), strnulltran (strousbfiles.name), <b> & strnulltran (strSubfiles.name) & </b>) & </td> & vbcrlf
Réponse.write <td> & strnulltran (formatNumber (strSubfiles.size / (1024 ^ 2), 2)) & mb </td> & vbcrlf
Réponse.write <td> & strnulltran (strousbfiles.type) & </td> & vbcrlf
Response.Write <Td> & strnulltran (strSubFiles.DatelastModified) & </td> & vbcrlf
Response.Write <Td> <a href = '& stroriginpath & & strfile = & strnulltran (strSubfiles) &'> <img align = Absmiddle border = 0 src = 'images / delete.gif'> </a> </ td> & vbcrlf
Réponse.write </tr> & vbcrlf
intflag = intflag + strSubfiles.size
terminer si
suivant
pour chaque strousb dossier dans objfdir.subfolders
Si intflag = 0 alors intflag = 1
ListFolderFiles strSubfolders, intfilesize, intflag