<%@ LANGUAGE="VBSCRIPT" %> <% '#################################### '## Application: Blue-Collar Productions '## File Name: igallery.asp '## File Version: i-Gallery '## 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. '#################################### %> <% Response.Buffer = "true" '########## System Settings Do Not Edit Below This Line... REALLY ########## %> <% '---- CursorTypeEnum Values ---- Const adOpenForwardOnly = 0 Const adOpenKeyset = 1 Const adOpenDynamic = 2 Const adOpenStatic = 3 '---- LockTypeEnum Values ---- Const adLockReadOnly = 1 Const adLockPessimistic = 2 Const adLockOptimistic = 3 Const adLockBatchOptimistic = 4 '---- CursorLocationEnum Values ---- Const adUseServer = 2 Const adUseClient = 3 '---- CommandTypeEnum Values ---- Const adCmdUnknown = &H0008 Const adCmdText = &H0001 Const adCmdTable = &H0002 Const adCmdStoredProc = &H0004 Const adCmdFile = &H0100 Const adCmdTableDirect = &H0200 %> <% Dim SysConn,SysRec,GalleryName,UploadPath,URLPath,NailerApp,DllPath,DateFormat,RecordsPerRow,RecordsPerPage,FoldersPerRow,MaxUploadSize,MailServer,MailAddress,EmailApp,Anonymous,MessageBoard,AllowedFiles,TitleMax,History,Vote,ToolBar,DescMax,Description,SlideShow,DelaySpeed,Transition,StartColor1,EndColor1,StartColor2,EndColor2,TitleColor,DateColor,FullScreen,ViewerBG Set SysConn = Server.CreateObject ("ADODB.Connection") SysConn.Open strConnect Set sysRec = SysConn.Execute ("SELECT * FROM System;") GalleryName = SysRec("GalleryName") UploadPath = SysRec("UploadPath") URLPath = SysRec("URLPath") NailerApp = SysRec("NailerApp") DllPath = SysRec("DllPath") DateFormat = SysRec("DateFormat") RecordsPerRow = sysRec("RecordsPerRow") RecordsPerPage = sysRec("RecordsPerPage") FoldersPerRow = sysRec("FoldersPerRow") MaxUploadSize = SysRec("MaxUpload") MailServer = SysRec("EmailServer") MailAddress = SysRec("EmailAddress") EmailApp = SysRec("EmailApp") Anonymous = SysRec("Anonymous") MessageBoard = SysRec("MessageBoard") AllowedFiles = SysRec("AllowedFiles") TitleMax = SysRec("TitleMax") History = SysRec("History") Vote = SysRec("Vote") ToolBar = SysRec("ToolBar") DescMax = SysRec("DescMax") Description = SysRec("Description") SlideShow = SysRec("SlideShow") DelaySpeed = SysRec("DelaySpeed") Transition = SysRec("Transition") StartColor1 = SysRec("StartColor1") EndColor1 = SysRec("EndColor1") DateColor = SysRec("DateColor") StartColor2 = SysRec("StartColor2") EndColor2 = SysRec("EndColor2") TitleColor = SysRec("TitleColor") FullScreen = SysRec("FullScreen") ViewerBG = SysRec("ViewerBG") On Error Resume Next Dim SecurityTimeout SecurityTimeout = 10 'Amount of time idle before security session expires (MIN = 3) '########## Do Not Edit Below This Line... REALLY ########## Dim objFSO Set objFSO = CreateObject("Scripting.FileSystemObject") Dim FSO Set FSO = CreateObject("Scripting.FileSystemObject") Dim f Set f = FSO.GetFolder(UploadPath) Dim fsDir Set fsDir = FSO.GetFolder(UploadPath) Dim FileList Set FileList = f.subFolders Dim GalleryVersion GalleryVersion = "GSP NETWORK" Dim sAgent, b_IE, b_NN6 Dim ie, nn6 b_IE = false b_NN6 = false sAgent = Request.ServerVariables("HTTP_USER_AGENT") if (inStr(sAgent,"MSIE")>0) then b_IE = true end if if (inStr(sAgent,"Gecko")>0) then b_NN6 = true end if ie = b_IE nn6 = b_NN6 Function URLSpace(s) URLspace = s URLSpace = Replace(URLSpace," ","+") URLSpace = Replace(URLSpace,"&","%26") End Function 'URLSpace Function rURLSpace(s) rURLspace = s rURLSpace = Replace(rURLSpace,"+"," ") rURLSpace = Replace(rURLSpace,"%26","&") End Function 'URLSpace Function fExt(fname) filename = fname DotPosition = InStrRev(filename, ".") fExt = Mid(filename,DotPosition + 1) fExt = LCase(fExt) End Function 'File Extension Dim igalleryNow igalleryNow = Now Function EuroDate(MyDate) EuroDate = Day(MyDate) & "/" & Month(MyDate) & "/" & mid(Year(MyDate),3,2) End Function Function USDate(MyDate) USDate = Month(MyDate) & "/" & Day(MyDate) & "/" & mid(Year(MyDate),3,2) End Function Dim OutMinusTwo Session.Timeout = SecurityTimeout OutMinusTwo = (SecurityTimeout-2)*60000 Dim Nailer If NailerApp="1" OR NailerApp="2" OR NailerApp="3" Then Nailer = True ElseIf NailerApp="4" OR NailerApp="" Then Nailer = False NailerApp = 4 End If %> <% 'OPTION EXPLICIT const BASE_64_MAP_INIT = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/" dim Base64EncMap(63) dim Base64DecMap(127) ' must be called before using anything else PUBLIC SUB initCodecs() ' init vars 'nl = "

