<% Set Conn = Server.CreateObject("ADODB.Connection") Conn.Open "tinspol" conn.execute ("SET CHARACTER SET latin2;") Set RS=Conn.Execute("select * from products order by datareal desc") do while not RS.EOF %><% if RS("foto1")<>"" then %><% end if %>
Nazwa
<%=RS("name")%>
Data realizacji
<%=DataLook(RS("datareal"))%>
Opis <%=MakeText(RS("body"))%>
" alt="" border="0">

<% RS.MoveNext Loop RS.Close Conn.Close %>
<% function DataLook(dzien) DataLook = Day(dzien) & "/" & Month(dzien) & "/" & Year(dzien) end function function eDataLook(dzien) eDataLook = Month(dzien) & "/" & Day(dzien) & "/" & Year(dzien) end function 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 %>