% If Application("Debugging")=False Then On Error resume next If NOT Session("InitOK") Then InitLP '### Script to open view popups fullscreen or windowed Response.Write "" & VbCRLf a=lcase(Request("a")) m=Request("m") CatID=Request("catID") ID=Request("ID") FolderID=Request("FolderID") f=Request("f") Dir=Request("dir") If Application("AllowRandomImages") Then ShowRandom=(a="random") If a="dl" Then DoDownload ElseIf a="rebuild" Then If Session("IsAdmin") Then DoRebuild ElseIf a="expire" Then ExpireFolders Session("CurFolder") Response.redirect "listpics.asp" ElseIf a="rate" Then If Session("AllowImageRatings") Then RateFile ID ElseIf a="showimageinfo" Then ShowImageInfo ID ElseIf a="config" Then If Session("AllowUserConfig") Then UserConfig ElseIf a="find" Then FindForm ElseIf a="cancelfind" Then Session("IsFindMode")=False Session("q")="" Session("MinDate")="" Session("MaxDate")="" Session("MinSize")="" Session("MaxSize")="" Session("FindStatus")="" Session("FindCatID")="" 'Response.redirect("listpics.asp") Response.Write Application("Header") DoList Response.Write Application("Footer") ElseIf a="login" Then LoginForm ElseIf a="show" Then ShowImage ID ElseIf a="addcomment" Then If Session("AllowComments") Then AddComment ID, FolderID ElseIf a="showcomment" Then ShowComment ID, FolderID ElseIf a="showinfo" Then ShowInfo ElseIf a="editfoldercfg" Then If Session("IsAdmin") Then EditFolderCfg ElseIf a="savefoldercfg" Then If Session("IsAdmin") Then SaveFolderCfg ElseIf a="editdescr" Then If Session("IsAdmin") OR Session("AllowEditDescription") Then EditDescription ID ElseIf a="logout" Then LogOut ElseIf a="rebuilddialog" Then If Session("IsAdmin") Then RebuildDialog ElseIf a="showfullexif" Then ShowFullExifInfo ID ElseIf a="overview" Then If Application("FullVersion") AND Session("AllowImageOverview") Then ShowOverview ElseIf a="timeline" Then If Application("FullVersion") AND Session("AllowTimeline") Then ShowTimeline Else Response.Write Application("Header") DoList Response.Write Application("Footer") End If '######################## SUB ShowImage(ID) '######################## '### Check if image was opened in popup if no direct links are allowed If NOT Application("AllowDirectLinks") Then Response.Write "" & VbCRLf End If If Application("Debugging")=False Then On Error resume next If Request("wm")<>"" AND Session("AllowExtraFullScreen") Then Session("FullMode")=(Request("wm")="full") If Request("vm")<>"" Then Session("ShowOriginal")=(Request("vm")="original") '### Get appropriate style sheet If Session("FullMode") Then Response.Write "" Else Response.Write "" End If '### Determine ID If IsArray(Session("FileIDList")) Then If ID="" Then ID=Session("FileIDList")(0) Else aTmp=Split(ID,",") ID=Trim(aTmp(0)) End If Else IsDirectLink=True If ID="" Then ShowError Session("Str")(168) End If ID=Clng(ID) '### Get image info from DB OpenRS Conn, RS SQL="SELECT Files.*, Folders.Name AS fName, Folders.ParentPath AS fPath, Folders.UserPass, Folders.Settingsmask, Folders.AdminPass FROM Folders RIGHT JOIN Files ON Folders.FolderID = Files.FolderID WHERE Files.ID=" & ID If NOT Session("IsAdmin") Then SQL=SQL & " AND Files.Status=2" If Session("ShowHiddenFiles") Then SQL=SQL & " OR Files.Status=3" ' response.write sql RS.Open SQL,Conn, 1, 1 If RS.EOF OR (IsDirectLink AND NOT Application("AllowDirectLinks")) Then ShowError Session("Str")(170) 'Exit if not found '### Get folder settings for directly linked image If IsDirectLink Then GetFldrSettings BuildPath(RS("fPath") & RS("fName")) '### Thumbs only? If Session("IsFindMode") Then AllowThumbsOnly=(Mid(RS("Settingsmask"),36,1)="1") Else AllowThumbsOnly=Session("AllowThumbsOnly") End If '### Check pass IsUser=(RS("UserPass")="") OR IsInList(Session("Pass"),RS("UserPass")) OR IsInList("nopass",RS("UserPass")) IsAdmin=(RS("AdminPass")<>"" OR Application("GlobalAdminPass")<>"") AND IsInList(Session("Pass"), Application("GlobalAdminPass") & "," & RS("AdminPass")) OR Session("IsAdmin") If (AllowThumbsOnly AND NOT IsAdmin) OR NOT (IsUser OR IsAdmin) Then ShowError Session("Str")(170) '### Paths fn=RS("Name") Ext=UCase(fso.GetExtensionName(fn)) fd=FromDBDate(RS("CreDate")) fldrpath=RS("fPath") & RS("fName") & "\" Descr=RS("Description") If Application("UseTitleInsteadOfName") Then Title=RS("Title") & "" IsMultimediaFile=IsMultimedia(fn) IsAnImage=IsImage(fn) If Session("ShowFileExtensions") Then If Title="" Then Title=StartCapital(fn) Else If Title="" Then Title=StartCapital(fso.getbasename(fn)) End If Response.Write "
|
") Response.Write " |
| "
If IsMultimediaFile Then
WriteMMObject ext, ImgLink
ElseIf IsAnImage Then
Response.Write ToggleViewLink
Response.Write " |
| "
'Response.Write " |
Rebuilding " & NumItems & " files...