<%
' Define variables
dim recordsonpage, requestrecords, offset, allrecords, hiddenrecords, showrecords, lastrecord, recordcounter, pagelist, pagelistcounter

' DB connection
dim Conn
Set Conn = createobject("ADODB.Connection")


Conn.open = "DRIVER={MySQL ODBC 3.51 Driver};SERVER=mysql95.secureserver.net;PORT=3306;DATABASE=illweb;USER=illweb;PASSWORD='webill';OPTION=0;"
'DRIVER={MySQL ODBC 3.51 Driver};SERVER=mysql95.secureserver.net;PORT=3306;DATABASE=illweb;USER=illweb;PASSWORD='your password';OPTION=0;
' records per page
recordsonpage = 1

' count all records
allrecords = 0
set rs = conn.Execute("SELECT * FROM illnewsdb")
do until rs.EOF
  allrecords = allrecords + 1
  rs.movenext
loop

' if offset is zero then the first page will be loaded
offset = request.querystring("offset")
if offset = 0 OR offset = "" then
  requestrecords = 0
else
  requestrecords = requestrecords + offset
end if

' opens database
set rs = conn.Execute("SELECT * FROM illnewsdb ORDER BY Add_Time Desc")

' reads first records (offset) without showing them (can't find another solution!)
hiddenrecords = requestrecords
do until hiddenrecords = 0 OR rs.EOF
  hiddenrecords = hiddenrecords - 1
  rs.movenext
  if rs.EOF then
    lastrecord = 1
  end if
