<%@LANGUAGE="VBSCRIPT"%>
<!--#include file="include/functions.asp"-->
<%
	id = Trim(Request("id"))
%>
<!--#include file="include/header.asp"-->
<%
	If id = "" Then
%>
<tr>
 <td>
  <table width="550" cellpadding="0" cellspacing="4">
   <tr>
    <td width="100" height="24" align="center" background="images/bg_column.jpg" class="links">Date</td>
	<td width="475" height="24" align="center" background="images/bg_column.jpg" class="links">Article</td>
	<td width="75" height="24" align="center" background="images/bg_column.jpg" class="links">View</td>
   </tr>
   <tr>
    <td colspan="4" bgcolor="#000000"><img src="images/px.gif" width="1" heigth="1"></td>
   </tr>
<%
	OpenRS("SELECT id,fldName,fldDate FROM news WHERE fldDate <= '" & MySQLDate(Date) & "' AND fldType='Public' ORDER BY fldDate DESC")
		If Not rs.EOF Then
			x = 0
			Do While Not rs.EOF
%>
   <tr height="26">
    <td align="center"><%=rs("fldDate")%></td>
	<td align="center"><%=rs("fldName")%></td>
	<td align="center"><a href="news.asp?id=<%=rs("id")%>"><img src="images/view.gif" height="20" width="50" border="0"></a></td>
   </tr>
   <tr>
    <td colspan="4" bgcolor="#000000"><img src="images/px.gif" width="1" heigth="1"></td>
   </tr>
<%		
				x = x + 1
				rs.MoveNext
			Loop
		Else
			Response.Write("<tr><td colspan='4' align='center' height='30'><b>Coming soon, so check back!</b></td></tr>")
		End If
	CloseRS()
%>
  </table>
 </td>
</tr> 
<%
	Else
		OpenRS("SELECT * FROM news WHERE id="&id)
			If Not rs.EOF Then
				Response.Write("<tr><td height=""20""><span class=""links"">"&rs("fldName")&"</span><br>"&rs("fldDate")&"</td></tr>"&vbCrLf)
				Response.Write("<tr><td height=""10""><img src=""images/px.gif"" height=""10""></td></tr>")
				Response.Write("<tr><td height=""1"" bgcolor=""#000000""><img src=""images/px.gif"" height=""1""></td></tr>")
				Response.Write("<tr><td height=""10""><img src=""images/px.gif"" height=""10""></td></tr>")
				Response.Write("<tr><td>"&rs("fldText")&"<br><br><a href=""news.asp""><img src=""images/back.gif"" height=""20"" width=""83"" border=""0""></a></td></tr>")
			Else
				Response.Write("<tr><td>Event Not Found!</td></tr>")
			End If
		CloseRS()
	End If
%>
<!--#include file="include/footer.asp"-->       