<html>
<head>
<title>WELCOME TO AJ's BULETIN BOARD</title>
<meta http-equiv="expires" content="0">
<style>
<!--
	a:link, a:visited {color:blue; font-weight:bold;}
	a:active {color=white; background: firebrick; font-size: 100%; font-weight:bold;}
	a:hover {color:red; font-weight:bold;}
//-->
</style>
<!-- scripting , html copyright 1998 Kathi O'Shea ------->
<!-- email info@web-savant for custom web development --->
<!-- see readme.txt in zip file for modification and ---->
<!-- redistribution info -------------------------------->
</head>
<body bgcolor="#E9F7FA" text="#0000CC" topmargin=0 leftmargin=0>
<center>
<font face="times new roman">
  <h1><font face='Georgia, Times New Roman, Times, serif' size=5 color=#0080C0>Buletin Board </font></h1>
  <h5>&nbsp; </font> <% PageNo = request("page")
If PageNo="" then
%> 

<font face="arial" size=3> <a href="sign.asp"><font size="2">Post new message</font></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
    <a href="<%= Request.ServerVariables("HTTP_REFERER")%>"><font size="2">Back 
    to Referring Page</font></a> </font> </h5>
  <p> <br>
    &nbsp;&nbsp;&nbsp;&nbsp; <%
	PageNo=1
ElseIf PageNo=1 then
%> 
  <p>&nbsp;&nbsp;&nbsp; 
  <p>

<%
End If
set conn = server.createobject("adodb.connection")
DSNtemp="DRIVER={Microsoft Access Driver (*.mdb)}; "
' set the actual path to the lostandfound below - this example
' assumes that the lostandfound is in the web server root
DSNtemp="lostandfound"
conn.Open DSNtemp
sqlstmt = "SELECT * from lostandfound ORDER BY PostDate DESC"
Set rs = Server.CreateObject("ADODB.Recordset")
rs.Open sqlstmt, conn, 3, 3
TotalRecs = rs.recordcount
rs.Pagesize=10
TotalPages = cInt(rs.pagecount)
rs.absolutepage=PageNo
If PageNo = 1 then
	response.write "<br><Font face='arial' size=2>There are " & TotalRecs & " entries in " & TotalPages & " pages</font>"
End If

	If rs.eof then
		response.write "<p><br><center><font face='arial'><b>There are no entries in the lostandfound.</b>"
		response.write "<br><a href='sign.asp'>Sign the buletin board</a></font></center>"
  	    response.end
	End If
x = 0
For x = 1 to 10
	If rs.eof then
		Exit For
	Else
		When = rs("PostDate")
    	Name = rs("Name")
		Name = Replace(Name,"''","'")
		City = rs("City")
		State = rs("State")
		Country = rs("Country")
	  	Email = rs("Email")
	  	URL = rs("URL")
	  '	If IsEmpty(URL) or URL = "" then
	'	   	Link = "no URL given"
	' 	Else
'		 	Link = "<a href='" & URL & "'>" & URL & "</a>"
'		End If
		Comments = rs("Comments")
		Comments = replace(Comments, "''", "'")
		Start = rs("PostDate")
   %>
<table width=600 border=0 cellpadding=0 cellspacing=0>
  <tr><td colspan=3><font face="arial" size=2><%= When %></td></tr>
    
  <tr>
    <td colspan=3 bgcolor="#C5BE60"><font face="arial" size=2 color="#000000">
	<b><%= Comments %></b></font>
	</td>
  </tr>
  
  <tr>
    <td width=125 valign="top">
	<font face="arial" size=1>
<%       
        If IsEmpty(Email) or Email="" then
			response.write(Name)
		Else
			response.write "<a href='mailto:" & Email & "'>" & Name & "</a>"
		End If
%>  
    </font>
    </td>
	
	<td width=200 valign="top"><font face="arial" size=1><i><%= City %>&nbsp;
	<%= State %>&nbsp;<%= Country %></i>
	</td>
	
	<td width=275 align="right" valign="top">
	<font face="arial" size=1><%= Link %>
    </font>
	</td>
  </tr>
</table>  
<br>
  <%
  	rs.MoveNext
	End If
Next
response.write "<table width=300 border=0><tr>"
response.write "<td align='center'>"
If PageNo > 1 then
	response.write "<form method='post' action='default.asp'>"
	response.write "<input type='hidden' name='Page' value='" & PageNo-1 & "'>"
	response.write "<font face='arial' size=2>"
	response.write "<input type='submit' value='<< Prev'></form>"
Else
	response.write "&nbsp;"
End If
response.write "</td><td align='center'>"
If NOT rs.eof then
	response.write "<form method='post' action='default.asp'>"
	response.write "<input type='hidden' name='Page' value='" & PageNo+1 & "'>"
	response.write "<font face='arial' size=2>"
	response.write "<input type='submit' value='Next >>'></form>"
Else
	response.write "&nbsp;"
End If
response.write "</td></tr></table>"				 
conn.close
set conn = nothing
  %>
</center>
</body>
</html>