<%@ LANGUAGE="VBSCRIPT" %> <% '#################################### '## Application: Blue-Collar Productions '## File Name: folderview.asp '## File Version: i-Gallery '## Notice: This code has limited warranties. Please see http://www.b-cp.com for details. '#################################### %> <% strFolder = Request("folder") Set objF = FSO.GetFolder(UploadPath&"\"&strFolder&"\") Set objFC = objF.Files intPage = Request.Querystring("page") If intPage <> "" Then intPage = intPage else intPage = 0 i = 1 RecordsCount = 0 ' set count to zero imagecount = 0 For Each image in objFC If NOT InStr(image, "tn-") > 0 Then imagecount = imagecount + 1 End if Next %> .:: <%= GalleryVersion %> - <%= PCase(strfolder) %> Folder ::.
<% If Session("userLevel") = "99" OR Session("userLevel") = "98" Then %> <% Else %> <% End If %>
  <%= FormatDateTime(igalleryNow,1) %>
Log Off&n=<%= Request.ServerVariables("SCRIPT_NAME") %>" onMouseOver="document.sbtnon.src='images/sm-logon2.gif'" onMouseOut="document.sbtnon.src='images/sm-logon1.gif'">Log On

<% Set objDir = FSO.GetFolder(UploadPath) emptyDir = True For Each f1 in objFC emptyDir = False Next If Session("userLevel") = "99" OR Session("userLevel") = "98" Then %> <% If emptyDir Then %> <% Else %> <% If Session("userLevel") = "99" OR Session("userLevel") = "98" Then %> <% End If %> <% End If End If %>
<%= LCase(Request("folder")) %>
    ">
DELETE THIS EMPTY FOLDER   

">
Main Folder