" & chr(13) & chr(10) ' setup base 64 dim max, idx max = len(BASE_64_MAP_INIT) for idx = 0 to max - 1 ' one based string Base64EncMap(idx) = mid(BASE_64_MAP_INIT, idx + 1, 1) next for idx = 0 to max - 1 Base64DecMap(ASC(Base64EncMap(idx))) = idx next END SUB ' encode base 64 encoded string PUBLIC FUNCTION Encode(plain) if len(plain) = 0 then Encode = "" exit function end if dim ret, ndx, by3, first, second, third by3 = (len(plain) \ 3) * 3 ndx = 1 do while ndx <= by3 first = asc(mid(plain, ndx+0, 1)) second = asc(mid(plain, ndx+1, 1)) third = asc(mid(plain, ndx+2, 1)) ret = ret & Base64EncMap( (first \ 4) AND 63 ) ret = ret & Base64EncMap( ((first * 16) AND 48) + ((second \ 16) AND 15 ) ) ret = ret & Base64EncMap( ((second * 4) AND 60) + ((third \ 64) AND 3 ) ) ret = ret & Base64EncMap( third AND 63) ndx = ndx + 3 loop ' check for stragglers if by3 < len(plain) then first = asc(mid(plain, ndx+0, 1)) ret = ret & Base64EncMap( (first \ 4) AND 63 ) if (len(plain) MOD 3 ) = 2 then second = asc(mid(plain, ndx+1, 1)) ret = ret & Base64EncMap( ((first * 16) AND 48) + ((second \ 16) AND 15 ) ) ret = ret & Base64EncMap( ((second * 4) AND 60) ) else ret = ret & Base64EncMap( (first * 16) AND 48) ret = ret & "=" end if ret = ret & "=" end if Encode = ret END FUNCTION ' decode base 64 encoded string PUBLIC FUNCTION Decode(scrambled) if len(scrambled) = 0 then Decode = "" exit function end if ' ignore padding dim realLen realLen = len(scrambled) do while mid(scrambled, realLen, 1) = "=" realLen = realLen - 1 loop dim ret, ndx, by4, first, second, third, fourth ret = "" by4 = (realLen \ 4) * 4 ndx = 1 do while ndx <= by4 first = Base64DecMap(asc(mid(scrambled, ndx+0, 1))) second = Base64DecMap(asc(mid(scrambled, ndx+1, 1))) third = Base64DecMap(asc(mid(scrambled, ndx+2, 1))) fourth = Base64DecMap(asc(mid(scrambled, ndx+3, 1))) ret = ret & chr( ((first * 4) AND 255) + ((second \ 16) AND 3)) ret = ret & chr( ((second * 16) AND 255) + ((third \ 4) AND 15) ) ret = ret & chr( ((third * 64) AND 255) + (fourth AND 63) ) ndx = ndx + 4 loop ' check for stragglers, will be 2 or 3 characters if ndx < realLen then first = Base64DecMap(asc(mid(scrambled, ndx+0, 1))) second = Base64DecMap(asc(mid(scrambled, ndx+1, 1))) ret = ret & chr( ((first * 4) AND 255) + ((second \ 16) AND 3)) if realLen MOD 4 = 3 then third = Base64DecMap(asc(mid(scrambled,ndx+2,1))) ret = ret & chr( ((second * 16) AND 255) + ((third \ 4) AND 15) ) end if end if Decode = ret END FUNCTION ' initialize call initCodecs ' Testing code 'dim inp, strencode 'inp = request.form("test") 'strencode = Encode(inp) 'response.write "Encoded value = " & strencode 'response.write "Decoded value = " & Decode(strencode) %> <% function CropIt(chkString,sNum) if IsNull(chKString) = False And chkString > sNum Then strTot = Len(chkString) While Right(chkString, 1) = " " chkString = Left(chkString, strTot - 1) strTot = Len(chkString) Wend chkString = Left(chkString, sNum) if Right(chkString, 1) = " " Then chkString = Left(chkString, sNum - 1) End if if Len(chkString) <> strTot Then chkString = chkString & "..." CropIt = chkString End if End function %> <% Function SendMail(comp, mailserv, fromname, fromemail, toname, toemail, subject, body) Dim myMail On Error Resume Next Select Case comp Case 1 'ASPMail Set myMail = Server.CreateObject("SMTPsvg.Mailer") myMail.FromName = fromname myMail.FromAddress = fromemail myMail.ContentType = strcontent myMail.Priority = strpriority myMail.ReturnReceipt= strreceipt myMail.RemoteHost = mailserv myMail.AddRecipient toname, toemail myMail.Subject = subject myMail.BodyText = body myMail.SendMail Case 2 'ASPEmail Set myMail = CreateObject("Persits.MailSender") myMail.From = fromemail myMail.FromName = fromname myMail.IsHTML = strcontent myMail.Priority = strpriority myMail.Host = mailserv myMail.AddAddress toemail myMail.Subject = subject myMail.Body = body myMail.Send Case 3 'CDONTS Set myMail = server.CreateObject("CDONTS.NewMail") myMail.To = toemail myMail.Value("Reply-To") = fromemail myMail.From = fromemail myMail.Subject = subject myMail.MailFormat = strcontent myMail.BodyFormat = strcontent myMail.Importance = strpriority myMail.Body = body myMail.Send Case 10 'CDOSYS Set myMail = Server.CreateObject("CDO.Message") myMail.From = fromemail myMail.To = toemail myMail.Subject = subject myMail.HTMLBody = body myMail.Send Case 4 ' Dynu Email Set myMail = Server.CreateObject("Dynu.Email") myMail.isHTML = True myMail.Smtp = mailserv result = myMail.Send(fromemail, toemail, subject, body) Case 5 'W3 JMail 4.1 set myMail = Server.CreateOBject( "JMail.Message" ) myMail.Logging = true myMail.silent = true myMail.From = fromemail myMail.FromName = fromname myMail.AddRecipient toemail, toname myMail.Subject = subject myMail.Body = body SendMail = myMail.Send(mailserv) Case 6 'W3 JMail 4.1 HTML Set myMail = Server.CreateObject("JMail.Message") myMail.AddRecipient toemail, toname myMail.From = fromemail myMail.Body = "Sorry, you cannot read HTML." myMail.Subject = subject myMail.HTMLBody = body SendMail = myMail.Send(mailserv) Case 7 'Simple Mail Set myMail = Server.CreateObject("ADISCON.SimpleMail.1") myMail.MailServer = mailserv myMail.Sender = fromemail myMail.Recipient = toemail myMail.Subject = subject myMail.MessageText = body call myMail.Send Case 8 'OCXMail set myMail = Server.CreateObject("ASPMail.ASPMailCtrl.1") result = myMail.SendMail(mailserv, toemail, fromemail, subject, body) Case 9 'VSMail 1.x Set myMail = CreateObject("VSEmail.SMTPSendMail") myMail.Host = mailserv myMail.From = fromname & " < " & fromemail & " >" myMail.SendTo = toemail myMail.Subject = subject myMail.Body = body myMail.Connect myMail.Send End Select Set myMail = Nothing If Err Then SendMail = False Else SendMail = True End If End Function %> <% function GetBytes(flnm, offset, bytes) Dim objFSO Dim objFTemp Dim objTextStream Dim lngSize on error resume next Set objFSO = CreateObject("Scripting.FileSystemObject") Set objFTemp = objFSO.GetFile(flnm) lngSize = objFTemp.Size set objFTemp = nothing fsoForReading = 1 Set objTextStream = objFSO.OpenTextFile(flnm, fsoForReading) if offset > 0 then strBuff = objTextStream.Read(offset - 1) end if if bytes = -1 then GetBytes = objTextStream.Read(lngSize) else GetBytes = objTextStream.Read(bytes) end if objTextStream.Close set objTextStream = nothing set objFSO = nothing end function function lngConvert(strTemp) lngConvert = clng(asc(left(strTemp, 1)) + ((asc(right(strTemp, 1)) * 256))) end function function lngConvert2(strTemp) lngConvert2 = clng(asc(right(strTemp, 1)) + ((asc(left(strTemp, 1)) * 256))) end function function gfxSpex(flnm, width, height, depth, strImageType) dim strPNG dim strGIF dim strBMP dim strType strType = "" strImageType = "(Unknown)" gfxSpex = False strPNG = chr(137) & chr(80) & chr(78) strGIF = "GIF" strBMP = chr(66) & chr(77) strType = GetBytes(flnm, 0, 3) if strType = strGIF then ' is GIF strImageType = "GIF" Width = lngConvert(GetBytes(flnm, 7, 2)) Height = lngConvert(GetBytes(flnm, 9, 2)) Depth = 2 ^ ((asc(GetBytes(flnm, 11, 1)) and 7) + 1) gfxSpex = True elseif left(strType, 2) = strBMP then ' is BMP strImageType = "BMP" Width = lngConvert(GetBytes(flnm, 19, 2)) Height = lngConvert(GetBytes(flnm, 23, 2)) Depth = 2 ^ (asc(GetBytes(flnm, 29, 1))) gfxSpex = True elseif strType = strPNG then ' Is PNG strImageType = "PNG" Width = lngConvert2(GetBytes(flnm, 19, 2)) Height = lngConvert2(GetBytes(flnm, 23, 2)) Depth = getBytes(flnm, 25, 2) select case asc(right(Depth,1)) case 0 Depth = 2 ^ (asc(left(Depth, 1))) gfxSpex = True case 2 Depth = 2 ^ (asc(left(Depth, 1)) * 3) gfxSpex = True case 3 Depth = 2 ^ (asc(left(Depth, 1))) '8 gfxSpex = True case 4 Depth = 2 ^ (asc(left(Depth, 1)) * 2) gfxSpex = True case 6 Depth = 2 ^ (asc(left(Depth, 1)) * 4) gfxSpex = True case else Depth = -1 end select else strBuff = GetBytes(flnm, 0, -1) lngSize = len(strBuff) flgFound = 0 strTarget = chr(255) & chr(216) & chr(255) flgFound = instr(strBuff, strTarget) if flgFound = 0 then exit function end if strImageType = "JPG" lngPos = flgFound + 2 ExitLoop = false do while ExitLoop = False and lngPos < lngSize do while asc(mid(strBuff, lngPos, 1)) = 255 and lngPos < lngSize lngPos = lngPos + 1 loop if asc(mid(strBuff, lngPos, 1)) < 192 or asc(mid(strBuff, lngPos, 1)) > 195 then lngMarkerSize = lngConvert2(mid(strBuff, lngPos + 1, 2)) lngPos = lngPos + lngMarkerSize + 1 else ExitLoop = True end if loop if ExitLoop = False then Width = -1 Height = -1 Depth = -1 else Height = lngConvert2(mid(strBuff, lngPos + 4, 2)) Width = lngConvert2(mid(strBuff, lngPos + 6, 2)) Depth = 2 ^ (asc(mid(strBuff, lngPos + 8, 1)) * 8) gfxSpex = True end if end if end function %> <% Function FileSize(intFileSize) const DecimalPlaces = 1 const FileSizeBytes = 1 const FileSizeKiloByte = 1024 const FileSizeMegaByte = 1048576 const FileSizeGigaByte = 1073741824 const FileSizeTeraByte = 1099511627776 Dim strFileSize, newFilesize If (Int(intFileSize / FileSizeTeraByte) <> 0) Then newFilesize = Round(intFileSize / FileSizeTeraByte, DecimalPlaces) strFileSize = newFilesize & " TB" ElseIf (Int(intFileSize / FileSizeGigaByte) <> 0) Then newFilesize = Round(intFileSize / FileSizeGigaByte, DecimalPlaces) strFileSize = newFilesize & " GB" ElseIf (Int(intFileSize / FileSizeMegaByte) <> 0) Then newFilesize = Round(intFileSize / FileSizeMegaByte, DecimalPlaces) strFileSize = newFilesize & " MB" ElseIf (Int(intFileSize / FileSizeKiloByte) <> 0) Then newFilesize = Round(intFileSize / FileSizeKiloByte, DecimalPlaces) strFileSize = newFilesize & " KB" ElseIf (Int(intFileSize / FileSizeBytes) <> 0) Then newFilesize = intFilesize strFileSize = newFilesize & " Bytes" ElseIf Int(intFileSize) = 0 Then strFilesize = 0 & " Bytes" End If FileSize = strFileSize End Function %> <% '#################################### '## Application: Blue-Collar Productions '## File Name: lang_global.inc (Language File) '## File Version: i-Gallery '## Notice: This code has limited warranties. Please see http://www.b-cp.com for details. '#################################### %> <% '## Global Settings ## '## editimage.asp, logs.asp, system.asp, upload.asp & users.asp CONST IG_timeout = "Your login session will timeout in 2 minutes. To continue your current session, please navigate to a new page." '## header.asp CONST IGhead_homep = "i-Gallery Home Page" CONST IGhead_lgoff = "Log Off" CONST IGhead_lgon = "Log On" '## menu.asp CONST IGmenu_spo = "Submit Photo(s) Online" CONST IGmenu_subfrm = "Submission Form" CONST IGmenu_ua = "User Administration" CONST IGmenu_anu = "Add New User" CONST IGmenu_mu = "Manage User(s)" CONST IGmenu_ulf = "User(s) Log Files" CONST IGmenu_smngt = "System Management" CONST IGmenu_smaint = "System Maintenance" CONST IGmenu_candr = "Compact & Repair Database" CONST IGmenu_mb = "MESSAGE BOARD" '## searchform.asp CONST IGsform_sg = "Search Gallery" CONST IGsform_but = "GO" CONST IGsform_xm = "Exact Match" '## footer.asp CONST IGfoot_his1 = "Within 7 Days" CONST IGfoot_his2 = "14 Days" CONST IGfoot_his3 = "21 Days" CONST IGfoot_pb = "Powered By" %> <% '#################################### '## Application: Blue-Collar Productions '## File Name: lang_igallery.inc (Language File) '## File Version: i-Gallery '## Notice: This code has limited warranties. Please see http://www.b-cp.com for details. '#################################### %> <% '## igallery.asp CONST IG_uol = "Up One level" CONST IG_pg1 = "Displaying Page" CONST IG_pg2 = "of" CONST IG_erfm1 = "Use the ""Create New Directory"" form below to add your first sub-directory to your main i-Gallery folder." CONST IG_erfm2 = "There are currently no folders within your main folder.  To create a new directory you must first log-in to the system administration section.  Click Here to log-in now." CONST IG_ded = "DO YOU WANT TO DELETE THIS EMPTY FOLDER" CONST IG_ri = "Repair Broken Thumbnails In This Folder" CONST IG_si = "Sync All Images In This Folder To Database" CONST IG_cnd1 = "Create New Directory" CONST IG_rnd1 = "Re-Name This Directory" CONST IG_edm = "There are currently no images to view within this directory." CONST IG_upttf1 = "Upload Pictures To This Folder" CONST IG_upttf2 = "Main Folder" CONST IG_but1 = "Create" CONST IG_but2 = "Re-Name" '## toolbar.asp CONST IGt_editimage = "Edit Image" CONST IGt_viewimage = "View Image" CONST IGt_rotateimagel = "Rotate Image 90º Left" CONST IGt_centerimage = "Center Image" CONST IGt_rotateimager = "Rotate Image 90º Right" CONST IGt_dwnimage = "Download Image" '## igallery.inc CONST IGi_add = "Added" CONST IGi_ht = "Height" CONST IGi_wd = "Width" CONST IGi_un = "Unknown" CONST IGi_mod = "Mod." CONST IGi_sz = "Size" CONST IGi_adjprop = "Edit Properties" CONST IGi_view = "Click Here To View" CONST IGi_vote = "Click Here To Vote" CONST IGi_tv = "Total Vote(s)" CONST IGi_views = "Views" CONST IGi_dwnaudio = "Download Audio File" CONST IGi_editaudio = "Edit Audio File" CONST IGi_dwnvideo = "Download Video File" CONST IGi_editvideo = "Edit Video File" CONST IGi_dwnld = "Download" CONST IGi_dwnlds = "Downloads" CONST IGi_f = "File" CONST IGi_desc = "Description" CONST IGi_unkn = "Unknown" CONST IGi_delunkn = "Delete Unknown File" %> <% Set objF = fsdir Set objFC = objF.Files intPage = Request.Querystring("page") If intPage <> "" Then intPage = intPage else intPage = 0 i = 1 Dim RecordsCount RecordsCount = 0 ' set count to zero Dim rowcount rowcount = 1 ' set count to zero %> <% '################# SUB DisplayGallery Folder & Object Set-Up ################# Sub DisplayGallery(dirfile,f1) '##### Begin Display Folders ###### If dirFile = "DISPLAYFOLDERS" Then strFolderName = f1.Name strBaseDir = BaseDir If strBaseDir <> "" Then strBaseDir = strBaseDir Else strBaseDir = "" %>

