<%@ Language=VBScript %> <% Response.Buffer = TRUE %> <% Server.ScriptTimeout = 600 %> <% ' Script Name : aspWebAlbum ' File Name : album.asp ' Version : 3.2 ' Release Date : 8/9/2003 ' ' Copyright (c) 2003 by Full Revolution, Inc., All Rights Reserved %> <% '******** Added for 3.1 release ************************************************** ShowCatImageAndText = "YES" '******** Create FSO to Main Category Folder ************************************* GalleryPath = Server.MapPath("album/categories") GalleryPathWriteCheck = Server.MapPath("album") GalleryURL = request.ServerVariables("URL") GalleryURL2 = request.ServerVariables("URL") ServerAddress = request.ServerVariables("HTTP_HOST") GalleryURL = left(GalleryURL, len(GalleryURL) - 10) & "/album/categories" MidiPath = Server.MapPath("album/midi") MidiURL = "http://" & ServerAddress & left(GalleryURL2, len(GalleryURL2) - 10) & "/album/midi" FullURL = "http://" & ServerAddress & left(GalleryURL2, len(GalleryURL2) - 10) & "/album.asp" PostURL = "http://" & ServerAddress & left(GalleryURL2, len(GalleryURL2) - 10) & "/album/categories" FullServerAddress = "http://" & ServerAddress FullSkinURL = "http://" & ServerAddress & left(GalleryURL2, len(GalleryURL2) - 10) & "/" Set FSO = CreateObject("Scripting.FileSystemObject") Set MainFolder = FSO.GetFolder(GalleryPath) Set CatFolders = MainFolder.SubFolders '******** Load Config ************************************************************ If Session("Gal_ConfigLoaded") <> "YES" then Call LoadConfig End If SkinFolder = Session("Gal_SkinFolder") CategoryColumns = cint(Session("Gal_CategoryColumns")) ShowPicCount = Session("Gal_ShowPicCount") UseCategoryBullets = Session("Gal_UseCategoryBullets") User1 = Session("Gal_ConfigUser1") User2 = Session("Gal_ConfigUser2") User3 = Session("Gal_ConfigUser3") User4 = Session("Gal_ConfigUser4") User5 = Session("Gal_ConfigUser5") DontShowDirectories = Session("Gal_ConfigDontShowDirs") ThumbCols = cint(Session("Gal_ConfigThumbCols")) ThumbRows = cint(Session("Gal_ConfigThumbRows")) ThumbnailTableBorderWidth = Session("Gal_ConfigThumbTableBorderWidth") ThumbnailTableBorderColor = Session("Gal_ConfigThumbTableBorderColor") ShowThumbnailInfo = Session("Gal_ConfigShowThumbnailInfo") ShowPictureInfo = Session("Gal_ConfigShowPictureInfo") ShowExtendedPictureInfo = Session("Gal_ConfigShowExtendedPictureInfo") ThumbWidth = Session("Gal_ConfigThumbWidth") ThumbHeight = Session("Gal_ConfigThumbHeight") SlideShowSeconds = Session("Gal_ConfigSlideShowSeconds") DisableRightClick = Session("Gal_ConfigDisableRightClick") PostCardImageWidth = Session("Gal_ConfigPostCardImageWidth") PostCardImageHeight = Session("Gal_ConfigPostCardImageHeight") PostCardTagLine = Session("Gal_ConfigPostCardTagLine") NewDays = cint(Session("Gal_ConfigNewDays")) PopularRating = cint(Session("Gal_ConfigPopularRating")) HotHits = cint(Session("Gal_ConfigHotHits")) RequireLogin = Session("Gal_ConfigRequireLogin") ShowUserData = Session("Gal_ConfigShowUserData") UseFavorites = Session("Gal_ConfigUseFavorites") EmailHost = Session("Gal_ConfigEmailHost") PageHeader = Session("Gal_ConfigPageHeader") PageFooter = Session("Gal_ConfigPageFooter") ThumbShowName = Session("Gal_ConfigThumbShowName") ThumbShowSize = Session("Gal_ConfigThumbShowSize") ThumbShowDate = Session("Gal_ConfigThumbShowDate") ThumbShowViews = Session("Gal_ConfigThumbShowViews") ThumbShowRating = Session("Gal_ConfigThumbShowRating") ThumbShowExtension = Session("Gal_ConfigThumbShowExtension") ThumbNameFieldLength = Session("Gal_ConfigThumbNameFieldLength") PicShowName = Session("Gal_ConfigPicShowName") PicShowSize = Session("Gal_ConfigPicShowSize") PicShowDate = Session("Gal_ConfigPicShowDate") PicShowViews = Session("Gal_ConfigPicShowViews") PicShowRating = Session("Gal_ConfigPicShowRating") PicShowPhotographer = Session("Gal_ConfigPicShowPhotographer") PicShowSource = Session("Gal_ConfigPicShowSource") PicShowCameraUsed = Session("Gal_ConfigPicShowCameraUsed") PicShowCopyright = Session("Gal_ConfigPicShowCopyright") UseNew = Session("Gal_ConfigUseNew") UseHot = Session("Gal_ConfigUseHot") UsePopular = Session("Gal_ConfigUsePopular") UsePostcard = Session("Gal_ConfigUsePostcard") UseRating = Session("Gal_ConfigUseRating") UseThumbBorder = Session("Gal_ConfigUseThumbBorder") SearchType = Session("Gal_ConfigSearchType") JPGComponent = Session("Gal_ConfigJPGComponent") EmailComponent = Session("Gal_ConfigEmailComponent") UploadComponent = Session("Gal_ConfigUploadComponent") UseTextNavigation = Session("Gal_ConfigUseTextNavigation") UseSlideShowTransitions = Session("Gal_ConfigUseSlideShowTransitions") UseFullScreenSlideShow = Session("Gal_ConfigUseFullScreenSlideShow") UseCookies = Session("Gal_ConfigUseCookies") AllowSessionBasedItems = Session("Gal_ConfigAllowSessionBasedItems") '-------- Variables that are not editable in this version ------------------------ CategoryImageDirectory = Server.MapPath("album/") & "\categoryimages\" CategoryImageLocation = "album/categoryimages/" UseDB = "YES" picsname = "pics" thumbsname = "thumbs" DownloadsName = "fullsize" DownloadExtension = ".JPG" DownloadText = "Click Here To Download A Full Sized Version of This Image" PicsPerPage = ThumbRows * ThumbCols If request.querystring("action") = "editconfig" then Call HasJPGComponent Call HasEmailComponent Call HasUploadComponent End If CategoryColumnWidth = 100/CategoryColumns & "%" ThumbnailColumnWidth = 100/ThumbCols & "%" '------- These variables will override the automatic component handling ---------- 'JPGComponent = "" 'JPGComponent = "ASPJpeg" 'JPGComponent = "aspSmartImage" 'JPGComponent = "AspImage" 'JPGComponent = "csImageFile" 'JPGComponent = "ASPThumbnailer" 'JPGComponent = "PicturePreviewer" 'JPGComponent = "GFLAX" 'JPGComponent = "GraphicsProcessor" 'JPGComponent = "dImage" 'JPGComponent = "SfImageResize" 'JPGComponent = "ImgWriter" 'JPGComponent = "ActiveImage" 'EmailComponent = "" 'EmailComponent = "CDONTS" 'EmailComponent = "ASPMail" 'EmailComponent = "ASPEmail" 'EmailComponent = "JMail" 'UploadComponent = "" 'UploadComponent = "AspUpload" 'UploadComponent = "aspSmartUpload" 'UploadComponent = "SAFileUp" '--------------------------------------------------------------------------------- '********* Load Cookie from Users Computer ************************************* If UseCookies = "YES" then SkinLocation = request.Cookies("ALBUM3_PREFS")("Skin") If request.Cookies("ALBUM3_PREFS")("ThumbCols") <> "" then Session("Gal_ConfigThumbCols") = request.Cookies("ALBUM3_PREFS")("ThumbCols") ThumbCols = Session("Gal_ConfigThumbCols") ThumbCols = cint(ThumbCols) End If If request.Cookies("ALBUM3_PREFS")("ThumbRows") <> "" then Session("Gal_ConfigThumbRows") = request.Cookies("ALBUM3_PREFS")("ThumbRows") ThumbRows = Session("Gal_ConfigThumbRows") ThumbRows = cint(ThumbRows) End If If request.Cookies("ALBUM3_PREFS")("Skin") <> "" then If fso.folderexists(server.mappath(SkinLocation)) then Session("Gal_SkinFolder") = request.Cookies("ALBUM3_PREFS")("Skin") SkinFolder = Session("Gal_SkinFolder") End If End If If Session("Gal_Favorites") = "" then Session("Gal_Favorites") = request.Cookies("ALBUM3_PREFS")("Favorites") End If PicsPerPage = ThumbRows * ThumbCols ThumbnailColumnWidth = 100/ThumbCols & "%" End If '******* Pull In Config From DB ************************************ Sub LoadConfig If UseSQLServer = "YES" then SQL = "SELECT * FROM Gal_Config" Else SQL = "SELECT * FROM Gal_Config" End If Set RS=dbc.execute(SQL) Session("Gal_SkinFolder") = RS("Config_SkinFolder") Session("Gal_CategoryColumns") = RS("Config_CategoryColumns") Session("Gal_ShowPicCount") = RS("Config_ShowPicCount") Session("Gal_UseCategoryBullets") = RS("Config_UseCategoryBullets") Session("Gal_ConfigUser1") = RS("Config_User1") Session("Gal_ConfigUser2") = RS("Config_User2") Session("Gal_ConfigUser3") = RS("Config_User3") Session("Gal_ConfigUser4") = RS("Config_User4") Session("Gal_ConfigUser5") = RS("Config_User5") Session("Gal_ConfigDontShowDirs") = RS("Config_DontShowDirs") Session("Gal_ConfigThumbCols") = RS("Config_ThumbCols") Session("Gal_ConfigThumbRows") = RS("Config_ThumbRows") Session("Gal_ConfigThumbTableBorderWidth") = RS("Config_ThumbTableBorderWidth") Session("Gal_ConfigThumbTableBorderColor") = RS("Config_ThumbTableBorderColor") Session("Gal_ConfigShowThumbnailInfo") = RS("Config_ShowThumbnailInfo") Session("Gal_ConfigShowPictureInfo") = RS("Config_ShowPictureInfo") Session("Gal_ConfigShowExtendedPictureInfo") = RS("Config_ShowExtendedPictureInfo") Session("Gal_ConfigThumbWidth") = RS("Config_ThumbWidth") Session("Gal_ConfigThumbHeight") = RS("Config_ThumbHeight") Session("Gal_ConfigSlideShowSeconds") = RS("Config_SlideShowSeconds") Session("Gal_ConfigDisableRightClick") = RS("Config_DisableRightClick") Session("Gal_ConfigPostCardImageWidth") = RS("Config_PostCardImageWidth") Session("Gal_ConfigPostCardImageHeight") = RS("Config_PostCardImageHeight") Session("Gal_ConfigPostCardTagLine") = RS("Config_PostCardTagLine") Session("Gal_ConfigNewDays") = RS("Config_NewDays") Session("Gal_ConfigPopularRating") = RS("Config_PopularRating") Session("Gal_ConfigHotHits") = RS("Config_HotHits") Session("Gal_ConfigRequireLogin") = RS("Config_RequireLogin") Session("Gal_ConfigShowUserData") = RS("Config_ShowUserData") Session("Gal_ConfigUseFavorites") = RS("Config_UseFavorites") Session("Gal_ConfigEmailHost") = RS("Config_EmailHost") Session("Gal_ConfigPageHeader") = RS("Config_PageHeader") Session("Gal_ConfigPageFooter") = RS("Config_PageFooter") Session("Gal_ConfigThumbShowName") = RS("Config_ThumbShowName") Session("Gal_ConfigThumbShowSize") = RS("Config_ThumbShowSize") Session("Gal_ConfigThumbShowDate") = RS("Config_ThumbShowDate") Session("Gal_ConfigThumbShowViews") = RS("Config_ThumbShowViews") Session("Gal_ConfigThumbShowRating") = RS("Config_ThumbShowRating") Session("Gal_ConfigThumbShowExtension") = RS("Config_ThumbShowExtension") Session("Gal_ConfigThumbNameFieldLength") = RS("Config_ThumbNameFieldLength") Session("Gal_ConfigPicShowName") = RS("Config_PicShowName") Session("Gal_ConfigPicShowSize") = RS("Config_PicShowSize") Session("Gal_ConfigPicShowDate") = RS("Config_PicShowDate") Session("Gal_ConfigPicShowViews") = RS("Config_PicShowViews") Session("Gal_ConfigPicShowRating") = RS("Config_PicShowRating") Session("Gal_ConfigPicShowPhotographer") = RS("Config_PicShowPhotographer") Session("Gal_ConfigPicShowSource") = RS("Config_PicShowSource") Session("Gal_ConfigPicShowCameraUsed") = RS("Config_PicShowCameraUsed") Session("Gal_ConfigPicShowCopyright") = RS("Config_PicShowCopyright") Session("Gal_ConfigUseNew") = RS("Config_UseNew") Session("Gal_ConfigUseHot") = RS("Config_UseHot") Session("Gal_ConfigUsePopular") = RS("Config_UsePopular") Session("Gal_ConfigUsePostcard") = RS("Config_UsePostcard") Session("Gal_ConfigUseRating") = RS("Config_UseRating") Session("Gal_ConfigUseThumbBorder") = RS("Config_UseThumbBorder") Session("Gal_ConfigSearchType") = RS("Config_SearchType") Session("Gal_ConfigJPGComponent") = RS("Config_JPGComponent") Session("Gal_ConfigEmailComponent") = RS("Config_EmailComponent") Session("Gal_ConfigUploadComponent") = RS("Config_UploadComponent") Session("Gal_ConfigUseTextNavigation") = RS("Config_UseTextNavigation") Session("Gal_ConfigUseSlideShowTransitions") = RS("Config_UseSlideShowTransitions") Session("Gal_ConfigUseFullScreenSlideShow") = RS("Config_UseFullScreenSlideShow") Session("Gal_ConfigUseCookies") = RS("Config_UseCookies") Session("Gal_ConfigAllowSessionBasedItems") = RS("Config_AllowSessionBasedItems") Session("Gal_ConfigLoaded") = "YES" RS.Close Set RS=Nothing End Sub '********* Load Default Values if not signed in ******************************** If Session("Gal_UserID") = "" then If Session("Gal_DefaultsLoaded") <> "YES" then SQL = "SELECT * FROM Gal_Users WHERE Gal_UserID = 1" Set RS=dbc.execute(SQL) If NOT RS.EOF then Session("Gal_DefaultsLoaded") = "YES" Session("Gal_UserCopyright") = RS("Gal_UserCopyright") Session("Gal_UserPhotographer") = RS("Gal_UserPhotographer") Session("Gal_UserCamera") = RS("Gal_UserCamera") Session("Gal_UserSource") = RS("Gal_UserSource") End If End If End If '********* Include the Right Click Protection ********************************** If request.querystring("action") <> "embed" and DisableRightClick = "YES" then ProtectFile= "album/norightclick.inc" If request.querystring("pic") <> "" then Call ReadProtectFile(ProtectFile) End If End If SUB ReadProtectFile(FileToRead) ProtectFile=server.mappath(FileToRead) Set fs = CreateObject("Scripting.FileSystemObject") Set thisfile = fs.OpenTextFile(Protectfile, 1, False) tempSTR=thisfile.readall response.write tempSTR thisfile.Close set thisfile=nothing set fs=nothing END SUB '********* Include the CSS from the current skin ******************************** If request.querystring("action") <> "embed" then SkinFile= SkinFolder & "album.css" Call ReadSkinFile(SkinFile) End If SUB ReadSkinFile(FileToRead) SkinFile=server.mappath(FileToRead) Set fs = CreateObject("Scripting.FileSystemObject") Set thisfile = fs.OpenTextFile(Skinfile, 1, False) tempSTR=thisfile.readall response.write replace(tempSTR, "$$SKINFOLDER", SkinFolder) thisfile.Close set thisfile=nothing set fs=nothing END SUB '****** Some Java Functions and Page Header ************************************************* If request.querystring("action") <> "embed" then %> <% End If '******** Find out what we should be doing ************************************** If RequireLogin = "YES" and Session("Gal_UserID") = "" and request.querystring("action") <> "login" and request.querystring("action") <> "summary" then If request.querystring("action") <> "embed" then Call MustLogin End If End If 'TestWriting = TestPermissions(GalleryPathWriteCheck) 'If TestWriting = False then ' Call WriteFailed 'End If ScriptAction = request.querystring("action") SELECT CASE ScriptAction CASE "" If UseFullScreenSlideShow = "YES" and request.querystring("slideshow") = "YES" then Else Call DrawHeader End If If request.querystring("pic") = "" and RequireLogin = "YES" and Session("Gal_UserID") <> "" OR RequireLogin = "NO" and request.querystring("pic") = "" then Call DrawCategories End If If request.querystring("pic") <> "" and RequireLogin = "YES" and Session("Gal_UserID") <> "" OR RequireLogin = "NO" and request.querystring("pic") <> "" then Call DrawPictureView End If If UseFullScreenSlideShow = "YES" and request.querystring("slideshow") = "YES" then Else Call DrawFooter End If CASE "login" Call DrawLoginPage CASE "processlogin" Call ProcessLogin CASE "summary" Call DrawSummary CASE "editimageinfo" Call CheckSecurity Call EditImageInfo CASE "editimageinfoprocess" Call EditImageInfoProcess CASE "editcategoryinfo" Call CheckSecurity Call EditCategoryInfo CASE "renamecategory" Call CheckSecurity Call RenameCategory CASE "renamecategoryprocess" Call RenameCategoryProcess CASE "deletecategory" Call CheckSecurity Call DeleteCategory CASE "deletecategoryprocess" Call DeleteCategoryProcess CASE "movecategory" Call CheckSecurity Call MoveCategory CASE "movecategoryprocess" Call MoveCategoryProcess CASE "editcategoryinfoprocess" Call EditCategoryInfoProcess CASE "uploadcategoryimage" Call CheckSecurity Call UploadCategoryImage CASE "uploadcategoryimageprocess" Call UploadCategoryImageProcess CASE "addcategory" Call CheckSecurity Call AddCategory CASE "addcategoryprocess" Call AddCategoryProcess CASE "uploadmedia" Call UploadMedia2 CASE "uploadmedia2" Call UploadMedia2 CASE "uploadmedia3" Call UploadMedia3 CASE "uploadmedia4" Call UploadMedia4 CASE "uploadmedia5" Call UploadMedia5 CASE "submit" Call UploadMedia2 CASE "deleteimage" Call CheckSecurity Call DeleteImage CASE "deleteimageprocess" Call DeleteImageProcess CASE "sendpostcard" Call SendPostCard CASE "sendpostcardpreview" Call SendPostCardPreview CASE "sendpostcardprocess" Call SendPostCardProcess CASE "rateimage" Call RateImage CASE "rateimageprocess" Call RateImageProcess CASE "renameimage" Call CheckSecurity Call RenameImage CASE "renameimageprocess" Call RenameImageProcess CASE "moveimage" Call CheckSecurity Call MoveImage CASE "moveimageprocess" Call MoveImageProcess CASE "logoff" Call Logoff CASE "processlogoff" Call ProcessLogoff CASE "search" Call DrawSearchOptions CASE "searchprocess" Call SearchProcess CASE "dosearch" Call DrawHeader Call DrawSubset Call DrawFooter CASE "new" Call DrawHeader Call DrawSubset Call DrawFooter CASE "popular" Call DrawHeader Call DrawSubset Call DrawFooter CASE "hot" Call DrawHeader Call DrawSubset Call DrawFooter CASE "favorites" Call DrawHeader Call DrawSubset Call DrawFooter CASE "submitted" Call DrawHeader Call DrawSubset Call DrawFooter CASE "addtofavorites" Call AddToFavorites CASE "removefromfavorites" Call RemoveFromFavorites CASE "approvesubmitted" Call CheckSecurity Call ApproveSubmitted CASE "manageusers" Call CheckSecurity Call ManageUsers CASE "manageusers2" Call CheckSecurity If request.form("txtManageUserTask") = "AddUser" then Call AddUser End If If request.form("txtManageUserTask") = "DeleteUser" then Call DeleteUser End If If request.form("txtManageUserTask") = "ModifyUser" then Call ModifyUser End If CASE "adduserprocess" Call AddUserProcess CASE "deleteuser2" Call CheckSecurity Call DeleteUser2 CASE "deleteuserprocess" Call DeleteUserProcess CASE "modifyuser2" Call CheckSecurity Call ModifyUser2 CASE "modifyuserprocess" Call ModifyUserProcess CASE "embed" Call EmbedContentWrite CASE "generateembed" Call GenerateEmbed CASE "generateembedprocess" Call GenerateEmbedProcess CASE "editconfig" Call CheckSecurity Call EditConfig CASE "editconfigprocess" Call EditConfigProcess CASE "maintaindb" Call CheckSecurity Call MaintainDB CASE "maintaindbprocess" Call MaintainDBProcess CASE "preferences" Call Preferences CASE "preferencesprocess" Call PreferencesProcess CASE "deletecookie" Call DeleteCookie CASE ELSE END SELECT '********************************************************************************* '******** Must Login ************************************************************* '********************************************************************************* Sub MustLogin response.write "





" & Sub1Var1 & "

" %><%=Sub1Var2%><% response.write "
" End Sub '********************************************************************************* '******** Write Failed ************************************************************* '********************************************************************************* Sub WriteFailed 'response.write "
The permissions on your server are not setup properly...
" 'response.write "Make sure that the default IIS user has WRITE permissions to the following directory and all of its sub-folders on the server:
" 'response.write GalleryPathWriteCheck 'response.write "
" 'response.write "

" End Sub '********************************************************************************* '***** Draw Category Navigation ************************************************** '********************************************************************************* Sub DrawNavigation(SSLink, PrevLink, NextLink) Heading = "  " & Sub2Var1 & "" CurrentCategory = request.querystring("cat") SubmitCategory = CurrentCategory CategorySubmitRights = GetSubmitRights(CurrentCategory) If request.querystring("cat") <> "" then Count = 0 B = "" Do While ((instr(1, CurrentCategory,"\")) and (Count < 10)) A = mid(CurrentCategory,1,instr(1,CurrentCategory,"\") - 1) If B <> "" then B = B + "\" End If B = B + A CurrentCategory = mid(CurrentCategory,instr(1,CurrentCategory,"\")+1) B = Replace(B," ", "%20") Heading = Heading + " \ " & A & "" Count = Count + 1 Loop If request.querystring("pic") <> "" then Heading = Heading + " \ " & "" & CurrentCategory & "" Heading = Heading + " \ " & request.querystring("pic") Heading = TopHeading & Heading Else Heading = Heading + " \ " & CurrentCategory Heading = TopHeading & Heading End If End If response.write "" response.write "" response.write "" response.write "" response.write "" response.write "
" response.write Heading response.write "" If UseTextNavigation = "NO" then If PrevLink <> "" then %><%=Sub2Var2%><% End If If CategorySubmitRights <> "NONE" then %><%=Sub2Var3%><% End If If SearchType = "DETAILED" then %><%=Sub2Var4%><% End If If UseNew = "YES" then %><%=Sub2Var5%><% End If If UseHot = "YES" then %><%=Sub2Var6%><% End If If UseRating = "YES" then If UsePopular = "YES" then %><%=Sub2Var7%><% End If End If If UseFavorites = "YES" then %><%=Sub2Var8%><% End If If request.querystring("pic") <> "" then If request.querystring("slideshow") = "YES" then If SSLink <> "" then SSLink = Left(SSLink, (len(SSLink) - 3)) %><%=Sub2Var9%><% End If Else If NextLink <> "" then If UseFullScreenSlideShow = "YES" then SSLink = Replace(SSLink, "\", "/") %><%=Sub2Var10%><% Else %><%=Sub2Var10%><% End If End If End If End If If NextLink <> "" then %><%=Sub2Var11%><% End If If UseCookies = "YES" then If AllowSessionBasedItems = "YES" then %><%=Sub2Var12%><% End If End If If Session("Gal_UserID") = "" then %><%=Sub2Var13%><% Else %><%=Sub2Var14%><% End If Else If PrevLink <> "" then %><%=Sub2Var15%> | <% End If If CategorySubmitRights <> "NONE" then %><%=Sub2Var16%> | <% End If If SearchType = "DETAILED" then %><%=Sub2Var17%> | <% End If If UseNew = "YES" then %><%=Sub2Var18%> | <% End If If UseHot = "YES" then %><%=Sub2Var19%> | <% End If If UseRating = "YES" then If UsePopular = "YES" then %><%=Sub2Var20%> | <% End If End If If UseFavorites = "YES" then %><%=Sub2Var21%> | <% End If If request.querystring("pic") <> "" then If request.querystring("slideshow") = "YES" then If SSLink <> "" then SSLink = Left(SSLink, (len(SSLink) - 3)) %><%=Sub2Var22%> | <% End If Else If NextLink <> "" then If UseFullScreenSlideShow = "YES" then SSLink = Replace(SSLink, "\", "/") %><%=Sub2Var23%> | <% Else %><%=Sub2Var23%> | <% End If End If End If End If If NextLink <> "" then %><%=Sub2Var24%> | <% End If If UseCookies = "YES" then If AllowSessionBasedItems = "YES" then %><%=Sub2Var25%> | <% End If End If If Session("Gal_UserID") = "" then %><%=Sub2Var26%>  <% Else %><%=Sub2Var27%>  <% End If End If response.write "
" '------------ Simple Search Box ------------------------ If SearchType = "SIMPLE" then response.write "" response.write "" response.write "" response.write "" response.write "" response.write "

" response.write "

" response.write "" response.write "" response.write "" response.write "" response.write "  " response.write " " response.write "" response.write "
" response.write "

