<%
Response.expires = 0
%>
<%option explicit%>
<!-- #include file=\"support.inc\" -->
<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\" \"
http://www.w3.org/TR/html4/loose.dtd\"><html>
<head>
<title>Untitled Document</title>
<meta http-equiv=\"Content-Type\" content=\"text/html; charset=iso-8859-1\">
<link rel=\"stylesheet\" type=\"text/css\" href=\"style/stylecoolsites.css\">
</head>
<body background=\"gif/main_wide.gif\" leftmargin=0 topmargin=0 marginwidth=0 marginheight=0 >
<table width=\"720\" border=\"0\" align=\"center\" height=\"214\" cellpadding=\"0\" cellspacing=\"0\">
<tr align=\"center\">
<center>
<td>
<div align=\"center\">
<table width=\"600\" border=\"0\" cellpadding=\"0\" cellspacing=\"0\">
<tr>
<td><%
Dim rst, strSQL
set rst = Server.CreateObject(\"ADODB.Recordset\")
strSQL = \"SELECT * FROM Files Order By ID Desc\"
rst.Open strSQL, connect, 3, 1, 1
Dim IntPageSize, PageIndex, TotalPages, TotalRecords
Dim RecordCount, RecordNumber
IntPageSize = 4
PageIndex = Request(\"PageIndex\")
\'If pageIndex is empty, set it to one.
if PageIndex = \"\" then PageIndex = 1
RecordCount = rst.RecordCount
RecordNumber = (PageIndex * IntPageSize) - (IntPageSize)
rst.PageSize = intPageSize \' Set the number of records per page
rst.AbsolutePage = PageIndex \'Define what page number on which the current record resides.
TotalPages = rst.PageCount
dim intPrev, intNext
intPrev = PageIndex - 1
intNext = PageIndex + 1 \'same as rst.AbsolutePage
\'Build table header
With Response
.write \"<table border=0 cellpadding=0 cellspacing=0>\"
end with
Dim Count \'We\'ll use this to limit the number of records displayed on a page
Count = 1
do while NOT rst.EOF AND Count <= IntPageSize
With Response
.Write \"<td width=150><a href=\"\"file.asp?ID=\" & rst(\"ID\") &\"\"\" target=_blank>\"
.Write \"<img border=0 src=\'\" & rst(\"File Data\") & \"\' >\" &\"</a><br>\"
.Write \"<center><font Size=1><a href=\"\"file.asp?ID=\" & rst(\"ID\") & \"\"\" target=_blank>\"
.Write \"| \" & rst(\"File Name\") &\" |\" & \"</td></font></center></a>\"
End with
count = count + 1
rst.MoveNext
loop
Response.Write \"<tr><td align=left colspan=9 bgcolor=999999>\"
call BuildNav2 (intPrev,IntNext,TotalPages)
response.write \"</td></tr></table>\"
rst.close
%>
<br>
<font size=\"1\">Note: de sidste nye Cool Sites kommer først i køen :-)</font></td>
</tr>
</table>
</div>
</td>
</center>
</tr>
</table>
</body>
</html>