<%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 Fpath=request("Fpath") if Fpath="" then Fpath="uploadfiles" set objfilesys=server.CreateObject("Scripting.filesystemobject") set myfolder=objfilesys.getfolder(Server.MapPath("../../"&Fpath&"")) set myfiles=myfolder.files dim page,sPageSize,ecount,scount page = (Request.QueryString("page")) if page = "" or not IsNumeric(page) Then page = 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 page = clng(page) scount = (page-1) * sPageSize + 1 ecount = page * 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%> 个文件 || 当前第:<%=page%> 页 || <% for i=1 to pagecount %> &Fpath=<%=Fpath%>><%if page=i then%><%=i%><%else%><%=i%><%end if%> <%next%>