" response.write "
" End If End Sub '********************************************************************************* '***** Category Listing Section ************************************************** '********************************************************************************* Sub DrawCategories If request.querystring("cat") = "" then ViewFolder = GalleryPath CategoryHeading = "Categories" Else ViewFolder = GalleryPath & "\" & request.querystring("cat") CategoryHeading = request.querystring("cat") CategoryHeading = mid(CategoryHeading,instr(1,CategoryHeading,"\")+1) End If If request.querystring("cat") <> "" then SQL = "SELECT * FROM Gal_Categories WHERE Gal_CategoryLocation = '" & request.querystring("cat") & "'" Set RS=dbc.execute(SQL) If NOT RS.EOF then CategoryDescription = RS("Gal_CategoryDescription") CategoryImage = RS("Gal_CategoryImage") CategoryHeading = CategoryHeading & "
" & CategoryDescription & "" End If RS.Close Set RS=Nothing Else CategoryDescription = "" CategoryImage = "" End If Set MainFolder = FSO.GetFolder(ViewFolder) Set CatFolders = MainFolder.SubFolders '---- Next & Prev Links If FSO.FolderExists(GalleryPath & "\" & request.querystring("cat") & "\" & picsname) then Set WorkFolder = FSO.GetFolder(GalleryPath & "\" & request.querystring("cat") & "\" & picsname) Set PicDir = WorkFolder.Files If PicDir.Count > PicsPerPage then NumPages = PicDir.Count \ PicsPerPage If PicDir.Count MOD picsperpage <> 0 then NumPages = NumPages + 1 End If ThisPage = (cint(request.querystring("start")) \ cint(picsperpage)) + 1 If ThisPage > 1 then NavPrevLink = "album.asp?cat=" & replace(request.querystring("cat")," ","%20") & "&start=" & (ThisPage-2) * PicsPerPage End If If ThisPage <> NumPages then NavNextLink = "album.asp?cat=" & replace(request.querystring("cat")," ","%20") & "&start=" & (ThisPage) * PicsPerPage End If End If End If Call DrawAlbumHeadingBar(CategoryHeading, ViewFolder) Call DrawNavigation(SlideShowLink, NavPrevLink, NavNextLink) '--------- Write Local Category Admin Bar ----------------------------------------------------- If Session("Gal_UserEditCategories") = "YES" then CurrentCategory = request.querystring("cat") response.write "" response.write "" response.write "" response.write "" response.write "" response.write "
  " & Sub3Var1 & ": " If request.querystring("cat") <> "" then If UseTextNavigation = "NO" then %><%=Sub3Var2%><% %><%=Sub3Var3%><% %><%=Sub3Var4%><% %><%=Sub3Var5%><% %><%=Sub3Var6%><% Else %><%=Sub3Var7%> | <% %><%=Sub3Var8%> | <% %><%=Sub3Var9%> | <% %><%=Sub3Var10%> | <% %><%=Sub3Var11%><% End If End If If UseTextNavigation = "NO" then %><%=Sub3Var12%><% Else %> | <%=Sub3Var13%><% End If response.write "
" End If '----------------------------------------------------------------------------------------------- Call DrawAdminButtons response.write "" response.write "" Span=0 For Each X in CatFolders If IsDirectoryOK(X.Name) = "YES" then NumOfPics = 0 Span = Span + 1 If Span > CategoryColumns then response.write "" Span = 1 End If MyStr = X.name If request.querystring("cat") = "" then workfold = GalleryPath & "\" & X.Name & "\" & picsname workpicl = GalleryURL & "/" & X.Name & "/" & catpicname Else workfold = GalleryPath & "\" & request.querystring("cat") & "\" & X.Name & "\" & picsname workpicl = GalleryURL & "/" & request.querystring("cat") & "/" & X.Name & "/" & catpicname End if If request.querystring("cat") <> "" then SQL = "SELECT * FROM Gal_Categories WHERE Gal_CategoryLocation = '" & request.querystring("cat") & "\" & X.Name & "'" Else SQL = "SELECT * FROM Gal_Categories WHERE Gal_CategoryLocation = '" & X.Name & "'" End If Set RS=dbc.execute(SQL) If NOT RS.EOF then CategoryDescription = RS("Gal_CategoryDescription") CategoryImage = RS("Gal_CategoryImage") CategorySubmitRights = RS("Gal_CategorySubmitRights") Else Set RSn=Server.CreateObject("ADODB.RecordSet") RSn.Open "SELECT * FROM Gal_Categories", dbc, adOpenDynamic, adLockPessimistic, adCMDText RSn.AddNew If request.querystring("cat") <> "" then RSn("Gal_CategoryLocation") = request.querystring("cat") & "\" & X.Name Else RSn("Gal_CategoryLocation") = X.Name End If RSn("Gal_CategoryDescription") = "" RSn("Gal_CategoryImage") = "" RSn("Gal_CategorySubmitRights") = "NONE" RSn("Gal_CategoryName") = X.Name RSn.Update RSn.Close Set RSn=Nothing CategoryDescription = "" CategoryImage = "" End If RS.Close Set RS=Nothing '------- Get image count ------------------------------------- TempFolderName = workfold NewFolderName = workfold NumOfPics = CountImages(workfold) NumOfFolders = CountSubFolders(TempFolderName) If NumOfPics > 0 then NumOfPics = NumOfPics & " " & Sub3Var14 If NumOfFolders > 0 then NumOfPics = NumOfPics & ", " & NumOfFolders & " " & Sub3Var15 End If Else If NumOfFolders > 0 then NumOfPics = NumOfFolders & " " & Sub3Var15 Else NumOfPics = Sub3Var16 End If End If '------- Is there new media here ----------------------------- NewStuff = HasNew(NewFolderName) '------------------------------------------------------------- If UseCategoryBullets = "YES" then BulletText = " " Else BulletText = "" End if If ShowPicCount = "YES" then PicCountText = " (" & NumOfPics & ")" & "" Else PicCountText = "" End if response.write "" End if Next response.write "" response.write "
" response.write "" response.write "
" response.write BulletText response.write "" If CategoryImage <> "" then If request.querystring("cat") <> "" then response.write "
" If ShowCatImageAndText = "YES" then response.write "" & MyStr & "" & PicCountText End If Else response.write "
" If ShowCatImageAndText = "YES" then response.write "" & MyStr & "" & PicCountText End If End If Else If request.querystring("cat") <> "" then response.write "" & MyStr & "" & PicCountText Else response.write "" & MyStr & "" & PicCountText End If End If If NewStuff = "YES" then response.write " " & Sub3Var17 & "" End If If Session("Gal_UserEditCategories") = "YES" then If request.querystring("cat") <> "" then CurrentCategory = request.querystring("cat") & "\" & X.Name Else CurrentCategory = X.Name End If %> E<% End If If CategoryDescription <> "" then response.write "
" & CategoryDescription & "" End If response.write "
" response.write "
" Call DrawThumbnails End Sub '********************************************************************************* '***** Draw Thumbnails *********************************************************** '********************************************************************************* Sub DrawThumbnails If fso.folderexists(GalleryPath & "\" & request.querystring("cat") & "\" & picsname) then Set WorkFolder = FSO.GetFolder(GalleryPath & "\" & request.querystring("cat") & "\" & picsname) Set PicDir = WorkFolder.Files MyStr = request.querystring("cat") response.write "" response.write "" Span = 0 picsDone = 0 If request.querystring("start") <> "" then DelayCount = cint(request.querystring("start")) Else DelayCount = 0 End If If PicDir.Count > PicsPerPage then NumPages = PicDir.Count \ PicsPerPage If PicDir.Count MOD picsperpage <> 0 then NumPages = NumPages + 1 End If ThisPage = (cint(request.querystring("start")) \ cint(picsperpage)) + 1 If ThisPage > 1 then PrevLink = "album.asp?cat=" & replace(request.querystring("cat")," ","%20") & "&start=" & (ThisPage-2) * PicsPerPage End If If ThisPage <> NumPages then NextLink = "album.asp?cat=" & replace(request.querystring("cat")," ","%20") & "&start=" & (ThisPage) * PicsPerPage End If End If For Each X in PicDir ThumbnailLocation = GalleryPath & "\" & request.querystring("cat") & "\" & thumbsname & "\" & X.Name ImageFileName = X.Name ImagePicLocation = GalleryPath & "\" & request.querystring("cat") & "\" & picsname & "\" ImageThumbLocation = GalleryPath & "\" & request.querystring("cat") & "\" & thumbsname & "\" If fso.fileexists(ThumbnailLocation) then ThumbnailExists = "YES" ImageType = Right(X.Name, 3) ImageType = replace(ImageType, ".", "_") Else ThumbnailExists = "NO" ImageType = Right(X.Name, 3) ImageType = replace(ImageType, ".", "_") NoPictureLocation = GalleryURL & "/" & replace(request.querystring("cat"), "\", "/") & "/" & picsname & "/" & X.Name End If SQL = "SELECT * FROM Gal_Images WHERE Gal_ImageFileLocation = '" & replace(request.querystring("cat"), "\", "/") & "/" & X.Name & "'" Set RS = dbc.execute(SQL) If NOT RS.EOF then ImageID = RS("Gal_ImageID") CurrentImageID = RS("Gal_ImageID") ImageDateAdded = RS("Gal_ImageDateAdded") ImageHits = RS("Gal_ImageHits") ImageStatus = RS("Gal_ImageStatus") If ImageStatus = "PENDING" then ShowPicture = "PENDING" Else ShowPicture = "YES" End If If RS("Gal_ImageRatingTotal") <> 0 then ImageRatingNumber = RS("Gal_ImageRatingNumber") ImageRating = RS("Gal_ImageRatingTotal") / RS("Gal_ImageRatingNumber") ImageRating = ImageRating / 2 ImageRatingValue = ImageRating ImageRatingRemainder = ImageRating - cint(ImageRating) ImageRatingStars = "" For I = 1 to cint(ImageRating) ImageRatingStars = ImageRatingStars & "" Next If ImageRatingRemainder >= .5 then ImageRatingStars = ImageRatingStars & "" End If ImageRating = ImageRatingStars Else ImageRating = Sub4Var1 End If Else TempCat = request.querystring("cat") & "/" & X.Name TempCat = Replace(TempCat, "\", "/") Set RS=Server.CreateObject("ADODB.RecordSet") RS.Open "SELECT * FROM Gal_Images", dbc, adOpenDynamic, adLockPessimistic, adCMDText RS.AddNew RS("Gal_ImageType") = ImageType RS("Gal_ImageFileName") = X.Name RS("Gal_ImageCategory") = request.querystring("cat") RS("Gal_ImageThumbPath") = ImageThumbLocation RS("Gal_ImageThumbURL") = GalleryURL & "/" & replace(request.querystring("cat")," ","%20") & "/" & thumbsname & "/" & replace(X.Name," ","%20") RS("Gal_ImagePicURL") = GalleryURL & "/" & replace(request.querystring("cat")," ","%20") & "/" & picsname & "/" & replace(X.Name," ","%20") RS("Gal_ImagePicPath") = ImagePicLocation RS("Gal_ImageFileLocation") = TempCat RS("Gal_ImageDateAdded") = FormatDateTime(X.DateCreated, 2) RS("Gal_ImageSize") = (X.Size \ 1024) & "k" RS("Gal_ImageCopyright") = Session("Gal_UserCopyright") RS("Gal_ImagePhotographer") = Session("Gal_UserPhotographer") RS("Gal_ImageCamera") = Session("Gal_UserCamera") RS("Gal_ImageSource") = Session("Gal_UserSource") RS.Update RS.Close Set RS=Nothing ImageHits = 0 ImageRating = Sub4Var1 ShowPicture = "YES" End If If ShowPicture = "YES" or ShowPicture = "PENDING" and Session("Gal_UserApproveSubmits") = "YES" then If DelayCount > 0 then DelayCount = DelayCount - 1 Else If picsDone < PicsPerPage then Span=Span + 1 picsDone = picsDone + 1 If Span > ThumbCols then response.write "" Span = 1 End if response.write "" End If End If End If Next response.write "
" response.write "" response.write "" response.write "
" If JPGComponent <> "" and ThumbnailExists = "NO" then If ImageType = "JPG" or ImageType = "jpg" then Call CreateThumbnail(ImagePicLocation, ImageThumbLocation, ImageFileName) ThumbnailExists = "YES" End If End If If ThumbnailExists = "YES" or ThumbnailExists = "NO" and ImageType = "JPG" or ImageType = "jpg" or ImageType = "GIF" or ImageType = "gif" or ImageType = "PNG" or ImageType = "png" then If UseDB = "YES" then If DateDiff("d", ImageDateAdded, Date()) <= NewDays then IsNew = "YES" Else IsNew = "NO" End If If ImageHits >= HotHits then IsHot = "YES" Else IsHot = "NO" End If If ImageRating <> "Not Yet Rated" and ImageRatingValue >= PopularRating then IsPopular = "YES" Else IsPopular = "NO" End If Else ImageDateAdded = FormatDateTime(X.DateCreated, 2) TempDateAdded = cDate(FormatDateTime(X.DateCreated, 2)) If DateDiff("d", TempDateAdded, Date()) <= NewDays then IsNew = "YES" Else IsNew = "NO" End If End If ThumbBorderClassName = "TableThumbBorder" If UseNew = "YES" then If IsNew = "YES" then ThumbBorderClassName = ThumbBorderClassName & "New" End If End If If UseHot = "YES" then If IsHot = "YES" then ThumbBorderClassName = ThumbBorderClassName & "Hot" End If End If If UsePopular = "YES" then If IsPopular = "YES" then ThumbBorderClassName = ThumbBorderClassName & "Pop" End If End If If ShowPicture = "PENDING" then ThumbBorderClassName = "TableThumbBorderPending" End If FixedCategory = replace(request.querystring("cat")," ","%20") FixedCategory = replace(FixedCategory,"\","/") If UseThumbBorder = "YES" then response.write "
" response.write "" If ThumbnailExists = "YES" then response.write "" Else response.write "" End If response.write "
" Else response.write "" If ThumbnailExists = "YES" then response.write "" response.write "
" Else response.write "" response.write "
" End If End If If UseFavorites = "YES" then If UseTextNavigation = "NO" then If CheckFavorite(CurrentImageID) <> "YES" then %>" onclick="NewWindow(this.href,'aspWebAlbum','300','250','no');return false"><%=Sub4Var2%>
<% Else %>" onclick="NewWindow(this.href,'aspWebAlbum','300','250','no');return false"><%=Sub4Var3%>
<% End If Else If CheckFavorite(CurrentImageID) <> "YES" then %>" onclick="NewWindow(this.href,'aspWebAlbum','300','250','no');return false"><%=Sub4Var4%>
<% Else %>" onclick="NewWindow(this.href,'aspWebAlbum','300','250','no');return false"><%=Sub4Var5%>
<% End If End If End If Else If ImageType <> "JPG" and ImageType <> "jpg" and ImageType <> "GIF" and ImageType <> "gif" and ImageType <> "PNG" and ImageType <> "png" then %><% Else response.write Sub4Var6 End If End If response.write "
" If ShowThumbnailInfo = "YES" then ImageFileCategory = request.querystring("cat") ImageFileName = X.Name ImageFileNameNoExt = Left(X.Name, len(X.Name) - 4) If ThumbNameFieldLength <> "" then If UseSQLServer <> "YES" then If len(ImageFileName) > cint(ThumbNameFieldLength) then ImageFileName = left(ImageFileName, ThumbNameFieldLength) & "..." End If If len(ImageFileNameNoExt) > cint(ThumbNameFieldLength) then ImageFileNameNoExt = left(ImageFileNameNoExt, ThumbNameFieldLength) & "..." End If Else If ThumbNameFieldLength <> null then If len(ImageFileName) > cint(ThumbNameFieldLength) then ImageFileName = left(ImageFileName, ThumbNameFieldLength) & "..." End If If len(ImageFileNameNoExt) > cint(ThumbNameFieldLength) then ImageFileNameNoExt = left(ImageFileNameNoExt, ThumbNameFieldLength) & "..." End If End If End If End If response.write "" If ThumbShowName = "YES" then response.write "" response.write "" response.write "" End If If ThumbShowSize = "YES" then response.write "" response.write "" End If If ThumbShowDate = "YES" then response.write "" response.write "" End If If UseDB = "YES" and ImageType = "JPG" or ImageType = "jpg" or ImageType = "GIF" or ImageType = "gif" or ImageType = "PNG" or ImageType = "png" then If ThumbShowViews = "YES" then response.write "" response.write "" End If If UseRating = "YES" then If ThumbShowRating = "YES" then response.write "" If ImageRating = "Not Yet Rated" then ImageRatingNumber = 0 End If response.write "" End If End If End If response.write "
" & Sub4Var7 & "  " If ThumbShowExtension = "YES" then response.write ImageFileName Else response.write ImageFileNameNoExt End If response.write "
" & Sub4Var8 & " " & " " & (X.Size \ 1024) & "k" & "
" & Sub4Var9 & " " & " " & ImageDateAdded & "
" & Sub4Var10 & " " & " " & ImageHits & "
" %><%=Sub4Var11%><% response.write "  " & ImageRating & " (" & ImageRatingNumber & " " & Sub4Var12 & ")
" End If If Session("Gal_UserEditImageInfo") = "YES" then ImageSize = (X.Size \ 1024) & "k" ImageDate = FormatDateTime(X.DateCreated, 2) CurrentImage = request.querystring("cat") & "/" & request.querystring("pic") ImageFile = X.Name ImageCategory = request.querystring("cat") response.write "" response.write "" response.write "" response.write "" response.write "" response.write "
  " & Sub4Var13 & " " If UseTextNavigation = "NO" then %><%=Sub4Var14%><% %><%=Sub4Var15%><% %><%=Sub4Var16%><% %><%=Sub4Var17%><% If ImageStatus = "PENDING" then %><%=Sub4Var22%><% End If Else %><%=Sub4Var18%> | <% %><%=Sub4Var19%> | <% %><%=Sub4Var20%> | <% %><%=Sub4Var21%><% If ImageStatus = "PENDING" then %> | <%=Sub4Var23%><% End If End If response.write "
" End If response.write "
" If PicDir.Count > PicsPerPage then response.write "" response.write "
" NumPages = PicDir.Count \ PicsPerPage If PicDir.Count MOD picsperpage <> 0 then NumPages = NumPages + 1 End If ThisPage = (cint(request.querystring("start")) \ cint(picsperpage)) + 1 If ThisPage > 1 then response.write " " & Sub4Var24 & " " End If For X=0 to (numpages - 1) If (X+1)=ThisPage then Response.write "[" & CStr(X+1) & "] " Else Response.write " " & CStr(X+1) & " " End If Next If ThisPage <> NumPages then response.write " " & Sub4Var25 & " " End If response.write "
" End If End If End Sub '********************************************************************************* '***** Draw Picture View Page **************************************************** '********************************************************************************* Sub DrawPictureView Set WorkFolder = FSO.GetFolder(GalleryPath & "\" & request.querystring("cat") & "\" & picsname) Set PicDir = WorkFolder.Files PrevDone=0 NextDone=0 CurDone=0 PrevLink="" CurLink="" NextLink="" ViewFolder = GalleryPath & "\" & request.querystring("cat") CategoryHeading = request.querystring("cat") CategoryHeading = mid(CategoryHeading,instr(1,CategoryHeading,"\")+1) CategoryHeading = CategoryHeading & " [" & left(request.querystring("pic"), len(request.querystring("pic"))-4) & "]" If request.querystring("cat") <> "" then SQL = "SELECT * FROM Gal_Categories WHERE Gal_CategoryLocation = '" & request.querystring("cat") & "'" Set RS=dbc.execute(SQL) If NOT RS.EOF then CategoryDescription = RS("Gal_CategoryDescription") CategoryImage = RS("Gal_CategoryImage") CategoryHeading = CategoryHeading & "
" & CategoryDescription & "" End If RS.Close Set RS=Nothing Else CategoryDescription = "" CategoryImage = "" End If For Each X in PicDir If Not CurDone then CurLink = X.Name End If If (CurDone=1) and (nextdone<>1) then NextLink = X.Name NextDone = 1 End If If X.Name = request.querystring("pic") then PrevDone=1 CurDone=1 CurLink = x.Name ImageSize = (X.Size \ 1024) & "k" ImageName = X.Name 'ImageDate = FormatDateTime(X.DateCreated, 2) ImageDate = FormatDateTime(X.DateCreated, 2) End If If PrevDone <> 1 then PrevLink = X.Name End If Next NavPrevLink = "album.asp?pic=" & replace(prevlink," ","%20") & "&cat=" & replace(request.querystring("cat")," ","%20") If NextLink <> "" then NavNextLink = "album.asp?pic=" & replace(nextlink," ","%20") & "&cat=" & replace(request.querystring("cat")," ","%20") Else NavNextLink = "" End If If request.querystring("slideshow") = "YES" then If NextLink <> "" then SlideShowURL = "album.asp?pic=" & replace(nextlink," ","%20") & "&cat=" & replace(request.querystring("cat")," ","%20") & "&slideshow=YES" response.write "" response.write "" If UseFullScreenSlideShow = "YES" then If UseSlideShowTransitions = "YES" then '------- Draw Transitions Header Randomize() RangeSize = 23 RandomValue = RangeSize * Rnd() RandomInteger = Int(RandomValue) %><% End If End If %><% response.write "" Else response.write "" response.write "" response.write "" End If Else If NextLink <> "" then SlideShowURL = "album.asp?pic=" & replace(nextlink," ","%20") & "&cat=" & replace(request.querystring("cat")," ","%20") & "&slideshow=YES" End If End If If UseFullScreenSlideShow = "YES" then If UseSlideShowTransitions = "YES" then response.write "
" End If End If If request.querystring("slideshow") = "YES" then If UseFullScreenSlideShow = "YES" then %><%=Sub5Var1%><% response.write "
" Else Call DrawAlbumHeadingBar(CategoryHeading, WorkFolder) Call DrawNavigation(SlideShowURL, NavPrevLink, NavNextLink) End If Else Call DrawAlbumHeadingBar(CategoryHeading, WorkFolder) Call DrawNavigation(SlideShowURL, NavPrevLink, NavNextLink) End If MyStr = request.querystring("cat") SQL = "SELECT * FROM Gal_Images WHERE Gal_ImageFileLocation = '" & replace(request.querystring("cat"), "\", "/") & "/" & request.querystring("pic") & "'" Set RS = dbc.execute(SQL) If NOT RS.EOF then CurrentImageID = RS("Gal_ImageID") If RS("Gal_ImageHits") / 1 = RS("Gal_ImageHits") then TempHits = cint(RS("Gal_ImageHits")) Else TempHits = 0 End If ImageHits = TempHits + 1 ImageRatingTotal = RS("Gal_ImageRatingTotal") ImageRatingNumber = RS("Gal_ImageRatingNumber") ImageCaption = RS("Gal_ImageCaption") ImageKeywords = RS("Gal_ImageKeywords") ImageCopyright = RS("Gal_ImageCopyright") ImagePhotographer = RS("Gal_ImagePhotographer") ImageSource = RS("Gal_ImageSource") ImageCamera = RS("Gal_ImageCamera") ImageUser1 = RS("Gal_ImageUser1") ImageUser2 = RS("Gal_ImageUser2") ImageUser3 = RS("Gal_ImageUser3") ImageUser4 = RS("Gal_ImageUser4") ImageUser5 = RS("Gal_ImageUser5") SQLu = "UPDATE Gal_Images SET Gal_ImageHits = " & ImageHits & " WHERE Gal_ImageID = " & RS("Gal_ImageID") Set RSu = dbc.execute(SQLu) RS.Close Set RS=Nothing If ImageRatingTotal <> 0 then ImageRating = ImageRatingTotal / ImageRatingNumber ImageRating = ImageRating / 2 ImageRatingRemainder = ImageRating - cint(ImageRating) ImageRatingStars = "" For I = 1 to cint(ImageRating) ImageRatingStars = ImageRatingStars & "" Next If ImageRatingRemainder >= .5 then ImageRatingStars = ImageRatingStars & "" End If ImageRating = ImageRatingStars Else ImageRating = Sub5Var2 End If Else Set RS=Server.CreateObject("ADODB.RecordSet") RS.Open "SELECT * FROM Gal_Images", dbc, adOpenDynamic, adLockPessimistic, adCMDText RS.AddNew RS("Gal_ImageHits") = 1 RS("Gal_ImageFileLocation") = replace(request.querystring("cat"), "\", "/") & "/" & request.querystring("pic") RS.Update RS.Close Set RS=Nothing ImageRating = Sub5Var2 ImageHits = 1 End If CurrentImage = request.querystring("cat") & "/" & request.querystring("pic") ImageFile = request.querystring("pic") ImageCategory = request.querystring("cat") If request.querystring("slideshow") = "YES" and UseFullScreenSlideShow = "YES" then Else If Session("Gal_UserEditImageInfo") = "YES" then response.write "" response.write "" response.write "" response.write "" response.write "" response.write "
  " & Sub5Var3 & " " If UseTextNavigation = "NO" then %><%=Sub5Var4%><% %><%=Sub5Var5%><% %><%=Sub5Var6%><% %><%=Sub5Var7%><% Else %><%=Sub5Var8%> | <% %><%=Sub5Var9%> | <% %><%=Sub5Var10%> | <% %><%=Sub5Var11%><% End If response.write "
" Call DrawAdminButtons End If End If If request.querystring("slideshow") = "YES" and UseFullScreenSlideShow = "YES" then Else response.write "" response.write "" response.write "" response.write "
" End If FixedCategory = replace(request.querystring("cat")," ","%20") FixedCategory = replace(FixedCategory,"\","/") response.write " oncontextmenu="alert('<%=Sub5Var12%>');" <% response.write " GALLERYIMG='NO'>" Else response.write ">" End If If request.querystring("slideshow") = "YES" and UseFullScreenSlideShow = "YES" then Else response.write "
" If UseFavorites = "YES" then If UseTextNavigation = "NO" then If CheckFavorite(CurrentImageID) <> "YES" then %>" onclick="NewWindow(this.href,'aspWebAlbum','300','250','no');return false"><%=Sub5Var13%>
<% Else %>" onclick="NewWindow(this.href,'aspWebAlbum','300','250','no');return false"><%=Sub5Var14%>
<% End If response.write "
" Else If CheckFavorite(CurrentImageID) <> "YES" then %>" onclick="NewWindow(this.href,'aspWebAlbum','300','250','no');return false"><%=Sub5Var15%>
<% Else %>" onclick="NewWindow(this.href,'aspWebAlbum','300','250','no');return false"><%=Sub5Var16%>
<% End If response.write "
" End If End If If ImageCaption <> "" then response.write ImageCaption & "

