20 messaggi dal 23 luglio 2002
Ho un problema con la paginazione asp in una pagina di un forum
Non riesco a capire o meglio dopo vari tentativi invani non sono riuscito a trovare dove inserire in maniera corretta le stringhe della mia paginazione.
Qualcuno può aiutarmi indicandomi dove devo inserire i codici asp della paginazione.
Il codice della pagina é:
<!--#INCLUDE FILE="config.inc" -->
<%



'## Default.asp

'## Open DataBase Connection
'## (Change to include file soon!)



set my_conn= Server.CreateObject("ADODB.Connection")

my_Conn.Open ConnString



'## Get Totals
set rs1 = Server.CreateObject("ADODB.Recordset")
strSQL = "Select * from Totals"

rs1.open strSQL, my_conn


Users = rs1("U_Count")
Posts = rs1("P_Count")

rs1.Close
set rs1 = nothing

'## Get all Forums From DB
strSql = "SELECT * FROM Category"
set rs = my_conn.Execute (StrSql)


'## Do some Cookie bits to see when last here
session("last_here_date") = Request.Cookies("date")
Response.Cookies("Date") = now()
Response.Cookies("Date").Expires = dateadd("d",365,now())

' if never been here before, set last_here_date to -10 days
if Session("last_here_date") = "" then
Session("last_here_date") = dateadd("d",-10,now())
End if

'## Function to display new icon
Function isNew(dt)
if datediff("s", session("last_here_date"), dt) > 1 then
isNew = "<font face='" & DefaultFontFace & "' color='" & NewFontColor & "' size='1'>New"
Else
isNew = " "
End If
End Function
%>

<!--#INCLUDE FILE="top.inc" -->
<table width="730" border =0 align="center">
<tr>
<td><font size="-1" face="Ms Sans Serif"><font face="Verdana, Arial, Helvetica, sans-serif">
<font size="1">Tua Ultima visita - <%= session("last_here_date")%></font> </font></td>
<td align=right><font face="Ms Sans Serif" size="-1">Totale degli Argomenti:
<%= Posts %> , Totale Iscritti: <%= Users %>   </font></td>
</tr>
</table>
<div align="center"><center>

<table width="730" border="0" align="center" cellpadding="0" cellspacing="2">
<tr>
<td align="center" bgcolor="<% =HeadCellColor %>"><font size="1" face="Ms Sans Serif"><strong> </font></td>
<td align="center" bgcolor="<% =HeadCellColor %>"><strong> <font face="Ms Sans Serif" size="1" color="<% =HeadFontColor %>">Categorie</font></strong></td>
<td align="center" bgcolor="<% =HeadCellColor %>"><strong> <font face="Ms Sans Serif" size="1" color="<% =HeadFontColor %>">Argomenti</font></strong></td>
<td align="center" bgcolor="<% =HeadCellColor %>"><strong> <font face="Ms Sans Serif" size="1" color="<% =HeadFontColor %>">Data
Inserimento </font></strong></td>
<td align="center" bgcolor="<% =HeadCellColor %>"><strong> <font face="Ms Sans Serif" size="1" color="<% =HeadFontColor %>">Proposta
da </font></strong></td>
</tr>
<%
If rs.Eof or rs.Bof then ' Nessuna categoria
Response.Write "<tr><td collspan=5>Non è presente ancora nessuna categoria</td></tr>"
Else
do until rs.eof '## Grab the Categories.








'## Display Category

Response.Write "<tr><td colspan=5 bgcolor='" & CategoryCellColor & "'><font face='" & DefaultFontFace & "' size='2' color='" & CategoryFontColor & "' size+1> <strong>"& rs("cat_name") & " </strong></font></td></tr>"
'## Build SQL to get forums via category
strSql = "SELECT Forum.Forum_ID, Forum.F_Name, Forum.F_Description, Forum.F_Cat, Forum.F_Count, Forum.F_Last_Post, Forum.F_Moderator, Members.M_Name "
strSql = strSql & "FROM Members INNER JOIN Forum ON Members.Member_id = Forum.F_Moderator "
strSql = strSql & "where Forum.F_Cat = " & rs("cat_id")
set rsForum = my_conn.Execute (StrSql)


if rsForum.eof or rsForum.bof then
Response.Write "<tr><td collspan=5> </td></tr>"
else
do until rsForum.Eof '## Display Forum
Response.Write "<tr>" & vbcrlf
Response.Write "<td bgcolor='" & ForumCellColor & "'>" & isNew(rsForum("F_Last_Post")) & "</td>"& vbcrlf
Response.Write "<td bgcolor='" & ForumCellColor & "'><font face='" & DefaultFontFace & "' size=2><a href='forum.asp?forum_id=" & rsForum("Forum_ID") & "&forum_title=" & server.URLEncode(rsForum("F_name")) & "'>"
Response.Write rsForum("F_name") & "</a><br>" & vbcrlf
Response.Write "<font color='" & ForumFontColor & "' face='" & DefaultFontFace & "' size='2'>" & rsForum("F_Description") & "</font></td>" & vbcrlf
Response.Write "<td bgcolor='" & ForumCellColor & "' align='center' valign='top' ><font face='" & DefaultFontFace & "' color='" & ForumFontColor & "' size='2'>" & rsForum("F_Count") & "</font></td>" & vbcrlf
Response.Write "<td bgcolor='" & ForumCellColor & "' align='center' valign='top'><font face='" & DefaultFontFace & "' color='" & ForumFontColor & "' size='2'>" & rsForum("F_Last_Post") & "</font></td>" & vbcrlf
Response.Write "<td bgcolor='" & ForumCellColor & "' valign='top'><font face='" & DefaultFontFace & "' color='" & ForumFontColor & "' size='2'>" & rsForum("M_Name") & "</font></td>"
Response.Write "</tr>" & vbcrlf
rsForum.movenext


loop
End If
rs.MoveNext
loop
End If

%>
</table>

<p align="center"> <font size="1" face="Ms Sans Serif"><font face="<% =DefaultFontFace %>" size="2"><a href="default.asp">Tutti
i Forums</a></font></p>
<div align="center">
<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,29,0" width="730" height="64">
<param name="movie" value="../banners.swf">
<param name="quality" value="high">
<embed src="../banners.swf" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" width="730" height="64"></embed></object>
</div>
</body></html>
<%
my_conn.Close
set my_conn = nothing

set rs = nothing


set rsForum = nothing

%>


OT: Leggi le faq prima di postare.

---[ www.digiscout.it ]---

"This message was written using 100% recycled electrons"

Torna al forum | Feed RSS

ASPItalia.com non è responsabile per il contenuto dei messaggi presenti su questo servizio, non avendo nessun controllo sui messaggi postati nei propri forum, che rappresentano l'espressione del pensiero degli autori.