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

📄 fm_include.asp

📁 燃点真情的WAP整站程序,WAP建站系统,,更多WAP源码再登陆http://xywap.cn
💻 ASP
📖 第 1 页 / 共 2 页
字号:
	Response.write "<b>重命名文件夹</b><br/>"
  If Request.querystring("commit") <> "yes" Then 
    Session("lastpage") = Request.ServerVariables("HTTP_REFERER")
    Response.Write "原文件夹名: <b>" & request.querystring("folder") & "</b><br/>" 
%>
新文件夹名:<br/>
<input name='name<%=minute(now)%><%=second(now)%>' title='名称' value='<%=ubb(rs("name"))%>'/><br/>
<anchor>[确定更改]<go href='fileman.asp?sid=<%=sid%>&amp;action=RenameFolder&amp;path=<%=spath%>&amp;folder=<%=request.querystring("folder")%>&amp;commit=yes' method='post' accept-charset='utf-8'>
<postfield name='NewFolderName' value='$(name<%=minute(now)%><%=second(now)%>)'/>
</go></anchor><br/>
<%
  Else
	NewFolderName=request.form("NewFolderName")
	sFolder=request.form("folder")
	if spath="/" then slashvalue="" else slashvalue="/" end if
    Set fso = CreateObject("Scripting.FileSystemObject")
	Set folderObject = fso.GetFolder(Server.MapPath(spath&slashvalue&sFolder))
	FolderObject.Name=NewFolderName
	 Set folderObject = Nothing
	 Set fso = Nothing
	  Response.Redirect("" & Session("lastpage") & "") 
    Response.Write "重命名成功<br/>" 
   End If
  
End Sub

Sub RenameFile
On error resume next
  response.write"<br/>"
  If Request("commit") <> "yes" Then 
    Session("lastpage") = Request.ServerVariables("HTTP_REFERER")
    Response.Write "您确认重命名: <b>" & request.querystring("file") & "</b><br/>" 
%>
新名称<input name='logo<%=minute(now)%><%=second(now)%>' title='名称' value='<%=ubb(rs("logo"))%>'/><br/>
<anchor>[确定重命名]<go href='fileman.asp?action=RenameFile&amp;path=<%=spath%>&amp;folder=<%=request.querystring("folder")%>&amp;commit=yes&amp;sid=<%=sid%>' method='post' accept-charset='utf-8'>
<postfield name='NewFileName' value='$(logo<%=minute(now)%><%=second(now)%>)'/>
<postfield name='filename' value='<%=request.querystring("file") %>'/>
</go></anchor><br/>
  <%
  Else
  	NewFileName=request.form("NewFileName")
	Sfile=request.form("filename")
sssjhhhw=Lcase(fs.GetExtensionName(NewFileName))
if sssjhhhw="asp" or sssjhhhw="asa" or sssjhhhw="php" or sssjhhhw="spx" or sssjhhhw="jsp" then
NewFileName=NewFileName&".非法文件"
end if    
	if spath="/" then slashvalue="" else slashvalue="/"
    Set fso = CreateObject("Scripting.FileSystemObject")
	Set FileObject = fso.GetFile(Server.MapPath(spath&slashvalue&sfile))
	FileObject.Name = NewFileName
	Set FilObject = Nothing
	Set fso = Nothing
Response.Write "重命名成功<br/>" 
  End If
  
End Sub

Sub FileTypeUnsupported
On error resume next
  Session("lastpage") = Request.ServerVariables("HTTP_REFERER")
  filename=request.querystring("file")
  response.write ("<br/>")  
  Response.write "查看文件: "
  response.write ""&filename&""
  response.write "<br/>"
  If sFileType = "jpg" OR sFileType = "gif" OR sFileType = "GIF" OR sFileType = "JPG" Then
    Response.Write "<img src='http://" & Request.ServerVariables("HTTP_HOST") & sfile & "' alt='图片'/>"
  else
    Response.Write "<br/>未知文件格式<br/><br/>"
  End If
  Response.Write ""
End Sub

Sub Size(itemsize)
  Select case Len(itemsize)
  Case "1", "2", "3" 
    Response.Write itemsize & " bytes"
  Case "4", "5", "6"
    Response.Write Round(itemsize/1000) & " Kb"
  Case "7", "8", "9"
    Response.Write Round(itemsize/1000000) & " Mb"
  End Select
End Sub

Sub ShowList

  %>