" End If If ShowPictureInfo = "YES" then response.write "" response.write "" If PicShowName = "YES" then response.write "" End If If PicShowSize = "YES" then response.write "" End If If PicShowDate = "YES" then response.write "" End If If PicShowViews = "YES" then response.write "" End If If UseRating = "YES" then If PicShowRating = "YES" then response.write "" End If End If response.write "" response.write "" If ThumbShowExtension <> "YES" then ImageNameNoExt = Left(ImageName, len(ImageName) - 4) End If If PicShowName = "YES" then If ThumbShowExtension = "YES" then response.write "" Else response.write "" End If End If If PicShowSize = "YES" then response.write "" End If If PicShowDate = "YES" then response.write "" End If If PicShowViews = "YES" then response.write "" End If If UseRating = "YES" then If PicShowRating = "YES" then response.write "" End If End If response.write "" response.write "
" & Sub5Var17 & "" & Sub5Var18 & "" & Sub5Var19 & "" & Sub5Var20 & "" %><%=Sub5Var21%><% response.write "
 " & ImageName & " " & ImageNameNoExt & " " & ImageSize & " " & ImageDate & " " & ImageHits & " " & ImageRating & " (" & ImageRatingNumber & " " & Sub5Var22 & ")
" End if If ShowExtendedPictureInfo = "YES" then response.write "
" response.write "" response.write "" If PicShowPhotographer = "YES" then response.write "" End If If PicShowSource = "YES" then response.write "" End If If PicShowCameraUsed = "YES" then response.write "" End If If PicShowCopyright = "YES" then response.write "" End If response.write "" response.write "" If PicShowPhotographer = "YES" then response.write "" End If If PicShowSource = "YES" then response.write "" End If If PicShowCameraUsed = "YES" then response.write "" End If If PicShowCopyright = "YES" then response.write "" End If response.write "" response.write "
" & Sub5Var23 & "" & Sub5Var24 & "" & Sub5Var25 & "" & Sub5Var26 & "
 " & ImagePhotographer & " " & ImageSource & " " & ImageCamera & " " & ImageCopyright & "
" End If If ShowUserData = "YES" then response.write "
" response.write "" response.write "" If User1 <> "" then response.write "" End If If User2 <> "" then response.write "" End If If User3 <> "" then response.write "" End If If User4 <> "" then response.write "" End If If User5 <> "" then response.write "" End If response.write "" response.write "" If User1 <> "" then response.write "" End If If User2 <> "" then response.write "" End If If User3 <> "" then response.write "" End If If User4 <> "" then response.write "" End If If User5 <> "" then response.write "" End If response.write "" response.write "
" & User1 & "" & User2 & "" & User3 & "" & User4 & "" & User5 & "
 " & ImageUser1 & " " & ImageUser2 & " " & ImageUser3 & " " & ImageUser4 & " " & ImageUser5 & "
" End If zip=GalleryURL & "\" & request.querystring("cat") & "\" & DownloadsName & "\" & request.querystring("pic") zipcheck=GalleryPath & "/" & request.querystring("cat") & "/" & DownloadsName & "/" & request.querystring("pic") zip=left(zip,len(zip)-4) & DownloadExtension zipcheck=left(zipcheck,len(zipcheck)-4) & DownloadExtension If fso.fileexists(zipcheck) then response.write "
" & DownloadText & "" End If response.write "
" response.write "" response.write "
" If PrevLink <> "" then response.write "" & Sub5Var27 & " " End If response.write " | " If UsePostcard = "YES" then %><%=Sub5Var28%> | <% End If If NextLink <> "" then response.write " " & Sub5Var29 & "" End If response.write "
" End If If request.querystring("slideshow") = "YES" and UseFullScreenSlideShow = "YES" then If UseSlideShowTransitions = "YES" then response.write "
" response.write "" response.write "" End If End If End Sub '********************************************************************************* '***** Draw Album Heading Bar **************************************************** '********************************************************************************* Sub DrawAlbumHeadingBar(HeadingToWrite, CurrentCatFolder) NumOfPics = CountImages(CurrentCatFolder & "\pics") NumOfFolders = CountSubFolders(CurrentCatFolder & "\pics") If NumOfFolders = "" then NumOfFolders = 0 CategoryText = Sub6Var1 & "  " Else CategoryText = Sub6Var1 & "  " End If If NumOfPics = "" then If request.querystring("pic") <> "" then NumOfPics = 1 FilesText = Sub6Var2 Else NumOfPics = 0 FilesText = Sub6Var3 End If Else FilesText = Sub6Var3 End If If NumOfPics = 0 then NumOfPics = "" FilesText = "" End If If NumOfFolders = 0 then NumOfFolders = "" CategoryText = "" End If If request.querystring("action") <> "" then FilesText = CurrentCatFolder & " " & Sub6Var4 End If response.write "" response.write "" response.write "" response.write "" response.write "" response.write "" response.write "
" If UseCategoryBullets = "YES" then response.write "" End if response.write "" response.write HeadingToWrite response.write "" If request.querystring("action") = "" then response.write NumOfPics & " " & FilesText If NumOfPics <> "" and NumOfFolders <> "" then response.write " and " End If response.write NumOfFolders & " " & CategoryText Else response.write FilesText End If If request.querystring("slideshow") = "YES" then response.write "
" & Sub6Var5 & " " & SlideShowSeconds & " " & Sub6Var6 End If response.write "
" End Sub '********************************************************************************* '***** Draw Image Subset ********************************************************* '********************************************************************************* Sub DrawSubSet SELECT CASE request.querystring("action") CASE "new" If UseSQLServer = "NO" then SQL = "SELECT * FROM Gal_Images WHERE Gal_ImageDateAdded >= #" & DateAdd("d", Date(), (NewDays * (-1))) & "# ORDER BY Gal_ImageDateAdded DESC" Else SQL = "SELECT * FROM Gal_Images WHERE Gal_ImageDateAdded >= '" & DateAdd("d", Date(), (NewDays * (-1))) & "' ORDER BY Gal_ImageDateAdded DESC" End If CategoryHeading = Sub7Var1 CASE "hot" SQL = "SELECT Gal_ImageID, Gal_ImageHits FROM Gal_Images" Set RS=Server.CreateObject("adodb.Recordset") RS.Open SQL, dbc, adopenstatic Do While NOT RS.EOF ImageHits = RS("Gal_ImageHits") If ImageHits >= HotHits then HotList = HotList & RS("Gal_ImageID") & ", " End If RS.MoveNext Loop RS.Close Set RS=Nothing If HotList = "" then HotList = "0, 0" End If If right(HotList, 2) = ", " then HotList = left(HotList, Len(HotList) -2) End If SQL = "SELECT * FROM Gal_Images WHERE Gal_ImageID IN(" & HotList & ") ORDER BY Gal_ImageHits DESC" CategoryHeading = Sub7Var2 CASE "popular" SQL = "SELECT Gal_ImageID, Gal_ImageRatingTotal, Gal_ImageRatingNumber FROM Gal_Images" Set RS=Server.CreateObject("adodb.Recordset") RS.Open SQL, dbc, adopenstatic Do While NOT RS.EOF If RS("Gal_ImageRatingTotal") <> 0 then ImageRating = RS("Gal_ImageRatingTotal") / RS("Gal_ImageRatingNumber") ImageRating = ImageRating / 2 ImageRatingValue = ImageRating Else ImageRatingValue = 0 End If If ImageRatingValue >= PopularRating then PopList = PopList & RS("Gal_ImageID") & ", " End If RS.MoveNext Loop RS.Close Set RS=Nothing If PopList = "" then PopList = "0, 0" End If If right(PopList, 2) = ", " then PopList = left(PopList, Len(PopList) -2) End If If UseSQLServer = "NO" then SQL = "SELECT * FROM Gal_Images WHERE Gal_ImageID IN(" & PopList & ") ORDER BY Gal_ImageRatingTotal DESC" Else PopList = Left(PopList, Len(PopList) - 2) SQL = "SELECT * FROM Gal_Images WHERE Gal_ImageID IN(" & PopList & ") ORDER BY Gal_ImageRatingTotal DESC" End If CategoryHeading = Sub7Var3 CASE "favorites" If Session("Gal_Favorites") = "" then Session("Gal_Favorites") = "0, 0" End If If right(Session("Gal_Favorites"), 2) = ", " then Session("Gal_Favorites") = left(Session("Gal_Favorites"), Len(Session("Gal_Favorites")) -2) End If If UseSQLServer = "NO" then SQL = "SELECT * FROM Gal_Images WHERE Gal_ImageID IN(" & Session("Gal_Favorites") & ") ORDER BY Gal_ImageFileName" Else Session("Gal_Favorites") = Left(Session("Gal_Favorites"), Len(Session("Gal_Favorites")) - 2) SQL = "SELECT * FROM Gal_Images WHERE Gal_ImageID IN(" & Session("Gal_Favorites") & ") ORDER BY Gal_ImageFileName" End If CategoryHeading = Sub7Var4 CASE "submitted" If Session("Gal_UserApproveSubmits") = "YES" then SQL = "SELECT * FROM Gal_Images WHERE Gal_ImageStatus = 'PENDING'" CategoryHeading = Sub7Var5 Else response.redirect "album.asp" End If CASE "dosearch" SQL = Session("Gal_CurrentSearch") CategoryHeading = Sub7Var6 CASE ELSE END SELECT Set RS=Server.CreateObject("adodb.Recordset") RS.Open SQL, dbc, adopenstatic If RS.EOF then NoResults = "
" & Sub7Var7 & "
" End If '---- Next & Prev Links If RS.RecordCount > PicsPerPage then NumPages = RS.RecordCount \ PicsPerPage If RS.RecordCount MOD picsperpage <> 0 then NumPages = NumPages + 1 End If ThisPage = (cint(request.querystring("start")) \ cint(picsperpage)) + 1 If ThisPage > 1 then NavPrevLink = "album.asp?action=" & request.querystring("action") & "&start=" & (ThisPage-2) * PicsPerPage End If If ThisPage <> NumPages then NavNextLink = "album.asp?action=" & request.querystring("action") & "&start=" & (ThisPage) * PicsPerPage End If End If ViewFolder = RS.RecordCount Call DrawAlbumHeadingBar(CategoryHeading, ViewFolder) Call DrawNavigation(SlideShowLink, NavPrevLink, NavNextLink) Call DrawAdminButtons response.write "" response.write "" Span = 0 picsDone = 0 If request.querystring("start") <> "" then DelayCount = cint(request.querystring("start")) Else DelayCount = 0 End If If RS.RecordCount > PicsPerPage then NumPages = RS.RecordCount \ PicsPerPage If RS.RecordCount MOD picsperpage <> 0 then NumPages = NumPages + 1 End If ThisPage = (cint(request.querystring("start")) \ cint(picsperpage)) + 1 If ThisPage > 1 then PrevLink = "album.asp?action=" & request.querystring("action") & "&start=" & (ThisPage-2) * PicsPerPage End If If ThisPage <> NumPages then NextLink = "album.asp?action=" & request.querystring("action") & "&start=" & (ThisPage) * PicsPerPage End If End If Do While NOT RS.EOF If fso.folderexists(RS("Gal_ImagePicPath")) then ThumbnailLocation = RS("Gal_ImageThumbPath") & RS("Gal_ImageFileName") ImageFileName = RS("Gal_ImageFileName") ImagePicLocation = RS("Gal_ImagePicPath") If fso.fileexists(ThumbnailLocation) then ThumbnailExists = "YES" ImageType = RS("Gal_ImageType") ImageType = replace(ImageType, ".", "_") Else ThumbnailExists = "NO" ImageType = RS("Gal_ImageType") ImageType = replace(ImageType, ".", "_") NoPictureLocation = RS("Gal_ImagePicURL") End If ImageID = RS("Gal_ImageID") CurrentImageID = RS("Gal_ImageID") ImageDateAdded = RS("Gal_ImageDateAdded") ImageHits = RS("Gal_ImageHits") ImageStatus = RS("Gal_ImageStatus") If ImageStatus = "PENDING" then ShowPicture = "PENDING" Else ShowPicture = "YES" End If If RS("Gal_ImageRatingTotal") <> 0 then ImageRatingNumber = RS("Gal_ImageRatingNumber") ImageRating = RS("Gal_ImageRatingTotal") / RS("Gal_ImageRatingNumber") ImageRating = ImageRating / 2 ImageRatingValue = ImageRating ImageRatingRemainder = ImageRating - cint(ImageRating) ImageRatingStars = "" For I = 1 to cint(ImageRating) ImageRatingStars = ImageRatingStars & "" Next If ImageRatingRemainder >= .5 then ImageRatingStars = ImageRatingStars & "" End If ImageRating = ImageRatingStars Else ImageRating = Sub7Var8 End If If ShowPicture = "YES" or ShowPicture = "PENDING" and Session("Gal_UserApproveSubmits") = "YES" then If DelayCount > 0 then DelayCount = DelayCount - 1 Else If picsDone < PicsPerPage then Span=Span + 1 picsDone = picsDone + 1 If Span > ThumbCols then response.write "" Span = 1 End if response.write "" End If End If End If End If RS.MoveNext Loop response.write "
" response.write "" response.write "" response.write "
" If ThumbnailExists = "YES" or ThumbnailExists = "NO" and ImageType = "JPG" or ImageType = "jpg" or ImageType = "GIF" or ImageType = "gif" or ImageType = "PNG" or ImageType = "png" then If DateDiff("d", ImageDateAdded, Date()) <= NewDays then IsNew = "YES" Else IsNew = "NO" End If If ImageHits >= HotHits then IsHot = "YES" Else IsHot = "NO" End If If ImageRating <> "Not Yet Rated" and ImageRatingValue >= PopularRating then IsPopular = "YES" Else IsPopular = "NO" End If ThumbBorderClassName = "TableThumbBorder" If UseNew = "YES" then If IsNew = "YES" then ThumbBorderClassName = ThumbBorderClassName & "New" End If End If If UseHot = "YES" then If IsHot = "YES" then ThumbBorderClassName = ThumbBorderClassName & "Hot" End If End If If UsePopular = "YES" then If IsPopular = "YES" then ThumbBorderClassName = ThumbBorderClassName & "Pop" End If End If If ShowPicture = "PENDING" then ThumbBorderClassName = "TableThumbBorderPending" End If If UseThumbBorder = "YES" then response.write "
" response.write "" If ThumbnailExists = "YES" then response.write "" Else response.write "" End If response.write "
" Else response.write "" If ThumbnailExists = "YES" then response.write "
" Else response.write "
" End If End If If UseFavorites = "YES" then If UseTextNavigation = "NO" then If CheckFavorite(CurrentImageID) <> "YES" then %>&cat=<%=RS("Gal_ImageCategory")%>" onclick="NewWindow(this.href,'aspWebAlbum','300','250','no');return false"><%=Sub7Var9%>
<% Else %>&cat=<%=RS("Gal_ImageCategory")%>" onclick="NewWindow(this.href,'aspWebAlbum','300','250','no');return false"><%=Sub7Var10%>
<% End If Else If CheckFavorite(CurrentImageID) <> "YES" then %>&cat=<%=RS("Gal_ImageCategory")%>" onclick="NewWindow(this.href,'aspWebAlbum','300','250','no');return false"><%=Sub7Var11%>
<% Else %>&cat=<%=RS("Gal_ImageCategory")%>" onclick="NewWindow(this.href,'aspWebAlbum','300','250','no');return false"><%=Sub7Var12%>
<% End If End If End If If ImageStatus = "PENDING" then response.write "" & Sub7Var13 response.write RS("Gal_ImageCategory") response.write "" End If Else If ImageType <> "JPG" and ImageType <> "jpg" and ImageType <> "GIF" and ImageType <> "gif" and ImageType <> "PNG" and ImageType <> "png" then %><% Else response.write Sub7Var14 End If End If response.write "
" If ShowThumbnailInfo = "YES" then ImageFileCategory = RS("Gal_ImageCategory") ImageFileName = RS("Gal_ImageFileName") ImageFileNameNoExt = Left(ImageFileName, len(ImageFileName) - 4) If ThumbNameFieldLength <> "" then If UseSQLServer <> "YES" then If len(ImageFileName) > cint(ThumbNameFieldLength) then ImageFileName = left(ImageFileName, ThumbNameFieldLength) & "..." End If If len(ImageFileNameNoExt) > cint(ThumbNameFieldLength) then ImageFileNameNoExt = left(ImageFileNameNoExt, ThumbNameFieldLength) & "..." End If Else If ThumbNameFieldLength <> null then If len(ImageFileName) > cint(ThumbNameFieldLength) then ImageFileName = left(ImageFileName, ThumbNameFieldLength) & "..." End If If len(ImageFileNameNoExt) > cint(ThumbNameFieldLength) then ImageFileNameNoExt = left(ImageFileNameNoExt, ThumbNameFieldLength) & "..." End If End If End If End If 'If ThumbNameFieldLength <> "" and ThumbNameFieldLength <> null then ' If len(ImageFileName) > cint(ThumbNameFieldLength) then ' ImageFileName = left(ImageFileName, ThumbNameFieldLength) & "..." ' End If ' If len(ImageFileNameNoExt) > cint(ThumbNameFieldLength) then ' ImageFileNameNoExt = left(ImageFileNameNoExt, ThumbNameFieldLength) & "..." ' End If 'End If response.write "" If ThumbShowName = "YES" then response.write "" response.write "" If ThumbShowExtension = "YES" then response.write "" Else response.write "" End If End If If ThumbShowSize = "YES" then response.write "" response.write "" End If If ThumbShowDate = "YES" then response.write "" response.write "" End If If UseDB = "YES" and ImageType = "JPG" or ImageType = "jpg" or ImageType = "GIF" or ImageType = "gif" or ImageType = "PNG" or ImageType = "png" then If ThumbShowViews = "YES" then response.write "" response.write "" End If If UseRating = "YES" then If ThumbShowRating = "YES" then response.write "" If ImageRating = "Not Yet Rated" then ImageRatingNumber = 0 End If response.write "" End If End If End If response.write "
" & Sub7Var15 & "  " & ImageFileName & "
 " & ImageFileNameNoExt & "
" & Sub7Var16 & " " & " " & RS("Gal_ImageSize") & "
" & Sub7Var17 & " " & " " & ImageDateAdded & "
" & Sub7Var18 & " " & " " & ImageHits & "
" %><%=Sub7Var19%><% response.write "  " & ImageRating & " (" & ImageRatingNumber & " " & Sub7Var20 & ")
" End If If Session("Gal_UserEditImageInfo") = "YES" then ImageSize = RS("Gal_ImageSize") ImageDate = RS("Gal_ImageDateAdded") CurrentImage = RS("Gal_ImageFileLocation") ImageFile = RS("Gal_ImageFileName") ImageCategory = RS("Gal_ImageCategory") response.write "" response.write "" response.write "" response.write "" response.write "" response.write "
" & Sub7Var21 & " " If UseTextNavigation = "NO" then %><%=Sub7Var22%><% %><%=Sub7Var23%><% %><%=Sub7Var24%><% %><%=Sub7Var25%><% If ImageStatus = "PENDING" then %><%=Sub7Var30%><% End If Else %><%=Sub7Var26%> | <% %><%=Sub7Var27%> | <% %><%=Sub7Var28%> | <% %><%=Sub7Var29%><% If ImageStatus = "PENDING" then %> | <%=Sub7Var31%><% End If End If response.write "
" End If response.write "
" If RS.RecordCount > PicsPerPage then response.write "" response.write "
" NumPages = RS.RecordCount \ PicsPerPage If RS.RecordCount MOD picsperpage <> 0 then NumPages = NumPages + 1 End If ThisPage = (cint(request.querystring("start")) \ cint(picsperpage)) + 1 If ThisPage > 1 then response.write " " & Sub7Var32 & " " End If For X=0 to (numpages - 1) If (X+1)=ThisPage then Response.write "[" & CStr(X+1) & "] " Else Response.write " " & CStr(X+1) & " " End If Next If ThisPage <> NumPages then response.write " " & Sub7Var33 & " " End If response.write "
" End If If NoResults <> "" then response.write NoResults End If End Sub '********************************************************************************* '***** Draw Login Page *********************************************************** '********************************************************************************* Sub DrawLoginPage response.write "" response.write "" response.write "" response.write "" response.write "" response.write "" response.write "" response.write "" response.write "" response.write "" response.write "
" & Sub8Var1 & "
    " & Sub8Var2 & "
" response.write "
" response.write "" response.write "" response.write "" response.write "" response.write "" response.write "" response.write "" response.write "" response.write "" response.write "" response.write "" response.write "" response.write "" response.write "
" response.write "" & Sub8Var3 & "" If request.querystring("error") = "nouser" then response.write "
" & Sub8Var4 & "" End If response.write "
" response.write "" & Sub8Var5 & "" If request.querystring("error") = "wrongpassword" then response.write "
" & Sub8Var6 & "" End If response.write "
 
" response.write "
" response.write "
" response.write "" End Sub '********************************************************************************* '***** Process Login ************************************************************* '********************************************************************************* Sub ProcessLogin SQL = "SELECT * FROM Gal_Users WHERE Gal_UserUserName = '" & request.form("txtUserName") & "'" Set RS=dbc.execute(SQL) If NOT RS.EOF then If RS("Gal_UserPassword") = request.form("txtPassword") then Session("Gal_UserID") = RS("Gal_UserID") Session("Gal_UserFirstName") = RS("Gal_UserFirstName") Session("Gal_UserLastName") = RS("Gal_UserLastName") Session("Gal_UserUserName") = RS("Gal_UserUserName") Session("Gal_UserPassword") = RS("Gal_UserPassword") Session("Gal_UserEditConfig") = RS("Gal_UserEditConfig") Session("Gal_UserEditUsers") = RS("Gal_UserEditUsers") Session("Gal_UserEditImageInfo") = RS("Gal_UserEditImageInfo") Session("Gal_UserEditCategories") = RS("Gal_UserEditCategories") Session("Gal_UserUploadImages") = RS("Gal_UserUploadImages") Session("Gal_UserApproveSubmits") = RS("Gal_UserApproveSubmits") Session("Gal_UserCopyright") = RS("Gal_UserCopyright") Session("Gal_UserPhotographer") = RS("Gal_UserPhotographer") Session("Gal_UserCamera") = RS("Gal_UserCamera") Session("Gal_UserSource") = RS("Gal_UserSource") response.redirect "album.asp?action=summary&message=" & Sub9Var1 & "&from=login" Else response.redirect "album.asp?action=login&error=wrongpassword" End If Else response.redirect "album.asp?action=login&error=nouser" End If End Sub '********************************************************************************* '***** Draw Search Options ******************************************************* '********************************************************************************* Sub DrawSearchOptions response.write "" response.write "" response.write "" response.write "" response.write "" response.write "" response.write "" response.write "" response.write "" response.write "" response.write "
" & Sub10Var1 & "
    " & Sub10Var2 & "
" response.write "
" response.write "" response.write "" response.write "" response.write "" response.write "" response.write "" response.write "" response.write "" response.write "" response.write "" response.write "" response.write "" response.write "" If UseSQLServer = "NO" then response.write "" response.write "" response.write "" response.write "" response.write "" response.write "" response.write "" response.write "" End If response.write "" response.write "" response.write "" response.write "" response.write "
" response.write "" & Sub10Var3 & "" response.write "" response.write "
" response.write "" & Sub10Var13 & "" response.write " " & Sub10Var14 & " " & Sub10Var15 & " " & Sub10Var16 response.write "
" response.write "" & Sub10Var17 & "" response.write "
" response.write "" & Sub10Var18 & "" response.write "" response.write "
" response.write "" & Sub10Var19 & "" response.write " " & Sub10Var20 & " " & Sub10Var21 response.write "
 
" response.write "
" response.write "
" response.write "" End Sub '********************************************************************************* '***** Process Search ************************************************************ '********************************************************************************* Sub SearchProcess SQL = "SELECT * FROM Gal_Images WHERE " & request.form("txtSearchIn") & " LIKE '" If request.form("txtSearchOptions") = "BEGINS" then SQL = SQL & "%" & request.form("txtSearchString") & "'" End If If request.form("txtSearchOptions") = "CONTAINS" then SQL = SQL & "%" & request.form("txtSearchString") & "%'" End If If request.form("txtSearchOptions") = "ENDS" then SQL = SQL & request.form("txtSearchString") & "%'" End If If UseSQLServer = "NO" then SQL = SQL & " ORDER BY " & request.form("txtSearchSort") & " " & request.form("txtSearchOrder") End If Session("Gal_CurrentSearch") = SQL If request.querystring("type") <> "simple" then %> <% Else response.redirect "album.asp?action=dosearch" End If End Sub '********************************************************************************* '***** Draw Preferences ********************************************************** '********************************************************************************* Sub Preferences response.write "" response.write "" response.write "" response.write "" response.write "" response.write "" response.write "" response.write "" response.write "" response.write "" response.write "
" & Sub11Var1 & "
    " & Sub11Var2 & "
" response.write "
" response.write "" response.write "" response.write "" response.write "" response.write "" response.write "" response.write "" response.write "" response.write "" response.write "" response.write "" response.write "" response.write "" response.write "" response.write "" response.write "" response.write "" response.write "
" response.write "" & Sub11Var3 & "" response.write "
" response.write "" & Sub11Var4 & "" response.write "
" response.write "" & Sub11Var5 & "" response.write "" response.write "
 
