That would include registering dlls which isnt an option..
So if i use the following code...
Code:
<%@ LANGUAGE="VBScript" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<title>ASP Directory Listing Demo</title>
<meta http-equiv="Content-Type" content="text/html;charset=utf-8" />
<link rel="stylesheet" type="text/css" href="/common/default.css" />
<link rel="stylesheet" type="text/css" href="jstree/mktree.css">
<script type="text/javascript" src="jstree/mktree.js"></script>
</head>
<body>
</div>
<ul class="mktree" id="tree1">
<% ListFolderContents(Server.MapPath("/site/craig/CSS")) %>
</ul>
</body>
</html>
<% sub ListFolderContents(path)
dim fs, folder, file, item, url
set fs = CreateObject("Scripting.FileSystemObject")
set folder = fs.GetFolder(path)
'Display the target folder and info.
Response.Write("<li><b>" & folder.Name & "</b> - " _
& folder.Files.Count & " files ")
if folder.SubFolders.Count > 0 then
Response.Write(folder.SubFolders.Count & " directories ")
end if
Response.Write("[list]" & vbCrLf)
'Display a list of sub folders.
for each item in folder.SubFolders
ListFolderContents(item.Path)
next
'Display a list of files.
for each item in folder.Files
url = MapURL(item.path)
Response.Write("<li><a href=""" & url & """>" & item.Name & "</a> " _
& "</li>" & vbCrLf)
next
Response.Write("</ul>" & vbCrLf)
Response.Write("</li>" & vbCrLf)
end sub
function MapURL(path)
dim rootPath, url
'Convert a physical file path to a URL for hypertext links.
rootPath = Server.MapPath("/")
url = Right(path, Len(path) - Len(rootPath))
MapURL = Replace(url, "\", "/")
end function %>
I can see the folder i want and it expands and closes
Now instead of opening the file when i click on it i want it to give a select box next to it to allow me to choose what i want to do
ie
add page below
edit page
delete page ..
and so on
any ideas?
ps the page that is selected the options need to be for that page, so that page name will be needed.
Thanks