On Error Resume Next Set FSO = Server.CreateObject("Scripting.FileSystemObject") root = Server.Mappath(".") url = Request.ServerVariables("URL") webpath = left(url, instrrev(url, "/")) If path = "" or right(path, 1) = "/" or right(path, 1) = "\" then If instr(path, "/") > 0 then path = replace(path, "/", "\") End if If left(path, 1) <> "\" then path = "\" & path End if If right(path, 1) <> "\" then path = path & "\" End if If instr(path, "..") < 1 then uppath = left(replace(path, "\", "/"), instrrev(left(replace(path, "\", "/"), len(path)-1), "/")) If uppath = "" then uppath = "/" End if result = vbcrlf & "<!-- Begin STVGallery file list -->" & vbcrlf result = result & "<table border=""0"" cellspacing=""3"" cellpadding=""0"">" & vbcrlf result = result & " <tr>" & vbcrlf result = result & " <td width=""18"" align=""center""><a href=""" & webpath & "?p=" & uppath & """><img src=""" & imgpath & "folder_up.gif"" border=""0"" alt=""Tilbage""></a></td>" & vbcrlf result = result & " <td nowrap><a href=""" & webpath & "?p=" & uppath & """>Tilbage</a></td>" & vbcrlf result = result & " </tr>" & vbcrlf result = result & " <tr>" & vbcrlf result = result & " <td colspan=""2"" style=""height: 10px""></td>" & vbcrlf result = result & " </tr>" & vbcrlf If FSO.FolderExists(root & path) then Set dir = FSO.GetFolder(root & path) Set subdirs = dir.SubFolders For each subdir in subdirs If err.Number = 0 then result = result & " <tr>" & vbcrlf result = result & " <td align=""center""><a href=""" & webpath & "?p=" & replace(path, "\", "/") & subdir.name & "/""><img src=""" & imgpath & "folder.gif"" border=""0"" alt=""Folder""></a></td>" & vbcrlf & " <td nowrap><a href=""" & webpath & "?p=" & replace(path, "\", "/") & subdir.name & "/"">" & subdir.name & "</a></td>" & vbcrlf result = result & " </tr>" & vbcrlf Else result = result & " <tr>" & vbcrlf result = result & " <td></td><td>" & err.Description & "</td>" & vbcrlf result = result & " </tr>" & vbcrlf err.Clear End if Next Set subdirs = Nothing Set dirfiles = dir.Files For each dirfile in dirfiles For ext = 0 to ubound(ValidExt)-1 If instr(right(lcase(dirfile), 4), ValidExt(ext)) > 0 then result = result & " <tr>" & vbcrlf result = result & " <td align=""center""><a href=""" & webpath & "?p=" & replace(path, "\", "/") & dirfile.name & """><img src=""" & imgpath & "file.gif"" border=""0"" alt=""File""></a></td>" & vbcrlf & " <td nowrap><a href=""" & webpath & "?p=" & replace(path, "\", "/") & dirfile.name & """>" & dirfile.name & "</a></td>" & vbcrlf result = result & " </tr>" & vbcrlf End if Next Next Set dirfiles = Nothing Set dir = Nothing Else result = result & " <tr>" & vbcrlf result = result & " <td></td>" & vbcrlf result = result & " <td nowrap>Path not found</td>" & vbcrlf result = result & " </tr>" & vbcrlf End if result = result & "</table>" & vbcrlf result = result & "<!-- End STVGallery file list -->" & vbcrlf Else Response.Redirect(webpath) End if Else If instr(path, "/") > 0 then path = replace(path, "/", "\") End if If left(path, 1) <> "\" then path = "\" & path End if If instr(path, "..") < 1 then uppath = left(replace(path, "\", "/"), instrrev(left(replace(path, "\", "/"), len(path)-1), "/")) result = vbcrlf & "<!-- Begin STVGallery item display -->" & vbcrlf result = result & "<table border=""0"" cellspacing=""3"" cellpadding=""0"">" & vbcrlf result = result & " <tr>" & vbcrlf result = result & " <td width=""18"" align=""center""><a href=""" & webpath & "?p=" & uppath & """><img src=""" & imgpath & "folder_up.gif"" border=""0"" alt=""Up""></a></td>" & vbcrlf result = result & " <td nowrap><a href=""" & webpath & "?p=" & uppath & """>Tilbage</a></td>" & vbcrlf result = result & " </tr>" & vbcrlf result = result & "</table>" & vbcrlf If uppath = "" then uppath = "/" End if If FSO.FileExists(root & path) then Set imgfile = FSO.GetFile(root & path) imgname = imgfile.Name result = result & "<p align=""center""><a href=""" & webpath & "?p=" & replace(path, "\", "/") & """>" & imgname & "</a><br><br><img src=""" & webpath & right(replace(path, "\", "/"), len(path)-1) & """ alt=""" & imgname & """></p>" & vbcrlf Set imgfile = Nothing dirpath = left(path, len(path)-len(imgname)) Set dir = FSO.GetFolder(root & dirpath) Set dirfiles = dir.Files counter = 0 For each dirfile in dirfiles For ext = 0 to ubound(ValidExt)-1 If instr(right(lcase(dirfile), 4), ValidExt(ext)) > 0 then counter = counter + 1 If instr(dirfile, imgname) > 0 then imgfileloc = counter End if End if Next Next counter = 0 For each dirfile in dirfiles For ext = 0 to ubound(ValidExt)-1 If instr(right(lcase(dirfile), 4), ValidExt(ext)) > 0 then counter = counter + 1 If counter = imgfileloc-1 then prevfile = dirfile.name prevfileloc = counter End if If counter = imgfileloc+1 then nextfile = dirfile.name nextfileloc = counter End if End if Next Next Set dirfiles = Nothing Set dir = Nothing result = result & "<table width=""100%"" border=""0"" cellspacing=""3"" cellpadding=""0"">" & vbcrlf result = result & " <tr>" & vbcrlf result = result & " <td width=""50%"" nowrap>" If prevfile <> "" then result = result & "<a href=""" & webpath & "?p=" & replace(dirpath, "\", "/") & prevfile & """><<< Previous</a>" End if result = result & "</td>" & vbcrlf result = result & " <td width=""50%"" nowrap align=""right"">" If nextfile <> "" then result = result & "<a href=""" & webpath & "?p=" & replace(dirpath, "\", "/") & nextfile & """>Next >>></a>" End if result = result & "</td>" & vbcrlf result = result & " </tr>" & vbcrlf result = result & "</table>" & vbcrlf result = result & "<!-- End STVGallery item display -->" & vbcrlf Else If err.Number = 0 then result = result & "<br> File not found" Else result = result & "<br> " & err.Description err.Clear End if End if Else Response.Redirect(webpath) End if End if Set FSO = Nothing STVGallery = result End function %>
I dette særtema ser vi på, hvordan cloud og AI bliver fundamentet for virksomhedernes digitale forretning, og hvordan de nye muligheder for automatisering og forretningsværdi kan udnyttes uden at miste overblik, sikkerhed og menneskelig kontrol.
On Error Resume Next Set FSO = Server.CreateObject("Scripting.FileSystemObject") root = Server.Mappath(".") url = Request.ServerVariables("URL") webpath = left(url, instrrev(url, "/")) If path = "" or right(path, 1) = "/" or right(path, 1) = "\" then If instr(path, "/") > 0 then path = replace(path, "/", "\") End if If left(path, 1) <> "\" then path = "\" & path End if If right(path, 1) <> "\" then path = path & "\" End if If instr(path, "..") < 1 then uppath = left(replace(path, "\", "/"), instrrev(left(replace(path, "\", "/"), len(path)-1), "/")) If uppath = "" then uppath = "/" End if result = vbcrlf & "<!-- Begin STVGallery file list -->" & vbcrlf result = result & "<table border=""1"" cellspacing=""3"" cellpadding=""0"">" & vbcrlf result = result & " <tr>" & vbcrlf result = result & " <td width=""18"" align=""center""><a href=""" & webpath & "?p=" & uppath & """><img src=""" & imgpath & "folder_up.gif"" border=""0"" alt=""Tilbage""></a></td>" & vbcrlf result = result & " <td nowrap><a href=""" & webpath & "?p=" & uppath & """>Tilbage</a></td>" & vbcrlf result = result & " </tr>" & vbcrlf result = result & " <tr>" & vbcrlf result = result & " <td colspan=""2"" style=""height: 10px""></td>" & vbcrlf result = result & " </tr>" & vbcrlf If FSO.FolderExists(root & path) then Set dir = FSO.GetFolder(root & path) Set subdirs = dir.SubFolders For each subdir in subdirs If err.Number = 0 then result = result & " <tr>" & vbcrlf result = result & " <td align=""center""><a href=""" & webpath & "?p=" & replace(path, "\", "/") & subdir.name & "/""><img src=""" & imgpath & "folder.gif"" border=""0"" alt=""Folder""></a></td>" & vbcrlf & " <td nowrap><a href=""" & webpath & "?p=" & replace(path, "\", "/") & subdir.name & "/"">" & subdir.name & "</a></td>" & vbcrlf result = result & " </tr>" & vbcrlf Else result = result & " <tr>" & vbcrlf result = result & " <td></td><td>" & err.Description & "</td>" & vbcrlf result = result & " </tr>" & vbcrlf err.Clear End if Next Set subdirs = Nothing Set dirfiles = dir.Files
result = result & "<tr>" & vbcrlf i = 0
For each dirfile in dirfiles For ext = 0 to ubound(ValidExt)-1 If instr(right(lcase(dirfile), 4), ValidExt(ext)) > 0 then i = I + 1
if i > 5 then ' tallet angiver hvor mange kolonner billederne skal vises i result = result & "</tr><tr>" & vbcrlf i = 1 end if
Set dirfiles = Nothing Set dir = Nothing Else result = result & " <tr>" & vbcrlf result = result & " <td></td>" & vbcrlf result = result & " <td nowrap>Path not found</td>" & vbcrlf result = result & " </tr>" & vbcrlf End if result = result & "</table>" & vbcrlf result = result & "<!-- End STVGallery file list -->" & vbcrlf Else Response.Redirect(webpath) End if Else If instr(path, "/") > 0 then path = replace(path, "/", "\") End if If left(path, 1) <> "\" then path = "\" & path End if If instr(path, "..") < 1 then uppath = left(replace(path, "\", "/"), instrrev(left(replace(path, "\", "/"), len(path)-1), "/")) result = vbcrlf & "<!-- Begin STVGallery item display -->" & vbcrlf result = result & "<table border=""0"" cellspacing=""3"" cellpadding=""0"">" & vbcrlf result = result & " <tr>" & vbcrlf result = result & " <td width=""18"" align=""center""><a href=""" & webpath & "?p=" & uppath & """><img src=""" & imgpath & "folder_up.gif"" border=""0"" alt=""Up""></a></td>" & vbcrlf result = result & " <td nowrap><a href=""" & webpath & "?p=" & uppath & """>Tilbage</a></td>" & vbcrlf result = result & " </tr>" & vbcrlf result = result & "</table>" & vbcrlf If uppath = "" then uppath = "/" End if If FSO.FileExists(root & path) then Set imgfile = FSO.GetFile(root & path) imgname = imgfile.Name result = result & "<p align=""center""><a href=""" & webpath & "?p=" & replace(path, "\", "/") & """>" & imgname & "</a><br><br><img src=""" & webpath & right(replace(path, "\", "/"), len(path)-1) & """ alt=""" & imgname & """></p>" & vbcrlf Set imgfile = Nothing dirpath = left(path, len(path)-len(imgname)) Set dir = FSO.GetFolder(root & dirpath) Set dirfiles = dir.Files counter = 0 For each dirfile in dirfiles For ext = 0 to ubound(ValidExt)-1 If instr(right(lcase(dirfile), 4), ValidExt(ext)) > 0 then counter = counter + 1 If instr(dirfile, imgname) > 0 then imgfileloc = counter End if End if Next Next counter = 0 For each dirfile in dirfiles For ext = 0 to ubound(ValidExt)-1 If instr(right(lcase(dirfile), 4), ValidExt(ext)) > 0 then counter = counter + 1 If counter = imgfileloc-1 then prevfile = dirfile.name prevfileloc = counter End if If counter = imgfileloc+1 then nextfile = dirfile.name nextfileloc = counter End if End if Next Next Set dirfiles = Nothing Set dir = Nothing result = result & "<table width=""100%"" border=""0"" cellspacing=""3"" cellpadding=""0"">" & vbcrlf result = result & " <tr>" & vbcrlf result = result & " <td width=""50%"" nowrap>" If prevfile <> "" then result = result & "<a href=""" & webpath & "?p=" & replace(dirpath, "\", "/") & prevfile & """><<< Previous</a>" End if result = result & "</td>" & vbcrlf result = result & " <td width=""50%"" nowrap align=""right"">" If nextfile <> "" then result = result & "<a href=""" & webpath & "?p=" & replace(dirpath, "\", "/") & nextfile & """>Next >>></a>" End if result = result & "</td>" & vbcrlf result = result & " </tr>" & vbcrlf result = result & "</table>" & vbcrlf result = result & "<!-- End STVGallery item display -->" & vbcrlf Else If err.Number = 0 then result = result & "<br> File not found" Else result = result & "<br> " & err.Description err.Clear End if End if Else Response.Redirect(webpath) End if End if Set FSO = Nothing STVGallery = result End function %>
Tilladte BB-code-tags: [b]fed[/b] [i]kursiv[/i] [u]understreget[/u] Web- og emailadresser omdannes automatisk til links. Der sættes "nofollow" på alle links.