" response.write "
" response.write "
" response.write "" End Sub '********************************************************************************* '***** Save Preferences ********************************************************** '********************************************************************************* Sub PreferencesProcess Response.Cookies("ALBUM3_PREFS")("ThumbCols") = request.form("txtThumbCols") Response.Cookies("ALBUM3_PREFS")("ThumbRows") = request.form("txtThumbRows") Response.Cookies("ALBUM3_PREFS")("Skin") = request.form("txtSkinFolder") Response.Cookies("ALBUM3_PREFS")("Favorites") = Session("Gal_Favorites") Response.Cookies("ALBUM3_PREFS").Expires = Now() + 30 Session.Abandon Session("Gal_ConfigLoaded") = "NO" %> <% End Sub '********************************************************************************* '***** Add To Favorites ********************************************************** '********************************************************************************* Sub AddToFavorites ImageFileLocation = request.querystring("cat") & "/" & request.querystring("image") SQL = "SELECT Gal_ImageID FROM Gal_Images WHERE Gal_ImageFileLocation = '" & ImageFileLocation & "'" Set RS=dbc.execute(SQL) If NOT RS.EOF then Session("Gal_Favorites") = Session("Gal_Favorites") & RS("Gal_ImageID") & ", " response.Cookies("ALBUM3_PREFS")("Favorites") = Session("Gal_Favorites") Response.Cookies("ALBUM3_PREFS").Expires = Now() + 30 End If RS.Close Set RS=Nothing %> <% End Sub '********************************************************************************* '***** Approve Submitted File **************************************************** '********************************************************************************* Sub ApproveSubmitted SQL = "UPDATE Gal_Images SET Gal_ImageStatus = '' WHERE Gal_ImageID = " & request.querystring("image") Set RS=dbc.execute(SQL) %> <% End Sub '********************************************************************************* '***** Remove From Favorites ***************************************************** '********************************************************************************* Sub RemoveFromFavorites ImageFileLocation = request.querystring("cat") & "/" & request.querystring("image") SQL = "SELECT Gal_ImageID FROM Gal_Images WHERE Gal_ImageFileLocation = '" & ImageFileLocation & "'" Set RS=dbc.execute(SQL) CurrentImageID = RS("Gal_ImageID") RS.Close Set RS=Nothing FavoritesArray = Split(Session("Gal_Favorites")) ArraySize = ubound(FavoritesArray) For I = 0 to ArraySize TempValue = Replace(FavoritesArray(I), ", ", "") TempValue = Replace(TempValue, " ", "") TempValue = Replace(TempValue, ",", "") If TempValue <> "" then If cint(TempValue) <> cint(CurrentImageID) then NewFavorites = NewFavorites & cint(TempValue) & ", " End If End If Next Session("Gal_Favorites") = NewFavorites response.Cookies("ALBUM3_PREFS")("Favorites") = Session("Gal_Favorites") Response.Cookies("ALBUM3_PREFS").Expires = Now() + 30 %> <% End Sub '********************************************************************************* '***** Logoff Confirm ************************************************************ '********************************************************************************* Sub LogOff response.write "" response.write "" response.write "" response.write "" response.write "" response.write "" response.write "" response.write "" response.write "" response.write "" response.write "
" & Sub12Var1 & "
    " & Sub12Var2 & "
" response.write "
" response.write "" response.write "" response.write "" response.write "" response.write "" response.write "
 

" response.write "
" response.write "
" response.write "" End Sub '********************************************************************************* '***** Process Logoff ************************************************************ '********************************************************************************* Sub ProcessLogOff Session.Abandon response.redirect "album.asp?action=summary&message=" & Sub13Var1 & "&from=logoff" End Sub '********************************************************************************* '***** Draw Summary Page ********************************************************* '********************************************************************************* Sub DrawSummary FromPage = request.querystring("from") SELECT CASE FromPage CASE "login" HeaderLine1 = Sub14Var1 HeaderLine2 = "    " & Sub14Var2 Message = request.querystring("message") ShowImage = "popup_head_login.gif" CASE "editimageinfosuccess" HeaderLine1 = Sub14Var3 HeaderLine2 = "    " & Sub14Var4 Message = request.querystring("message") ShowImage = "popup_head_imageinfo.gif" CASE "editcategoryinfosuccess" HeaderLine1 = Sub14Var5 HeaderLine2 = "    " & Sub14Var4 Message = request.querystring("message") ShowImage = "popup_head_categoryinfo.gif" CASE "renamecategorysuccess" HeaderLine1 = Sub14Var6 HeaderLine2 = "    " & Sub14Var4 Message = request.querystring("message") ShowImage = "popup_head_categoryinfo.gif" CASE "movecategorysuccess" HeaderLine1 = Sub14Var7 HeaderLine2 = "    " & Sub14Var4 Message = request.querystring("message") ShowImage = "popup_head_categoryinfo.gif" CASE "deletecategorysuccess" HeaderLine1 = Sub14Var8 HeaderLine2 = "    " & Sub14Var4 Message = request.querystring("message") ShowImage = "popup_head_categoryinfo.gif" CASE "addcategorysuccess" HeaderLine1 = Sub14Var9 HeaderLine2 = "    " & Sub14Var4 Message = request.querystring("message") ShowImage = "popup_head_categoryinfo.gif" CASE "rateimagesuccess" HeaderLine1 = Sub14Var10 HeaderLine2 = "    " & Sub14Var4 Message = request.querystring("message") ShowImage = "popup_head_imageinfo.gif" CASE "logoff" HeaderLine1 = Sub14Var11 HeaderLine2 = "    " & Sub14Var4 Message = request.querystring("message") ShowImage = "popup_head_logoff.gif" CASE "deleteimagesuccess" HeaderLine1 = Sub14Var12 HeaderLine2 = "    " & Sub14Var4 Message = request.querystring("message") ShowImage = "popup_head_imageinfo.gif" CASE "renameimagesuccess" HeaderLine1 = Sub14Var13 HeaderLine2 = "    " & Sub14Var4 Message = request.querystring("message") ShowImage = "popup_head_imageinfo.gif" CASE "moveimagesuccess" HeaderLine1 = Sub14Var14 HeaderLine2 = "    " & Sub14Var4 Message = request.querystring("message") ShowImage = "popup_head_imageinfo.gif" CASE "addusersuccess" HeaderLine1 = Sub14Var15 HeaderLine2 = "    " & Sub14Var4 Message = request.querystring("message") ShowImage = "popup_head_users.gif" CASE "modifyusersuccess" HeaderLine1 = Sub14Var16 HeaderLine2 = "    " & Sub14Var4 Message = request.querystring("message") ShowImage = "popup_head_users.gif" CASE "deleteusersuccess" HeaderLine1 = Sub14Var17 HeaderLine2 = "    " & Sub14Var4 Message = request.querystring("message") ShowImage = "popup_head_users.gif" CASE "postcardsuccess" HeaderLine1 = Sub14Var18 HeaderLine2 = "    " & Sub14Var4 Message = request.querystring("message") ShowImage = "popup_head_postcard.gif" CASE "editconfigsuccess" HeaderLine1 = Sub14Var19 HeaderLine2 = "    " & Sub14Var4 Message = request.querystring("message") ShowImage = "popup_head_config.gif" CASE "maintaindbsuccess" HeaderLine1 = Sub14Var20 HeaderLine2 = "    " & Sub14Var4 Message = request.querystring("message") ShowImage = "popup_head_db.gif" CASE "notallowed" HeaderLine1 = Sub14Var22 HeaderLine2 = "    " & Sub14Var4 Message = request.querystring("message") ShowImage = "popup_head_login.gif" CASE ELSE END SELECT response.write "" response.write "" response.write "" response.write "" response.write "" response.write "" response.write "" response.write "" response.write "" response.write "" response.write "
" & HeaderLine1 & "
" & HeaderLine2 & "
" response.write "" & Message & "

" If request.querystring("from") <> "renamecategorysuccess" and request.querystring("from") <> "movecategorysuccess" and request.querystring("from") <> "deletecategorysuccess" then response.write "" Else %> <% End If response.write "
" response.write "" End Sub '********************************************************************************* '***** Edit Image Info *********************************************************** '********************************************************************************* Sub EditImageInfo ImageCategory = request.querystring("cat") ImageFilename = request.querystring("image") ImageLocation = request.querystring("cat") & "/" & request.querystring("image") ImageLocation = replace(ImageLocation, "\", "/") ImageDate = request.querystring("date") ImageSize = request.querystring("size") ThumbLocation = request.querystring("cat") & "/thumbs/" & request.querystring("image") NoThumbLocation = request.querystring("cat") & "/pics/" & request.querystring("image") SQL = "SELECT * FROM Gal_Images WHERE Gal_ImageFileLocation = '" & ImageLocation & "'" Set RS = dbc.execute(SQL) If NOT RS.EOF then ImageHits = int(RS("Gal_ImageHits")) ImageRatingTotal = RS("Gal_ImageRatingTotal") ImageRatingNumber = RS("Gal_ImageRatingNumber") ImageCaption = RS("Gal_ImageCaption") ImageKeywords = RS("Gal_ImageKeywords") ImageCopyright = RS("Gal_ImageCopyright") ImagePhotographer = RS("Gal_ImagePhotographer") ImageSource = RS("Gal_ImageSource") ImageCamera = RS("Gal_ImageCamera") ImageID = RS("Gal_ImageID") ImageUser1 = RS("Gal_ImageUser1") ImageUser2 = RS("Gal_ImageUser2") ImageUser3 = RS("Gal_ImageUser3") ImageUser4 = RS("Gal_ImageUser4") ImageUser5 = RS("Gal_ImageUser5") ImageDate = RS("Gal_ImageDateAdded") End If response.write "" response.write "" response.write "" response.write "" response.write "" response.write "" response.write "" response.write "" response.write "" response.write "" response.write "
" & Sub15Var1 & "
    " & Sub15Var2 & "
" response.write "
" response.write "" response.write "" response.write "" response.write "" response.write "" Else response.write "" End If response.write "" response.write "" response.write "" response.write "" response.write "" response.write "" response.write "" response.write "" response.write "" response.write "" response.write "" response.write "" response.write "" response.write "" response.write "" response.write "" response.write "" response.write "" response.write "" response.write "" response.write "" response.write "" response.write "" response.write "" response.write "" response.write "" response.write "" If User1 <> "" then response.write "" response.write "" %>" response.write "" response.write "" End If If User2 <> "" then response.write "" response.write "" %>" response.write "" response.write "" End If If User3 <> "" then response.write "" response.write "" %>" response.write "" response.write "" End If If User4 <> "" then response.write "" response.write "" %>" response.write "" response.write "" End If If User5 <> "" then response.write "" response.write "" %>" response.write "" response.write "" End If response.write "" response.write "" response.write "" response.write "
" If fso.fileexists(GalleryPath & "/" & ThumbLocation) then response.write "" response.write "" & Sub15Var3 & "
" response.write "" & Sub15Var4 & " " & ImageLocation & "
" response.write "" & Sub15Var5 & " " & ImageDate & "
" response.write "" & Sub15Var6 & " " & ImageSize & "
" response.write "
" response.write "" & Sub15Var7 & "" response.write "
" response.write "" & Sub15Var8 & "" response.write "
" response.write "" & Sub15Var9 & "" response.write "
" response.write "" & Sub15Var10 & "" response.write "
" response.write "" & Sub15Var11 & "" response.write "
" response.write "" & Sub15Var12 & "" response.write "
" response.write "" & User1 & ":<% response.write "
" response.write "" & User2 & ":<% response.write "
" response.write "" & User3 & ":<% response.write "
" response.write "" & User4 & ":<% response.write "
" response.write "" & User5 & ":<% response.write "
 

" response.write "
" response.write "
" response.write "" End Sub '********************************************************************************* '***** Edit Image Info Process *************************************************** '********************************************************************************* Sub EditImageInfoProcess txtGal_ImageID = request.form("txtID") txtGal_ImageCaption = request.form("txtCaption") txtGal_ImageKeywords = request.form("txtKeywords") txtGal_ImageCopyright = request.form("txtCopyright") txtGal_ImagePhotographer = request.form("txtPhotographer") txtGal_ImageCamera = request.form("txtCamera") txtGal_ImageSource = request.form("txtSource") txtGal_ImageLocation = request.form("txtLocation") txtGal_ImageUser1 = FixString(request.form("txtUser1")) txtGal_ImageUser2 = FixString(request.form("txtUser2")) txtGal_ImageUser3 = FixString(request.form("txtUser3")) txtGal_ImageUser4 = FixString(request.form("txtUser4")) txtGal_ImageUser5 = FixString(request.form("txtUser5")) SQL="UPDATE Gal_Images SET " SQL = SQL & "Gal_ImageCaption = '" & txtGal_ImageCaption & "', " SQL = SQL & "Gal_ImageKeywords = '" & txtGal_ImageKeywords & "', " SQL = SQL & "Gal_ImageCopyright = '" & txtGal_ImageCopyright & "', " SQL = SQL & "Gal_ImagePhotographer = '" & txtGal_ImagePhotographer & "', " SQL = SQL & "Gal_ImageCamera = '" & txtGal_ImageCamera & "', " SQL = SQL & "Gal_ImageUser1 = '" & txtGal_ImageUser1 & "', " SQL = SQL & "Gal_ImageUser2 = '" & txtGal_ImageUser2 & "', " SQL = SQL & "Gal_ImageUser3 = '" & txtGal_ImageUser3 & "', " SQL = SQL & "Gal_ImageUser4 = '" & txtGal_ImageUser4 & "', " SQL = SQL & "Gal_ImageUser5 = '" & txtGal_ImageUser5 & "', " SQL = SQL & "Gal_ImageSource = '"& txtGal_ImageSource & "' " SQL = SQL & " WHERE [Gal_ImageID] ="&txtGal_ImageID dbc.Execute(SQL) response.redirect "album.asp?action=summary&from=editimageinfosuccess&message=" & Sub16Var1 End Sub '********************************************************************************* '***** Edit Category Info ******************************************************** '********************************************************************************* Sub EditCategoryInfo ThisCategory = request.querystring("cat") SQL = "SELECT * FROM Gal_Categories WHERE Gal_CategoryLocation = '" & ThisCategory & "'" Set RS = dbc.execute(SQL) If NOT RS.EOF then CategoryID = RS("Gal_CategoryID") CategoryLocation = RS("Gal_CategoryLocation") CategoryImage = RS("Gal_CategoryImage") CategoryDescription = RS("Gal_CategoryDescription") CategoryRecordExists = "YES" CategorySubmitRights = RS("Gal_CategorySubmitRights") Else CategoryLocation = ThisCategory End If response.write "" response.write "" response.write "" response.write "" response.write "" response.write "" response.write "" response.write "" response.write "" response.write "" response.write "
" & Sub17Var1 & "
    " & Sub17Var2 & "
" response.write "
" response.write "" response.write "" response.write "" response.write "" response.write "" response.write "" response.write "" response.write "" response.write "" response.write "" response.write "" response.write "" response.write "" response.write "" response.write "" response.write "" response.write "" response.write "" response.write "" response.write "" response.write "
" response.write "" & Sub17Var3 & "" response.write "
" response.write "" & Sub17Var4 & "
 
" response.write "
  " %><%=Sub17Var5%><% response.write "" response.write "
" response.write "" & Sub17Var6 & "" response.write "" response.write "
 

" response.write "
" response.write "
" response.write "" End Sub '********************************************************************************* '***** Rename Category *********************************************************** '********************************************************************************* Sub RenameCategory ThisCategory = request.querystring("cat") SQL = "SELECT * FROM Gal_Categories WHERE Gal_CategoryLocation = '" & ThisCategory & "'" Set RS = dbc.execute(SQL) If NOT RS.EOF then CategoryID = RS("Gal_CategoryID") CategoryLocation = RS("Gal_CategoryLocation") CategoryName = RS("Gal_CategoryName") Else CategoryLocation = ThisCategory End If response.write "" response.write "" response.write "" response.write "" response.write "" response.write "" response.write "" response.write "" response.write "" response.write "" response.write "
" & Sub18Var1 & "
    " & Sub18Var2 & "
" response.write "
" response.write "" response.write "" response.write "" response.write "" response.write "" response.write "" response.write "" response.write "" response.write "" response.write "" response.write "" response.write "" response.write "
" response.write "" & Sub18Var3 & "" '----- Added Notice about characters in names ----------------------------------- response.write "
NOTE: Make sure you don't use any of the following characters in your category name: ' \ / : * ? < > | " & Chr(34) & "" '-------------------------------------------------------------------------------- response.write "
 

" response.write "
" response.write "
" response.write "" End Sub '********************************************************************************* '***** Rename Category Process *************************************************** '********************************************************************************* Sub RenameCategoryProcess txtGal_CategoryID = request.form("txtID") txtGal_CategoryOldLocation = request.form("txtOldLocation") txtGal_CategoryOldLocation = replace(txtGal_CategoryOldLocation, "\", "/") txtGal_CategoryOldName = request.form("txtOldName") txtGal_CategoryNewName = request.form("txtNewName") 'txtGal_CategoryNewName = FixName(txtGal_CategoryNewName) TempValue = Len(txtGal_CategoryOldName) TempLocation = Left(txtGal_CategoryOldLocation, TempValue) 'txtGal_CategoryNewLocation = TempLocation & "\" & txtGal_CategoryNewName txtGal_CategoryNewLocation = Replace(txtGal_CategoryOldLocation, txtGal_CategoryOldName, txtGal_CategoryNewName) If txtGal_CategoryOldLocation = txtGal_CategoryOldName then txtGal_CategoryNewLocation = txtGal_CategoryNewName End If '----- Update this categorys name in the DB ------------------------- SQL="UPDATE Gal_Categories SET " SQL = SQL & "Gal_CategoryName = '" & txtGal_CategoryNewName & "', " SQL = SQL & "Gal_CategoryLocation = '" & txtGal_CategoryNewLocation & "' " SQL = SQL & " WHERE [Gal_CategoryID] ="&txtGal_CategoryID dbc.Execute(SQL) '----- Rename the actual folder to the new name --------------------- OldPath = GalleryPath & "\" & txtGal_CategoryOldLocation NewPath = GalleryPath & "\" & txtGal_CategoryNewLocation Set fso = Server.CreateObject("Scripting.FileSystemObject") fso.MoveFolder OldPath, NewPath '----- Change all the images in this category ----------------------- SQL = "SELECT * FROM Gal_Images WHERE Gal_ImageCategory LIKE '" & txtGal_CategoryOldLocation & "%'" Set RS = dbc.execute(SQL) Do While NOT RS.EOF If txtGal_CategoryOldLocation <> RS("Gal_ImageCategory") then TempNewCategory = RS("Gal_ImageCategory") NewCategory = Replace(TempNewCategory, txtGal_CategoryOldLocation, txtGal_CategoryNewLocation) Else NewCategory = txtGal_CategoryNewLocation End If ThumbnailLocation = GalleryPath & "\" & NewCategory & "\" & thumbsname & "\" & RS("Gal_ImageFileName") ImageFileName = RS("Gal_ImageFileName") ImagePicLocation = GalleryPath & "\" & NewCategory & "\" & picsname & "\" ImageThumbLocation = GalleryPath & "\" & NewCategory & "\" & thumbsname & "\" NewLocation = replace(NewCategory, "\", "/") SQLn="UPDATE Gal_Images SET " SQLn = SQLn & "Gal_ImageFileLocation = '" & NewLocation & "/" & RS("Gal_ImageFileName") & "', " SQLn = SQLn & "Gal_ImageThumbURL = '" & GalleryURL & "/" & replace(NewCategory," ","%20") & "/" & thumbsname & "/" & replace(RS("Gal_ImageFileName")," ","%20") & "', " SQLn = SQLn & "Gal_ImageThumbPath = '" & ImageThumbLocation & "', " SQLn = SQLn & "Gal_ImagePicPath = '" & ImagePicLocation & "', " SQLn = SQLn & "Gal_ImagePicURL = '" & GalleryURL & "/" & replace(NewCategory," ","%20") & "/" & picsname & "/" & replace(RS("Gal_ImageFileName")," ","%20") & "', " SQLn = SQLn & "Gal_ImageCategory = '" & NewCategory & "' " SQLn = SQLn & " WHERE [Gal_ImageID] ="& RS("Gal_ImageID") dbc.Execute(SQLn) RS.MoveNext Loop '----- Update any other categories under this one ------------------- SQL = "SELECT * FROM Gal_Categories WHERE Gal_CategoryLocation LIKE '" & txtGal_CategoryOldLocation & "%'" Set RS = dbc.execute(SQL) Do While NOT RS.EOF CatName = RS("Gal_CategoryName") NewLocation = txtGal_CategoryNewLocation & "\" & CatName 'NewLocation = replace(NewLocation, "\", "/") If RS("Gal_CategoryLocation") <> txtGal_CategoryNewLocation then SQLu="UPDATE Gal_Categories SET " SQLu = SQLu & "Gal_CategoryLocation = '" & NewLocation & "' " SQLu = SQLu & " WHERE [Gal_CategoryID] ="& RS("Gal_CategoryID") dbc.Execute(SQLu) End If RS.MoveNext Loop '--------------------------------------------------------------------- response.redirect "album.asp?action=summary&from=renamecategorysuccess&message=" & Sub19Var1 End Sub '********************************************************************************* '***** Move Category ************************************************************* '********************************************************************************* Sub MoveCategory ThisCategory = request.querystring("cat") SQL = "SELECT * FROM Gal_Categories WHERE Gal_CategoryLocation = '" & ThisCategory & "'" Set RS = dbc.execute(SQL) If NOT RS.EOF then CategoryID = RS("Gal_CategoryID") CategoryLocation = RS("Gal_CategoryLocation") CategoryName = RS("Gal_CategoryName") Else CategoryLocation = ThisCategory End If response.write "" response.write "" response.write "" response.write "" response.write "" response.write "" response.write "" response.write "" response.write "" response.write "" response.write "
" & Sub20Var1 & "
    " & Sub20Var2 & "
" response.write "
" response.write "" response.write "" response.write "" response.write "" response.write "" response.write "" response.write "" response.write "" response.write "" response.write "" response.write "" response.write "" response.write "
" response.write "" & Sub20Var3 & "" response.write "" response.write "
 

" response.write "
" response.write "
" response.write "" End Sub '********************************************************************************* '***** Move Category Process ***************************************************** '********************************************************************************* Sub MoveCategoryProcess txtGal_CategoryID = request.form("txtID") txtGal_CategoryOldLocation = request.form("txtOldLocation") txtGal_CategoryOldName = request.form("txtOldName") txtGal_CategoryNewLocation = request.form("txtNewCategory") & "\" & request.form("txtOldName") txtGal_CategoryNewLocation = Replace(txtGal_CategoryNewLocation, GalleryPath, "") txtGal_CategoryNewLocation = Right(txtGal_CategoryNewLocation, Len(txtGal_CategoryNewLocation) - 1) 'txtGal_CategoryNewLocation = Replace(txtGal_CategoryOldLocation, txtGal_CategoryOldName, txtGal_CategoryNewName) 'If txtGal_CategoryOldLocation = txtGal_CategoryOldName then ' txtGal_CategoryNewLocation = txtGal_CategoryNewName 'End If '----- Update this categorys name in the DB ------------------------- SQL="UPDATE Gal_Categories SET " 'SQL = SQL & "Gal_CategoryName = '" & txtGal_CategoryNewName & "', " SQL = SQL & "Gal_CategoryLocation = '" & txtGal_CategoryNewLocation & "' " SQL = SQL & " WHERE [Gal_CategoryID] ="&txtGal_CategoryID dbc.Execute(SQL) '----- Rename the actual folder to the new name --------------------- OldPath = GalleryPath & "\" & txtGal_CategoryOldLocation NewPath = GalleryPath & "\" & txtGal_CategoryNewLocation response.write "OldPath: " & OldPath & "
" response.write "NewPath: " & NewPath & "
" Set fso = Server.CreateObject("Scripting.FileSystemObject") fso.MoveFolder OldPath, NewPath '----- Change all the images in this category ----------------------- SQL = "SELECT * FROM Gal_Images WHERE Gal_ImageCategory LIKE '" & txtGal_CategoryOldLocation & "%'" Set RS = dbc.execute(SQL) Do While NOT RS.EOF If txtGal_CategoryOldLocation <> RS("Gal_ImageCategory") then TempNewCategory = RS("Gal_ImageCategory") NewCategory = Replace(TempNewCategory, txtGal_CategoryOldLocation, txtGal_CategoryNewLocation) Else NewCategory = txtGal_CategoryNewLocation End If ThumbnailLocation = GalleryPath & "\" & NewCategory & "\" & thumbsname & "\" & RS("Gal_ImageFileName") ImageFileName = RS("Gal_ImageFileName") ImagePicLocation = GalleryPath & "\" & NewCategory & "\" & picsname & "\" ImageThumbLocation = GalleryPath & "\" & NewCategory & "\" & thumbsname & "\" NewCategory = replace(NewCategory, "\","/") SQLn="UPDATE Gal_Images SET " SQLn = SQLn & "Gal_ImageFileLocation = '" & NewCategory & "/" & RS("Gal_ImageFileName") & "', " SQLn = SQLn & "Gal_ImageThumbURL = '" & GalleryURL & "/" & replace(NewCategory," ","%20") & "/" & thumbsname & "/" & replace(RS("Gal_ImageFileName")," ","%20") & "', " SQLn = SQLn & "Gal_ImageThumbPath = '" & ImageThumbLocation & "', " SQLn = SQLn & "Gal_ImagePicPath = '" & ImagePicLocation & "', " SQLn = SQLn & "Gal_ImagePicURL = '" & GalleryURL & "/" & replace(NewCategory," ","%20") & "/" & picsname & "/" & replace(RS("Gal_ImageFileName")," ","%20") & "', " SQLn = SQLn & "Gal_ImageCategory = '" & NewCategory & "' " SQLn = SQLn & " WHERE [Gal_ImageID] ="& RS("Gal_ImageID") dbc.Execute(SQLn) RS.MoveNext Loop '----- Update any other categories under this one ------------------- SQL = "SELECT * FROM Gal_Categories WHERE Gal_CategoryLocation LIKE '" & txtGal_CategoryOldLocation & "%'" Set RS = dbc.execute(SQL) Do While NOT RS.EOF CatName = RS("Gal_CategoryName") NewLocation = txtGal_CategoryNewLocation & "\" & CatName If RS("Gal_CategoryLocation") <> txtGal_CategoryNewLocation then SQLu="UPDATE Gal_Categories SET " SQLu = SQLu & "Gal_CategoryLocation = '" & NewLocation & "' " SQLu = SQLu & " WHERE [Gal_CategoryID] ="& RS("Gal_CategoryID") dbc.Execute(SQLu) End If RS.MoveNext Loop '--------------------------------------------------------------------- response.redirect "album.asp?action=summary&from=movecategorysuccess&message=" & Sub21Var1 End Sub '********************************************************************************* '***** Delete Category *********************************************************** '********************************************************************************* Sub DeleteCategory ThisCategory = request.querystring("cat") SQL = "SELECT * FROM Gal_Categories WHERE Gal_CategoryLocation = '" & ThisCategory & "'" Set RS = dbc.execute(SQL) If NOT RS.EOF then CategoryID = RS("Gal_CategoryID") CategoryLocation = RS("Gal_CategoryLocation") CategoryName = RS("Gal_CategoryName") Else CategoryLocation = ThisCategory End If response.write "" response.write "" response.write "" response.write "" response.write "" response.write "" response.write "" response.write "" response.write "" response.write "" response.write "
" & Sub22Var1 & "
    " & Sub22Var2 & "