<% Set tlist = f1.Files tpf = 4 tpr = 2 tPage = 0 t = 1 tcount = 0 For Each thumbnail in tlist If (tcount >= (tPage * tpf)) And (tcount < (tPage * tpf) + tpf) Then If NOT InStr(thumbnail, "tn-") > 0 Then ' Hide NON-Thumnails In View ThumbPath = UploadPath &"\"& Replace(strBaseDir,"/","\") &"\"& strFolderName &"\" & thumbnail.Name FileExt = fExt(thumbnail.Name) Select Case FileExt Case "jpg", "jpeg", "gif", "bmp", "png" '##### Folder Icon ###### If gfxSpex(ThumbPath, width, height, colors, strType) = True Then strwidth = "37" strheight = FormatNumber(strwidth*(height/width),0) If strheight > 33 Then strheight = "33" strwidth = FormatNumber(strheight*(width/height),0) Else strheight = strheight End If Else strwidth = 37 strheight = 33 End If If nailer Then strURL = URLpath&"/"& strBaseDir &"/"& strFolderName&"/tn-"&thumbnail.Name Else strURL = URLpath&"/"& strBaseDir &"/"& strFolderName&"/"&thumbnail.Name End If '##### End Folder Icon ###### strimagesrc = "" Case "mid", "midi", "au", "aif", "aiff", "snd", "wav", "mp3", "mpga" strimagesrc = "" Case "avi", "mpg", "mpeg", "mov", "rm", "ram", "swf", "wmv", "qt" strimagesrc = "" Case Else strimagesrc = "" End Select If Not t Mod tpr = 0 Then %> <% Else %> <% End if End If tcount = tcount + 1 t = t + 1 End If Set Jpeg = Nothing If tcount > 3 Then Exit For Next %>
\"><%= strimagesrc %>
\"><%= strimagesrc %>

