<%
Function Apostrophe(s) 
  pos=Instr(s, "'")
  while pos>0
        s=mid(s,1,pos-1) & "\'" & mid(s,pos+1)
        pos=Instr(pos+2, s, "'")
  wend
  pos=Instr(s, chr(13))
  while pos>0
        s=mid(s,1,pos-1) & mid(s,pos+1)
        pos=Instr(pos, s, chr(13))
  wend
  pos=Instr(s, chr(10))
  while pos>0
        s=mid(s,1,pos-1) & mid(s,pos+1)
        pos=Instr(pos, s, chr(10))
  wend
  Apostrophe=s
end function



Set conn=server.createobject("ADODB.CONNECTION")
'conn.open("robion")
connstring="DRIVER={Microsoft Access Driver (*.mdb)}; DBQ=E:\kunden\homepages\42\d314052914\db\robion.mdb;"
conn.Open connstring 
SQL="SELECT * FROM [actualite] where ucase(titre)<>'MARQUISE' ORDER by [ordre]"    
Set rs=conn.execute(sql)
corp=""
i=0
do while rs.eof=false 
'if rs.eof=false then
   if i>0 then 
       corp=corp & "<BR><BR>"
   else
       corp=corp & "<BR>"
   end if
   photo=rs("photo")
   if photo<>"" then
      corp=corp & "<center><img src=""photo/" & photo & """></center><BR>"
   end if

   corp=corp & "<div style={margin-left:7pt; margin-right:5pt;}>"

   titre=rs("titre")
   if titre<>"" then
      corp=corp & "<B><u>" & titre & "</u></B>"
   end if

   commentaire=rs("commentaire")
   if commentaire<>"" then
      corp=corp & "<BR>" & commentaire
   end if
   internet=rs("internet")
   if internet<>"" then
      if ucase(left(internet,3))="WWW" then internet="http://" & internet
      chemin="../"
      if ucase(left(internet,4))="HTTP" then chemin=""
       
      corp=corp & "<BR><a href=""" & internet & """ target=""_blank"">En savoir plus...</A>"
   end if


   corp=corp & "</div>"
   corp="<font face=verdana size=1>" & corp & "</font>"
'end if
   i=i+1
   rs.movenext
loop
response.write(" document.writeln('"  & apostrophe(corp)  & "');  ")
'response.write(" ")
set rs=nothing
set conn=nothing
%>