 |
 |
<%
strtesto="#000000"
strtxtcolor="#000000"
strgalmenu="#000000"
%>
<%
if request.querystring("pht")<>"" then
pht=request.querystring("pht")
else
pht="/public/dps/gallery"
end if
if (pht="/public/dps" or pht="/public") then
%>
<%
else %>
| <% if request.querystring("pht")<>"" then %>&pht=<%=stridpht1%>"> >Gallery
> <% end if %>
<%
'Split all checked checkboxes into an array
arrCheck = Split(request.querystring("pht"), "/")
stridpht1=request.querystring("pht")
if stridpht1<>"" then
arrCheck1 = Split(stridpht1, "/")
strlastpht=arrCheck1(Ubound(arrCheck))
else
strlastpht=0
end if
For i = 0 to Ubound(arrCheck)
stridpht= stridpht & arrCheck(i) &"/"
stridpht2=stridpht
strlen=Len(stridpht)
strdifflen=Len(stridpht2)-1
stridpht1=left(stridpht2,strdifflen)
strph=replace(request.querystring("pht"),"/public/dps","")
strph=replace(strph,"/gallery","")
strph=replace(strph,"_"," ")
if arrCheck(i)<>"public" and arrCheck(i)<>"dps" and arrCheck(i)<>"gallery" and arrCheck(i)<>strgalfolder then
%>
><%=replace(arrCheck(i),"_"," ")%>
>
<% end if
Next
%>
|
|
|
<% 'pht="/public/dps/gallery"
'response.write pht
Dim objFso, objFolder, objSubFolders, strFolder, strSubFolder
'if request.querystring("f")<>"" then
'strPath = request.querystring("f")
'else
strPath = pht
'end if
Set objFso = Server.createObject("Scripting.FileSystemObject")
Set objFolder = objFso.GetFolder(Server.MapPath(strPath))
Set objSubFolders = objFolder.SubFolders
For Each strSubFolder in objSubFolders
strcountfolder=strcountfolder + 1
strcountimg=0
Response.write ""&showimage&""
imagenr = imagenr + 1
iRecordsShown = iRecordsShown + 1
Next
Set objFso = Nothing
Set objFolder = Nothing
Set objSubFolders = Nothing
function showimage()
dim HTML
html = ""
if imagenr = 4 then 'change this if you want more than 4 images in a row
html = " "
imagenr = 0
end if
html=html &""
html=html &""
html=html &" | "
showimage = html
end function
%>
|
<%
if pht<>"" then
%>
<%
IMAGE_FOLDER_PATH = ""& pht & "/"
USE_ASP_JPEG = false
RESIZE_WIDTH = 150
PRESERVE_ASPEACT_RATIO = false
RESIZE_LARGE_IMAGE = false
RESIZE_LARGE_IMAGE_WIDTH = 800
PER_LINE = 4
GAL_PER_PAGE = 8
'Set Jpeg = Server.CreateObject("Persits.Jpeg")
Set Fsys=CreateObject("Scripting.FileSystemObject")
full_image_path = server.mappath(IMAGE_FOLDER_PATH)
full_thumb_path = server.mappath(IMAGE_FOLDER_PATH)
call mkdir(full_image_path,Fsys)
call mkdir(full_thumb_path,Fsys)
if isnumeric(request("offset")) and request("offset") <> "" then
offset = request("offset")+0
else
offset = 0
end if
if isnumeric(request("iid")) and request("iid") <> "" then
output=""
image = get_images(full_image_path,fsys)
output = output&"| "
if request("iid")+0 > 0 then
prev = request("iid")-1
imgname=IMAGE_FOLDER_PATH&image(prev)
imgpath=Server.MapPath(IMAGE_FOLDER_PATH&image(prev))
Set objImageSize = New ImageSize
With objImageSize
.ImageFile = imgpath
strimgh=.ImageWidth
strimgw=.ImageHeight
End With
Set objImageSize = Nothing
strtemph="90"
moltiplica=strtemph * 100
dividi=moltiplica/strimgh
moltiplica2=strimgw * dividi
strtempw=moltiplica2/100
maxsizew="120"
if int(strtempw)>int(maxsizew) then
moltiplica1=maxsizew * 100
dividi1=moltiplica1/strtempw
moltiplica21=strtemph * dividi1
strtemph=moltiplica21/100
strtempw=maxsizew
end if
if int(strimgh)>int(strimgw) then
strthbimgw=formatnumber(strtempw,0)
strthbimgh=formatnumber(strtemph,0)
else
strthbimgw=formatnumber(strtempw,0)
strthbimgh=formatnumber(strtemph,0)
end if
output = output&""
end if
output = output&" | "
imgname=IMAGE_FOLDER_PATH&image(request("iid"))
imgpath=Server.MapPath(IMAGE_FOLDER_PATH&image(request("iid")))
Set objImageSize = New ImageSize
With objImageSize
.ImageFile = imgpath
strimgh=.ImageWidth
strimgw=.ImageHeight
End With
Set objImageSize = Nothing
strtemph="350"
moltiplica=strtemph * 100
dividi=moltiplica/strimgh
moltiplica2=strimgw * dividi
strtempw=moltiplica2/100
maxsizew="350"
if int(strtempw)>int(maxsizew) then
moltiplica1=maxsizew * 100
dividi1=moltiplica1/strtempw
moltiplica21=strtemph * dividi1
strtemph=moltiplica21/100
strtempw=maxsizew
end if
if int(strimgh)>int(strimgw) then
strthbimgw=formatnumber(strtempw,0)
strthbimgh=formatnumber(strtemph,0)
else
strthbimgw=formatnumber(strtempw,0)
strthbimgh=formatnumber(strtemph,0)
end if
output = output& ""
strnameimg1=image(request("iid"))
strimgread=image(request("iid"))
strimgread=replace(strimgread,".jpg","")
strimgread=replace(strimgread,".jpeg","")
strimgread=replace(strimgread,".JPEG","")
strimgread=replace(strimgread,".JPG","")
strimgread=replace(strimgread,".gif","")
strimgread=replace(strimgread,".GIF","")
strimgread=replace(strimgread,".PNG","")
strimgread=replace(strimgread,".png","")
strimgread=replace(strimgread,"_"," ")
strimgread=replace(strimgread,"."," ")
strimgread=Lcase(strimgread)
strimgreadzoom=strimgread
if nameimgev=1 and right(lcase(image(request("iid"))), 7)<>"_no.jpg" then
strimgread=""& strimgread &"
"
end if
'output = output&" "
imgname=IMAGE_FOLDER_PATH&image(request("iid"))
imgpath=Server.MapPath(IMAGE_FOLDER_PATH&image(request("iid")))
Set objImageSize = New ImageSize
With objImageSize
.ImageFile = imgpath
strimgh=.ImageWidth
strimgw=.ImageHeight
End With
Set objImageSize = Nothing
strtemph="480"
moltiplica=strtemph * 100
dividi=moltiplica/strimgh
moltiplica2=strimgw * dividi
strtempw=moltiplica2/100
maxsizew="640"
if int(strtempw)>int(maxsizew) then
moltiplica1=maxsizew * 100
dividi1=moltiplica1/strtempw
moltiplica21=strtemph * dividi1
strtemph=moltiplica21/100
strtempw=maxsizew
end if
if int(strimgh)>int(strimgw) then
strthbimgw1=formatnumber(strtempw,0)
strthbimgh1=formatnumber(strtemph,0)
else
strthbimgw1=formatnumber(strtempw,0)
strthbimgh1=formatnumber(strtemph,0)
end if
set RecSet1 = Server.CreateObject("ADODB.Recordset")
Visa1 = "SELECT * FROM phinfo where phname like '" & imgname & "'"
RecSet1.Open Visa1, Connect, adOpenStatic, adLockOptimistic
if not recset1.eof then
strphinfo=RecSet1("phinfo")
else
strphinfo=""
end if
output = output&""
output = output&" "
output = output&""
output = output&" "& strphinfo &""
output = output&" | "
output = output&" Torna indietro"
output = output&" | "
'output = output&""
output = output&"| "
if request("iid")+0 < ubound(image) then
prev = request("iid")+1
imgname=IMAGE_FOLDER_PATH&image(prev)
imgpath=Server.MapPath(IMAGE_FOLDER_PATH&image(prev))
Set objImageSize = New ImageSize
With objImageSize
.ImageFile = imgpath
strimgh=.ImageWidth
strimgw=.ImageHeight
End With
Set objImageSize = Nothing
strtemph="90"
moltiplica=strtemph * 100
dividi=moltiplica/strimgh
moltiplica2=strimgw * dividi
strtempw=moltiplica2/100
maxsizew="120"
if int(strtempw)>int(maxsizew) then
moltiplica1=maxsizew * 100
dividi1=moltiplica1/strtempw
moltiplica21=strtemph * dividi1
strtemph=moltiplica21/100
strtempw=maxsizew
end if
if int(strimgh)>int(strimgw) then
strthbimgw=formatnumber(strtempw,0)
strthbimgh=formatnumber(strtemph,0)
else
strthbimgw=formatnumber(strtempw,0)
strthbimgh=formatnumber(strtemph,0)
end if
output = output&""
end if
output = output& " | "
else
for each image in get_images(full_image_path,fsys)
strcountimage=strcountimage +1
next
'response.write strcountimage
if strcountimage<2 and request.querystring("offset")<"1" then
else
output=""
output = output&""
output = output&"| "
if offset > 0 then
output = output&"< Precedenti "&GAL_PER_PAGE&""
end if
output = output&" | "
output = output&""&offset&">"&(got_loop+offset)&" / "&offset_loop&" immagini | "
output = output&""
if (got_loop+offset) < offset_loop then
output = output&"Prossime "&GAL_PER_PAGE&" >"
end if
output = output&" | "
output = output& " "
end if
'se maggiore di 1
end if
response.write output
function resize_lrg_img(path,width)
jpeg.Open path
if jpeg.width > width then
jpeg.PreserveAspectRatio = true
jpeg.PreserveAspectRatio = true
jpeg.width = width
jpeg.Save path
end if
end function
function get_images(path,fsys)
dim files()
set folder = fsys.GetFolder(path)
i =0
for each item in folder.Files
if check_filetype(item.Name) then
redim Preserve files(i)
files(i) = item.Name
i = i+ 1
end if
next
get_images = files
end function
function check_filetype(filename)
check_filetype = false
for each ext in split("jpg,JPG,jpeg,png,gif",",")
if right(lcase(filename),len(ext)) = lcase(ext) then
check_filetype = true
end if
next
end function
function mkdir(path,fsys)
If Not fsys.FolderExists(path) Then
call fsys.CreateFolder(path)
End If
end function
Set Jpeg = nothing
Set Fsys=nothing
%>
<% end if %>
<% end if %>
|
|
|
| MSP SRL | strada di Settimo, 272 - 10156 Torino | 011 2731659, 011 2238055 | info@mspsrl.com |
|
|