" response.write "
" response.write "" response.write "" response.write "" response.write "" response.write "" response.write "" response.write "" response.write "" response.write "" response.write "" response.write "" response.write "" response.write "
" response.write "" & Sub22Var3 & "" response.write "" & CategoryName & "
" response.write "" & Sub22Var4 & "
" response.write "
 

" response.write "
" response.write "
" response.write "" End Sub '********************************************************************************* '***** Delete Category Process *************************************************** '********************************************************************************* Sub DeleteCategoryProcess txtGal_CategoryID = request.form("txtID") txtGal_CategoryOldLocation = request.form("txtOldLocation") txtGal_CategoryOldName = request.form("txtOldName") txtGal_CategoryNewLocation = request.form("txtNewCategory") & "\" & request.form("txtOldName") txtGal_CategoryNewLocation = Replace(txtGal_CategoryNewLocation, GalleryPath, "") txtGal_CategoryNewLocation = Right(txtGal_CategoryNewLocation, Len(txtGal_CategoryNewLocation) - 1) '----- Delete folder(s) from the DB --------------------------------- SQL="DELETE FROM Gal_Categories WHERE Gal_CategoryLocation LIKE '" & txtGal_CategoryOldLocation & "%'" dbc.Execute(SQL) '----- Rename the actual folder to the new name --------------------- OldPath = GalleryPath & "\" & txtGal_CategoryOldLocation Set fso = Server.CreateObject("Scripting.FileSystemObject") fso.DeleteFolder(OldPath) '----- Change all the images in this category ----------------------- SQL = "DELETE FROM Gal_Images WHERE Gal_ImageCategory LIKE '" & txtGal_CategoryOldLocation & "%'" Set RS = dbc.execute(SQL) response.redirect "album.asp?action=summary&from=deletecategorysuccess&message=" & Sub23Var1 End Sub '********************************************************************************* '***** Edit Category Info Process ************************************************ '********************************************************************************* Sub EditCategoryInfoProcess txtGal_CategoryID = request.form("txtID") txtGal_CategoryLocation = request.form("txtLocation") txtGal_CategoryDescription = request.form("txtDescription") txtGal_CategoryImage = request.form("txtImage") txtGal_CategoryRecordExists = request.form("txtRecordExists") txtGal_CategorySubmitRights = request.form("txtSubmitRights") If txtGal_CategoryRecordExists = "YES" then SQL="UPDATE Gal_Categories SET " SQL = SQL & "Gal_CategoryDescription = '" & txtGal_CategoryDescription & "', " SQL = SQL & "Gal_CategorySubmitRights = '" & txtGal_CategorySubmitRights & "', " SQL = SQL & "Gal_CategoryImage = '"& txtGal_CategoryImage & "' " SQL = SQL & " WHERE [Gal_CategoryID] ="&txtGal_CategoryID dbc.Execute(SQL) response.redirect "album.asp?action=summary&from=editcategoryinfosuccess&message=" & Sub24Var1 Else Set RS=Server.CreateObject("ADODB.RecordSet") RS.Open "SELECT * FROM Gal_Categories", dbc, adOpenDynamic, adLockPessimistic, adCMDText RS.AddNew RS("Gal_CategoryLocation") = txtGal_CategoryLocation RS("Gal_CategoryDescription") = txtGal_CategoryDescription RS("Gal_CategoryImage") = txtGal_CategoryImage RS.Update RS.Close Set RS=Nothing response.redirect "album.asp?action=summary&from=editcategoryinfosuccess&message=" & Sub24Var1 End If End Sub '********************************************************************************* '******** Add a New Category ***************************************************** '********************************************************************************* Sub AddCategory ThisCategory = request.querystring("cat") If ThisCategory <> "" then CurrentPath = GalleryPath & "\" & ThisCategory CurrentDisplayPath = ThisCategory Else CurrentPath = GalleryPath CurrentDisplayPath = "TOP" End If If request.querystring("name") <> "" then CategoryName = request.querystring("name") CategoryDescription = request.querystring("description") CategoryImage = request.querystring("categoryimage") CurrentPath = request.querystring("currentpath") End If response.write "" response.write "" response.write "" response.write "" response.write "" response.write "" response.write "" response.write "" response.write "" response.write "" response.write "
" & Sub25Var1 & "
    " & Sub25Var2 & "
" response.write "
" response.write "" response.write "" response.write "" response.write "" response.write "" response.write "" response.write "" response.write "" response.write "" response.write "" response.write "" response.write "" response.write "" response.write "" response.write "" response.write "" response.write "" response.write "" response.write "" response.write "" response.write "" response.write "" response.write "" response.write "" response.write "" response.write "" response.write "" response.write "
" response.write "" & Sub25Var3 & "" & Sub25Var4 & "
" & CurrentDisplayPath response.write "
" response.write "" & Sub25Var5 & "" If request.querystring("error") = "alreadyexists" then response.write "
" response.write Sub25Var6 response.write "" End If '----- Added Notice about characters in names ----------------------------------- response.write "
NOTE: Make sure you don't use any of the following characters in your category name: ' \ / : * ? < > | " & Chr(34) & "" '-------------------------------------------------------------------------------- response.write "
" response.write "" & Sub25Var7 & "" response.write "
" response.write "" & Sub25Var8 & "
 
" response.write "
  " %><%=Sub25Var9%><% response.write "" response.write "
" response.write "" & Sub25Var10 & "" response.write "" response.write "
 

" response.write "
" response.write "
" response.write "" End Sub '********************************************************************************* '******** Add Category Process *************************************************** '********************************************************************************* Sub AddCategoryProcess Set fs=createobject("scripting.filesystemobject") NewFolder = request.form("txtLocation") NewFolder = NewFolder & "\" & request.form("txtName") NewFolder = NewFolder PicsFolder = NewFolder & "\" & "pics" ThumbsFolder = NewFolder & "\" & "thumbs" If request.form("txtDBLocation") = "" then txtGal_CategoryLocation = request.form("txtName") Else txtGal_CategoryLocation = request.form("txtDBLocation") & "\" & request.form("txtName") End If txtGal_CategoryDescription = request.form("txtDescription") txtGal_CategoryImage = request.form("txtImage") txtGal_SubmitRights = request.form("txtSubmitRights") If NOT fs.folderexists(NewFolder) then fs.createfolder(NewFolder) fs.createfolder(PicsFolder) fs.createfolder(ThumbsFolder) Set RS=Server.CreateObject("ADODB.RecordSet") RS.Open "SELECT * FROM Gal_Categories", dbc, adOpenDynamic, adLockPessimistic, adCMDText RS.AddNew RS("Gal_CategoryName") = request.form("txtName") RS("Gal_CategoryLocation") = txtGal_CategoryLocation RS("Gal_CategoryDescription") = txtGal_CategoryDescription RS("Gal_CategoryImage") = txtGal_CategoryImage RS("Gal_CategorySubmitRights") = txtGal_SubmitRights RS.Update RS.Close Set RS=Nothing response.redirect "album.asp?action=summary&from=addcategorysuccess&message=" & Sub26Var1 Else response.redirect "album.asp?action=addcategory&name=" & request.form("txtName") & "&description=" & request.form("txtDescription") & "&categoryimage=" & request.form("txtImage") & "¤tpath=" & request.form("txtLocation") & "&error=alreadyexists" End If End Sub '********************************************************************************* '******** Upload Media *********************************************************** '********************************************************************************* Sub UploadMedia ThisCategory = request.querystring("cat") If ThisCategory <> "" then CurrentPath = GalleryPath & "\" & ThisCategory CurrentDisplayPath = ThisCategory Else CurrentPath = GalleryPath CurrentDisplayPath = "TOP" End If response.write "" response.write "" response.write "" response.write "" response.write "" response.write "" response.write "" response.write "" response.write "" response.write "" response.write "
" & Sub27Var1 & "
    " & Sub27Var2 & "
" response.write "
" response.write "" response.write "" response.write "" response.write "" response.write "" response.write "" response.write "" response.write "" response.write "" response.write "
  " & Sub27Var3 & "

" response.write "
  " & Sub27Var4 & "
" response.write "


" response.write "
" response.write "
" response.write "" End Sub '********************************************************************************* '******** Upload Media 2 ********************************************************* '********************************************************************************* Sub UploadMedia2 ThisCategory = request.querystring("cat") If ThisCategory <> "" then CurrentPath = GalleryPath & "\" & ThisCategory CurrentDisplayPath = ThisCategory Else CurrentPath = GalleryPath CurrentDisplayPath = "TOP" End If CategorySubmitRights = GetSubmitRights(ThisCategory) ' ThisCategory = request.form("txtDBLocation") ' If ThisCategory <> "" then ' CurrentPath = request.form("txtLocation") ' CurrentDisplayPath = ThisCategory ' Else ' CurrentPath = GalleryPath ' CurrentDisplayPath = "TOP" ' End If HowMany = "ONE" response.write "" response.write "" response.write "" response.write "" If request.querystring("action") <> "submit" then response.write "" Else response.write "" End If response.write "" response.write "" response.write "" response.write "" response.write "" response.write "
" & Sub28Var1 & "
    " & Sub28Var2 & "
" & Sub28Var3 & "
    " & Sub28Var2 & "
" response.write "
" response.write "" response.write "" response.write "" response.write "" response.write "" If HowMany = "ONE" then If UploadComponet = "" or UploadComponent = "aspSmartUpload" then response.write "" response.write "" response.write "" Else response.write "" response.write "" response.write "" End If End If response.write "" response.write "" response.write "
" response.write Sub28Var4 & "
" response.write "" & CurrentDisplayPath & "

" response.write Sub28Var5 & "
" response.write "
" If request.querystring("action") <> "submit" then response.write "
" response.write "
" response.write "
" response.write "

" Else response.write "
" End If response.write "
" response.write Sub28Var4 & "
" response.write "" & CurrentDisplayPath & "

" response.write Sub28Var5 & "
" response.write "
" If request.querystring("action") <> "submit" then response.write "
" response.write "
" response.write "
" response.write "

" Else response.write "
" End If response.write "
" response.write "
" response.write "" response.write "
" response.write "
onclick="UploadAnimation.className='UploadImageAnimationVis'"<% response.write ">
" response.write "
" response.write "
" response.write "
" response.write "" End Sub '********************************************************************************* '******** Upload Media 3 ********************************************************* '********************************************************************************* Sub UploadMedia3 UploadLocation = request.querystring("location") & "\pics" CurrentPath = request.querystring("location") ThisCategory = request.querystring("dblocation") CategorySubmitRights = request.querystring("submit") SELECT CASE UploadComponent CASE "" Dim Uploader, File Set Uploader = New FileUploader Uploader.Upload() If Uploader.Files.Count = 0 Then UploadResult = Sub29Var1 Else For Each File In Uploader.Files.Items File.SaveToDisk UploadLocation Next UploadResult = "SUCCESS" End If CASE "AspUpload" Set Upload = Server.CreateObject("Persits.Upload") Count = Upload.Save(UploadLocation) For Each File in Upload.Files sFileName = File.Path Session("Gal_FileUploaded") = Right(sFileName, Len(sFileName)-InStrRev(sFileName, "\")) Next If Count = "" then UploadResult = Sub29Var1 Else UploadResult = "SUCCESS" End If CASE "aspSmartUpload" Set Upload = Server.CreateObject("aspSmartUpload.SmartUpload") Upload.Upload Count = Upload.Save(UploadLocation) sFileName = Upload.Files.Item(1).FileName Session("Gal_FileUploaded") = Right(sFileName, Len(sFileName)-InStrRev(sFileName, "\")) If Count = "" or Count = 0 then UploadResult = Sub29Var1 Else UploadResult = "SUCCESS" End If CASE "SAFileUp" Set Upload = Server.CreateObject("SoftArtisans.FileUp") Upload.Path = UploadLocation Upload.Save Count = Upload.TotalBytes 'sFileName = upload.form("File1").UserFilename 'Session("Gal_FileUploaded") = Right(sFileName, Len(sFileName)-InStrRev(sFileName, "\")) If Count = "" then UploadResult = Sub29Var1 Else UploadResult = "SUCCESS" End If CASE ELSE END SELECT If UploadResult <> "SUCCESS" then response.write UploadResult Else response.write "" response.write "" response.write "" response.write "" response.write "" response.write "" response.write "" response.write "" response.write "" response.write "" response.write "
" & Sub29Var2 & "
    " & Sub29Var3 & "
" response.write "
" response.write "" response.write "" response.write "" response.write "" '------- Get Image Info and Add it to the DB FileUploaded = UploadLocation & "\" & Session("Gal_FileUploaded") If fso.fileexists(FileUploaded) then Set X = fso.getfile(FileUploaded) ThumbnailLocation = GalleryPath & "\" & ThisCategory & "\" & thumbsname & "\" & X.Name ImageFileName = X.Name ImageName = Left(ImageFileName, Len(ImageFileName)-4) ImagePicLocation = GalleryPath & "\" & ThisCategory & "\" & picsname & "\" ImageThumbLocation = GalleryPath & "\" & ThisCategory & "\" & thumbsname & "\" ImageType = Right(X.Name, 3) TempLocation = ThisCategory & "/" & X.Name TempLocation = Replace(TempLocation, "\", "/") Set RS=Server.CreateObject("ADODB.RecordSet") RS.Open "SELECT * FROM Gal_Images", dbc, adOpenDynamic, adLockPessimistic, adCMDText RS.AddNew RS("Gal_ImageType") = ImageType RS("Gal_ImageFileName") = X.Name RS("Gal_ImageCategory") = ThisCategory RS("Gal_ImageThumbPath") = ImageThumbLocation RS("Gal_ImageThumbURL") = GalleryURL & "/" & replace(ThisCategory," ","%20") & "/" & thumbsname & "/" & replace(X.Name," ","%20") RS("Gal_ImagePicURL") = GalleryURL & "/" & replace(ThisCategory," ","%20") & "/" & picsname & "/" & replace(X.Name," ","%20") RS("Gal_ImagePicPath") = ImagePicLocation RS("Gal_ImageFileLocation") = TempLocation RS("Gal_ImageDateAdded") = FormatDateTime(X.DateCreated, 2) RS("Gal_ImageSize") = (X.Size \ 1024) & "k" RS("Gal_ImageCopyright") = Session("Gal_UserCopyright") RS("Gal_ImagePhotographer") = Session("Gal_UserPhotographer") RS("Gal_ImageCamera") = Session("Gal_UserCamera") RS("Gal_ImageSource") = Session("Gal_UserSource") RS("Gal_ImageKeywords") = ImageName If CategorySubmitRights = "PENDING" and Session("Gal_UserID") = "" then RS("Gal_ImageStatus") = "PENDING" End If RS.Update RS.Close Set RS=Nothing End If response.write "" If request.querystring("howmany") = "ONE" then response.write "" response.write "" response.write "" response.write "" response.write "" response.write "" End If response.write "
" response.write Sub29Var4 & "
" response.write Sub29Var5 & " " & Sub29Var6 & "
" If UploadComponet = "" or UploadComponent = "aspSmartUpload" then response.write "
" If request.querystring("oldaction") <> "submit" then response.write "
" response.write "
" response.write "
" response.write "

" Else response.write "
" End If Else response.write "
" If request.querystring("oldaction") <> "submit" then response.write "
" response.write "
" response.write "
" response.write "

" Else response.write "
" End If End If '---- Check to see if a component is installed... if so give the option to create a thumbnail automatically. If JPGComponent <> "" then response.write "" & Sub29Var7 & " " & JPGComponent & " " & Sub29Var8 & "

" response.write Sub29Var9 & "
" response.write "
" End If response.write "


" response.write "
" response.write "
" response.write "" End If End Sub '********************************************************************************* '******** Upload Media 4 ********************************************************* '********************************************************************************* Sub UploadMedia4 UploadLocation = request.querystring("location") & "\thumbs" CurrentPath = request.querystring("location") ThisCategory = request.querystring("dblocation") SELECT CASE UploadComponent CASE "" Dim Uploader, File Set Uploader = New FileUploader Uploader.Upload() If Uploader.Files.Count = 0 Then UploadResult = Sub30Var1 Else For Each File In Uploader.Files.Items File.SaveToDisk UploadLocation Next UploadResult = "SUCCESS" End If CASE "AspUpload" Set Upload = Server.CreateObject("Persits.Upload") Count = Upload.Save(UploadLocation) If Count = "" then UploadResult = Sub30Var1 Else UploadResult = "SUCCESS" End If CASE "aspSmartUpload" Set Upload = Server.CreateObject("aspSmartUpload.SmartUpload") Upload.Upload Count = Upload.Save(UploadLocation) If Count = "" or Count = 0 then UploadResult = Sub30Var1 Else UploadResult = "SUCCESS" End If CASE "SAFileUp" Set Upload = Server.CreateObject("SoftArtisans.FileUp") Upload.Path = UploadLocation Upload.Save Count = Upload.TotalBytes If Count = "" then UploadResult = Sub30Var1 Else UploadResult = "SUCCESS" End If CASE ELSE END SELECT If UploadResult <> "SUCCESS" Then response.write "" response.write "" response.write "" response.write "" response.write "" response.write "" response.write "" response.write "" response.write "" response.write "" response.write "
" & Sub30Var2 & "
    " & Sub30Var3 & "
" response.write "
" response.write "" response.write "" response.write "" response.write "" response.write "" response.write "" response.write "" response.write "
" & Sub30Var4 & "

" response.write "


" response.write "
" response.write "
" response.write "" Else response.write "" response.write "" response.write "" response.write "" response.write "" response.write "" response.write "" response.write "" response.write "" response.write "" response.write "
" & Sub30Var7 & "
    " & Sub30Var8 & "
" response.write "
" response.write "" response.write "" response.write "" response.write "" response.write "" response.write "" response.write "" response.write "
" & Sub30Var9 & "

" response.write "


" response.write "
" response.write "
" response.write "" End If End Sub '********************************************************************************* '******** Rate An Image ********************************************************** '********************************************************************************* Sub RateImage ImageCategory = request.querystring("cat") ImageFilename = request.querystring("image") ImageLocation = replace(request.querystring("cat"), "\", "/") & "/" & request.querystring("image") ImageDate = request.querystring("date") ImageSize = request.querystring("size") ThumbLocation = request.querystring("cat") & "/thumbs/" & request.querystring("image") NoThumbLocation = request.querystring("cat") & "/pics/" & request.querystring("image") SQL = "SELECT * FROM Gal_Images WHERE Gal_ImageFileLocation = '" & ImageLocation & "'" Set RS = dbc.execute(SQL) If NOT RS.EOF then ImageHits = int(RS("Gal_ImageHits")) ImageRatingTotal = RS("Gal_ImageRatingTotal") ImageRatingNumber = RS("Gal_ImageRatingNumber") ImageCaption = RS("Gal_ImageCaption") ImageKeywords = RS("Gal_ImageKeywords") ImageCopyright = RS("Gal_ImageCopyright") ImagePhotographer = RS("Gal_ImagePhotographer") ImageSource = RS("Gal_ImageSource") ImageCamera = RS("Gal_ImageCamera") ImageID = RS("Gal_ImageID") ImageDate = RS("Gal_ImageDateAdded") End If response.write "" response.write "" response.write "" response.write "" response.write "" response.write "" response.write "" response.write "" response.write "" response.write "" response.write "
" & Sub31Var1 & "
    " & Sub31Var2 & "
" response.write "
" response.write "" response.write "" response.write "" response.write "" response.write "" response.write "" response.write "" Else response.write "" End If response.write "
" If fso.fileexists(GalleryPath & "/" & ThumbLocation) then response.write "" response.write "" & Sub31Var3 & "

" response.write "

" response.write "" response.write "
" response.write "
" response.write "
" response.write "" End Sub '********************************************************************************* '******** Rate Image Process ***************************************************** '********************************************************************************* Sub RateImageProcess CurrentRating = request.form("txtImageRating") txtGal_ImageID = request.form("txtID") txtGal_ImageLocation = request.form("txtLocation") txtGal_ImageRatingTotal = request.form("txtRatingTotal") If txtGal_ImageRatingTotal = "" then txtGal_ImageRatingTotal = 0 End If txtGal_ImageRatingNumber = request.form("txtRatingNumber") If txtGal_ImageRatingNumber = "" then txtGal_ImageRatingNumber = 0 End If txtGal_ImageRatingNumber = cint(txtGal_ImageRatingNumber) + 1 txtGal_ImageRatingTotal = txtGal_ImageRatingTotal + cint(CurrentRating) SQL="UPDATE Gal_Images SET " SQL = SQL & "Gal_ImageRatingNumber = '" & txtGal_ImageRatingNumber & "', " SQL = SQL & "Gal_ImageRatingTotal = '"& txtGal_ImageRatingTotal & "' " SQL = SQL & " WHERE [Gal_ImageID] ="& txtGal_ImageID dbc.Execute(SQL) response.redirect "album.asp?action=summary&from=rateimagesuccess&message=" & Sub32Var1 End Sub '********************************************************************************* '******** Delete An Image ******************************************************** '********************************************************************************* Sub DeleteImage ImageCategory = request.querystring("cat") ImageFilename = request.querystring("image") ImageLocation = replace(request.querystring("cat"), "\", "/") & "/" & request.querystring("image") ImageDate = request.querystring("date") ImageSize = request.querystring("size") ThumbLocation = request.querystring("cat") & "/thumbs/" & request.querystring("image") NoThumbLocation = request.querystring("cat") & "/pics/" & request.querystring("image") SQL = "SELECT * FROM Gal_Images WHERE Gal_ImageFileLocation = '" & ImageLocation & "'" Set RS = dbc.execute(SQL) If NOT RS.EOF then ImageHits = int(RS("Gal_ImageHits")) ImageRatingTotal = RS("Gal_ImageRatingTotal") ImageRatingNumber = RS("Gal_ImageRatingNumber") ImageCaption = RS("Gal_ImageCaption") ImageKeywords = RS("Gal_ImageKeywords") ImageCopyright = RS("Gal_ImageCopyright") ImagePhotographer = RS("Gal_ImagePhotographer") ImageSource = RS("Gal_ImageSource") ImageCamera = RS("Gal_ImageCamera") ImageID = RS("Gal_ImageID") ImageDate = RS("Gal_ImageDateAdded") End If response.write "" response.write "" response.write "" response.write "" response.write "" response.write "" response.write "" response.write "" response.write "" response.write "" response.write "
" & Sub33Var1 & "
    " & Sub33Var2 & "
" response.write "
" response.write "" response.write "" response.write "" response.write "" response.write "" response.write "" response.write "" Else response.write "" End If response.write "" response.write "" response.write "" response.write "" response.write "" response.write "" response.write "" response.write "" response.write "" response.write "" response.write "
" If fso.fileexists(GalleryPath & "/" & ThumbLocation) then response.write "" response.write "" & Sub33Var3 & "
" response.write "" & Sub33Var4 & " " & ImageLocation & "
" response.write "" & Sub33Var5 & " " & ImageDate & "
" response.write "" & Sub33Var6 & " " & ImageSize & "
" response.write "
" response.write " " & Sub33Var7 & "" response.write "
 
" response.write "
" response.write "
" response.write "" End Sub '********************************************************************************* '******** Delete Image Process *************************************************** '********************************************************************************* Sub DeleteImageProcess ImageCategory = request.form("txtImageCat") ImageFilename = request.form("txtImageName") DBLocation = ImageCategory & "/" & ImageFileName ImageLocation = GalleryPath & "\" & ImageCategory & "\pics\" & ImageFilename ThumbLocation = GalleryPath & "\" & ImageCategory & "\thumbs\" & ImageFilename ImageURL = GalleryURL & "\" & ImageCategory & "\pics\" & ImageFilename 'response.write "Image Location: " & ImageLocation & "
" 'response.write "Thumb Location: " & ThumbLocation & "
" If fso.fileexists(ImageLocation) then fso.deletefile(ImageLocation) If fso.fileexists(ThumbLocation) then fso.deletefile(ThumbLocation) End If SQL = "DELETE FROM Gal_Images WHERE Gal_ImageFileLocation = '" & replace(DBLocation, "\", "/") & "'" dbc.execute(SQL) response.redirect "album.asp?action=summary&from=deleteimagesuccess&message=" & Sub34Var1 Else response.redirect "album.asp?action=summary&from=deleteimagesuccess&message=" & Sub34Var2 End If End Sub '********************************************************************************* '******** Rename An Image ******************************************************** '********************************************************************************* Sub RenameImage ImageCategory = request.querystring("cat") ImageFilename = request.querystring("image") ImageLocation = request.querystring("cat") & "/" & request.querystring("image") ImageDate = request.querystring("date") ImageSize = request.querystring("size") ThumbLocation = request.querystring("cat") & "/thumbs/" & request.querystring("image") NoThumbLocation = request.querystring("cat") & "/pics/" & request.querystring("image") SQL = "SELECT * FROM Gal_Images WHERE Gal_ImageFileLocation = '" & replace(ImageLocation, "\", "/") & "'" Set RS = dbc.execute(SQL) If NOT RS.EOF then ImageHits = int(RS("Gal_ImageHits")) ImageRatingTotal = RS("Gal_ImageRatingTotal") ImageRatingNumber = RS("Gal_ImageRatingNumber") ImageCaption = RS("Gal_ImageCaption") ImageKeywords = RS("Gal_ImageKeywords") ImageCopyright = RS("Gal_ImageCopyright") ImagePhotographer = RS("Gal_ImagePhotographer") ImageSource = RS("Gal_ImageSource") ImageCamera = RS("Gal_ImageCamera") ImageID = RS("Gal_ImageID") ImageDate = RS("Gal_ImageDateAdded") End If response.write "" response.write "" response.write "" response.write "" response.write "" response.write "" response.write "" response.write "" response.write "" response.write "" response.write "
" & Sub35Var1 & "
    " & Sub35Var2 & "
