<% ' /////////////////////////////////////////////////////// ' // Dimac CMS ' // Copyright 2004-2008 Dimac Development AB, Sweden ' // www.Dimac.net ' // ' // NOTE: ' // You are not allowed to remove this ' // Copyright information without written ' // permission from Dimac Development. ' /////////////////////////////////////////////////////// If NOT CBool(Session("ValidAdminUser")) Then Response.Redirect("../LIO/loggin.asp") End IF vMediaArchiveStartRoot = "SiteResources/data/MediaArchive/" vSubFolder = Request.ServerVariables("SCRIPT_NAME") vSubFolder = Mid(vSubFolder,1, InStr(LCase(vSubFolder),"/cmsadmin/site/default_image2.asp")) imgFolder = "../../SiteResources/data/MediaArchive/images" 'Locate your image folder here ' // imgFolder2 = ImagePreviewRoot + MediaArchiveStartRoot + "images" 'imgFolder2 = vMediaArchivePreviewRoot + vMediaArchiveStartRoot + "images" imgFolder2 = vSubFolder + vMediaArchiveStartRoot + "images" If request.QueryString("xField") <> "" then Session("imageField") = request.QueryString("xField") End IF '~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ %> <%=langLabelImages%> <% dim objFSO dim objMainFolder dim strOptions dim strHTML dim catid strHTML = "" set objFSO = server.CreateObject ("Scripting.FileSystemObject") set objMainFolder = objFSO.GetFolder(server.MapPath(imgFolder)) catid = CStr(request("catid")) if catid="" then catid = objMainFolder.path dim objTempFSO dim objTempFolder dim objTempFiles dim objTempFile set objTempFSO = server.CreateObject ("Scripting.FileSystemObject") set objTempFolder = objTempFSO.GetFolder (catid) set objTempFiles = objTempFolder.files strHTML = strHTML & "" for each objTempFile in objTempFiles '*********** 'objTempFile.path => image physical path 'basePath => base path set basePath = objFSO.GetFolder(server.MapPath(imgFolder)) PhysicalPathWithoutBase = Replace(objTempFile.path,basePath.path,"") sTmp = replace(PhysicalPathWithoutBase,"\","/")'fix from physical to virtual ' sCurrImgPath = imgFolder & sTmp sCurrImgPath = imgFolder2 & sTmp '*********** strHTML = strHTML & "" strHTML = strHTML & "" 'strHTML = strHTML & "" strHTML = strHTML & "" strHTML = strHTML & "" 'strHTML = strHTML & "" next strHTML = strHTML & "
" & objTempFile.name & "" & objTempFile.type & "" & FormatNumber(objTempFile.size/1000,0) & " kb" & langLabelSelect & "del
" Function createCategoryOptions(pi_objFolder) dim objFolder dim objFolders set objFolders = pi_objfolder.SubFolders for each objFolder in objFolders 'Recursive programming starts here createCategoryOptions objFolder next if pi_objFolder.attributes and 2 then 'hidden folder then do nothing else '*********** set basePath = objFSO.GetFolder(server.MapPath(imgFolder)) 'response.Write catid & " - " & oo.path Response.Write Replace(pi_objFolder.path,basePath.path,"") '*********** if CStr(catid)=CStr(pi_objFolder.path) then strOptions = strOptions & "" & vbCrLf else strOptions = strOptions & "" & vbCrLf end if end if strOptions = strOptions & vbCrLf createCategoryOptions = strOptions End Function function ConstructPath(str) str = mid(str,len(server.MapPath ("./"))+1) ConstructPath = replace(str,"\","/") end function %>
id=form2 name=form2>
<%=langLabelSelectFolder%> : 
<%=langLabelFileName%>
<%=strHTML%>

<%=langLabelImageSource%>: