Web Wiz - Green Windows Web Hosting

  New Posts New Posts RSS Feed - File manager progy
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

File manager progy

 Post Reply Post Reply
Author
l15aRd View Drop Down
Groupie
Groupie


Joined: 24 May 2002
Location: England
Status: Offline
Points: 121
Post Options Post Options   Thanks (0) Thanks(0)   Quote l15aRd Quote  Post ReplyReply Direct Link To This Post Topic: File manager progy
    Posted: 05 June 2003 at 1:54am

I need a decent file manager, for my websites downloads page, can anyone recommend any?

Thanx in advance.


DrunkenTechie.net

You can logoff, but you can never leave
Back to Top
Stefano View Drop Down
Newbie
Newbie
Avatar

Joined: 28 May 2003
Location: Canada
Status: Offline
Points: 8
Post Options Post Options   Thanks (0) Thanks(0)   Quote Stefano Quote  Post ReplyReply Direct Link To This Post Posted: 11 June 2003 at 2:22pm

I have a simple one here, let's you see files and images in the upload dir, and delete them with a click.

It needs to be in the admin/includes folder

just past it into a new file, put it in the admin/includes folder, and away you go.

***************************************************

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>Untitled Document</title>
<script language="JavaScript">
  function confirm_delete(strFileName)
   {
   if (confirm("Are you sure that you would like to delete " + strFileName + "?"))
    {
    document.location = "fmanager.asp?Action=Delete&File=" + strFileName;
    }
   }
</script>

<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</head>

<body>
<%
ImagesPath = "../../uploads/"

If Request.QueryString("Action") = "Delete" Then
 Dim strImage
 
 strImage = ImagesPath & Request.QueryString("File")
 response.write(server.mappath(strImage))
 Set objFSO = CreateObject("Scripting.FileSystemObject")
 objFSO.DeleteFile(server.mappath(strImage))
 objFSO.Close
 Set objFSO = Nothing
End If
%>

<table border="0" cellpadding="0" cellspacing="0" width="400" align="center">
  <tr>
   <td align="left" width="10"><img src="../images/left.gif" width="8" height="20" border="0" alt=""></td>
   <td width="100%"  align="center">Image Management</td>
   <td align="right" width="10"><img src="../images/right.gif" width="8" height="20" border="0" alt=""></td>
  </tr>
  <tr>
   <td colspan="3" valign="top">
    <table border="0" width="100%" bgcolor="#000000" cellpadding="0" cellspacing="1" valign="top">
     <tr>
      <td bgcolor="#fffff0" valign="top">
       <table cellpadding="0" cellspacing="0" border="0" width="100%">
        <tr>
         <td>
          <table width="100%" border="0" align="left" cellpadding="3" cellspacing="0">
              <tr align="left" valign="top">
               <td width="155"><font class="Bold">File Name</font></td>
               <td width="55" align="center"><font class="Bold">Size</font></td>
               <td align="center"><font class="Bold">Date</font></td>
            <td align="center"><font class="Bold">Actions</font></td>
              </tr><%
              Dim objFSO 'File System Object
              Dim objFile 'File Object
              Dim objFolder 'Folder Object
              Set objFSO = CreateObject("Scripting.FileSystemObject") 'Create File System Object To Get list of files
              Set objFolder = objFSO.GetFolder(server.mappath(ImagesPath)) 'Set the object folder To the mapped path
              'For Each file In the folder
              For Each objFile In objFolder.Files
            if objFile.Name <>  "blank.gif" then %>
               <tr align="left" valign="top">
                <td>
             <b><%=objFile.Name%></b><br>
             <% response.write "<img src='" & ImagesPath & objfile.name & "'>" %>
             <hr>
             </td><td><%
                 'We will format the file size so it looks pretty
                 if objFile.Size <1024 Then
                  Response.Write objFile.Size & " Bytes"
                 ElseIf objFile.Size < 1048576 Then
                  Response.Write Round(objFile.Size / 1024.1) & " KB"
                 Else
                  Response.Write Round((objFile.Size/1024)/1024.1) & " MB"
                 End if %>
                </td>
                <td><%=objFile.DateLastModified%></td>
             <td align="center">[<a href="javascript:confirm_delete('<%=objFile.Name%>')">Del</a>]</td>
               </tr><%
            end if
              Next %>
             </table>
         </td>
        </tr>
       </table>
      </td>
     </tr>
    </table>
   </td>
  </tr>
 </table>
</body>
</html>
**********************************************



Edited by Stefano
Back to Top
l15aRd View Drop Down
Groupie
Groupie


Joined: 24 May 2002
Location: England
Status: Offline
Points: 121
Post Options Post Options   Thanks (0) Thanks(0)   Quote l15aRd Quote  Post ReplyReply Direct Link To This Post Posted: 12 June 2003 at 1:02am
Thanks for getting back to me :), will have a look at it

DrunkenTechie.net

You can logoff, but you can never leave
Back to Top
FLATLINE View Drop Down
Groupie
Groupie
Avatar

Joined: 08 July 2002
Location: Israel
Status: Offline
Points: 142
Post Options Post Options   Thanks (0) Thanks(0)   Quote FLATLINE Quote  Post ReplyReply Direct Link To This Post Posted: 13 June 2003 at 12:43am

Wow Stefano that's a really cool script!

How about posting a script for editing HTML pages?

I'm gonna make my own Brinkster website LOL

Visit my site: DarkGreen HQ
Back to Top
FLATLINE View Drop Down
Groupie
Groupie
Avatar

Joined: 08 July 2002
Location: Israel
Status: Offline
Points: 142
Post Options Post Options   Thanks (0) Thanks(0)   Quote FLATLINE Quote  Post ReplyReply Direct Link To This Post Posted: 17 June 2003 at 4:41am
Hey Stefano I was serious about that! Bump!
Visit my site: DarkGreen HQ
Back to Top
abhinav View Drop Down
Groupie
Groupie


Joined: 13 May 2003
Location: India
Status: Offline
Points: 63
Post Options Post Options   Thanks (0) Thanks(0)   Quote abhinav Quote  Post ReplyReply Direct Link To This Post Posted: 19 June 2003 at 5:09am
neat little script!
Back to Top
 Post Reply Post Reply

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 12.08
Copyright ©2001-2026 Web Wiz Ltd.


Become a Fan on Facebook Follow us on X Connect with us on LinkedIn Web Wiz Blogs
About Web Wiz | Contact Web Wiz | Terms & Conditions | Cookies | Privacy Notice

Web Wiz is the trading name of Web Wiz Ltd. Company registration No. 05977755. Registered in England and Wales.
Registered office: Web Wiz Ltd, Unit 18, The Glenmore Centre, Fancy Road, Poole, Dorset, BH12 4FB, UK.

Prices exclude VAT at 20% unless otherwise stated. VAT No. GB988999105 - $, € prices shown as a guideline only.

Copyright ©2001-2026 Web Wiz Ltd. All rights reserved.