<% kat=Request("kat") %>
<% Set Conn = Server.CreateObject("ADODB.Connection") Conn.Open "prebud" Conn.execute ("SET CHARACTER SET latin2;") Set RS=Conn.Execute("select * from products where categ=" & kat & "") do while not RS.EOF %>
<%=RS("name")%>

<%=MakeText(RS("body"))%>
<% if RS("foto1")<>"" then if RS("foto1big")<>"" then %>"><% end if %>" alt="" border="0"><% if RS("foto1big")<>"" then %><% end if end if if RS("foto2")<>"" then if RS("foto2big")<>"" then %>"><% end if %>" alt="" border="0"><% if RS("foto2big")<>"" then %><% end if end if if RS("foto3")<>"" then if RS("foto3big")<>"" then %>"><% end if %>" alt="" border="0"><% if RS("foto3big")<>"" then %><% end if end if %>

<% RS.MoveNext Loop RS.Close Conn.Close %>
<% Function MakeText(txt) artykul=txt do while left(artykul,1)=" " or left(artykul,1)=chr(10) artykul=mid(artykul,2) loop do while right(artykul,1)=" " or right(artykul,1)=chr(10) artykul=left(artykul,len(artykul)-1) loop if artykul<>"" then artykul=Replace(artykul,chr(13),"") artykul=Replace(artykul,chr(10),"
") end if MakeText = artykul End Function %>