\"><%= f1.name %>
<% '##### 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 %> <% Select Case FileExt Case "jpg", "jpeg", "gif", "bmp", "png" %> <% If Session("userLevel") = "99" OR Session("userLevel") = "98" Then %> <% End If %> <% If ToolBar Then %> <% End If %> <% Case "mid", "midi", "au", "aif", "aiff", "snd", "wav", "mp3", "mpga" %> <% Case "avi", "mpg", "mpeg", "mov", "rm", "ram", "swf", "wmv", "qt" %> <% Case Else %> <% End Select %> <% Select Case FileExt Case "jpg", "jpeg", "gif", "bmp", "png", "mid", "midi", "au", "aif", "aiff", "snd", "wav", "mp3", "mpga", "avi", "mpg", "mpeg", "mov", "rm", "ram", "swf", "wmv", "qt" %> <% Case Else %> <% If Session("userLevel") = "99" OR Session("userLevel") = "98" Then %> <% End If %> <% End Select %>
<% If History Then %> <% End If %>
<%= strtitle2 %> <%= strhistory %>
<% If gfxSpex(Replace(f1.Path,"tn-",""), width, height, colors, strType) = True Then %> <% Else %> <% 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 %>
<%= IGi_ht %>: <%= height %>
<%= IGi_wd %>: <%= width %>
<%= IGi_ht %>: <%= IGi_un %>
<%= IGi_wd %>: <%= IGi_un %>
<%= IGi_mod %>: <%= modified %>
<%= IGi_sz %>: <%= FileSize(f1.Size) %>
<%= IGi_adjprop %>
<% If (ie) Then %><% End If %>
&mode=other"><%= IGi_dwnaudio %>: <%= strtitle1 %>

