<%Session.CodePage=65001%> 网站后台管理登陆 <%call log_chk()%> <%'---------------------------------删除文件 If Request("act")="del" Then dname=request("dname") Fpath=request("Fpath") dname=Server.MapPath("../../"&Fpath&"/"&dname) Set fs = Server.CreateObject("Scripting.FileSystemObject") fs.deleteFile(dname) response.write"" response.end Set fs = Nothing End if%>
后台管理:>> 上传文件管理
<% Function ShowFileInfo(filespec) Dim fso,f Set fso = CreateObject("Scripting.FileSystemObject") Set f = fso.GetFile(filespec) ShowFileInfo = "Created:"& f.DateCreated End Function %> <% Function ShowFileInfo(filespec) Dim fso,f Set fso= CreateObject("Scripting.FileSystemObject") Set f= fso.GetFile(filespec) ShowFileInfo= "创建于:"&f.DateCreated End Function %> <% dim count dim Fpath count = 0 dname=request("dname") Fpath=request("Fpath") dname2=Server.MapPath("../../"&Fpath&"/"&dname) Fpaths=Fpath&"/"&dname set objfilesys=server.CreateObject("Scripting.filesystemobject") set myfolder=objfilesys.getfolder(dname2) set myfiles=myfolder.files dim pages,sPageSize,ecount,scount pages = (Request.QueryString("pages")) if pages = "" or not IsNumeric(pages) Then pages = 1 dim objfilesys dim myfolders dim myfile dim filecount, pagecount'准备分页 sPageSize = 12'每页显示数 filecount = clng(myfiles.count) pagecount = clng(filecount / sPageSize) if pagecount=0 then pagecount=1 pages = clng(pages) scount = (pages-1) * sPageSize + 1 ecount = pages * sPageSize %> <% for each myfile in myfiles fp = cstr(myfile.path) count = count +1 if scount <= count and ecount >= count Then %> <% end if next %>
已上传文件( 缩略图管理 || 内容图片管理)
文件名 创建日期 大小 操作
<%=myfile.name%> <%=myfile.DateCreated%> <%=clng(myfile.Size/1024)%> K 查看 || 删除
共 <%=pagecount%> 页 <%=filecount%> 个文件 || 当前第:<%=pages%> 页 || <% for i=1 to pagecount %> &Fpath=<%=Fpath%>&dname=<%=request("dname")%>><%if pages=i then%><%=i%><%else%><%=i%><%end if%> <%next%>