dynamische Sitemap gesucht

CrocodileHunter

Grünschnabel
Hallo Leutz,

ich möchte auf unserem Webserver IIS eine dynamische Sitemap unter asp erstellen. Leider habe ich keine Ahnung wie das geht da ich noch Newbie bin. Ich habe ein Script bereits vorliegen, allerdings steht dabei das es noch nicht ausgreift ist und ich es auch noch nicht zum Laufen gebracht habe. Hier mal der Quelltext: Ist aber nicht von mir:

' ------------------------------------------------
<%
Response.Buffer = True
DIM Spacer
Spacer=""
%>
<html>
<head>
<title>ASP - Datenbankkurs (Verzeichnisliste)</title>
</head>

<body leftmargin="0" topmargin="0" bgcolor="white">

<%
PRIVATE sub intoFold(FirstPath)

' --- Folder-Objekt instanzieren
Set Folder = objFileSys.GetFolder(FirstPath)

' --- Nur weitermachen wenn kein Fehler aufgetreten ist
If Err <> 0 Then
Set Folder = Nothing
Set Folder = objFileSys.GetSpecialFolder(WindowsFolder)
End if

If Left(Folder.Name, 1) <> "_" Then
%>
<table width="100%" border="1" cellspacing="0">
<tr>
<td>
<table width="100%" cellspacing="0" border="0">
<tr>
<td bgcolor="#EEEEEE"><%=Font%><strong>Verzeichnisliste Laufwerk <%=Left(Folder, 3)%></strong></td>
</tr>
</table>
</td>
</tr>
</table>
<table width="100%" height="100%" border="0" cellspacing="0">
<tr>
<td valign="top" width="35%" nowrap>
<table width="100%" height="100%" border="0" cellspacing="0">
<tr>
<td valign="top" width="100%" nowrap><%=Font%>
<img align="absmiddle" src="../images/drive.gif" border="0" WIDTH="16" HEIGHT="16"> <a href="v_verwaltung_folders.asp?Folder=<%=Folder.Drive.Path%>"><%=Folder.Drive & "\ " & Folder.Drive.VolumeName%></a><br>
<%

Set Drive = objFileSys.GetFolder(Left(Folder, 3))
Set RootFolder = Drive.SubFolders

For Each RootFolderPath in RootFolder
If Len(RootFolderPath.Path) < 10 Then
CompareLength = Len(RootFolderPath.Path)
Else
CompareLength = 10
End if

If Left(RootFolderPath.Path, CompareLength) <> Left(Folder.Path, CompareLength) And Mid(RootFolderPath.Path, CompareLength + 1, 1) <> "." Then
%>
<img align="absmiddle" src="../images/clsdfold.gif" border="0" WIDTH="16" HEIGHT="16"> <a href="v_verwaltung_folders.asp?Folder=<%=RootFolderPath.Path%>"><%=RootFolderPath.Name%></a><br>
<%
Else
DIM FolderArray(10)
' Response.Write Folder.Path
If Len(Folder.Path) > 3 Then
ParentFolder = objFileSys.GetParentFolderName(Folder.Path)
Set ParentFolderPath = objFileSys.GetFolder(ParentFolder)
Else
ParentFolder = ""
End if

i = 1

Do While Len(ParentFolder) > 3
If Len(ParentFolder) > 3 Then
FolderArray(i) = "<img align=""absmiddle"" src=""../images/openfold.gif"" border=""0"" WIDTH=""16"" HEIGHT=""16""> <a href=""v_verwaltung_folders.asp?Folder=" & ParentFolder & """>" & ParentFolderPath.Name & "</a><br>"
End if
ParentFolder = objFileSys.GetParentFolderName(ParentFolder)
Set ParentFolderPath = objFileSys.GetFolder(ParentFolder)
i = i + 1
Loop

Do While i > 0

%>
<%=Spacer%><%=FolderArray(i)%>
<%
Spacer = Spacer & " "
i = i - 1
Loop

If Folder.Name <> "" Then
%>
<%=Spacer%><img align="absmiddle" src="../images/openfold.gif" border="0" WIDTH="16" HEIGHT="16"> <a href="v_verwaltung_folders.asp?Folder=<%=Folder.Path%>"><%=Folder.Name%></a><br>
<%
Spacer = Spacer & " "
End if
Set FolderCol = Folder.SubFolders
For Each SubFolder in FolderCol
If Left(SubFolder.Name, 1) <> "_" Then
%>
<%=Spacer%><img align="absmiddle" src="../images/clsdfold.gif" border="0" WIDTH="16" HEIGHT="16"> <a href="v_verwaltung_folders.asp?Folder=<%=SubFolder.Path%>"><%=SubFolder.Name%></a><br>
<%
End if
Next
End if
Next

%>
</td>
</tr>
</table>
</td>
</tr>
</table>

<%
End if

Set Folder = Nothing

End sub

Set objFileSys = CreateObject("Scripting.FileSystemObject")

If Request("Folder") = "" Then
intoFold(objFileSys.GetSpecialFolder(WindowsFolder))
Else
IntoFold(Request("Folder"))
End if

Set objFileSys = Nothing

%>

</body>
</html>
' ------------------------------------------------

Kann man den verwenden? Es muß nicht asp sein, ich brauch einfach eine dynamische Sitemap. Also kann es auch eine andere Sprache sein.

Danke schon mal.


Croc
 

Neue Beiträge

Zurück