" response.write "
" response.write "" response.write "" response.write "" response.write "" response.write "" response.write "" response.write "" Else response.write "" End If response.write "" response.write "" response.write "" response.write "" response.write "" response.write "" response.write "" response.write "" response.write "" response.write "" response.write "
" If fso.fileexists(GalleryPath & "/" & ThumbLocation) then response.write "" response.write "" & Sub35Var3 & "
" response.write "" & Sub35Var4 & " " & ImageLocation & "
" response.write "" & Sub35Var5 & " " & ImageDate & "
" response.write "" & Sub35Var6 & " " & ImageSize & "
" response.write "
" response.write " " & Sub35Var7 & "
" response.write "" '----- Added Notice about characters in names ----------------------------------- response.write "
NOTE: Make sure you don't use any of the following characters in your image name: ' \ / : * ? < > | " & Chr(34) & "" '-------------------------------------------------------------------------------- response.write "
" response.write "
 
" response.write "
" response.write "
" response.write "" End Sub '********************************************************************************* '******** Rename Image Process *************************************************** '********************************************************************************* Sub RenameImageProcess ImageCategory = request.form("txtImageCat") ImageFilename = request.form("txtImageName") DBLocation = ImageCategory & "/" & ImageFileName ImageLocation = GalleryPath & "\" & ImageCategory & "\pics\" & ImageFilename ThumbLocation = GalleryPath & "\" & ImageCategory & "\thumbs\" & ImageFilename ImageURL = GalleryURL & "\" & ImageCategory & "\pics\" & ImageFilename NewImageName = request.form("txtNewImageName") NewImageLocation = GalleryPath & "\" & ImageCategory & "\pics\" & NewImageName NewThumbLocation = GalleryPath & "\" & ImageCategory & "\thumbs\" & NewImageName NewDBLocation = ImageCategory & "/" & NewImageName DBLocation = replace(DBLocation, "\", "/") NewDBLocation = replace(NewDBLocation, "\", "/") If fso.fileexists(ImageLocation) then fso.MoveFile ImageLocation, NewImageLocation If fso.fileexists(ThumbLocation) then fso.MoveFile ThumbLocation, NewThumbLocation End If SQL = "UPDATE Gal_Images SET Gal_ImageFileLocation = '" & replace(NewDBLocation, "\", "/") & "' WHERE Gal_ImageFileLocation = '" & replace(DBLocation, "\", "/") & "'" 'response.write SQL dbc.execute(SQL) response.redirect "album.asp?action=summary&from=renameimagesuccess&message=" & Sub36Var1 Else response.redirect "album.asp?action=summary&from=renameimagesuccess&message=" & Sub36Var2 End If End Sub '********************************************************************************* '******** Move An Image ********************************************************** '********************************************************************************* Sub MoveImage ImageCategory = request.querystring("cat") ImageFilename = request.querystring("image") ImageLocation = replace(request.querystring("cat"), "\", "/") & "/" & request.querystring("image") ImageDate = request.querystring("date") ImageSize = request.querystring("size") ThumbLocation = request.querystring("cat") & "/thumbs/" & request.querystring("image") NoThumbLocation = request.querystring("cat") & "/pics/" & request.querystring("image") SQL = "SELECT * FROM Gal_Images WHERE Gal_ImageFileLocation = '" & ImageLocation & "'" Set RS = dbc.execute(SQL) If NOT RS.EOF then ImageHits = int(RS("Gal_ImageHits")) ImageRatingTotal = RS("Gal_ImageRatingTotal") ImageRatingNumber = RS("Gal_ImageRatingNumber") ImageCaption = RS("Gal_ImageCaption") ImageKeywords = RS("Gal_ImageKeywords") ImageCopyright = RS("Gal_ImageCopyright") ImagePhotographer = RS("Gal_ImagePhotographer") ImageSource = RS("Gal_ImageSource") ImageCamera = RS("Gal_ImageCamera") ImageID = RS("Gal_ImageID") ImageDate = RS("Gal_ImageDateAdded") End If response.write "" response.write "" response.write "" response.write "" response.write "" response.write "" response.write "" response.write "" response.write "" response.write "" response.write "
" & Sub37Var1 & "
    " & Sub37Var2 & "
" response.write "
" response.write "" response.write "" response.write "" response.write "" response.write "" response.write "" response.write "" Else response.write "" End If response.write "" response.write "" response.write "" response.write "" response.write "" response.write "" response.write "" response.write "" response.write "" response.write "" response.write "
" If fso.fileexists(GalleryPath & "/" & ThumbLocation) then response.write "" response.write "" & Sub37Var3 & "
" response.write "" & Sub37Var4 & " " & ImageLocation & "
" response.write "" & Sub37Var5 & " " & ImageDate & "
" response.write "" & Sub37Var6 & " " & ImageSize & "
" response.write "
" response.write " " & Sub37Var7 & "
" response.write "" response.write "
" response.write "
 
" response.write "
" response.write "
" response.write "" End Sub '********************************************************************************* '******** Move Image Process ***************************************************** '********************************************************************************* Sub MoveImageProcess ImageCategory = request.form("txtImageCat") ImageFilename = request.form("txtImageName") DBLocation = ImageCategory & "/" & ImageFileName DBLocation = Replace(DBLocation, "\", "/") ImageLocation = GalleryPath & "\" & ImageCategory & "\pics\" & ImageFilename ThumbLocation = GalleryPath & "\" & ImageCategory & "\thumbs\" & ImageFilename ImageURL = GalleryURL & "\" & ImageCategory & "\pics\" & ImageFilename 'NewImageName = request.form("txtNewImageName") NewCategory = request.form("txtNewCategory") NewImageLocation = NewCategory & "\pics\" & ImageFileName NewThumbLocation = NewCategory & "\thumbs\" & ImageFileName DBCategory = Replace(NewCategory, GalleryPath, "") 'DBCategory = Replace(DBCategory, "\", "/") DBCategory = Right(DBCategory, Len(DBCategory) -1) NewDBLocation = DBCategory & "/" & ImageFileName NewDBLocation = replace(NewDBLocation, "\", "/") response.write "OLD PIC LOCATION: " & ImageLocation & "
" response.write "NEW PIC LOCATION: " & NewImageLocation & "

" response.write "OLD THUMB LOCATION: " & ThumbLocation & "
" response.write "NEW THUMB LOCATION: " & NewThumbLocation & "

" response.write "OLD DB LOCATION: " & DBLocation & "
" response.write "NEW DB LOCATION: " & NewDBLocation If fso.fileexists(ImageLocation) then fso.MoveFile ImageLocation, NewImageLocation If fso.fileexists(ThumbLocation) then fso.MoveFile ThumbLocation, NewThumbLocation End If SQL = "UPDATE Gal_Images SET Gal_ImageFileLocation = '" & NewDBLocation & "' WHERE Gal_ImageFileLocation = '" & DBLocation & "'" dbc.execute(SQL) response.redirect "album.asp?action=summary&from=moveimagesuccess&message=" & Sub38Var1 Else response.redirect "album.asp?action=summary&from=moveimagesuccess&message=" & Sub38Var2 End If End Sub '********************************************************************************* '******** Send A Post Card ******************************************************* '********************************************************************************* Sub SendPostCard %> <% ImageCategory = request.querystring("cat") ImageFilename = request.querystring("image") ImageLocation = request.querystring("cat") & "/" & request.querystring("image") ImageDate = request.querystring("date") ImageSize = request.querystring("size") ThumbLocation = request.querystring("cat") & "/thumbs/" & request.querystring("image") NoThumbLocation = request.querystring("cat") & "/pics/" & request.querystring("image") ImageURL = GalleryURL & "\" & request.querystring("cat") & "\pics\" & request.querystring("image") If EmailComponent = "" then response.write "onload="alert('<%=Sub39Var7%>');"><% Else response.write "" End If response.write "" response.write "" response.write "" response.write "" response.write "" response.write "" response.write "" response.write "" response.write "" response.write "
" & Sub39Var8 & "
    " & Sub39Var9 & "
" response.write "
" response.write "" response.write "" response.write "" response.write "" response.write "" response.write "" Else response.write "" End If response.write "" response.write "" response.write "" response.write "" response.write "" response.write "" response.write "" response.write "" response.write "" response.write "" response.write "" response.write "" response.write "" response.write "" response.write "" response.write "" response.write "" response.write "" response.write "" response.write "" response.write "" response.write "" response.write "" response.write "" response.write "" response.write "
" If fso.fileexists(GalleryPath & "/" & ThumbLocation) then response.write "" response.write "" & Sub39Var10 & "
" response.write "" & Sub39Var11 & " " & ImageFileName & "
" response.write "" & Sub39Var12 & " " & ImageDate & "
" response.write "" & Sub39Var13 & " " & ImageSize & "
" response.write "
" response.write "  " & Sub39Var14 & "
  " %> <% response.write "
" & Sub39Var15 & "
" response.write "
" response.write "  " & Sub39Var16 & "
  " %> <% response.write "
" & Sub39Var17 & "
" response.write "
" response.write "  " & Sub39Var18 & "
" response.write "  " response.write "
" & Sub39Var19 & "
" response.write "
" response.write "  " & Sub39Var20 & "
  " %> <% response.write "
" & Sub39Var21 & "
" response.write "
" response.write " 
" 'response.write "  " response.write "
" & Sub39Var22 & "
" response.write "


" response.write "
" response.write "
" response.write "" End Sub '********************************************************************************* '******** Send Post Card Preview ************************************************* '********************************************************************************* Sub SendPostCardPreview ImageURL = request.form("txtImageURL") ImageURL = FullServerAddress & ImageURL CardRecipient = request.form("txtRecipient") CardYourName = request.form("txtYourName") CardYourEmail = request.form("txtYourEmail") CardGreeting = request.form("txtGreeting") CardMessage = request.form("txtMessage") CardBackColor = request.form("txtBackColor") CardBorderColor = request.form("txtBorderColor") CardFontFace = request.form("txtFontFace") CardFontColor = request.form("txtFontColor") CardSong = request.form("txtSong") 'ImageCategory = request.querystring("cat") 'ImageFilename = request.querystring("image") 'ImageLocation = request.querystring("cat") & "/" & request.querystring("image") 'ImageDate = request.querystring("date") 'ImageSize = request.querystring("size") 'ThumbLocation = request.querystring("cat") & "/thumbs/" & request.querystring("image") '------ Build the HTML Output 'If CardSong <> "" then ' TempPCOutput = "" 'End If TempPCOutput = TempPCOutput & "" TempPCOutput = TempPCOutput & "" TempPCOutput = TempPCOutput & "" TempPCOutput = TempPCOutput & "" TempPCOutput = TempPCOutput & "
" TempPCOutput = TempPCOutput & "" TempPCOutput = TempPCOutput & "" TempPCOutput = TempPCOutput & "" TempPCOutput = TempPCOutput & "" TempPCOutput = TempPCOutput & "" TempPCOutput = TempPCOutput & "
" TempPCOutput = TempPCOutput & "" TempPCOutput = TempPCOutput & "" TempPCOutput = TempPCOutput & "" TempPCOutput = TempPCOutput & "" TempPCOutput = TempPCOutput & "" TempPCOutput = TempPCOutput & "" TempPCOutput = TempPCOutput & "" TempPCOutput = TempPCOutput & "" TempPCOutput = TempPCOutput & "" TempPCOutput = TempPCOutput & "
 " TempPCOutput = TempPCOutput & "

" TempPCOutput = TempPCOutput & "" & CardGreeting & "

" TempPCOutput = TempPCOutput & "" & CardMessage & "
" TempPCOutput = TempPCOutput & "
" TempPCOutput = TempPCOutput & "From: " & CardYourName & "
" TempPCOutput = TempPCOutput & "" & CardYourEmail & "
" TempPCOutput = TempPCOutput & "
" TempPCOutput = TempPCOutput & "" & PostCardTagLine & "
" TempPCOutput = TempPCOutput & "
" TempPCOutput = TempPCOutput & "
" response.write "" response.write "" response.write "" response.write "" response.write "" response.write "" response.write "" response.write "" response.write "" response.write "" response.write "
" & Sub40Var1 & "
    " & Sub40Var2 & "
" response.write "
" response.write "" response.write "" response.write "" %> <% response.write "" response.write "" response.write "" response.write "" response.write "" response.write "" response.write "" response.write "
" response.write TempPCOutput response.write "
" & Sub40Var3 & " " & CardRecipient & "
" response.write "


" response.write "
" response.write "
" response.write "" End Sub '********************************************************************************* '******** Send PostCard Process ************************************************** '********************************************************************************* Sub SendPostCardProcess Recipient = request.form("txtRecipient") SenderName = request.form("txtSenderName") SenderEmail = request.form("txtSenderEmail") MessageToSend = request.form("txtMessageToSend") Call SendAnEmail(Recipient, SenderName, SenderEmail, MessageToSend) response.redirect "album.asp?action=summary&from=postcardsuccess&linktype=window&message=" & Sub41Var1 End Sub '********************************************************************************* '******** Upload A File ********************************************************** '********************************************************************************* Sub UploadCategoryImage formname = request.querystring("form") elementname = request.querystring("element") %> <% response.write "" response.write "" response.write "" response.write "" response.write "" response.write "" response.write "" response.write "" response.write "
" & Sub42Var1 & "
" response.write "
" response.write Sub42Var2 & "
" response.write "" & CategoryImageDirectory & "
" response.write "

" response.write "" response.write "
" response.write "
" End Sub '********************************************************************************* '******** Upload File Process **************************************************** '********************************************************************************* Sub UploadCategoryImageProcess Dim Uploader, File Set Uploader = New FileUploader formname = request.querystring("form") elementname = request.querystring("element") %> <% response.write "" response.write "" response.write "" response.write "" response.write "" response.write "" response.write "" response.write "" response.write "
" & Sub43Var1 & "
" Uploader.Upload() If Uploader.Files.Count = 0 Then Response.Write Sub43Var2 Else For Each File In Uploader.Files.Items File.SaveToDisk CategoryImageDirectory Next response.write Sub43Var3 & "

" response.write " onClick="calpopulate('<% response.write Session("frFileName") %>')" return false; <% response.write ">" response.write "
" End If End Sub '********************************************************************************* '******** Manage Users Page ****************************************************** '********************************************************************************* Sub ManageUsers response.write "" response.write "" response.write "" response.write "" response.write "" response.write "" response.write "" response.write "" response.write "" response.write "" response.write "
" & Sub44Var1 & "
    " & Sub44Var2 & "
" response.write "
" response.write "" response.write "" response.write "" response.write "" response.write "" response.write "" response.write "" response.write "" response.write "" response.write "" response.write "" response.write "" response.write "" response.write "" response.write "" response.write "" response.write "" response.write "
" response.write "" & Sub44Var3 & "" response.write "
" response.write "" & Sub44Var4 & "" response.write "
" response.write "" & Sub44Var5 & "" response.write "
 

" response.write "
" response.write "
" response.write "" End Sub '********************************************************************************* '******** Add A New User ********************************************************* '********************************************************************************* Sub AddUser response.write "" response.write "" response.write "" response.write "" response.write "" response.write "" response.write "" response.write "" response.write "" response.write "" response.write "
" & Sub45Var1 & "
    " & Sub44Var2 & "
" response.write "
" response.write "" response.write "" response.write "" response.write "" response.write "" response.write "" response.write "" response.write "" response.write "" response.write "" response.write "" response.write "" response.write "" response.write "" response.write "" response.write "" response.write "" response.write "" response.write "" response.write "" response.write "" response.write "" response.write "" response.write "" response.write "" response.write "" response.write "" response.write "" response.write "" response.write "" response.write "" response.write "" response.write "" response.write "" response.write "" response.write "" response.write "" response.write "" response.write "" response.write "" response.write "" response.write "" response.write "" response.write "" response.write "" response.write "
" response.write "" & Sub45Var3 & "" response.write "
" response.write "" & Sub45Var4 & "" response.write "
" response.write "" & Sub45Var5 & "" response.write "
" response.write "" & Sub45Var6 & "" response.write "
" response.write "" & Sub45Var7 & "" response.write "
" response.write "" & Sub45Var8 & "" response.write "
" response.write "" & Sub45Var9 & "" response.write "
" response.write "" & Sub45Var10 & "" response.write "
" response.write "" & Sub45Var11 & "" response.write "
" response.write "" & Sub45Var12 & "" response.write " " & Sub45Var13 & "
" response.write " " & Sub45Var14 & "
" response.write " " & Sub45Var15 & "
" response.write " " & Sub45Var16 & "
" response.write " " & Sub45Var17 & "
" response.write " " & Sub45Var18 & "
" response.write "
 

" response.write "
" response.write "
" response.write "" End Sub '********************************************************************************* '******** Add A New User Process ************************************************* '********************************************************************************* Sub AddUserProcess txtGal_UserFirstName = request.form("txtFirstName") txtGal_UserLastName = request.form("txtLastName") txtGal_UserUserName = request.form("txtUserName") txtGal_UserPassword = request.form("txtPassword") txtGal_UserEmailAddress = request.form("txtEmailAddress") txtGal_UserEditConfig = request.form("txtEditConfig") txtGal_UserEditUsers = request.form("txtEditUsers") txtGal_UserEditImageInfo = request.form("txtEditImageInfo") txtGal_UserEditCategories = request.form("txtEditCategories") txtGal_UserUploadImages = request.form("txtUploadImages") txtGal_UserApproveSubmits = request.form("txtApproveSubmits") txtGal_UserCopyright = request.form("txtCopyright") txtGal_UserPhotographer = request.form("txtPhotographer") txtGal_UserCamera = request.form("txtCamera") txtGal_UserSource = request.form("txtSource") Set RS=Server.CreateObject("ADODB.RecordSet") RS.Open "SELECT * FROM Gal_Users", dbc, adOpenDynamic, adLockPessimistic, adCMDText RS.AddNew RS("Gal_UserFirstName") = txtGal_UserFirstName RS("Gal_UserLastName") = txtGal_UserLastName RS("Gal_UserUserName") = txtGal_UserUserName RS("Gal_UserPassword") = txtGal_UserPassword RS("Gal_UserEmailAddress") = txtGal_UserEmailAddress RS("Gal_UserEditConfig") = txtGal_UserEditConfig RS("Gal_UserEditUsers") = txtGal_UserEditUsers RS("Gal_UserEditImageInfo") = txtGal_UserEditImageInfo RS("Gal_UserEditCategories") = txtGal_UserEditCategories RS("Gal_UserUploadImages") = txtGal_UserUploadImages RS("Gal_UserApproveSubmits") = txtGal_UserApproveSubmits RS("Gal_UserCopyright") = txtGal_UserCopyright RS("Gal_UserPhotographer") = txtGal_UserPhotographer RS("Gal_UserCamera") = txtGal_UserCamera RS("Gal_UserSource") = txtGal_UserSource RS.Update RS.Close Set RS=Nothing response.redirect "album.asp?action=summary&from=addusersuccess&linktype=window&message=" & Sub46Var1 End Sub '********************************************************************************* '******** Modify User Selection ************************************************** '********************************************************************************* Sub ModifyUser response.write "" response.write "" response.write "" response.write "" response.write "" response.write "" response.write "" response.write "" response.write "" response.write "" response.write "
" & Sub47Var1 & "
    " & Sub47Var2 & "
" response.write "
" response.write "" response.write "" response.write "" response.write "" response.write "" response.write "" response.write "" response.write "" response.write "" response.write "
" response.write "" & Sub47Var3 & "" response.write "" response.write "
 

" response.write "
" response.write "
" response.write "" End Sub '********************************************************************************* '******** Modify A User ********************************************************** '********************************************************************************* Sub ModifyUser2 SQL = "SELECT * FROM Gal_Users WHERE Gal_UserID = " & request.form("txtUserID") Set RS=dbc.execute(SQL) response.write "" response.write "" response.write "" response.write "" response.write "" response.write "" response.write "" response.write "" response.write "" response.write "" response.write "
" & Sub48Var1 & "
    " & Sub48Var2 & "
" response.write "
" response.write "" response.write "" response.write "" response.write "" response.write "" response.write "" response.write "" response.write "" response.write "" response.write "" response.write "" response.write "" response.write "" response.write "" response.write "" response.write "" response.write "" response.write "" response.write "" response.write "" response.write "" response.write "" response.write "" response.write "" response.write "" response.write "" response.write "" response.write "" response.write "" response.write "" response.write "" response.write "" response.write "" response.write "" response.write "" response.write "" response.write "" response.write "" response.write "" response.write "" response.write "" response.write "" response.write "" response.write "" response.write "" response.write "" response.write "
" response.write "" & Sub48Var3 & "" response.write "
" response.write "" & Sub48Var4 & "" response.write "
" response.write "" & Sub48Var5 & "" response.write "
" response.write "" & Sub48Var6 & "" response.write "
" response.write "" & Sub48Var7 & "" response.write "
" response.write "" & Sub48Var8 & "" response.write "
" response.write "" & Sub48Var9 & "" response.write "
" response.write "" & Sub48Var10 & "" response.write "
" response.write "" & Sub48Var11 & "" response.write "
" response.write "" & Sub48Var12 & "" response.write " " & Sub48Var13 & "
" response.write " " & Sub48Var14 & "
" response.write " " & Sub48Var15 & "
" response.write " " & Sub48Var16 & "
" response.write " " & Sub48Var17 & "
" response.write " " & Sub48Var18 & "
" response.write "
 

" response.write "
" response.write "
" response.write "" RS.Close Set RS=Nothing End Sub '********************************************************************************* '******** Modify A User Process ************************************************** '********************************************************************************* Sub ModifyUserProcess txtGal_UserFirstName = request.form("txtFirstName") txtGal_UserLastName = request.form("txtLastName") txtGal_UserUserName = request.form("txtUserName") txtGal_UserPassword = request.form("txtPassword") txtGal_UserEmailAddress = request.form("txtEmailAddress") txtGal_UserEditConfig = request.form("txtEditConfig") txtGal_UserEditUsers = request.form("txtEditUsers") txtGal_UserEditImageInfo = request.form("txtEditImageInfo") txtGal_UserEditCategories = request.form("txtEditCategories") txtGal_UserUploadImages = request.form("txtUploadImages") txtGal_UserApproveSubmits = request.form("txtApproveSubmits") txtGal_UserCopyright = request.form("txtCopyright") txtGal_UserPhotographer = request.form("txtPhotographer") txtGal_UserCamera = request.form("txtCamera") txtGal_UserSource = request.form("txtSource") SQL="UPDATE Gal_Users SET " SQL = SQL & "Gal_UserFirstName = '" & txtGal_UserFirstName & "', " SQL = SQL & "Gal_UserLastName = '" & txtGal_UserLastName & "', " SQL = SQL & "Gal_UserUserName = '" & txtGal_UserUserName & "', " SQL = SQL & "Gal_UserPassword = '" & txtGal_UserPassword & "', " SQL = SQL & "Gal_UserEmailAddress = '" & txtGal_UserEmailAddress & "', " SQL = SQL & "Gal_UserEditConfig = '" & txtGal_UserEditConfig & "', " SQL = SQL & "Gal_UserEditUsers = '" & txtGal_UserEditUsers & "', " SQL = SQL & "Gal_UserEditImageInfo = '" & txtGal_UserEditImageInfo & "', " SQL = SQL & "Gal_UserEditCategories = '" & txtGal_UserEditCategories & "', " SQL = SQL & "Gal_UserUploadImages = '" & txtGal_UserUploadImages & "', " SQL = SQL & "Gal_UserCopyright = '" & txtGal_UserCopyright & "', " SQL = SQL & "Gal_UserPhotographer = '" & txtGal_UserPhotographer & "', " SQL = SQL & "Gal_UserCamera = '" & txtGal_UserCamera & "', " SQL = SQL & "Gal_UserSource = '" & txtGal_UserSource & "', " SQL = SQL & "Gal_UserApproveSubmits = '"& txtGal_UserApproveSubmits & "' " SQL = SQL & " WHERE [Gal_UserID] ="&request.form("txtUserID") dbc.Execute(SQL) response.redirect "album.asp?action=summary&from=modifyusersuccess&linktype=window&message=" & Sub49Var1 End Sub '********************************************************************************* '******** Delete User Selection ************************************************** '********************************************************************************* Sub DeleteUser response.write "" response.write "" response.write "" response.write "" response.write "" response.write "" response.write "" response.write "" response.write "" response.write "" response.write "
" & Sub50Var1 & "
    " & Sub50Var2 & "
" response.write "
" response.write "" response.write "" response.write "" response.write "" response.write "" response.write "" response.write "" response.write "" response.write "" response.write "
" response.write "" & Sub50Var3 & "" response.write "" response.write "
 

" response.write "
" response.write "
" response.write "" End Sub '********************************************************************************* '******** Delete User Confirmation *********************************************** '********************************************************************************* Sub DeleteUser2 SQL = "SELECT * FROM Gal_Users WHERE Gal_UserID = " & request.form("txtUserID") Set RS=dbc.execute(SQL) response.write "" response.write "" response.write "" response.write "" response.write "" response.write "" response.write "" response.write "" response.write "" response.write "" response.write "
" & Sub51Var1 & "
    " & Sub51Var2 & "
" response.write "
" response.write "" response.write "" response.write "" response.write "" response.write "" response.write "" response.write "" response.write "" response.write "" response.write "" response.write "
" response.write "" & Sub51Var3 & "

" response.write RS("Gal_UserFirstName") & " " & RS("Gal_UserLastName") response.write "
 

" response.write "
" response.write "
" response.write "" End Sub '********************************************************************************* '******** Delete User Process **************************************************** '********************************************************************************* Sub DeleteUserProcess SQL = "DELETE FROM Gal_Users WHERE Gal_UserID IN("& request.form("txtUserID") &")" dbc.Execute(SQL) response.redirect "album.asp?action=summary&from=deleteusersuccess&linktype=window&message=" & Sub52Var1 End Sub '********************************************************************************* '******** Maintain DB ************************************************************ '********************************************************************************* Sub MaintainDB response.write "" response.write "" response.write "" response.write "" response.write "" response.write "" response.write "" response.write "" response.write "" response.write "" response.write "
" & Sub53Var1 & "
    " & Sub53Var2 & "