文件管理组件<br/>
  <%
  
    ' Use the GetFolder method of the filesystemobject to get the contents of the directory specified in sPath  
  Set fileobject = fs.GetFolder(server.mappath(sPath))
	' Use the SubFolders property to get the folders contained in the directory specified in sPath
  Set foldercollection = fileobject.SubFolders 
    ' Start the code to alternate line colors - just to make the display a little less visually confusing.
  lineid=0
  bgcolor = ""

  ' Loop through the folders contained in the foldercollection and display their information on the page
  For Each folder in foldercollection 
    ' Apply our alternating line coloring
    If lineid = 0 Then
      bgcolor = bgcolor_off
      lineid = 1
    Else
      bgcolor = bgcolor_on
      lineid = 0
    End if		

		Response.Write "" &vbCrLf
		If Right(sPath,1)="/" Then
	    Response.Write "<a href=""" & scriptname & "?action=viewfolder&amp;sid="&sid&"&amp;path=" & sPath & folder.name & """>" & folder.name & "</a>"

		Else
		  Response.Write "<a href=""" & scriptname & "?action=viewfolder&amp;sid="&sid&"&amp;path=" & sPath &"/" &folder.name & """>" & folder.name & "</a>"

		End If  

	  Response.Write " " 

Call Size(folder.size)
if ssss<>"" then Response.Write "" & folder.datelastmodified & ""
	  Response.Write "<a href=""" & scriptname & "?action=RenameFolder&amp;path=" & sPath & "/" & folder.name & "&amp;sid="&sid&"&amp;folder=" & folder.name & """>改名</a> <a href=""" & scriptname & "?action=deletefolder&amp;sid="&sid&"&amp;path=" & sPath & "&amp;folder=" & folder.name & """>删除</a><br/>"
  Next 
  Set foldercollection=nothing

  ' Use the Files property to get the files contained in the directory specified in sPath
  Set filecollection = fileobject.Files
  
	 'Loop through the files contained in the filescollection and dislay their information on the page
	For Each file in filecollection 
     'Apply our alternating line coloring
    If lineid = 0 Then
      bgcolor = bgcolor_off
      lineid = 1
    Else
      bgcolor = bgcolor_on
      lineid = 0
    End if	
%>
  <%
	if fs.GetExtensionName(file.name)="gif" then image="图片"
	if fs.GetExtensionName(file.name)="pdf" then image="PDF"
	if fs.GetExtensionName(file.name)="css" then image="CSS"
	if fs.GetExtensionName(file.name)="doc" then image="DOC"
	if fs.GetExtensionName(file.name)="xls" then image="未知"
	if fs.GetExtensionName(file.name)="exe" then image="可执行文件"
	if fs.GetExtensionName(file.name)="zip" then image="压缩"
	if fs.GetExtensionName(file.name)="jpg" then image="图片"
	if fs.GetExtensionName(file.name)="jpeg" then image="图片"
	if fs.GetExtensionName(file.name)="htm" then image="HTM"
	if fs.GetExtensionName(file.name)="html" then image="HTML"
	if fs.GetExtensionName(file.name)="wml" then image="WML"
	if fs.GetExtensionName(file.name)="swf" then image="FSAHL"
	if fs.GetExtensionName(file.name)="asp" then image="ASP"
	if fs.GetExtensionName(file.name)="txt" then image="TXT"
	if fs.GetExtensionName(file.name)="inc" then image="INC"
	if fs.GetExtensionName(file.name)="js" then image="JS"
	if fs.GetExtensionName(file.name)="mdb" then image="MDB"
	
if image="" then image= "未知"
Response.Write ""&image&" <a href=""" & scriptname & "?action=editfile&amp;sid="&sid&"&amp;path=" & sPath & "&amp;file=" & file.name & "&amp;filetype=" & Lcase(fs.GetExtensionName(file.name)) & """>" & file.name & "</a> "
Call Size(file.size)
if ssss<>"" then
Response.Write "" & file.datelastmodified & ""
end if
Response.Write "<br/><a href=""" & scriptname & "?action=RenameFile&amp;sid="&sid&"&amp;path=" & sPath & "&amp;file=" & file.name & "&amp;filetype=" & Lcase(fs.GetExtensionName(file.name)) & """>改名</a>|"
Response.Write "<a href=""" & scriptname & "?action=deletefile&amp;sid="&sid&"&amp;path=" & sPath & "&amp;file=" & file.name & "&amp;filetype=" & Lcase(fs.GetExtensionName(file.name)) & """>删除</a>|<a href='" & sPath & "/" & file.name & "'>访问</a><br/>"
  Next
  ' We are done displaying information about files and folders in this directory, so close the table.
End Sub
Sub DisplayErrors
  Response.Write "错误编号:" & errornum & "<br/>"
	Response.Write "" & errorcode & ""
End Sub

%>


⌨️ 快捷键说明

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