<%
'##### End Display Folders ######
'##### Begin Display Images ######
ElseIf dirFile = "DISPLAYIMAGES" Then
strBaseDir = BaseDir
If strBaseDir <> "" Then strBaseDir = strBaseDir Else strBaseDir = ""
If NOT InStr(f1, "tn-") > 0 AND NOT InStr(LCase(f1), "thumbs.db") > 0 Then ' Hide Non-Thumnails & Thumbs.db In View
'##### Original Image Size ######
'FileExt = fExt(f1.Name)
'Select Case FileExt
'Case "jpg", "jpeg", "gif", "bmp", "png"
'ImagePath = UploadPath &"\"& strImageFolder &"\" & strimage
'If gfxSpex(Replace(f1.Path,"tn-",""), width, height, colors, strType) = True Then
'ImageWidth = width
'ImageHeight = height
'End If
'End Select
If Nailer Then
'If ImageWidth > 145 Then
strwidth = "145"
'strheight = Round(145*ImageHeight/ImageWidth,0)
strimagesrc = ""
'Else
'strwidth = ImageWidth
'strHeight = ImageHeight
'strimagesrc = ""
'End If
Else
'If ImageWidth > 145 Then
strwidth = "145"
'strheight = Round(145*ImageHeight/ImageWidth,0)
'Else
'strwidth = ImageWidth
'strHeight = ImageHeight
'End If
strimagesrc = ""
End If
If (RecordsCount >= (intPage * RecordsPerPage)) and (RecordsCount < (intPage * RecordsPerPage) + RecordsPerPage) Then
If NOT i MOD RecordsPerRow = 0 Then
strImageName = f1.name
QS = "?image="&URLSpace(Replace(strImageName,"tn-",""))&"&folder="&URLSpace(BaseDir)&"&page="&intPage
%>
width="245"<% Else %>width="155"<% End If %> bgcolor="#f4f4f4" onMouseOver="this.bgColor='#efefef'" onMouseOut="this.bgColor='#f7f7f7'" valign="top" nowrap>
<%
'####################################
'## Application: Blue-Collar Productions
'## File Name: igallery.inc
'## Copyright: This code is copyrighted. Please see http://www.b-cp.com for details.
'## Notice: This code has limited warranties. Please see http://www.b-cp.com for details.
'####################################
%>
<%
strimage = Replace(f1.Name,"tn-","")
strfolder = BaseDir
Set RS1 = Server.CreateObject("ADODB.RecordSet")
Set GalleryConn1 = Server.CreateObject ("ADODB.Connection")
GalleryConn1.Open strConnect
SQL1 = "SELECT * FROM Descriptions " & _
"WHERE imagename ='" & strimage & _
"' AND folder ='" & Replace(strfolder,"'","''") & _
"' "
RS1.Open SQL1, GalleryConn1, adOpenStatic, adLockReadOnly, adCmdText
If RS1.EOF And RS1.BOF Then
strtitle1 = strimage
If Session("userLevel") = "99" OR Session("userLevel") = "98" Then
strtitle2 = CropIt(strimage,TitleMax+10)
Else
strtitle2 = CropIt(strimage,TitleMax)
End If
strdescription1 = ""
Else
If RS1("title") <> "" Then
strtitle1 = RS1("title")
strtitle2 = RS1("title")
Else
strtitle1 = strimage
If Session("userLevel") = "99" OR Session("userLevel") = "98" Then
strtitle2 = CropIt(strimage,TitleMax+10)
Else
strtitle2 = CropIt(strimage,TitleMax)
End If
End If
strid = RS1("ID")
strdescription1 = RS1("description")
strviews = RS1("total")
strvotes = RS1("votes")
strrating = RS1("rating")
strdateadded = RS1("dateadded")
End If
RS1.Close
GalleryConn1.Close
'DotPosition = InStrRev(f1.name, ".")
'FileExt = Mid(f1.name,DotPosition + 1)
'FileExt = LCase(FileExt)
FileExt = fExt(f1.name)
qs1="vote.asp?link="&strid&"&image="&URLSpace(Replace(f1.Name,"'","\'"))&"&folder="&URLSpace(Replace(strfolder,"'","\'"))&"&page="&intPage
imgnew12 = ""
imgnew8 = ""
imgnew4 = ""
imgnew0 = ""
if DateDiff("d",strdateadded,Date())>"" and DateDiff("d",strdateadded,Date())<8 then
strhistory = imgnew12
elseif DateDiff("d",strdateadded,Date())>7 and DateDiff("d",strdateadded,Date())<15 then
strhistory = imgnew8
elseif DateDiff("d",strdateadded,Date())>14 and DateDiff("d",strdateadded,Date())<22 then
strhistory = imgnew4
else
strhistory = imgnew0
end if
%>
<%= strtitle2 %>
<% If History Then %>
<%= strhistory %>
<% End If %>
<%
Select Case FileExt
Case "jpg", "jpeg", "gif", "bmp", "png"
%>
<% If Session("userLevel") = "99" OR Session("userLevel") = "98" Then %>
<% If gfxSpex(Replace(f1.Path,"tn-",""), width, height, colors, strType) = True Then %>
<%= IGi_ht %>:
<%= height %>
<%= IGi_wd %>:
<%= width %>
<% Else %>
<%= IGi_ht %>:
<%= IGi_un %>
<%= IGi_wd %>:
<%= IGi_un %>
<%
End If
If DateFormat = 1 Then
modified = USDate(f1.DateLastModified)
ElseIf DateFormat = 2 Then
modified = EuroDate(f1.DateLastModified)
Else
modified = FormatDateTime(f1.DateLastModified,2)
End If
%>
width="245"<% Else %>width="155"<% End If %> bgcolor="#f4f4f4" onMouseOver="this.bgColor='#efefef'" onMouseOut="this.bgColor='#f7f7f7'" valign="top" nowrap>
<%
'####################################
'## Application: Blue-Collar Productions
'## File Name: igallery.inc
'## Copyright: This code is copyrighted. Please see http://www.b-cp.com for details.
'## Notice: This code has limited warranties. Please see http://www.b-cp.com for details.
'####################################
%>
<%
strimage = Replace(f1.Name,"tn-","")
strfolder = BaseDir
Set RS1 = Server.CreateObject("ADODB.RecordSet")
Set GalleryConn1 = Server.CreateObject ("ADODB.Connection")
GalleryConn1.Open strConnect
SQL1 = "SELECT * FROM Descriptions " & _
"WHERE imagename ='" & strimage & _
"' AND folder ='" & Replace(strfolder,"'","''") & _
"' "
RS1.Open SQL1, GalleryConn1, adOpenStatic, adLockReadOnly, adCmdText
If RS1.EOF And RS1.BOF Then
strtitle1 = strimage
If Session("userLevel") = "99" OR Session("userLevel") = "98" Then
strtitle2 = CropIt(strimage,TitleMax+10)
Else
strtitle2 = CropIt(strimage,TitleMax)
End If
strdescription1 = ""
Else
If RS1("title") <> "" Then
strtitle1 = RS1("title")
strtitle2 = RS1("title")
Else
strtitle1 = strimage
If Session("userLevel") = "99" OR Session("userLevel") = "98" Then
strtitle2 = CropIt(strimage,TitleMax+10)
Else
strtitle2 = CropIt(strimage,TitleMax)
End If
End If
strid = RS1("ID")
strdescription1 = RS1("description")
strviews = RS1("total")
strvotes = RS1("votes")
strrating = RS1("rating")
strdateadded = RS1("dateadded")
End If
RS1.Close
GalleryConn1.Close
'DotPosition = InStrRev(f1.name, ".")
'FileExt = Mid(f1.name,DotPosition + 1)
'FileExt = LCase(FileExt)
FileExt = fExt(f1.name)
qs1="vote.asp?link="&strid&"&image="&URLSpace(Replace(f1.Name,"'","\'"))&"&folder="&URLSpace(Replace(strfolder,"'","\'"))&"&page="&intPage
imgnew12 = ""
imgnew8 = ""
imgnew4 = ""
imgnew0 = ""
if DateDiff("d",strdateadded,Date())>"" and DateDiff("d",strdateadded,Date())<8 then
strhistory = imgnew12
elseif DateDiff("d",strdateadded,Date())>7 and DateDiff("d",strdateadded,Date())<15 then
strhistory = imgnew8
elseif DateDiff("d",strdateadded,Date())>14 and DateDiff("d",strdateadded,Date())<22 then
strhistory = imgnew4
else
strhistory = imgnew0
end if
%>
<%= strtitle2 %>
<% If History Then %>
<%= strhistory %>
<% End If %>
<%
Select Case FileExt
Case "jpg", "jpeg", "gif", "bmp", "png"
%>
<% If Session("userLevel") = "99" OR Session("userLevel") = "98" Then %>
<% If gfxSpex(Replace(f1.Path,"tn-",""), width, height, colors, strType) = True Then %>
<%= IGi_ht %>:
<%= height %>
<%= IGi_wd %>:
<%= width %>
<% Else %>
<%= IGi_ht %>:
<%= IGi_un %>
<%= IGi_wd %>:
<%= IGi_un %>
<%
End If
If DateFormat = 1 Then
modified = USDate(f1.DateLastModified)
ElseIf DateFormat = 2 Then
modified = EuroDate(f1.DateLastModified)
Else
modified = FormatDateTime(f1.DateLastModified,2)
End If
%>
<%
End If
End If
RecordsCount = RecordsCount + 1
If rowcount = RecordsPerRow Then rowcount = 0
rowcount = rowcount + 1
i = i + 1
End If
%>
<%
'##### End Display Images ######
End If
End Sub
'################# End SUB DisplayGallery Folder & Object Set-Up #################
%>
.:: <%= GalleryVersion %> Main Folder ::.
<%
'####################################
'i-Gallery LOGO;
'I don't mind if you remove the header but if you intend to use i-Gallery on your site please
'provide a link back to the software on the pages powered by i-Gallery. Thanks for all your
'support!
'####################################
%>
<%
On Error Resume Next
folderc = 0
For Each fn1 In FileList
folderc = folderc +1
Next
currentf = 1
For Each fn In FileList
If NOT LCase(fn.Name) = "_vti_cnf" Then ' Hide Front Page "_vti_cnf" Folder In Menu
If Request("D") Then
String1 = LCase(Request("D"))
Else
String1 = "\"&LCase(Replace(Request("folder"),"/","\"))&"\"
End If
String2 = "\"&LCase(fn.Name)&"\"
If InStr(String1,String2)>0 Then
ShowFolder = True
Else
ShowFolder = False
End if
If len(fn.Name) > 30 Then
FolderName = Left(fn.Name,30)&"..."
Else
FolderName = fn.Name
End if
Directory = fn
Directory = Replace(LCase(Directory),LCase(UploadPath),"")
Directory = URLSpace(Directory)
%>
<%
Set FileList1 = fn.SubFolders
For Each fn1 in FileList1
If NOT LCase(fn1.Name) = "_vti_cnf" Then ' Hide Front Page "_vti_cnf" Folder In Menu
If ShowFolder Then
If Request("D") Then
String1a = LCase(Request("D"))
Else
String1a = "\"&LCase(Replace(Request("folder"),"/","\"))&"\"
End If
String2a = "\"&LCase(fn1.Name)&"\"
If InStr(String1a,String2a)>0 Then
ShowFolder1 = True
Else
ShowFolder1 = False
End if
If len(fn1.Name) > 23 Then
FolderName = Left(fn1.Name,23)&"..."
Else
FolderName = fn1.Name
End if
Directory1 = fn1
Directory1 = Replace(LCase(Directory1),LCase(UploadPath),"")
Directory1 = URLSpace(Directory1)
%>
<% If currentf = folderc Then %><% Else %><% End If %>
<%
Set FileList2 = fn1.SubFolders
For Each fn2 in FileList2
If NOT LCase(fn2.Name) = "_vti_cnf" Then ' Hide Front Page "_vti_cnf" Folder In Menu
If ShowFolder Then
If Request("D") Then
String1b = LCase(Request("D"))
Else
String1b = "\"&LCase(Replace(Request("folder"),"/","\"))&"\"
End If
String2b = "\"&LCase(fn2.Name)&"\"
If InStr(String1b,String2b)>0 Then
ShowFolder2 = True
Else
ShowFolder2 = False
End if
If len(fn2.Name) > 20 Then
FolderName = Left(fn2.Name,20)&"..."
Else
FolderName = fn2.Name
End If
Directory2 = fn2
Directory2 = Replace(LCase(Directory2),LCase(UploadPath),"")
Directory2 = URLSpace(Directory2)
%>
<% If currentf = folderc Then %><% Else %><% End If %>
<%
Set FileList3 = fn2.SubFolders
For Each fn3 in FileList3
If NOT LCase(fn3.Name) = "_vti_cnf" Then ' Hide Front Page "_vti_cnf" Folder In Menu
If ShowFolder Then
If Request("D") Then
String1c = LCase(Request("D"))
Else
String1c = "\"&LCase(Replace(Request("folder"),"/","\"))&"\"
End If
String2c = "\"&LCase(fn3.Name)&"\"
If InStr(String1c,String2c)>0 Then
ShowFolder3 = True
Else
ShowFolder3 = False
End if
If len(fn3.Name) > 17 Then
FolderName = Left(fn3.Name,17)&"..."
Else
FolderName = fn3.Name
End if
Directory3 = fn3
Directory3 = Replace(LCase(Directory3),LCase(UploadPath),"")
Directory3 = URLSpace(Directory3)
%>
<% If currentf = folderc Then %><% Else %><% End If %>
<%
'################ Begin Display Folder & Object Layout ################
Sub iGallery
Set f = fso.GetFolder(fsDir)
Set FileList = f.subFolders
Dim emptyDir
emptyDir = TRUE
If TopLevel Then
Parent = ""
%>
<%
'On Error Resume Next
fi = 1
fpr = FoldersPerRow
For Each fn in FileList
emptyDir = FALSE
If Not LCase(fn.Name) = "_vti_cnf" Then
If Not fi Mod fpr = 0 then
%>
<% DisplayGallery "DISPLAYFOLDERS",fn %>
<% Else %>
<% DisplayGallery "DISPLAYFOLDERS",fn %>
<%
End If
fi = fi + 1
End If
Next
%>
<%
Set filelist = f.Files
If Nailer Then
For Each fn in filelist
emptyDir = FALSE
DisplayGallery "DISPLAYIMAGES",fn
Next
Else
For Each fn in filelist
emptyDir = FALSE
If NOT InStr(LCase(fn.Name), "tn-") > 0 Then
DisplayGallery "DISPLAYIMAGES",fn
End If
Next
End If
%>
<%
If Request("Page") = "" Then
CurrentPage = 0
Else
CurrentPage = CInt(Request("Page"))
End If
PageCount = Round((RecordsCount/RecordsPerPage),1)
'If (PageCount > 1) Then PageCount = int(PageCount) + 1
If InStrRev(PageCount, ".") > 0 Then
DotPosition = InStrRev(PageCount, ".")
Decimal = Mid(PageCount,DotPosition + 1)
If Decimal <= 5 Then
PageCount = Round(PageCount+.5,0)
Else
PageCount = Round(PageCount,0)
End If
Else
PageCount = Round(PageCount,0)
End If
%>
<%
lastrowtotal = rowcount-1
blankspaces = RecordsPerRow - lastrowtotal
If NOT CurrentPage+1 < PageCount AND NOT TopLevel AND NOT blankspaces = RecordsPerRow Then
Select Case blankspaces
Case 1
%>
width="245"<% Else %>width="155"<% End If %> bgcolor="#f4f4f4" onMouseOver="this.bgColor='#efefef'" onMouseOut="this.bgColor='#f7f7f7'" valign="top" nowrap>
<%
Case 2
%>
width="245"<% Else %>width="155"<% End If %> bgcolor="#f4f4f4" onMouseOver="this.bgColor='#efefef'" onMouseOut="this.bgColor='#f7f7f7'" valign="top" nowrap>
width="245"<% Else %>width="155"<% End If %> bgcolor="#f4f4f4" onMouseOver="this.bgColor='#efefef'" onMouseOut="this.bgColor='#f7f7f7'" valign="top" nowrap>
<%
Case 3
%>
width="245"<% Else %>width="155"<% End If %> bgcolor="#f4f4f4" onMouseOver="this.bgColor='#efefef'" onMouseOut="this.bgColor='#f7f7f7'" valign="top" nowrap>
width="245"<% Else %>width="155"<% End If %> bgcolor="#f4f4f4" onMouseOver="this.bgColor='#efefef'" onMouseOut="this.bgColor='#f7f7f7'" valign="top" nowrap>
width="245"<% Else %>width="155"<% End If %> bgcolor="#f4f4f4" onMouseOver="this.bgColor='#efefef'" onMouseOut="this.bgColor='#f7f7f7'" valign="top" nowrap>
<%
Case 4
%>
width="245"<% Else %>width="155"<% End If %> bgcolor="#f4f4f4" onMouseOver="this.bgColor='#efefef'" onMouseOut="this.bgColor='#f7f7f7'" valign="top" nowrap>
width="245"<% Else %>width="155"<% End If %> bgcolor="#f4f4f4" onMouseOver="this.bgColor='#efefef'" onMouseOut="this.bgColor='#f7f7f7'" valign="top" nowrap>
width="245"<% Else %>width="155"<% End If %> bgcolor="#f4f4f4" onMouseOver="this.bgColor='#efefef'" onMouseOut="this.bgColor='#f7f7f7'" valign="top" nowrap>
width="245"<% Else %>width="155"<% End If %> bgcolor="#f4f4f4" onMouseOver="this.bgColor='#efefef'" onMouseOut="this.bgColor='#f7f7f7'" valign="top" nowrap>
<%
Case 5
%>
width="245"<% Else %>width="155"<% End If %> bgcolor="#f4f4f4" onMouseOver="this.bgColor='#efefef'" onMouseOut="this.bgColor='#f7f7f7'" valign="top" nowrap>
width="245"<% Else %>width="155"<% End If %> bgcolor="#f4f4f4" onMouseOver="this.bgColor='#efefef'" onMouseOut="this.bgColor='#f7f7f7'" valign="top" nowrap>
width="245"<% Else %>width="155"<% End If %> bgcolor="#f4f4f4" onMouseOver="this.bgColor='#efefef'" onMouseOut="this.bgColor='#f7f7f7'" valign="top" nowrap>
width="245"<% Else %>width="155"<% End If %> bgcolor="#f4f4f4" onMouseOver="this.bgColor='#efefef'" onMouseOut="this.bgColor='#f7f7f7'" valign="top" nowrap>
width="245"<% Else %>width="155"<% End If %> bgcolor="#f4f4f4" onMouseOver="this.bgColor='#efefef'" onMouseOut="this.bgColor='#f7f7f7'" valign="top" nowrap>
<%
End Select
End If
%>
<%
'####################################
'## Application: Blue-Collar Productions
'## File Name: paging-ig.asp
'## File Version: 4.0
'## Notice: This code has limited warranties. Please see http://www.b-cp.com for details.
'####################################
%>
<%
CurrentUrl = "http://" & Request.ServerVariables("HTTP_HOST") & Request.ServerVariables("PATH_INFO")
CurrentUrl = CurrentUrl & "?d=" & Request("d") & "&page="
If CurrentPage <> 0 Then
pgHTML = "
"
Else
' Determine last page [ - X]
If i+9 > PageCount Then
lastx = PageCount
Else
lastx = i+9
If lastx = 10 Then
lastx = 9
End If
End If
pgHTML = pgHTML & "
<% If PageCount > 1 Then %>
<%= IG_pg1 %> [<%= CurrentPage+1 %> <%= IG_pg2 %> <%= PageCount %>]
<% End If %>
<%= pgHTML %>
<% End If %>
<% If TopLevel AND emptyDir Then %>
<% If Session("userLevel") = "99" OR Session("userLevel") = "98" Then %>
<%= IG_erfm1 %>
<% Else %>
<%= IG_erfm2 %>
<% End If %>
<% End If %>
<% If Session("userLevel") = "99" OR Session("userLevel") = "98" Then %>
<% If NOT TopLevel AND emptyDir AND RecordsCount = "0" Then %>
<% End If %>
<% If Nailer AND Not TopLevel AND NOT RecordsCount = "0" Then %>
<% If Session(BaseDir&"-sync") = 1 Then %><% End If %>
<% End If %>
<%
Dim CurrentDir
CurrentDir = Replace(BaseDir,"/","\")
Dim ParentDir
ParentDir = Replace(Parent,LCase(UploadPath),"")
'ParentDir = Right(ParentDir,Len(ParentDir)-1)
ParentDir = Replace(ParentDir,"\","/")
%>
<% If NOT TopLevel Then %>
<% End If %>
<% Else %>
<% If Not TopLevel AND RecordsCount = "0" Then %>
<%= IG_edm %>
<% End If %>
<% End If %>
<% If Session("userLevel") = "99" OR Session("userLevel") = "98" Then %>
<%
Directory = f
Directory = Replace(LCase(Directory),LCase(UploadPath),"")
Directory = Replace(Directory,"\\","\")
%>
<%
'####################################
'Powered By: i-Gallery
'I don't mind if you remove the footer but if you intend to use i-Gallery on your site please
'provide a link back to the software on the pages powered by i-Gallery. Thanks for all your
'support!
'####################################
menuPage = Request.ServerVariables("Script_Name")
menuPage = Mid(menuPage,InstrRev(menuPage,"/") + 1)
%>
<% If History AND menuPage = "igallery.asp" Then %>
<%
End Sub
'################ End Display Folder & Object Layout ################
%>
<%
'################ Create New Folder ################
Sub CreateFolder
fn = fn
fn = Replace(fn,"\","")
fn = Replace(fn,"/","")
fn = Replace(fn,":","")
fn = Replace(fn,"?","")
fn = Replace(fn,"<","")
fn = Replace(fn,">","")
fn = Replace(fn,"|","")
fn = Replace(fn,chr(42),"")
fn = Replace(fn,chr(34),"")
PathOrig = Request.QueryString("D")
PathName = PathOrig & fn
PathCurrent = Request.QueryString("C")
PathCurrent = "\"&PathCurrent&"\"
NewFolderRedirect = PathCurrent&fn&"\"
PathRename = Request.QueryString("PARENT") & fn
OldDirectory = LCase(Request.QueryString("OFOLDER"))
If Request.QueryString("PFOLDER") <> "" Then
NewDirectory = LCase(Request.QueryString("PFOLDER") &"/"& fn)
Else
NewDirectory = LCase(fn)
End If
PathParent = Request.QueryString("PARENT")
RenameFolderRedirect = PathParent&"\"&fn&"\"
If right(PathName,1) = "\" Then PathName = Left(PathName,len(PathName)-1)
Select Case UCase(Request.QueryString("T"))
Case "F" 'Create Folder
If NOT fso.FolderExists(PathName) Then
Set f = fso.CreateFolder(PathName)
response.redirect "igallery.asp?d="&URLSpace(NewFolderRedirect)
Else
response.redirect "igallery.asp?d="&URLSpace(PathCurrent)
End If
Case "R" 'Rename Folder
If fso.FolderExists(PathOrig) Then
Set f = fso.GetFolder(PathOrig)
f.Name = fn
' Batch Folder Update
Set renameConn = Server.CreateObject("ADODB.Connection")
Set RS = Server.CreateObject("ADODB.Recordset")
renameConn.Open strConnect
Set RS.ActiveConnection = renameConn
RS.CursorType = adOpenStatic
RS.LockType = adLockBatchOptimistic
SQL = "SELECT * FROM Descriptions"
SQL = SQL & " WHERE (1=1) "
RS.Open SQL,,,adCmdTable
While Not RS.EOF
If Instr(RS("folder"),OldDirectory) Then
strnewdir = Replace(RS("folder"),OldDirectory,rURLSpace(NewDirectory))
RS("folder") = rURLSpace(strnewdir)
End if
RS.MoveNext
Wend
RS.UpdateBatch
RS.close
Set RS = Nothing
' End Batch Folder Update
response.redirect "igallery.asp?d="&URLSpace(RenameFolderRedirect)
Else
response.redirect "igallery.asp?d="&URLSpace(PathCurrent)
End If
End Select
End Sub
%>
<%
'################ Begin Main Guts ################
' Root Image Directory
fsDir = LCase(UploadPath&Request("d"))
fsDir = Replace(fsDir,"\..","")
fsDir = Replace(fsDir,"..","")
If fsDir = UploadPath Then fsDir = Request.Form("fsDir")
fsRoot = LCase(UploadPath)&"\"
If Instr(fsdir,fsroot) <> 1 Then fsDir = fsRoot
If Lcase(fsDir) = Lcase(fsRoot) Then TopLevel = TRUE
' Base Image Directory
Dim BaseDir
BaseDir = Replace(Mid(fsDir,len(fsRoot),250),"\","/")
BaseDir = Left(BaseDir,Len(BaseDir)-1)
BaseDir = Right(BaseDir,Len(BaseDir)-1)
' Form Action
Action = Request.Form("POSTACTION")
PathName = Request.Form("PATHNAME")
' Delete Empty Folders
Select Case UCase(Action)
Case "DELETE"
If Request.Form("OK") = "on" Then
PathParent = Request.Form("PARENT")
If Instr(PathName,fsroot) = 1 Then
fso.DeleteFolder Left(PathName,Len(PathName)-1),TRUE
response.redirect "igallery.asp?d="&URLSpace(PathParent)&"\"
End If
End If
If Request.Form("DELETEOK") = "on" Then
If Instr(PathName,fsroot) = 1 Then
If fso.FileExists(Request.Form("PathName")) Then
Set f = fso.GetFile(Request.Form("PathName"))
f.delete
End If
End If
End If
End Select
' Choose Re-Direct
If Action <> "" Then
tstr = "igallery.asp?d="
If NOT TopLevel Then
tstr = tstr & URLSpace(fsDir)
End If
response.redirect tstr
End If
' Page Display
fn = Request.QueryString("f")
If fn = "" Then
iGallery
Else
CreateFolder
End If
'################# End Main Guts #################
%>
<%
Set objFC = nothing
Set objF = nothing
Set objFSO = Nothing
Set FSO = Nothing
Set f = Nothing
Set fsDir = Nothing
%>