Problemer med paging
Hi eksperter,Hvad skal der til før min paging virker?
På forhånd tak!
-------------------------------------------------------------
<%@LANGUAGE="VBSCRIPT" CODEPAGE="1252"%>
<html>
<head>
<title>TEAM[NOPANIC] - Mess with the best, die like the rest!</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<link href="includes/stylesheet.css" rel="stylesheet" type="text/css">
</head>
<body background="../grafik/bg.gif" leftmargin="40" topmargin="0">
<table border="0" cellpadding="0" cellspacing="0" class="motherboard">
<tr>
<td height="355" valign="top"><!--#include virtual="pages/includes/header_menu.asp"--></td>
</tr>
<tr>
<td align="center" valign="top"><table width="780" border="0" cellpadding="0" cellspacing="0">
<tr>
<td width="235" valign="top"> </td>
<td width="545"> </td>
</tr>
<tr>
<td width="235" valign="top"><!--#include virtual="pages/includes/functions.asp"-->
<!--#include virtual="pages/includes/infobox.asp"--></td>
<td valign="top"><table width="545" border="0" cellpadding="0" cellspacing="0">
<tr>
<td><table height="21" border="0" cellpadding="0" cellspacing="0" class="pagename">
<tr>
<td height="20" valign="top">New reports </td>
</tr>
</table></td>
</tr>
<tr>
<td height="29" valign="top"> </td>
</tr>
<tr>
<td valign="top">
<%
SQL = "SELECT COUNT(*) as new FROM news"
set RS = conn.execute(SQL)
newcount = RS("news")
set conn = opendb()
SQL = "SELECT id, topic, body, author, source, addeddate FROM news ORDER BY id DESC limit 0,1"
set RS = conn.execute(SQL)
newpage = trim(request.querystring("newpage"))
if tagpage = "" then tagpage = 1
list = request.querystring("list")
if list = "" then list = 5
rest = (newcount Mod list)
rcsleft = list
if (rest = 0) then
pages = int(newcount / list )
else
pages = int(newcount / list + 1)
end if
if RS.EOF then
Response.write("Ingen tags fundet i databasen!")
else
RS.move(list * newpage - list)
end if
do while not RS.EOF and rcsleft > 0
if Cint(tagcount) > 0 then
if Cint(tagpage) > 1 then
response.write("<a href='?page=6&newpage=" & newpage - 1 & "&list=" & list &"'><< Forrige side</a>")
End if
response.write("</td>")
response.write("<td width='205' height='3' align='center'>Side " & newpage & " af " & pages)
response.write("<br>")
response.write("Vis <a href='?new_reports&newpage=1&list=5'>5</a>, <a href='?new_reports&newpage=1&list=10'>10</a>, <a href='?new_reports&newpage=1&list=15'>15</a> nyheder pr. side</td>")
response.write("<td width='150' height='3' class='text' align='right'>")
If Cint(newpage) < pages then
response.write("<a href='?page=6&newpage=" & newpage + 1 & "&list=" & list & "'>Næste side >></a>")
End if
%>
<table width="545" border="0" cellpadding="5" cellspacing="0" class="uplight">
<tr>
<td width="440" height="88" align="left" valign="top"><table width="100%" border="0" cellpadding="0" cellspacing="0" class="text11">
<tr>
<td width="299" height="18" valign="top"><% response.write(" " & RS("topic") & " ")%></td>
</tr>
</table>
<table width="100%" border="0" cellpadding="0" cellspacing="0" class="text10">
<tr>
<td width="299" height="30" valign="top"><% response.write(" <font color='#999999'>Skrevet d. " & formatdatetime(RS("addeddate"),2) & " kl. " & formatdatetime(RS("addeddate"),4) & " af <a href='http://www.team-nopanic.dk/pages/" & RS("author") & ".asp" & "'>" & RS("author") & "</a></font> ")%></td>
</tr>
</table>
<table width="100%" border="0" cellpadding="0" cellspacing="0" class="text10">
<tr>
<td width="299" height="18" valign="top">
</td>
</tr>
</table> <br></td>
<td width="83" valign="top"><%response.write("<img src='http://www.team-nopanic.dk/grafik/members/" & RS("author") & ".jpg" & "'> ")%></td>
</tr>
</table>
<br>
<table width="545" border="0" cellpadding="5" cellspacing="0" class="updown">
<tr>
<td width="522" height="22" valign="top"><% response.write(" " & RS("body") & " ")%></td>
</tr>
</table>
<%
end if
closedb()
%> </td>
</tr>
</table>
</td>
</tr>
</table></td>
</tr>
<tr>
<td height="40" align="center" valign="middle"><table cellpadding="5" class="copyright">
<tr>
<td>Alt tekst, struktur, grafik, medie & Asp kode er copyright 2003 TeamNopanic - Siden er udarbejdet af David Plum Olsen </td>
</tr>
</table></td>
</tr>
</table>
</body>
</html>
