<%session("language") = "en"%> <% ' take the 4 latest news from the database and show them.. 'DateNow=now() 'todaysDate = FormatDateTime(DateNow,2) Set Connection = Server.CreateObject("ADODB.Connection") Connection.open strcon if session("language") = "se" then SQL = "Select news_id,news_heading,news_article FROM news " elseif session("language") = "en" then SQL = "Select news_id,news_heading_english as news_heading,news_article_english as news_article FROM news " end if SQL = SQL & " ORDER BY news.news_id DESC" Set RS = Connection.Execute(SQL) %> Christina Ljungberg

<%if rs.eof then%> No news at the moment <%else%> <% number_news = 1 %> <% Do until RS.EOF or number_news > 4 %> <% take40caractersheading = rs("news_heading") news_heading_light= left(take40caractersheading,36) %> <% take40caracters = rs("news_article") news_article_light= left(take40caracters,36) %>
<%=news_heading_light%> <% count_caracters = len(news_heading_light) if count_caracters > 35 then %> ... <%end if%>
" onClick="NewWindow(this.href,'nyhet','350','200','yes');return false"> <%=news_article_light%> <% count_caracters = len(news_article_light) if count_caracters > 35 then %> ... <%end if%> <% number_news = number_news + 1 RS.MoveNext %>
<% Loop %> <% end if RS.Close Connection.Close %>