<% If emptyDir Then %>
No Images Available! <% Else %>
<% For Each f1 in objFC If NOT InStr(f1, "tn-") > 0 Then ' Hide NON-Thumnails In View ThumbPath = UploadPath&"\"&strFolder&"\"&f1.Name '##### Thumbnailer Call ###### If gfxSpex(ThumbPath, width, height, colors, strType) = true then strwidth = "120" strheight = FormatNumber(strwidth*(height/width),0) If nailer Then strURL = URLPath&"/"&strFolder&"/tn-"&f1.Name Else strURL = URLPath&"/"&strFolder&"/"&f1.Name End If strimagesrc = "" End If '##### End Thumbnailer Call ###### If (RecordsCount >= (intPage * RecordsPerPage)) and (RecordsCount < (intPage * RecordsPerPage) + RecordsPerPage) Then If not i mod recordsperrow = 0 Then strid = Request.QueryString("uid") strimagename = f1.name qs = "?image="&URLSpace(strimagename)&"&folder="&URLSpace(strfolder) %> <% Else strid = Request.QueryString("uid") strimagename = f1.name qs = "?image="&URLSpace(strimagename)&"&folder="&URLSpace(strfolder) %> <% End If End If RecordsCount = RecordsCount + 1 i = i + 1 End If Set Jpeg = Nothing Next %> <% TotalImages = RecordsCount CurrentPageCount = ((intPage * RecordsPerPage) + RecordsPerPage) PCO = RecordsPerPage - (CurrentPageCount - TotalImages) If PCO > CurrentPageCount OR PCO > 12 Then PCO = 0 Else PCO = PCO End If %> <% If Session("userLevel") = "99" OR Session("userLevel") = "98" Then %> <% If PCO = 1 OR PCO = 3 OR PCO = 5 OR PCO = 7 OR PCO = 9 OR PCO = 11 OR PCO = 13 OR PCO = 15 Then %> <% End If %> <% Else %> <% If PCO = 1 OR PCO = 4 OR PCO = 7 OR PCO = 10 OR PCO = 13 OR PCO = 16 OR PCO = 19 Then %> <% ElseIf PCO = 2 OR PCO = 5 OR PCO = 8 OR PCO = 11 OR PCO = 14 OR PCO = 17 OR PCO = 20 Then %> <% End If %> <% End If %>
width="255"<% Else %>width="170"<% End If %> bgcolor="#f4f4f4" onMouseOver="this.bgColor='#efefef'" onMouseOut="this.bgColor='#f7f7f7'" valign="top"> <% Iname = f1.Name Fname = strfolder Set RS = Server.CreateObject("ADODB.RecordSet") Set GalleryConn = Server.CreateObject ("ADODB.Connection") GalleryConn.Open strConnect SQL = "SELECT * FROM Descriptions " & _ "WHERE imagename ='" & Iname & _ "' AND folder ='" & Fname & _ "' " RS.Open SQL, GalleryConn, adOpenStatic, adLockReadOnly, adCmdText If RS.EOF And RS.BOF Then strtitle = f1.name strdescription = "" Else strtitle = RS("title") strdescription = RS("description") End If RS.Close GalleryConn.Close %> <% If Session("userLevel") = "99" OR Session("userLevel") = "98" Then %> <% Else if gfxSpex(f1.Path, width, height, colors, strType) = true then End If End If %> <% If strdescription <> "" Then %> <% End If %>
<%= strtitle %>
<% If gfxSpex(f1.Path, width, height, colors, strType) = true then %> <% Else %> <% End If %>
Width: <%= width %>
Height: <%= height %>
Width: Unknown
Height: Unknown
Posted: <%= Month(f1.DateCreated) %>/<%= Year(f1.DateCreated) %>
Size: <%= FileSize(f1.Size) %>
<% If ToolBar Then %> <% Else %> <% End If %>
Actual Size Edit Image
<% If ToolBar Then %> <% If (ie) Then %> <% End If %> <% If Session("userLevel") = "99" OR Session("userLevel") = "98" Then %> <% End If %> <% If (ie) Then %> <% End If %>
Edit Actual Size Rotate 90º Left Normal View Rotate 90º Right
<% Else %> <% If Session("userLevel") = "99" OR Session("userLevel") = "98" Then %> <% Else %>
Actual Size
<% End If %> <% End If %>
Description:
<%= strdescription %>
width="255"<% Else %>width="170"<% End If %> bgcolor="#f4f4f4" onMouseOver="this.bgColor='#efefef'" onMouseOut="this.bgColor='#f7f7f7'" valign="top"> <% Iname = f1.Name Fname = strfolder Set RS1 = Server.CreateObject("ADODB.RecordSet") Set GalleryConn1 = Server.CreateObject ("ADODB.Connection") GalleryConn1.Open strConnect SQL1 = "SELECT * FROM Descriptions " & _ "WHERE imagename ='" & Iname & _ "' AND folder ='" & Fname & _ "' " RS1.Open SQL1, GalleryConn1, adOpenStatic, adLockReadOnly, adCmdText If RS1.EOF And RS1.BOF Then strtitle = f1.name strdescription1 = "" Else strtitle = PCase(RS1("title")) strdescription1 = RS1("description") End If RS1.Close GalleryConn1.Close %> <% If Session("userLevel") = "99" OR Session("userLevel") = "98" Then %> <% Else if gfxSpex(f1.Path, width, height, colors, strType) = true then End If End If %> <% If strdescription1 <> "" Then %> <% End If %>
<%= strtitle %>
<% if gfxSpex(f1.Path, width, height, colors, strType) = true then %> <% Else %> <% End If %>
Width: <%= width %>
Height: <%= height %>
Width: Unknown
Height: Unknown
Posted: <%= Month(f1.DateCreated) %>/<%= Year(f1.DateCreated) %>
Size: <%= FileSize(f1.Size) %>
<% If ToolBar Then %> <% Else %> <% End If %>
Actual Size Edit Image
<% If ToolBar Then %> <% If (ie) Then %> <% End If %> <% If Session("userLevel") = "99" OR Session("userLevel") = "98" Then %> <% End If %> <% If (ie) Then %> <% End If %>
Edit Actual Size Rotate 90º Left Normal View Rotate 90º Right
<% Else %> <% If Session("userLevel") = "99" OR Session("userLevel") = "98" Then %> <% Else %>
Actual Size
<% End If %> <% End If %>
Description:
<%= strdescription1 %>
     
<% End If %> <% If Request("Page")="" Then CurrentPage = 0 Else CurrentPage = CInt(Request("Page")) End If PageCount = (RecordsCount/RecordsPerPage) If (PageCount > 1) Then PageCount = int(PageCount) + 1 %> <% If PageCount > 1 Then %>
<% If PageCount > 1 Then %> [<%= RecordsPerPage %>] Records Per Page - Displaying Page [<%= CurrentPage+1 %> of <%= PageCount %>] <% End If %> <%= pgHTML %>
<% End If %> <% If Session("userLevel") = "99" OR Session("userLevel") = "98" Then %> <% If Nailer AND Not TopLevel AND NOT emptyDir Then %>
">Repair Broken Thumbnails In This Folder
<% End If %>
">Upload Pictures To This Folder

">
Main Folder
<% End If %> <% set objFC = nothing set objF = nothing set FSO = nothing %>