loop
%>

	<style>

	A:link  {font-family:Geneva, Arial, Helvetica, sans-serif; color:#00FF00; text-decoration:none; font-weight:bold; font-size:11px }
	A:active {font-family:Geneva, Arial, Helvetica, sans-serif; color:#00FF00; text-decoration:none; font-weight:bold; font-size:11px }
	A:visited {font-family:Geneva, Arial, Helvetica, sans-serif; color:#00FF00; text-decoration:none; font-weight:bold; font-size:11px}
	A:hover {font-family:Geneva, Arial, Helvetica, sans-serif; color:#color:#00FF00; text-decoration:none; font-weight:bold; font-size:11px }
	
	2d2d2d
.SideText{font-family:Geneva, Arial, Helvetica, sans-serif; font-weight:bold; font-size:14px }
.NewsDate{font-family:Geneva, Arial, Helvetica, sans-serif; color:#00FF00 ; font-weight:bold; font-size:11px }
.HeadFont{font-family:Geneva, Arial, Helvetica, sans-serif; color:#00FF00 ; font-weight:bold; font-size:20px }
.ArtFont{font-family:Geneva, Arial, Helvetica, sans-serif; color:#FFFFFF ; font-weight:bold; font-size:11px}
.NoNext{font-family:Geneva, Arial, Helvetica, sans-serif; color:#464646 ; font-weight:bold; font-size:12px}
.SpaceFont{font-family:Geneva, Arial, Helvetica, sans-serif; color:#FFFFFF; font-weight:bold; font-size:11px }
.SigFont{font-family:Geneva, Arial, Helvetica, sans-serif; color:#00FF00 ; font-weight:bold; font-size:10px }

body{
text-align: center;
margin: 0;
padding: 0;
border: 0;
overflow: visible;
height: 100%;
background-color: transparent;
}

html, div { margin:0; padding:0; height:100%;}

p.date {
	width: 42px;
	height: 10px;
	padding: 18px 0 14px 0;
	text-align: center;
}

#calendar {
color: black;
z-index: -1;
position: absolute;
top: 0px;
left: 0px;
bottom: 0px;
width: auto;
height: 170px; /*Height of top frame div*/
overflow: visible; /*Disable scrollbars. Set to "scroll" to enable*/
}

#tag {
color: black;
position: absolute;
top: -10px;
left: 50px;
bottom: 0px;
width: 58.7px;
text-align: center;
height: 170px; /*Height of top frame div*/
overflow: visible; /*Disable scrollbars. Set to "scroll" to enable*/
}

#tagright {
color: black;
position: absolute;
top: -10px;
right: 0px;
bottom: 0px;
width: 58.7px;
text-align: center;
height: 170px; /*Height of top frame div*/
overflow: visible; /*Disable scrollbars. Set to "scroll" to enable*/
}


.month1 { background: url(images/01.gif) no-repeat 0 0; }
.month2 { background: url(images/02.gif) no-repeat 0 0; }
.month3 { background: url(images/03.gif) no-repeat 0 0; }
.month4 { background: url(images/04.gif) no-repeat 0 0; }
.month5 { background: url(images/05.gif) no-repeat 0 0; }
.month6 { background: url(images/06.gif) no-repeat 0 0; }
.month7 { background: url(images/07.gif) no-repeat 0 0; }
.month8 { background: url(images/08.gif) no-repeat 0 0; }
.month9 { background: url(images/09.gif) no-repeat 0 0; }
.month10 { background: url(images/10.gif) no-repeat 0 0; }
.month11 { background: url(images/11.gif) no-repeat 0 0; }
.month12 { background: url(images/12.gif) no-repeat 0 0; }

p.date span { display: none; }

</style>
										
												
															<table cellpadding="2px" cellspacing="0px"  border="0px"
															width="460px"   bordercolor="#D0D0D0" style=" border-style:style:outset ">
															  <tr>
															  <td align="center" valign="top">
									
																
																												  <div id="illbanner">
   
</div>
<script type="text/javascript"> 
var fo = new FlashObject("images/flashbanners/thenews.swf", "banner", "445", "47", "6", "#000000"); 
fo.addParam("wmode", "transparent"); 
fo.write("illbanner"); 

</script> 					  
															 												  
															<table height="100%" cellpadding="0px"  cellspacing="0px">
															<tr><td align="center" valign="top">
															
															  <table  cellpadding="0px"   cellspacing="0px" style="border-style:inset " border="0px" bordercolorlight="#FFFFFF" bordercolor="#A2A2A2" width="440px" >
															  <tr><td valign="top" align="center" >
															
															  <table cellpadding="2px" border="0px" cellspacing="0px" style="border-style:solid " bordercolor="#000000">
															 
															

<%
' prints records in the table
showrecords = recordsonpage
recordcounter = requestrecords
do until showrecords = 0 OR rs.EOF
recordcounter = recordcounter + 1
%>

<div id="calendar">
 <p class="date month8"><span>Aug</span> 18<span>th</span></p>
 <font class="NewsDate"><% = FormatDateTime(rs("Add_Time"),2) %>
 </div>
 <div id="tag">
<img src="images/tagBeats.png" width="55">
</div>
 <tr>
  <td align="center">
  <font class="HeadFont">   <% = rs("News_Subj") %></font>
  <p align="right"><font class="SigFont"> ~<% = rs("Add_User") %></font><p>
  </td> 
 </tr>
 
   <tr><td class="ArtFont">
															 
															  <font style="margin-top:1px; margin-left:20px; margin-right:10px; margin-bottom:1 ">
															<% = rs("News_Body") %>
															</font>
											<script>
var idcomments_acct = '4b5468aca568827542cd239ba29e3894';
var idcomments_post_id = '10';
var idcomments_post_url;
</script>
<span id="IDCommentsPostTitle" style="display:none"></span>
<script type='text/javascript' src='http://www.intensedebate.com/js/genericCommentWrapperV2.js'>
</script>	
															  </td></tr>


<%
  showrecords = showrecords - 1
  rs.movenext
  if rs.EOF then
    lastrecord = 1
  end if
loop
%>

</table>




 
 
 
   </td></tr>															
															  </table>															 
															   
															  </td>
															 
															  </tr>
															 
															
															<tr><td style="height:38px "  align="right" valign="bottom">
															<!-- Previous and Next Table -->
															
															  <table width="438px" border="1px" cellpadding="1px"   cellspacing="0px" bordercolor="#A2A2A2" bordercolorlight="#FFFFFF" style="border-style:inset ">
															  <tr><td valign="bottom" align="right" >
															
															  <table width="438px" cellpadding="0px" border="1px" cellspacing="0px" style="border-style:solid " bordercolor="#000000">
															  
															      <tr><td  class="ArtFont" align="right" >
 <tr>
  <td align="center">
    <table align="right" cellpadding="0" cellspacing="0"><tr><td>
  <% if requestrecords <> 0 then %>
  
  <a   ONMOUSEOVER="this.style.color='#FFFFFF'" ONMOUSEOUT="this.style.color='#1362A4'"  style="font-family:Geneva, Arial, Helvetica, sans-serif; color:#1362A4; text-decoration:none; font-weight:bold; font-size:12px"
   href="iLLNews.asp?offset=<% = requestrecords - recordsonpage %>">
   [Prev Page]</a><% else %><font class="NoNext">[Prev Page]</font><% end if %></td>
   <td align="right">&nbsp;
   <font class="NoNext">|</font>
   &nbsp;
   </td>
  <td align="right"><% if lastrecord <> 1 then %>   
   <a   ONMOUSEOVER="this.style.color='#FFFFFF'" ONMOUSEOUT="this.style.color='#1362A4'"  style="font-family:Geneva, Arial, Helvetica, sans-serif; color:#1362A4; text-decoration:none; font-weight:bold; font-size:12px "
    href="iLLNews.asp?offset=
	<% = requestrecords + recordsonpage %>">[Next Page]</a>
	<% else %><font class="NoNext">[Next Page]</font><% end if %>&nbsp;
	</td></tr></table>
	
	</td>
 </tr>
 </table>
 </td></tr></table>
															
															
															</td></tr>
															  
											  </table>
											  
											  
											  
											  
											  </td></tr></table>
											  
											
<!-- <tr>
 <td colspan="2">pagelist:
<%
'pagelist = 0
'pagelistcounter = 0
'do until pagelist > allrecords  
'  pagelistcounter = pagelistcounter + 1
%>

<%
 ' pagelist = pagelist + recordsonpage
'loop
%>
  </td>
 </tr>-->


<%
' Closes connection
rs.close
Conn.close
%>
</td></tr></table>
<br><br><br><br><br>