<% Dim rstSimple ' ADO recordset 'Dim recupere 'recupere=request.querystring("r") Set rstSimple = cnnSimple.Execute("SELECT * FROM new_contenu where S01<>'0' and idlocalite=1 order by date desc") %> <% Function sesure_mot(texte, longueur) Dim j Dim car j = longueur Do While j <= Len(texte) car = Mid(texte, j, 1) If car = " " Or car = Chr(10) Or car = Chr(13) Or car = "," Or car = "." Or car = ";" Or car = ":" Then Exit Do End If j = j + 1 Loop sesure_mot = Left(texte, j) If Len(sesure_mot) < Len(texte) Then sesure_mot = sesure_mot & "..." End If End Function %>

NEWS
<% Do While Not rstSimple.EOF %>
<% Set fs = Server.CreateObject ( "Scripting.FileSystemObject" ) fichier = rstSimple("idnews") & ".jpg" repertoire = "news/" chemin = Server.MapPath(repertoire & fichier)%> <% If fs.FileExists (chemin) then %> .jpg" width="60" height="60"> <% Else Response.Write " " End if %>
><%= rstSimple.fields("titre").Value %>  <% texte=rstSimple("news") response.write(sesure_mot(texte,100)) %>
<% rstSimple.MoveNext Loop rstSimple.Close Set rstSimple = Nothing %>