<%language="VBScript" response.write "" sqlstr = "SELECT TOP " & numItems & " * FROM news ORDER BY date DESC, time DESC" Set rsnews = news.Execute(sqlstr) If Err.Number <> 0 Then response.write "Couldn't exec SQL query" response.end End If If rsnews.EOF Then response.write "No records found... DB corrupt?" response.end End If Function to_html(s_string) to_html = Replace(s_string, vbcrlf, "
") to_html = Replace(to_html, """", """) End Function rsnews.moveFirst Dim db While Not rsnews.EOF s_message=rsnews.fields("news") s_message2=to_html(s_message) s_message3=to_html(s_message) If rsnews.fields("urls") = "1" THEN s_message3 = edit_hrefs(s_message2) End if currdate = FormatDateTime(rsnews.fields("date"), 1) if db <> currdate then %>

   <% response.write currdate %>
<% db = currdate end if %>
<%=rsnews.fields("title")%>
<%Response.Write s_message3%>


<% rsnews.moveNext Wend %>




<%=reginfo%>