%
If session("user_logged_moderator" & strSUnique) Or Session("admin_loggedin" & strSUnique) = Session.SessionID then moderator = True
If not Request.Form("B1") = Empty then
images = Request.Form("strImages")
adIDf = Request.Form("adID")
objConn.Execute("UPDATE " & tablPfx & "Ads SET images = '" & images & "' WHERE adID = '" & adIDf & "';")
If isEvents then Call logEvent("Update Ad", adIDf, session("Subject" & strSUnique), " - Images Updated", Empty, Empty)
ClearSession
objConn.close
If IsCache then Call cacheAds(adIDf)
Response.Redirect "viewad.asp?ID=" & adIDf
End If
If Not IsNumeric(Request("ID")) Or CStr(Request("ID")) = Empty then Response.Write "
Invalid Request " & msgBack
msgNoAd = "
| <%= strText_Home %>::<%= strText_EditImages %>::<%= display %> | |||||||||||||||||
<% Dim imgDim(10,1) imgAttached = True If Session("Count_Image" & strSUnique) = "0" then Response.Write " " & strText_NoImagesAttached & " " imgAttached = False Dim buildSess(10,1) Session("Attach_Image" & strSUnique) = buildSess Session("strImages" & strSUnique) = Empty Else If isArray(Session("Attach_Image" & strSUnique)) then uPA = Session("Attach_Image" & strSUnique) For L = 1 to 10 If not uPA(L,0) = Empty then imgDim(L,0) = CLng(Split(uPA(L,1), "x")(0)) imgDim(L,1) = CLng(Split(uPA(L,1), "x")(1)) If imgDim(L,0) > 100 then koef = imgDim(L,0) / imgDim(L,1) imgDim(L,0) = 100 imgDim(L,1) = Round(100 / koef) End If strImg = strImg & uPA(L,0) & "|" & uPA(L,1) & sf End If Next Session("strImages" & strSUnique) = strImg Else Dim uPA(10,1) adImgArray = Split(Session("strImages" & strSUnique), sf) Session("Count_Image" & strSUnique) = UBound(adImgArray) imgArrayDim = UBound(adImgArray) - 1 For d = 0 to imgArrayDim x = d + 1 uPA(x,0) = Split(adImgArray(d), "|")(0) adSize = Split(adImgArray(d), "|")(1) uPA(x,1) = adSize imgDim(x,0) = CLng(Split(adSize, "x")(0)) imgDim(x,1) = CLng(Split(adSize, "x")(1)) If imgDim(x,0) > 100 then koef = imgDim(x,0) / imgDim(x,1) imgDim(x,0) = 100 imgDim(x,1) = Round(100 / koef) End If Next Session("Attach_Image" & strSUnique) = uPA End IF End If %> <% If imgAttached Then %>
<% End If %>
|
|||||||||||||||||