" response.write "
" response.write "" response.write "" response.write "" response.write "" response.write "" '-------- Check Images ------------------------ SQL = "SELECT * FROM Gal_Images" Set RS=dbc.execute(SQL) TempCount = 0 NoResults = "
" & Sub53Var4 & "
" Do While NOT RS.EOF PictureLocation = RS("Gal_ImagePicPath") & RS("Gal_ImageFileName") If PictureLocation <> "" then If fso.fileexists(PictureLocation) then Else TempCount = TempCount + 1 response.write "" response.write "" response.write "" response.write "" If TempCount = 1 then KillImages = RS("Gal_ImageID") Else KillImages = KillImages & ", " & RS("Gal_ImageID") End If End If End If RS.MoveNext Loop If TempCount <> 0 then response.write "" response.write "" response.write "" response.write "" End If RS.Close Set RS=Nothing If TempCount = 0 then response.write "" response.write "" response.write "" response.write "" End If NoResults = "" '-------- Check Categories ------------------------ response.write "" response.write "" response.write "" response.write "" response.write "" response.write "" response.write "" response.write "" SQL = "SELECT * FROM Gal_Categories" Set RS=dbc.execute(SQL) TempCount = 0 NoResults = "
" & Sub53Var6 & "
" Do While NOT RS.EOF CategoryLocation = GalleryPath & "\" & RS("Gal_CategoryLocation") If CategoryLocation <> "" then If fso.folderexists(CategoryLocation) then Else TempCount = TempCount + 1 response.write "" response.write "" response.write "" response.write "" If TempCount = 1 then KillFolders = RS("Gal_CategoryID") Else KillFolders = KillFolders & ", " & RS("Gal_CategoryID") End If End If End If RS.MoveNext Loop If TempCount <> 0 then response.write "" response.write "" response.write "" response.write "" End If RS.Close Set RS=Nothing If TempCount = 0 then response.write "" response.write "" response.write "" response.write "" End If NoResults = "" response.write "" response.write "" response.write "" response.write "" response.write "
" response.write "DEL
" & Sub53Var3 & "
" response.write "
" response.write "" response.write "" response.write "" & RS("Gal_ImageFileName") & "" response.write "
" response.write "" response.write "CLICK HERE TO DELETE ALL BROKEN IMAGE LINKS" response.write "
" response.write "" & NoResults & "" response.write "
" response.write "

" response.write "
" response.write "DEL
" & Sub53Var5 & "
" response.write "
" response.write "" response.write "" response.write "" & RS("Gal_CategoryLocation") & "" response.write "
" response.write "" response.write "CLICK HERE TO DELETE ALL BROKEN FOLDER LINKS" response.write "
" response.write "" & NoResults & "" response.write "
 

" response.write "
" response.write "
" response.write "" End Sub '********************************************************************************* '******** Maintain DB Process **************************************************** '********************************************************************************* Sub MaintainDBProcess If request.form("ImagesToDelete") <> "" then SQL = "DELETE FROM Gal_Images WHERE Gal_ImageID IN("& request.form("ImagesToDelete") &")" Set RS = dbc.Execute(SQL) End If If request.form("CategoriesToDelete") <> "" then SQL = "DELETE FROM Gal_Categories WHERE Gal_CategoryID IN("& request.form("CategoriesToDelete") &")" Set RS = dbc.Execute(SQL) End If response.redirect "album.asp?action=summary&from=maintaindbsuccess&linktype=window&message=" & Sub54Var1 End Sub '********************************************************************************* '******** Generate Embeded Content *********************************************** '********************************************************************************* Sub GenerateEmbed response.write "" response.write "" response.write "" response.write "" response.write "" response.write "" response.write "" response.write "" response.write "" response.write "" response.write "
" & Sub55Var1 & "
    " & Sub55Var2 & "
" response.write "
" response.write "" response.write "" response.write "" response.write "" response.write "" SQL = "SELECT * FROM Gal_Categories" Set RS=dbc.execute(SQL) response.write "" response.write "" response.write "" response.write "" response.write "" response.write "" response.write "" response.write "" response.write "" response.write "" response.write "" response.write "" response.write "" response.write "" response.write "" response.write "" response.write "" response.write "" response.write "" response.write "" response.write "" response.write "" response.write "" response.write "" response.write "
" response.write "" & Sub55Var3 & "" response.write "" response.write "
" response.write "" & Sub55Var8 & "" response.write "" response.write "
" response.write "" & Sub55Var9 & "" response.write "" response.write "
" response.write "" & Sub55Var10 & "" response.write "" response.write "
" response.write "" & Sub55Var11 & "" response.write "" response.write "
" response.write "" & Sub55Var12 & "" response.write " " & Sub55Var13 & " " & Sub55Var14 response.write "
 

" response.write "
" response.write "
" response.write "" End Sub '********************************************************************************* '******** Generate Embeded Process *********************************************** '********************************************************************************* Sub GenerateEmbedProcess response.write "" response.write "" response.write "" response.write "" response.write "" response.write "" response.write "" response.write "" response.write "" response.write "" response.write "
" & Sub56Var1 & "
    " & Sub56Var2 & "
" response.write "
" response.write "" EmbedURL = FullURL & "?action=embed&type=" & request.form("txtType") & "&num=" & request.form("txtNum") & "&cols=" & request.form("txtCols") & "&newwin=" & request.form("txtNewWin") & "&pad=" & request.form("txtPad") & "&cat=" & request.form("txtCat") response.write "" response.write "" response.write "" response.write "" response.write "" response.write "" response.write "" response.write "" response.write "" response.write "" response.write "" response.write "" response.write "
" response.write "" & Sub56Var3 & "" response.write "" response.write "
" response.write "" & Sub56Var4 & "" response.write "
" response.write "
" %> <% response.write "
" response.write "
" response.write "
 

" response.write "
" response.write "
" response.write "" End Sub '********************************************************************************* '***** Draw Embeded Content ****************************************************** '********************************************************************************* Sub EmbedContentWrite SELECT CASE request.querystring("type") CASE "cat" SQL = "SELECT * FROM Gal_Images WHERE Gal_ImageCategory = '" & request.querystring("cat") & "' ORDER BY Gal_ImageDateAdded DESC, Gal_ImageFileName DESC" CategoryHeading = "What's New" CASE "new" SQL = "SELECT * FROM Gal_Images WHERE Gal_ImageDateAdded >= #" & DateAdd("d", Date(), (NewDays * (-1))) & "# ORDER BY Gal_ImageDateAdded DESC" CategoryHeading = "What's New" CASE "hot" SQL = "SELECT Gal_ImageID, Gal_ImageHits FROM Gal_Images" Set RS=Server.CreateObject("adodb.Recordset") RS.Open SQL, dbc, adopenstatic Do While NOT RS.EOF ImageHits = RS("Gal_ImageHits") If ImageHits >= HotHits then HotList = HotList & RS("Gal_ImageID") & ", " End If RS.MoveNext Loop RS.Close Set RS=Nothing If HotList = "" then HotList = "0, 0" End If SQL = "SELECT * FROM Gal_Images WHERE Gal_ImageID IN(" & HotList & ") ORDER BY Gal_ImageHits DESC" CategoryHeading = "What's Hot" CASE "popular" SQL = "SELECT Gal_ImageID, Gal_ImageRatingTotal, Gal_ImageRatingNumber FROM Gal_Images" Set RS=Server.CreateObject("adodb.Recordset") RS.Open SQL, dbc, adopenstatic Do While NOT RS.EOF If RS("Gal_ImageRatingTotal") <> 0 then ImageRating = RS("Gal_ImageRatingTotal") / RS("Gal_ImageRatingNumber") ImageRating = ImageRating / 2 ImageRatingValue = ImageRating Else ImageRatingValue = 0 End If If ImageRatingValue >= PopularRating then PopList = PopList & RS("Gal_ImageID") & ", " End If RS.MoveNext Loop RS.Close Set RS=Nothing If PopList = "" then PopList = "0, 0" End If SQL = "SELECT * FROM Gal_Images WHERE Gal_ImageID IN(" & PopList & ") ORDER BY Gal_ImageRatingTotal DESC" CategoryHeading = "What's Popular" CASE ELSE END SELECT Set RS=Server.CreateObject("adodb.Recordset") RS.Open SQL, dbc, adopenstatic If request.querystring("pad") <> "" then PaddingToUse = request.querystring("pad") Else PaddingToUse = 4 End If EmbedContent = "" EmbedContent = EmbedContent & "" Span = 0 picsDone = 0 Do While NOT RS.EOF If fso.folderexists(RS("Gal_ImagePicPath")) then ThumbnailLocation = RS("Gal_ImageThumbPath") & RS("Gal_ImageFileName") ImageFileName = RS("Gal_ImageFileName") ImagePicLocation = RS("Gal_ImagePicPath") If fso.fileexists(ThumbnailLocation) then ThumbnailExists = "YES" ImageType = RS("Gal_ImageType") ImageType = replace(ImageType, ".", "_") Else ThumbnailExists = "NO" ImageType = RS("Gal_ImageType") ImageType = replace(ImageType, ".", "_") NoPictureLocation = RS("Gal_ImagePicURL") End If ImageID = RS("Gal_ImageID") CurrentImageID = RS("Gal_ImageID") ImageStatus = RS("Gal_ImageStatus") If ImageStatus = "PENDING" then ShowPicture = "PENDING" Else ShowPicture = "YES" End If If ShowPicture = "YES" or ShowPicture = "PENDING" and Session("Gal_UserApproveSubmits") = "YES" then If cint(picsDone) < cint(request.querystring("num")) then Span=Span + 1 picsDone = picsDone + 1 If cint(Span) > cint(request.querystring("cols")) then EmbedContent = EmbedContent & "" Span = 1 End if EmbedContent = EmbedContent & "" End If End If End If RS.MoveNext Loop EmbedContent = EmbedContent & "
" If ThumbnailExists = "YES" or ThumbnailExists = "NO" and ImageType = "JPG" or ImageType = "jpg" or ImageType = "GIF" or ImageType = "gif" or ImageType = "PNG" or ImageType = "png" then LinkURL = Left(FullURL, Len(FullURL) - 9) EmbedContent = EmbedContent & "" If ThumbnailExists = "YES" then EmbedContent = EmbedContent & "" Else EmbedContent = EmbedContent & "" End If End If EmbedContent = EmbedContent & "
" EmbedContent = Replace(EmbedContent, "'", chr(34)) %> function ShowEmbedContent() { var tmpStr; tmpStr = ('<%=EmbedContent%>'); document.write(tmpStr); } <% End Sub '********************************************************************************* '***** Edit Configuration ******************************************************** '********************************************************************************* Sub EditConfig SQL = "SELECT * FROM Gal_Config" Set RS=dbc.execute(SQL) response.write "" response.write "" response.write "" response.write "" response.write "" response.write "" response.write "" response.write "" response.write "" response.write "" response.write "
" & Sub57Var1 & "
    " & Sub57Var2 & "
" response.write "
" response.write "" response.write "" response.write "" response.write "" response.write "" response.write "" response.write "" response.write "" response.write "" response.write "" response.write "" response.write "" response.write "" response.write "" response.write "" response.write "" response.write "" response.write "" response.write "" response.write "" response.write "" response.write "" response.write "" response.write "" response.write "" response.write "" response.write "" response.write "" response.write "" response.write "" response.write "" response.write "" response.write "" response.write "" response.write "" response.write "" response.write "" response.write "" response.write "" response.write "" response.write "" response.write "" response.write "" response.write "" response.write "" response.write "" response.write "" response.write "" response.write "" response.write "" response.write "" response.write "" response.write "" response.write "" response.write "" response.write "" response.write "" response.write "" response.write "" response.write "" response.write "" response.write "" response.write "" response.write "" response.write "" response.write "" response.write "" response.write "" response.write "" response.write "" response.write "" response.write "" response.write "" response.write "" response.write "" response.write "" response.write "" response.write "" response.write "" response.write "" response.write "" response.write "" response.write "" response.write "" response.write "" response.write "" response.write "" response.write "" response.write "" response.write "" response.write "" response.write "" response.write "" response.write "" response.write "" response.write "" response.write "" response.write "" response.write "" response.write "" response.write "" response.write "" response.write "" response.write "" response.write "" response.write "" response.write "" response.write "" response.write "" response.write "" response.write "" response.write "" response.write "" response.write "" response.write "" response.write "" response.write "" response.write "" response.write "" response.write "" response.write "" response.write "" response.write "" response.write "" response.write "" response.write "" response.write "" response.write "" response.write "" response.write "" response.write "" response.write "" response.write "" response.write "" response.write "" response.write "" response.write "" response.write "" response.write "" response.write "" response.write "" response.write "" response.write "" response.write "" response.write "" response.write "" response.write "" response.write "" response.write "" response.write "" response.write "" response.write "" response.write "" response.write "" response.write "" response.write "" response.write "" response.write "" response.write "" response.write "" response.write "" response.write "" response.write "" response.write "" response.write "" response.write "" response.write "" response.write "" response.write "" response.write "" response.write "" response.write "" response.write "" response.write "" response.write "" response.write "" response.write "" response.write "" response.write "" response.write "" response.write "" response.write "" response.write "" response.write "" response.write "" response.write "" response.write "" response.write "" response.write "" response.write "" response.write "" response.write "" response.write "" response.write "" response.write "" response.write "" response.write "" response.write "" response.write "" response.write "" response.write "" response.write "" response.write "" response.write "" response.write "" response.write "" response.write "" response.write "" response.write "" response.write "" response.write "" response.write "" response.write "" response.write "
" response.write "" & Sub57Var3 & "" response.write "" response.write "
" response.write "" & Sub57Var4 & "" response.write "" response.write "
" response.write "" & Sub57Var5 & "" response.write "" response.write "
" response.write "" & Sub57Var6 & "" response.write "" response.write "
" response.write "" & Sub57Var8 & "" response.write "" response.write "
" response.write "" & Sub57Var9 & "" response.write " " & Sub57Var10 & " " & Sub57Var11 response.write "
" response.write "" & Sub57Var12 & "" response.write " " & Sub57Var10 & " " & Sub57Var11 response.write "
" response.write "" & Sub57Var13 & "" response.write " " & Sub57Var10 & " " & Sub57Var11 response.write "
" response.write "" & Sub57Var14 & "" response.write " " & Sub57Var10 & " " & Sub57Var11 response.write "
" response.write "" & Sub57Var15 & "" response.write " " & Sub57Var10 & " " & Sub57Var11 response.write "
" response.write "" & Sub57Var16 & "" response.write " " & Sub57Var10 & " " & Sub57Var11 response.write "
" response.write "" & Sub57Var17 & "" response.write " " & Sub57Var10 & " " & Sub57Var11 response.write "
" response.write "" & Sub57Var18 & "" response.write "" response.write "
" response.write "" & Sub57Var19 & "" response.write "" response.write "
" response.write "" & Sub57Var20 & "" response.write "" response.write "
" response.write "" & Sub57Var21 & "" response.write "" response.write "
" response.write "" & Sub57Var22 & "" response.write "" response.write "
" response.write "" & Sub57Var23 & "" response.write " " & Sub57Var10 & " " & Sub57Var11 response.write "
" response.write " " response.write " " & Sub57Var24 & "
" response.write " " & Sub57Var25 & "
" response.write " " & Sub57Var26 & "
" response.write " " & Sub57Var27 & "
" response.write " " & Sub57Var28 & "
" response.write " " & Sub57Var29 & "
" response.write "
" response.write "" & Sub57Var30 & "" response.write "" response.write "
" response.write "" & Sub57Var31 & "" response.write "" response.write "
" response.write "" & Sub57Var32 & "" response.write "" response.write "
" response.write "" & Sub57Var33 & "" response.write " " & Sub57Var10 & " " & Sub57Var11 response.write "
" response.write "" & Sub57Var34 & "" response.write " " & Sub57Var10 & " " & Sub57Var11 response.write "
" response.write " " response.write " " & Sub57Var35 & "
" response.write " " & Sub57Var36 & "
" response.write " " & Sub57Var37 & "
" response.write " " & Sub57Var38 & "
" response.write " " & Sub57Var39 & "
" response.write "
" response.write "" & Sub57Var40 & "" response.write " " & Sub57Var10 & " " & Sub57Var11 response.write "
" response.write " " response.write " " & Sub57Var41 & "
" response.write " " & Sub57Var42 & "
" response.write " " & Sub57Var43 & "
" response.write " " & Sub57Var44 & "
" response.write "
" response.write "" & Sub57Var45 & "" response.write " " & Sub57Var10 & " " & Sub57Var11 response.write "
" response.write "" & Sub57Var46 & "" response.write " " & Sub57Var10 & " " & Sub57Var11 response.write "
" response.write "" & Sub57Var47 & "" response.write "" response.write "
" response.write "" & Sub57Var48 & "" response.write "" response.write "
" response.write "" & Sub57Var49 & "" response.write "" response.write "
" response.write "" & Sub57Var50 & "" response.write "" response.write "
" response.write "" & Sub57Var51 & "" response.write "" response.write "
" response.write "" & Sub57Var52 & "" response.write "" response.write "
" response.write "" & Sub57Var53 & "" response.write "" response.write "
" response.write "" & Sub57Var54 & "" response.write " " & Sub57Var55 & " " & Sub57Var56 response.write "
" response.write "" & Sub57Var57 & "" response.write " " & Sub57Var10 & " " & Sub57Var11 response.write "
" response.write "" & Sub57Var58 & "" response.write " " & Sub57Var10 & " " & Sub57Var11 response.write "
" response.write "" & Sub57Var59 & "" response.write " " & Sub57Var10 & " " & Sub57Var11 response.write "
" response.write "" & Sub57Var60 & "" response.write " " & Sub57Var10 & " " & Sub57Var11 response.write "
" response.write "" & Sub57Var61 & "" response.write " " & Sub57Var10 & " " & Sub57Var11 response.write "
" response.write "" & Sub57Var62 & "" response.write " " & Sub57Var10 & " " & Sub57Var11 response.write "
" response.write "" & Sub57Var63 & "" response.write " " & Sub57Var10 & " " & Sub57Var11 response.write "
" response.write "" & Sub57Var64 & "" response.write "" response.write "
" response.write "" & Sub57Var65 & "" response.write "" response.write "
" response.write "" & Sub57Var66 & "" response.write "" response.write "
" response.write "" & Sub57Var67 & "" response.write "" response.write "
" response.write "" & Sub57Var68 & "" response.write "" response.write "
" response.write "" & Sub57Var69 & "" response.write "" response.write "
" response.write "" & Sub57Var70 & "" response.write "" response.write "
" response.write "" & Sub57Var71 & "" response.write "" response.write "
 

" response.write "
" response.write "
" response.write "" End Sub '********************************************************************************* '***** Edit Configuration Process ************************************************ '********************************************************************************* Sub EditConfigProcess txtGal_ConfigSkinFolder = request.form("txtConfig_SkinFolder") txtGal_ConfigCategoryColumns = request.form("txtConfig_CategoryColumns") txtGal_ConfigShowPicCount = request.form("txtConfig_ShowPicCount") txtGal_ConfigUseCategoryBullets = request.form("txtConfig_UseCategoryBullets") txtGal_ConfigUser1 = request.form("txtConfig_User1") txtGal_ConfigUser2 = request.form("txtConfig_User2") txtGal_ConfigUser3 = request.form("txtConfig_User3") txtGal_ConfigUser4 = request.form("txtConfig_User4") txtGal_ConfigUser5 = request.form("txtConfig_User5") txtGal_ConfigDontShowDirs = request.form("txtConfig_DontShowDirs") txtGal_ConfigThumbRows = request.form("txtConfig_ThumbRows") txtGal_ConfigThumbCols = request.form("txtConfig_ThumbCols") txtGal_ConfigThumbTableBorderWidth = request.form("txtConfig_ThumbTableBorderWidth") txtGal_ConfigThumbTableBorderColor = request.form("txtConfig_ThumbTableBorderColor") txtGal_ConfigShowThumbnailInfo = request.form("txtConfig_ShowThumbnailInfo") txtGal_ConfigShowPictureInfo = request.form("txtConfig_ShowPictureInfo") txtGal_ConfigShowExtendedPictureInfo = request.form("txtConfig_ShowExtendedPictureInfo") txtGal_ConfigThumbWidth = request.form("txtConfig_ThumbWidth") txtGal_ConfigThumbHeight = request.form("txtConfig_ThumbHeight") txtGal_ConfigSlideShowSeconds = request.form("txtConfig_SlideShowSeconds") txtGal_ConfigDisableRightClick = request.form("txtConfig_DisableRightClick") txtGal_ConfigPostCardImageWidth = request.form("txtConfig_PostCardImageWidth") txtGal_ConfigPostCardImageHeight = request.form("txtConfig_PostCardImageHeight") txtGal_ConfigPostCardTagLine = request.form("txtConfig_PostCardTagLine") txtGal_ConfigNewDays = request.form("txtConfig_NewDays") txtGal_ConfigPopularRating = request.form("txtConfig_PopularRating") txtGal_ConfigHotHits = request.form("txtConfig_HotHits") txtGal_ConfigRequireLogin = request.form("txtConfig_RequireLogin") txtGal_ConfigShowUserData = request.form("txtConfig_ShowUserData") txtGal_ConfigUseFavorites = request.form("txtConfig_UseFavorites") txtGal_ConfigEmailHost = request.form("txtConfig_EmailHost") txtGal_ConfigPageHeader = FixString(request.form("txtConfig_PageHeader")) txtGal_ConfigPageFooter = FixString(request.form("txtConfig_PageFooter")) txtGal_ConfigPicShowName = request.form("txtConfig_PicShowName") txtGal_ConfigPicShowSize = request.form("txtConfig_PicShowSize") txtGal_ConfigPicShowDate = request.form("txtConfig_PicShowDate") txtGal_ConfigPicShowViews = request.form("txtConfig_PicShowViews") txtGal_ConfigPicShowRating = request.form("txtConfig_PicShowRating") txtGal_ConfigPicShowPhotographer = request.form("txtConfig_PicShowPhotographer") txtGal_ConfigPicShowCameraUsed = request.form("txtConfig_PicShowCameraUsed") txtGal_ConfigPicShowSource = request.form("txtConfig_PicShowSource") txtGal_ConfigPicShowCopyright = request.form("txtConfig_PicShowCopyright") txtGal_ConfigThumbShowName = request.form("txtConfig_ThumbShowName") txtGal_ConfigThumbShowSize = request.form("txtConfig_ThumbShowSize") txtGal_ConfigThumbShowDate = request.form("txtConfig_ThumbShowDate") txtGal_ConfigThumbShowViews = request.form("txtConfig_ThumbShowViews") txtGal_ConfigThumbShowRating = request.form("txtConfig_ThumbShowRating") txtGal_ConfigThumbShowCopyright = request.form("txtConfig_ThumbShowCopyright") txtGal_ConfigThumbShowExtension = request.form("txtConfig_ThumbShowExtension") txtGal_ConfigThumbNameFieldLength = request.form("txtConfig_ThumbNameFieldLength") txtGal_ConfigUseNew = request.form("txtConfig_UseNew") txtGal_ConfigUseHot = request.form("txtConfig_UseHot") txtGal_ConfigUsePopular = request.form("txtConfig_UsePopular") txtGal_ConfigUsePostcard = request.form("txtConfig_UsePostcard") txtGal_ConfigUseRating = request.form("txtConfig_UseRating") txtGal_ConfigUseThumbBorder = request.form("txtConfig_UseThumbBorder") txtGal_ConfigSearchType = request.form("txtConfig_SearchType") txtGal_ConfigJPGComponent = request.form("txtConfig_JPGComponent") txtGal_ConfigEmailComponent = request.form("txtConfig_EmailComponent") txtGal_ConfigUploadComponent = request.form("txtConfig_UploadComponent") txtGal_ConfigUseTextNavigation = request.form("txtConfig_UseTextNavigation") txtGal_ConfigUseSlideShowTransitions = request.form("txtConfig_UseSlideShowTransitions") txtGal_ConfigUseFullScreenSlideShow = request.form("txtConfig_UseFullScreenSlideShow") txtGal_ConfigUseCookies = request.form("txtConfig_UseCookies") txtGal_ConfigAllowSessionBasedItems = request.form("txtConfig_AllowSessionBasedItems") SQL="UPDATE Gal_Config SET " SQL = SQL & "Config_SkinFolder = '" & txtGal_ConfigSkinFolder & "', " SQL = SQL & "Config_CategoryColumns = '" & txtGal_ConfigCategoryColumns & "', " SQL = SQL & "Config_ShowPicCount = '" & txtGal_ConfigShowPicCount & "', " SQL = SQL & "Config_UseCategoryBullets = '" & txtGal_ConfigUseCategoryBullets & "', " SQL = SQL & "Config_User1 = '" & txtGal_ConfigUser1 & "', " SQL = SQL & "Config_User2 = '" & txtGal_ConfigUser2 & "', " SQL = SQL & "Config_User3 = '" & txtGal_ConfigUser3 & "', " SQL = SQL & "Config_User4 = '" & txtGal_ConfigUser4 & "', " SQL = SQL & "Config_User5 = '" & txtGal_ConfigUser5 & "', " SQL = SQL & "Config_DontShowDirs = '" & txtGal_ConfigDontShowDirs & "', " SQL = SQL & "Config_ThumbRows = '" & txtGal_ConfigThumbRows & "', " SQL = SQL & "Config_ThumbCols = '" & txtGal_ConfigThumbCols & "', " SQL = SQL & "Config_ThumbTableBorderWidth = '" & txtGal_ConfigThumbTableBorderWidth & "', " SQL = SQL & "Config_ThumbTableBorderColor = '" & txtGal_ConfigThumbTableBorderColor & "', " SQL = SQL & "Config_ShowThumbnailInfo = '" & txtGal_ConfigShowThumbnailInfo & "', " SQL = SQL & "Config_ShowPictureInfo = '" & txtGal_ConfigShowPictureInfo & "', " SQL = SQL & "Config_ShowExtendedPictureInfo = '" & txtGal_ConfigShowExtendedPictureInfo & "', " SQL = SQL & "Config_ThumbWidth = '" & txtGal_ConfigThumbWidth & "', " SQL = SQL & "Config_ThumbHeight = '" & txtGal_ConfigThumbHeight & "', " SQL = SQL & "Config_SlideShowSeconds = '" & txtGal_ConfigSlideShowSeconds & "', " SQL = SQL & "Config_DisableRightClick = '" & txtGal_ConfigDisableRightClick & "', " SQL = SQL & "Config_PostCardImageWidth = '" & txtGal_ConfigPostCardImageWidth & "', " SQL = SQL & "Config_PostCardImageHeight = '" & txtGal_ConfigPostCardImageHeight & "', " SQL = SQL & "Config_PostCardTagLine = '" & txtGal_ConfigPostCardTagLine & "', " SQL = SQL & "Config_NewDays = '" & txtGal_ConfigNewDays & "', " SQL = SQL & "Config_PopularRating = '" & txtGal_ConfigPopularRating & "', " SQL = SQL & "Config_HotHits = '" & txtGal_ConfigHotHits & "', " SQL = SQL & "Config_RequireLogin = '" & txtGal_ConfigRequireLogin & "', " SQL = SQL & "Config_ShowUserData = '" & txtGal_ConfigShowUserData & "', " SQL = SQL & "Config_UseFavorites = '" & txtGal_ConfigUseFavorites & "', " SQL = SQL & "Config_EmailHost = '" & txtGal_ConfigEmailHost & "', " SQL = SQL & "Config_PageHeader = '" & txtGal_ConfigPageHeader & "', " SQL = SQL & "Config_PicShowName = '" & txtGal_ConfigPicShowName & "', " SQL = SQL & "Config_PicShowSize = '" & txtGal_ConfigPicShowSize & "', " SQL = SQL & "Config_PicShowDate = '" & txtGal_ConfigPicShowDate & "', " SQL = SQL & "Config_PicShowViews = '" & txtGal_ConfigPicShowViews & "', " SQL = SQL & "Config_PicShowRating = '" & txtGal_ConfigPicShowRating & "', " SQL = SQL & "Config_PicShowPhotographer = '" & txtGal_ConfigPicShowPhotographer & "', " SQL = SQL & "Config_PicShowSource = '" & txtGal_ConfigPicShowSource & "', " SQL = SQL & "Config_PicShowCameraUsed = '" & txtGal_ConfigPicShowCameraUsed & "', " SQL = SQL & "Config_PicShowCopyright = '" & txtGal_ConfigPicShowCopyright & "', " SQL = SQL & "Config_ThumbShowName = '" & txtGal_ConfigThumbShowName & "', " SQL = SQL & "Config_ThumbShowSize = '" & txtGal_ConfigThumbShowSize & "', " SQL = SQL & "Config_ThumbShowDate = '" & txtGal_ConfigThumbShowDate & "', " SQL = SQL & "Config_ThumbShowViews = '" & txtGal_ConfigThumbShowViews & "', " SQL = SQL & "Config_ThumbShowRating = '" & txtGal_ConfigThumbShowRating & "', " SQL = SQL & "Config_ThumbShowExtension = '" & txtGal_ConfigThumbShowExtension & "', " SQL = SQL & "Config_ThumbNameFieldLength = '" & txtGal_ConfigThumbNameFieldLength & "', " SQL = SQL & "Config_UseNew = '" & txtGal_ConfigUseNew & "', " SQL = SQL & "Config_UseHot = '" & txtGal_ConfigUseHot & "', " SQL = SQL & "Config_UsePopular = '" & txtGal_ConfigUsePopular & "', " SQL = SQL & "Config_UsePostcard = '" & txtGal_ConfigUsePostcard & "', " SQL = SQL & "Config_UseRating = '" & txtGal_ConfigUseRating & "', " SQL = SQL & "Config_UseThumbBorder = '" & txtGal_ConfigUseThumbBorder & "', " SQL = SQL & "Config_SearchType = '" & txtGal_ConfigSearchType & "', " SQL = SQL & "Config_JPGComponent = '" & txtGal_ConfigJPGComponent & "', " SQL = SQL & "Config_EmailComponent = '" & txtGal_ConfigEmailComponent & "', " SQL = SQL & "Config_UseTextNavigation = '" & txtGal_ConfigUseTextNavigation & "', " SQL = SQL & "Config_UseSlideShowTransitions = '" & txtGal_ConfigUseSlideShowTransitions & "', " SQL = SQL & "Config_UseFullScreenSlideShow = '" & txtGal_ConfigUseFullScreenSlideShow & "', " SQL = SQL & "Config_UseCookies = '" & txtGal_ConfigUseCookies & "', " SQL = SQL & "Config_AllowSessionBasedItems = '" & txtGal_ConfigAllowSessionBasedItems & "', " SQL = SQL & "Config_UploadComponent = '" & txtGal_ConfigUploadComponent & "', " SQL = SQL & "Config_PageFooter = '"& txtGal_ConfigPageFooter & "' " SQL = SQL & " WHERE [Config_ConfigID] = 1" 'response.write SQL dbc.Execute(SQL) Session("Gal_ConfigLoaded") = "NO" response.redirect "album.asp?action=summary&from=editconfigsuccess&linktype=window&message=" & Sub58Var1 End Sub '********************************************************************************* '********************************************************************************* '************************* Routines Below Here Only ****************************** '********************************************************************************* '********************************************************************************* Sub DrawAdminButtons If Session("Gal_UserID") <> "" then response.write "" response.write "" response.write "" response.write "" response.write "" response.write "
  " & Sub59Var1 & " " If UseTextNavigation = "NO" then If Session("Gal_UserEditUsers") = "YES" then %><%=Sub59Var2%><% End If If Session("Gal_UserEditConfig") = "YES" then %><%=Sub59Var3%><% End If If Session("Gal_UserApproveSubmits") = "YES" then %><%=Sub59Var4%><% End If If Session("Gal_UserEditConfig") = "YES" then %><%=Sub59Var5%><% %><%=Sub59Var6%><% End If Else If Session("Gal_UserEditUsers") = "YES" then %><%=Sub59Var7%> | <% End If If Session("Gal_UserEditConfig") = "YES" then %><%=Sub59Var8%> | <% End If If Session("Gal_UserApproveSubmits") = "YES" then %><%=Sub59Var9%> | <% End If If Session("Gal_UserEditConfig") = "YES" then %><%=Sub59Var10%> | <% %><%=Sub59Var11%><% End If End If response.write "