<% If Session("userLevel") = "99" OR Session("userLevel") = "98" Then %> <% If ToolBar Then %>
<%= IGi_editaudio %> &mode=other"><%= IGi_dwnaudio %>
<% Else %>
<%= IGi_editaudio %> <%= IGi_editaudio %>
<% End If %> <% Else %>
&mode=other"> &mode=other"><%= IGi_dwnld %> .<%= UCase(FileExt) %> <%= IGi_f %>
<% End If %>
&mode=other"><%= IGi_dwnld %>: <%= strtitle1 %>

<% If Session("userLevel") = "99" OR Session("userLevel") = "98" Then %> <% If ToolBar Then %>
<%= IGi_editvideo %> &mode=other"><%= IGi_dwnvideo %>
<% Else %>
<%= IGi_editvideo %> <%= IGi_editvideo %>
<% End If %> <% Else %>
&mode=other"> &mode=other"><%= IGi_dwnld %> .<%= UCase(FileExt) %> <%= IGi_f %>
<% End If %>
<%= IGi_unkn %> .<%= UCase(FileExt) %> <%= IGi_f %>

<%= IGi_unkn %> .<%= UCase(FileExt) %> <%= IGi_f %>
<% If Vote Then %> <% End If %> <% If Description Then %> <% End If %>
" width="41" border="0" alt="<%= IGi_vote %>!<% If strvotes <> "" Then %> - <%= IGi_tv %>: <%= strvotes %><% End If %>"><%= IGi_views %>: <% If strviews <> "" Then response.write strviews Else response.write "0" %>
<%= strdescription1 %>
<%= IGi_delunkn %>
<% Else 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 %> <% Select Case FileExt Case "jpg", "jpeg", "gif", "bmp", "png" %> <% If Session("userLevel") = "99" OR Session("userLevel") = "98" Then %> <% End If %> <% If ToolBar Then %> <% End If %> <% Case "mid", "midi", "au", "aif", "aiff", "snd", "wav", "mp3", "mpga" %> <% Case "avi", "mpg", "mpeg", "mov", "rm", "ram", "swf", "wmv", "qt" %> <% Case Else %> <% End Select %> <% Select Case FileExt Case "jpg", "jpeg", "gif", "bmp", "png", "mid", "midi", "au", "aif", "aiff", "snd", "wav", "mp3", "mpga", "avi", "mpg", "mpeg", "mov", "rm", "ram", "swf", "wmv", "qt" %> <% Case Else %> <% If Session("userLevel") = "99" OR Session("userLevel") = "98" Then %> <% End If %> <% End Select %>
<% If History Then %> <% End If %>
<%= strtitle2 %> <%= strhistory %>
<% If gfxSpex(Replace(f1.Path,"tn-",""), width, height, colors, strType) = True Then %> <% Else %> <% 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 %>
<%= IGi_ht %>: <%= height %>
<%= IGi_wd %>: <%= width %>
<%= IGi_ht %>: <%= IGi_un %>
<%= IGi_wd %>: <%= IGi_un %>
<%= IGi_mod %>: <%= modified %>
<%= IGi_sz %>: <%= FileSize(f1.Size) %>
<%= IGi_adjprop %>
<% If (ie) Then %><% End If %>
&mode=other"><%= IGi_dwnaudio %>: <%= strtitle1 %>

