% @Language=VBScript %> <% Option Explicit %> <% PreventPageCaching if request("page") <> "" then session("pubblicimmobiliPage") = request("page") end if if session("pubblicimmobiliPage") = "" or not isNumeric(session("pubblicimmobiliPage")) then session("pubblicimmobiliPage") = "1" dim PRATICA : PRATICA = fixQuotes(request.QueryString("PRATICA")) if PRATICA = "" or not isNumeric(PRATICA) then response.Redirect("../mediaglobal/home.asp") if request("area") <> "" then session("sArea") = request("area") end if if not dDescArea.Exists(session("sArea")) then response.Redirect("home.asp") if request("tipo") <> "" then session("sTipo") = request("tipo") end if if not dDescTipo.Exists(session("sTipo")) then response.Redirect("home.asp") dim sNote, sCategoria, sProvincia, sComune, nMq, nPrezzo, iListImg sSQL = "SELECT tblImmobili.*, tblImmobiliCat.sCategoria, tblRegioni.sRegione, tblProvince.sProvincia, tblComuni.sComune"&_ " FROM tblComuni INNER JOIN (tblProvince INNER JOIN (tblRegioni INNER JOIN "&_ " (tblImmobiliCat INNER JOIN tblImmobili ON tblImmobiliCat.ID = tblImmobili.IdCat) ON tblRegioni.ID = tblImmobili.nRegione) "&_ " ON tblProvince.ID = tblImmobili.nProvincia) ON tblComuni.IdComune = tblImmobili.nComune"&_ " WHERE tblImmobili.bEnabled = -1 AND tblImmobiliCat.bEnabled = -1 AND tblImmobili.sArea = '"&session("sArea")&"' "&_ " AND IdPratica = "&PRATICA&"" set oRS = getRS(sSQL, connstring) if oRS.eof then response.Redirect("../mediaglobal/home.asp") sNote = normalizeCMSText(oRS("sNote")) sCategoria = oRS("sCategoria") sProvincia = oRS("sProvincia") sComune = oRS("sComune") nMq = formatNumber(oRS("nMq"), 0, -1, 0, 0 ) nPrezzo = formatNumber(oRS("nPrezzo"), 2, -1, 0, -1 ) iListImg = oRS("iListImg") dim firstImagePath if iListImg <> "" then firstImagePath = dirImmobiliSpot&iListImg else firstImagePath = "../images/icone/noImage.gif" end if set oRS = Nothing dim iPreview, iVideo, bFoundVideo : bFoundVideo = false sSQL = "SELECT * FROM tblImmobiliVideo WHERE IdPratica = "&PRATICA set oRS = getRS( sSQL, connstring ) if not oRS.eof then iPreview = oRS("iPreview") iVideo = oRS("iVideo") if iVideo <> "" and not isNull(iVideo) then bFoundVideo = true end if set oRS = Nothing %>
<% dim galleryList : galleryList = ""
sSQL = "SELECT * FROM tblImmobiliImmagini "&_
" WHERE idPratica = "&PRATICA&" AND iImg <> '' "&_
" ORDER BY nPosizView"
set oRS = getRS(sSQL, connstring)
if not oRS.eof then
do while not oRS.eof
galleryList = galleryList & "
<% if galleryList <> "" then
response.Write " |
"
oRS.MoveNext
loop
end if
set oRS = Nothing %>
Rif.: <%="MG"&right("00000"&unFixQuotes(PRATICA), 5)%> Tipologia.: <%=sCategoria%> Zona: <%=sComune & " (" & sProvincia & ")" %> <% if nMq <> "0" then %>Mq.: <%=nMq%> <% end if %> <% if nPrezzo <> "0" then %>Prezzo €.: <%=nPrezzo%> <% end if %> |
<%=sNote%> | |