" End If End Sub Sub DrawCategoryDropDown(CurrentFold) Set WorkFolder = FSO.GetFolder(CurrentFold) Set TempFolders = WorkFolder.SubFolders If TempFolders.Count > 0 then For Each X In TempFolders If X.Name <> "pics" and X.Name <> "thumbs" then response.write "" SubPicFolder = CurrentFold & "\" & X.Name Call DrawCategoryDropDown(SubPicFolder) End If Next End If End Sub Sub CreateThumbnail(PicPath, ThumbPath, ImageName) If JPGComponent = "ASPJpeg" then Set Jpeg = Server.CreateObject("Persits.Jpeg") Path = PicPath & ImageName Jpeg.Open Path PercentResize = Jpeg.OriginalHeight / ThumbHeight Jpeg.Width = Jpeg.OriginalWidth / PercentResize Jpeg.Height = Jpeg.OriginalHeight / PercentResize Jpeg.Save ThumbPath & ImageName Set Jpeg = Nothing End If If JPGComponent = "aspSmartImage" then Set Jpeg = Server.CreateObject("AspSmartImage.SmartImage") Path = PicPath & ImageName Jpeg.openFile cstr(Path) PercentResize = Jpeg.OriginalHeight / ThumbHeight Jpeg.Resample Jpeg.OriginalWidth / PercentResize, Jpeg.OriginalHeight / PercentResize Call Jpeg.SaveFile(ThumbPath & ImageName) Set Jpeg = Nothing End If If JPGComponent = "AspImage" then Set Jpeg = Server.CreateObject("AspImage.Image") Path = PicPath & ImageName Jpeg.LoadImage(Path) Jpeg.FileName = ThumbPath & ImageName PercentResize = Jpeg.MaxY / ThumbHeight Jpeg.JPEGQuality = 70 Jpeg.ImageFormat = 1 Jpeg.Resize Jpeg.MaxX / PercentResize,Jpeg.MaxY / PercentResize Jpeg.SaveImage Set Jpeg = Nothing End If If JPGComponent = "csImageFile" then Set Jpeg = Server.CreateObject("csImageFile.Manage") Path = PicPath & ImageName Jpeg.ReadFile Path Jpeg.JpegQuality = 70 PercentResize = Jpeg.Height / ThumbHeight Jpeg.Resize Jpeg.Width / PercentResize,Jpeg.Height / PercentResize Jpeg.WriteFile ThumbPath & ImageName Set Jpeg = Nothing End If If JPGComponent = "ASPThumbnailer" then Set Jpeg = Server.CreateObject("ASPThumbnailer2.Thumbnail") Path = PicPath & ImageName ThumbPath = ThumbPath & ImageName PercentResize = Jpeg.Height / ThumbHeight ThumbsHeight = Jpeg.Height / PercentResize Jpeg.MakeThumbnail Path, ThumbPath, ThumbsHeight, ThumbsWidth , 0 Set Jpeg = Nothing End If If JPGComponent = "PicturePreviewer" then Set Jpeg = Server.CreateObject("eKov.PicturePreviewer") Path = PicPath & ImageName Jpeg.LoadFromFile Path ThumbPath = ThumbPath & ImageName PercentResize = Jpeg.Height / ThumbHeight NewWidth = Jpeg.Width / PercentResize NewHeight = Jpeg.Height / PercentResize Jpeg.Quality = 70 Jpeg.Resize NewWidth, NewHeight, 1 Jpeg.SaveToFileAsJpeg ThumbPath Set Jpeg = Nothing End If If JPGComponent = "GFLAX" then Set Jpeg = Server.CreateObject("GflAx193.GflAx") Path = PicPath & ImageName Jpeg.LoadBitmap Path ThumbPath = ThumbPath & ImageName PercentResize = Jpeg.Height / ThumbHeight NewWidth = Jpeg.Width / PercentResize NewHeight = Jpeg.Height / PercentResize Jpeg.SaveFormat = 1 Jpeg.SaveJPEGQuality = 70 Jpeg.Resize NewWidth, NewHeight Jpeg.SaveBitmap ThumbPath Set Jpeg = Nothing End If If JPGComponent = "GraphicsProcessor" then Set Jpeg = Server.CreateObject("GraphicsProcessor2002.RasterObject") Path = PicPath & ImageName Jpeg.LoadFile Path ThumbPath = ThumbPath & ImageName PercentResize = Jpeg.Height / ThumbHeight NewWidth = Jpeg.Width / PercentResize NewHeight = Jpeg.Height / PercentResize Jpeg.Resize NewWidth, NewHeight Jpeg.SaveFile ThumbPath Set Jpeg = Nothing End If If JPGComponent = "dImage" then Set Jpeg = Server.CreateObject("dImage.dThumb") Path = PicPath & ImageName Jpeg.GetImage Path ThumbPath = ThumbPath & ImageName PercentResize = Jpeg.Height / ThumbHeight NewWidth = Jpeg.Width / PercentResize NewHeight = Jpeg.Height / PercentResize Jpeg.JPGQuality = 70 Jpeg.ResizeByHeight NewHeight Jpeg.SaveImage ThumbPath Set Jpeg = Nothing End If If JPGComponent = "SfImageResize" then Set Jpeg = Server.CreateObject("SfImageResize.ImageResize") Path = PicPath & ImageName Jpeg.LoadFromFile Path ThumbPath = ThumbPath & ImageName Jpeg.Width = ThumbWidth Jpeg.Height = ThumbHeight Jpeg.DoResize Jpeg.SaveToFile ThumbPath Set Jpeg = Nothing End If If JPGComponent = "ImgWriter" then Set Jpeg = Server.CreateObject("softartisans.ImageGen") Path = PicPath & ImageName Jpeg.LoadImage Path ThumbPath = ThumbPath & ImageName PercentResize = Jpeg.Height / ThumbHeight NewWidth = Jpeg.Width / PercentResize NewHeight = Jpeg.Height / PercentResize Jpeg.ResizeImage NewWidth, NewHeight, saiNearestNeighbor Jpeg.SaveImage 0, 3, ThumbPath Set Jpeg = Nothing End If If JPGComponent = "ActiveImage" then Set Jpeg = Server.CreateObject("ActiveImage.Images.1") Path = PicPath & ImageName Jpeg.SetImageType 1 Jpeg.ReadFromFile Path ThumbPath = ThumbPath & ImageName PercentResize = Jpeg.GetHeight / ThumbHeight OldWidth = Jpeg.GetWidth OldHeight = Jpeg.GetHeight NewWidth = Jpeg.GetWidth / PercentResize NewHeight = Jpeg.GetHeight / PercentResize Jpeg.SetImage 1 Jpeg.CreateImage NewWidth,NewHeight Jpeg.CopyImageResize 1,0,0,0,0,0,NewWidth,NewHeight,OldWidth,OldHeight Jpeg.SetJpegQuality 70 Jpeg.WriteToFile ThumbPath Jpeg.DestroyImage Jpeg.SetImage 0 Jpeg.DestroyImage Set Jpeg = Nothing End If End Sub '********************************************************************************* '******** Send An Email ********************************************************** '********************************************************************************* Sub SendAnEmail(SendTo, SenderName, SenderEmail, MessageToSend) '------ Fill the Variables -------------------------- txtSendTo = SendTo txtSendFrom = SenderEmail txtSubject = "Postcard From: " & SenderName & "(" & SenderEmail & ")" txtBody = MessageToSend If EmailComponent = "CDONTS" then Set sMail = Server.CreateObject("CDONTS.NewMail") sMail.BodyFormat = 0 sMail.MailFormat = 0 sMail.From = txtSendFrom sMail.To = txtSendTo sMail.Subject = txtSubject sMail.Body = txtBody sMail.Send( ) End If If EmailComponent = "ASPEmail" then Set sMail = Server.CreateObject("Persits.MailSender") sMail.Host = EmailHost sMail.From = txtSendFrom sMail.FromName = txtSendFrom sMail.ReplyTo = txtSendFrom sMail.AddAddress = txtSendTo 'This needs to be changed to handle multiples!!! sMail.Subject = txtSubject sMail.Body = txtBody sMail.Send End If If EmailComponent = "JMail" then Set sMail = Server.CreateObject("JMail.Message") sMail.Logging = true sMail.silent = true sMail.From = txtSendFrom sMail.FromName = txtSendFrom sMail.AddRecipient txtSendTo 'This needs to be changed to handle multiples!!! sMail.Subject = txtSubject sMail.ContentType = "text/html" sMail.Body = txtBody sMail.Send(EmailHost) End If If EmailComponent = "ASPMail" then Set sMail = Server.CreateObject("SMTPsvg.Mailer") sMail.RemoteHost = EmailHost sMail.FromAddress = txtSendFrom sMail.FromName = txtSendFrom sMail.AddRecipient txtEmailUser, txtSendTo 'This needs to be changed to handle multiples!!! sMail.ContentType = "text/html" sMail.Subject = txtSubject sMail.BodyText = txtBody sMail.SendMail End If End Sub Sub HasJPGComponent Err.Clear On Error Resume Next Set Jpeg = Server.CreateObject("Persits.Jpeg") If Err.Number = 0 Then Session("HasASPJpeg") = "YES" Else Session("HasASPJpeg") = "NO" End If Set obj = Nothing On Error Goto 0 Err.Clear On Error Resume Next Set Jpeg = Server.CreateObject("AspSmartImage.SmartImage") If Err.Number = 0 Then Session("HasaspSmartImage") = "YES" Else Session("HasaspSmartImage") = "NO" End If Set obj = Nothing On Error Goto 0 Err.Clear On Error Resume Next Set Jpeg = Server.CreateObject("AspImage.Image") If Err.Number = 0 Then Session("HasAspImage") = "YES" Else Session("HasAspImage") = "NO" End If Set obj = Nothing On Error Goto 0 Err.Clear On Error Resume Next Set Jpeg = Server.CreateObject("csImageFile.Manage") If Err.Number = 0 Then Session("HascsImageFile") = "YES" Else Session("HascsImageFile") = "NO" End If Set obj = Nothing On Error Goto 0 Err.Clear On Error Resume Next Set Jpeg = Server.CreateObject("ASPThumbnailer2.Thumbnail") If Err.Number = 0 Then Session("HasASPThumbnailer") = "YES" Else Session("HasASPThumbnailer") = "NO" End If Set obj = Nothing On Error Goto 0 Err.Clear On Error Resume Next Set Jpeg = Server.CreateObject("eKov.PicturePreviewer") If Err.Number = 0 Then Session("HasPicturePreviewer") = "YES" Else Session("HasPicturePreviewer") = "NO" End If Set obj = Nothing On Error Goto 0 Err.Clear On Error Resume Next Set Jpeg = Server.CreateObject("GflAx193.GflAx") If Err.Number = 0 Then Session("HasGFLAX") = "YES" Else Session("HasGFLAX") = "NO" End If Set obj = Nothing On Error Goto 0 Err.Clear On Error Resume Next Set Jpeg = Server.CreateObject("GraphicsProcessor2002.RasterObject") If Err.Number = 0 Then Session("HasGraphicsProcessor") = "YES" Else Session("HasGraphicsProcessor") = "NO" End If Set obj = Nothing On Error Goto 0 Err.Clear On Error Resume Next Set Jpeg = Server.CreateObject("dImage.dThumb") If Err.Number = 0 Then Session("HasdImage") = "YES" Else Session("HasdImage") = "NO" End If Set obj = Nothing On Error Goto 0 Err.Clear On Error Resume Next Set Jpeg = Server.CreateObject("SfImageResize.ImageResize") If Err.Number = 0 Then Session("HasSfImageResize") = "YES" Else Session("HasSfImageResize") = "NO" End If Set obj = Nothing On Error Goto 0 Err.Clear On Error Resume Next Set Jpeg = Server.CreateObject("softartisans.ImageGen") If Err.Number = 0 Then Session("HasImgWriter") = "YES" Else Session("HasImgWriter") = "NO" End If Set obj = Nothing On Error Goto 0 Err.Clear On Error Resume Next Set Jpeg = Server.CreateObject("ActiveImage.Images.1") If Err.Number = 0 Then Session("HasActiveImage") = "YES" Else Session("HasActiveImage") = "NO" End If Set obj = Nothing On Error Goto 0 End Sub Sub HasUploadComponent Err.Clear On Error Resume Next Set UploadComp = Server.CreateObject("Persits.Upload") If Err.Number = 0 Then Session("HasAspUpload") = "YES" Else Session("HasAspUpload") = "NO" End If Set UploadComp = Nothing On Error Goto 0 Err.Clear On Error Resume Next Set UploadComp = Server.CreateObject("aspSmartUpload.SmartUpload") If Err.Number = 0 Then Session("HasaspSmartUpload") = "YES" Else Session("HasaspSmartUpload") = "NO" End If Set UploadComp = Nothing On Error Goto 0 Err.Clear On Error Resume Next Set UploadComp = Server.CreateObject("SoftArtisans.FileUp") If Err.Number = 0 Then Session("HasSAFileUp") = "YES" Else Session("HasSAFileUp") = "NO" End If Set UploadComp = Nothing On Error Goto 0 End Sub Sub HasEmailComponent Err.Clear On Error Resume Next Set EmailComp = Server.CreateObject("CDONTS.NewMail") If Err.Number = 0 Then Session("HasCDONTS") = "YES" Else Session("HasCDONTS") = "NO" End If Set EmailComp = Nothing On Error Goto 0 Err.Clear On Error Resume Next Set EmailComp = Server.CreateObject("Persits.MailSender") If Err.Number = 0 Then Session("HasASPEmail") = "YES" Else Session("HasASPEmail") = "NO" End If Set EmailComp = Nothing On Error Goto 0 Err.Clear On Error Resume Next Set EmailComp = Server.CreateObject("JMail.Message") If Err.Number = 0 Then Session("HasJMail") = "YES" Else Session("HasJMail") = "NO" End If Set EmailComp = Nothing On Error Goto 0 Err.Clear On Error Resume Next Set EmailComp = Server.CreateObject("SMTPsvg.Mailer") If Err.Number = 0 Then Session("HasASPMail") = "YES" Else Session("HasASPMail") = "NO" End If Set EmailComp = Nothing On Error Goto 0 End Sub Function FixString(strSource) strSource = Replace(strSource, "'", "''") strSource = Replace(strSource, "''''", "''") FixString = Replace(strSource, "'''", "''") 'FixString = strSource End Function Function CountImages(CurrentFold) CurrentFold = Left(CurrentFold, (len(CurrentFold) - 5)) PicFold = CurrentFold & "\pics" If FSO.FolderExists(PicFold) then Set WorkFolder = FSO.GetFolder(CurrentFold) Set PicFolder = FSO.GetFolder(PicFold) Set TempDir = PicFolder.Files Set TempFolders = WorkFolder.SubFolders If TempDir.Count > 0 then TempPicCount = TempDir.Count End If If TempFolders.Count > 0 then For Each X In TempFolders If X.Name <> "pics" and X.Name <> "thumbs" then SubPicFolder = CurrentFold & "\" & X.Name & "\pics" SubTempPicCount = CountImages(SubPicFolder) TempPicCount = TempPicCount + SubTempPicCount End If Next End If TempReturn = TempPicCount CountImages = TempReturn End If End Function Function HasNew(CurrentFold) CurrentFold = Left(CurrentFold, (len(CurrentFold) - 5)) PicFold = CurrentFold & "\pics" If FSO.FolderExists(PicFold) then Set WorkFolder = FSO.GetFolder(CurrentFold) Set PicFolder = FSO.GetFolder(PicFold) Set TempDir = PicFolder.Files For Each I in TempDir If DateDiff("d", I.DateCreated, Date()) < NewDays then Return = "YES" End If Next If Return <> "YES" then Set TempFolders = WorkFolder.SubFolders If TempDir.Count > 0 then TempPicCount = TempDir.Count End If If TempFolders.Count > 0 then For Each X In TempFolders If X.Name <> "pics" and X.Name <> "thumbs" then SubPicFolder = CurrentFold & "\" & X.Name & "\pics" SubTempReturn = HasNew(SubPicFolder) If SubTempReturn = "YES" then FoundNew = "YES" End If End If Next End If End If If Return = "YES" or SubTempReturn = "YES" or FoundNew = "YES" then HasNew = "YES" End If End If End Function Function CountSubFolders(CurrentFold) CurrentFold = Left(CurrentFold, (len(CurrentFold) - 5)) If FSO.FolderExists(CurrentFold) then Set WorkFolder = FSO.GetFolder(CurrentFold) Set TempFolders = WorkFolder.SubFolders If TempFolders.Count > 0 then For Each X In TempFolders TempFoldersC = Split(DontShowDirectories, ",") ShowDir = "YES" For I = 0 to Ubound(TempFoldersC) If TempFoldersC(I) = X.Name then ShowDir = "NO" End If Next If ShowDir <> "NO" then TempFolderCount = TempFolderCount + 1 SubPicFolder = CurrentFold & "\" & X.Name & "\pics" SubTempPicCount = CountSubFolders(SubPicFolder) TempFolderCount = TempFolderCount + SubTempPicCount End If Next End If TempReturn = TempFolderCount CountSubFolders = TempReturn End If End Function Function IsDirectoryOK(FolderName) TempFolders = Split(DontShowDirectories, ",") For I = 0 to Ubound(TempFolders) If TempFolders(I) = FolderName then Return = "NO" End If Next If Return <> "NO" then Return = "YES" End If IsDirectoryOK = Return End Function Function CheckFavorite(CurrentImageIDToUse) CurrentFavorites = Split(Session("Gal_Favorites")) For I = 0 to ubound(CurrentFavorites) -1 TempValue = Replace(CurrentFavorites(I), ",", "") If cint(TempValue) = cint(CurrentImageIDToUse) then Return = "YES" End If Next CheckFavorite = Return End Function Function GetSubmitRights(CurrentCat) SQLr = "SELECT Gal_CategorySubmitRights FROM Gal_Categories WHERE Gal_CategoryLocation = '" & CurrentCat & "'" Set RSr=dbc.execute(SQLr) If NOT RSr.EOF then GetSubmitRightsTemp = RSr("Gal_CategorySubmitRights") If GetSubmitRightsTemp = "" then GetSubmitRightsTemp = "NONE" End If Else GetSubmitRightsTemp = "NONE" End If RSr.Close Set RSr=Nothing GetSubmitRights = GetSubmitRightsTemp End Function Function IsImageVisible(CurrentImageID) SQLv = "SELECT Gal_ImageStatus FROM Gal_Images WHERE Gal_ImageID = " & CurrentImageID Set RSv=dbc.execute(SQLv) If NOT RSv.EOF then If RSv("Gal_ImageStatus") = "PENDING" then TempReturn = "NO" Else TempReturn = "" End If End If RSv.Close Set RSv=Nothing IsImageVisible = TempReturn End Function Function TestPermissions(AlbumPath) AlbumPath = AlbumPath & "/albumtestwrite.txt" On Error Resume Next Set objFSO = CreateObject("Scripting.FileSystemObject") If Err.Number = 0 Then Set objTS = objFSO.CreateTextFile(AlbumPath, True) If Err.Number = 0 Then objTS.WriteLine("Test") 'If Err.Number = 0 Then objTS.Close 'If Err.Number = 0 Then ' Set objFile = objFSO.GetFile(AlbumPath) ' If Err.Number = 0 Then ' objFile.Delete True If Err.Number = 0 Then TestPermissions = True Else TestPermissions = False End If ' End If 'End If 'End If objTS.Close End If Set objTS = Nothing End If Set objFile = Nothing Set objTS = Nothing Set objFSO = Nothing On Error Goto 0 End Function Sub CheckSecurity If Session("Gal_UserID") = "" then response.redirect "album.asp?action=summary&from=notallowed&linktype=window&message=" & Sub60Var1 End If End Sub Sub DrawHeader response.write PageHeader End Sub Sub DrawFooter response.write PageFooter End Sub '----- Fix Folder Name Function --------------------------- Function FixName(NameToFix) TempName = replace(FolderNameToFix, "'", "") TempName = replace(TempName, "\", "") TempName = replace(TempName, "/", "") TempName = replace(TempName, "?", "") TempName = replace(TempName, ":", "") TempName = replace(TempName, "*", "") TempName = replace(TempName, "<", "") TempName = replace(TempName, ">", "") TempName = replace(TempName, "|", "") TempName = replace(TempName, Chr(34), "") FixName = TempName End Function %>