<% If Session("userLevel") = "99" OR Session("userLevel") = "98" Then %> <% If ToolBar Then %>
<%= IGi_editaudio %> &mode=other"><%= IGi_dwnaudio %>
<% Else %>
<%= IGi_editaudio %> <%= IGi_editaudio %>
<% End If %> <% Else %>
&mode=other"> &mode=other"><%= IGi_dwnld %> .<%= UCase(FileExt) %> <%= IGi_f %>
<% End If %>
&mode=other"><%= IGi_dwnld %>: <%= strtitle1 %>

<% If Session("userLevel") = "99" OR Session("userLevel") = "98" Then %> <% If ToolBar Then %>
<%= IGi_editvideo %> &mode=other"><%= IGi_dwnvideo %>
<% Else %>
<%= IGi_editvideo %> <%= IGi_editvideo %>
<% End If %> <% Else %>
&mode=other"> &mode=other"><%= IGi_dwnld %> .<%= UCase(FileExt) %> <%= IGi_f %>
<% End If %>
<%= IGi_unkn %> .<%= UCase(FileExt) %> <%= IGi_f %>

<%= IGi_unkn %> .<%= UCase(FileExt) %> <%= IGi_f %>
<% If Vote Then %> <% End If %> <% If Description Then %> <% End If %>
" width="41" border="0" alt="<%= IGi_vote %>!<% If strvotes <> "" Then %> - <%= IGi_tv %>: <%= strvotes %><% End If %>"><%= IGi_views %>: <% If strviews <> "" Then response.write strviews Else response.write "0" %>
<%= strdescription1 %>
<%= IGi_delunkn %>
<% 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 ################# %> GSP Network Richard Hatch Cruise Gallery Battlestar Michael Wehrhahn <% '#################################### '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! '#################################### %>
" End If If PageCount > 1 Then for i = 1 to PageCount If NOT (i-1 = CurrentPage) Then If Int(i/10) = Int(CurrentPage/10) Then pgHTML = 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 & "" i = (int(i/10)+1)*10-1 End If Else pgHTML = pgHTML & "" End If Next End If If CurrentPage+1 < PageCount Then pgHTML = pgHTML & "" End If %> <% If PageCount > 1 Then %>
  <%= FormatDateTime(igalleryNow,1) %>
