<%
if (Request.Querystring("p")="s") then%>
<%
elseif (Request.Querystring("p")="p") then
%>
<%
elseif (Request.Querystring("lm")="1") then
%>
<%
elseif (Request.Querystring("p")="o") then
%>
<%
else
zap = "SELECT TOP 12 r.*, m.tm_nazwa2 FROM t_restauracje r "
zap = zap & "JOIN t_miejscowosc m ON r.tr_id_miejscowosci = m.id_miejscowosci "
zap = zap & "WHERE r.rabat > 0 and prezentacja_rabat>0 ORDER BY rabat DESC"
sel.open zap, conn, 1, 3
if sel.recordcount > 0 then
response.write "
![]()
" & vbCrLf
Dim fs, imgFolder, inc, tab1(12), tab2(12), tab3(12), tab4(12), tab_id(12), tab_miasto(12)
set fs=Server.CreateObject("Scripting.FileSystemObject")
inc = 0
do while not sel.eof
if inc=0 then
odslony = sel("id_restauracji")
else
odslony = odslony&", "&sel("id_restauracji")
end if
tab1(inc) = sel("tr_nazwa")
tab_id(inc) = sel("id_restauracji")
tab2(inc) = sel("rabat")
if sel("tr_cena_od")<>"" then
tab3(inc) = "
przed rabatem od: " & sel("tr_cena_od") & " zł/os."
else
tab3(inc) = " "
end if
tab_miasto(inc) = sel("tm_nazwa2")
if fs.FileExists("C:/inetpub/wwwroot/info2/Gastronomia/restauracje/"&replace(sel("tr_url"), "start.htm", "images") & "/1p.jpg") then
ImgDimension("restauracje/"&replace(sel("tr_url"), "start.htm", "images") & "/1p.jpg")
call ImgNormalizeSize(154, 132, False)
tab4(inc) = "
![]()
"
end if
inc = inc + 1
sel.movenext
loop
Set fs = nothing
Dim i1, i5, i3, i4, koniec
i1 = 0
i5 = 0
i3 = 0
i4 = 0
koniec = false
For i = 0 to 15
For i2 = 0 to 2
if i2 = 0 then response.write "
" & vbCrLf
if (i Mod 4) = 0 And tab1(i1)<>"" then
response.write "" & tab1(i1) & "
" & vbCrLf
i1 = i1 + 1
end if
if (i = 1 Or i = 5 Or i = 9 Or i = 13) And tab4(i4)<>"" then
response.write "" & tab_miasto(i4) & "
" & tab4(i4) & " " & vbCrLf
i4 = i4 + 1
end if
if (i = 2 Or i = 6 Or i = 10 Or i = 14) And tab2(i5)<>"" then
response.write "" & tab2(i5) & "%
" & vbCrLf
i5 = i5 + 1
end if
if (i = 3 Or i = 7 Or i = 11 Or i = 15) And tab3(i3)<>"" then
response.write "- " & trim(tab3(i3)) & "
więcej »
" & vbCrLf
i3 = i3 + 1
end if
if i2 = 2 then
response.write "" & vbCrLf & "
" & vbCrLf
if ((i + 1) Mod 4) = 0 And tab1(i3)<>"" then response.write "
" & vbCrLf
if tab1(i3)="" then
koniec = true
Exit For
end if
end if
next
if koniec then Exit For
Next
end if
sel.close
'sel.open "SELECT opis FROM h_teksty WHERE id = 1", conn, 1, 3
'if sel.recordcount > 0 And sel("opis")<>"" then
'response.write "
zalety systemu restauracjezrabatem.pl
" & vbCrLf
'response.write "
" & sel("opis") & "
" & vbCrLf
'end if
'sel.close
end if
%>