Någon som förstår hur jag menar?
Har denna paging. Vill nu att i varje länk kunna kolla vilken sida som inlägget ligger på. <%If TOTALASIDOR PÅ INLÄGGET > 1 Then%>&sida=<%=SIDAN SOM MAN SKALL KOMMA TILL><%End If%>
Den kodsträngen ligger nedan i koden. Sidantalet är 20 på forum_view.asp.
<%SQL = "SELECT cf.katId, cf.rubrik, cf.id, cf.datum, cf.viewed, cf.svarsId, cf.anvnamn, cu.ar, cu.kon, cu.status, cu.anvnamn, cu.userId, cu.man, cu.dag FROM com_forum AS cf, com_users AS cu WHERE cf.userID=cu.userID AND cu.userID=" & Session("user_id") & " AND " & SQLwhere & " ORDER BY cf.id DESC"
arrRecSet = GetDbRows(SQL)
If Not IsArray(arrRecSet) Then%>
<table width="100%" border="0" cellpadding="2" cellspacing="0">
<tr>
<td><i><%=SubTopic%></i></td>
</tr>
</table>
<%Else
intPostsPerPage = 20
If Len(trim(Request.Querystring("n"))) > 0 Then intPage = cInt(trim(Request.Querystring("n"))) Else intPage = 1
intFirstPost = (intPage - 1) * intPostsPerPage
intTotalPosts = UBound(arrRecSet, 2)
intPages = ((intTotalPosts)\intPostsPerPage)+1
If intFirstPost + (intPostsPerPage - 1) >= UBound(arrRecSet,2) Then
intLastPost = UBound(arrRecSet, 2)
Else
intLastPost = intFirstPost + (intPostsPerPage - 1)
strNext = True
End If
x = 0
For i = intFirstPost To intLastPost
If X Mod 2 = 0 then
color = varRadBGC
Else
color = ""
End If%>
<table width="100%" border="0" cellpadding="4" cellspacing="0" bgcolor="<%=color%>" onmouseover="this.style.backgroundColor='<%=sidBG%>'; "onmouseout="this.style.backgroundColor='';">
<tr>
<td width="50%">
<a href="forum_view.asp?id=<%If arrRecSet(5,i) <> 0 Then%><%=arrRecSet(5,i)%><%ELse%><%=arrRecSet(2,i)%><%End If%>&kategori=<%=arrRecSet(0,i)%>[B]<%If TOTALASIDOR PÅ INLÄGGET > 1 Then%>&sida=<%=SIDAN SOM MAN SKALL KOMMA TILL><%End If%>[/B]#<%=arrRecSet(2,i)%>"><%=arrRecSet(1,i)%></a>
</td>
<td width="13%">
<%If arrRecSet(5,i) = 0 Then%>Läst: <%=arrRecSet(4,i)%><%ELse%> <%End If%>
</td>
<td align="right" width="37%">
<%If arrRecSet(6,i) = arrRecSet(10,i) Then%>
Inlägg av: <%Call WriteOnlineOrOfflineImage(arrRecSet(9,i))%> <b><a href="krypin.asp?id=<%=arrRecSet(11,i)%>"><%=arrRecSet(10,i)%></a></b> <%Call WriteSexInitialAndAge(arrRecSet(8,i),CDate(arrRecSet(7,i)&"-"&arrRecSet(12,i)&"-"&arrRecSet(13,i)))%>
<%Else%>
Inlägg av: <%=arrRecSet(7,i)%>
<%End If%>
</td>
</tr>
<tr>
<td colspan="3">
<em>Postad: <%If arrRecSet(3,i) <> "0000-00-00 00:00:00" Then%><%=Datum(arrRecSet(3,i))%><%ENd If%></em>
</td>
</tr>
</table>
<%X=X+1
Next
End If%>