<% If Session("userLevel") = "99" OR Session("userLevel") = "98" Then %> <%= IGhead_lgoff %>
<% Else %> &d=<%= URLSpace(Request("d")) %>" onMouseOver="document.sbtnon.src='images/sm-logon2.gif'" onMouseOut="document.sbtnon.src='images/sm-logon1.gif'"><%= IGhead_lgon %>
<% End If %>
<% '#################################### '## Application: Blue-Collar Productions '## File Name: menu.asp '## File Version: 4.0 '## Copyright: This code is copyrighted and has limited warranties. Please see http://www.b-cp.com for details. '#################################### %>
<%= GalleryName %>

<% 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) %> <% End If currentf = currentf + 1 Next %>
<%= FolderName %>

[an error occurred while processing this directive]
<% If Anonymous Then %>
<%= IGmenu_spo %>:
<% If Request("mi") = "1" Then %> <% Else %> <% End If %>
<%= IGmenu_subfrm %>
<% End If %> <% If Session("userLevel") = "99" Then %>
<%= IGmenu_ua %>:
<% If Request("mi") = "2" Then %> <% Else %> <% End If %> <% If Request("mi") = "3" Then %> <% Else %> <% End If %> <% If Request("mi") = "4" Then %> <% Else %> <% End If %>
<%= IGmenu_anu %>
<%= IGmenu_mu %>
<%= IGmenu_ulf %>

<%= IGmenu_smngt %>:
<% If Request("mi") = "5" Then %> <% Else %> <% End If %> <% If Request("mi") = "6" Then %> <% Else %> <% End If %>
<%= IGmenu_smaint %>
<%= IGmenu_candr %>

<% If MessageBoard Then %>
 <%= IGmenu_mb %>
<% End If %> <% 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 = "" %>
<%= GalleryName %>

<% Else Parent = fso.GetParentFolderName(fsDir) Parent = Replace(LCase(Parent),LCase(UploadPath),"") Parent = Replace(Parent,"\\","\") %>
<%= f.name %>
<%= IG_uol %>
<% End If %> <% 'On Error Resume Next fi = 1 fpr = FoldersPerRow For Each fn in FileList emptyDir = FALSE If Not LCase(fn.Name) = "_vti_cnf" AND TopLevel Then If Not fi Mod fpr = 0 then %> <% Else %> <% End If fi = fi + 1 End If Next %>
<% DisplayGallery "DISPLAYFOLDERS",fn %>   <% DisplayGallery "DISPLAYFOLDERS",fn %>

<% 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 %> <% Case 2 %> <% Case 3 %> <% Case 4 %> <% Case 5 %> <% End Select End If %>
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>  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> 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> 
<% '#################################### '## 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 = "
«Prev" & i & "[" & i & "-" & lastx & "]" pgHTML = pgHTML & "" pgHTML = pgHTML & "" pgHTML = pgHTML & "" pgHTML = pgHTML & "
" pgHTML = pgHTML & "" & i & "" pgHTML = pgHTML & "" pgHTML = pgHTML & "" pgHTML = pgHTML & "
" pgHTML = pgHTML & "
Next»
<% 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 %>
<%= IG_ded %>   
<% End If %> <% If Nailer AND Not TopLevel AND NOT RecordsCount = "0" Then %>
<%= IG_ri %> <% If Session(BaseDir&"-repair") = 1 Then %><% End If %>
<% End If %> <% If Not TopLevel AND NOT RecordsCount = "0" Then %>
<%= IG_si %> <% 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 TopLevel Then %> <% End If %> <% If NOT TopLevel Then %> <% End If %>
<%= IG_cnd1 %>:
<%= IG_rnd1 %>:
<% 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,"\\","\") %>
<% If Not TopLevel Then %>
"><%= IG_upttf1 %>
<% End If %>
<% If Not TopLevel Then %>

<%= IG_upttf2 %>
<% End If %>
<% End If %>
 

Not sure about signing up just yet? Join our Mailing List and stay informed.
Tell A Friend   /   Suggestions   /  Link Our Banner     Email: 


To be removed from our Mailing List ClickHere.

Hosted & Designed By the GSP NETWORK. A Global Star Production All Rights Reserved. Copyrighted 2007

 

<% 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 %>