% Session.LCID=1040 %> <% Response.buffer = True %>
|
||||
Aysms > Forum > Lista messaggi |
<%=forumName%> |
<%if Session("admin")="Yes" Then %> <% End If %> Vai a AySmS |
|
|
<%
Set RS = Server.CreateObject("ADODB.Recordset")
MySql="SELECT Count(*) AS MessageTot FROM messages"
Rs.Open MySql, my_conn
MessageTot=rs("MessageTot")
rs.close
%>
Benvenuto nel forum degli
sms gratis, il forum contiene <%=MessageTot%> messaggi.
<% Rem Now extract the message list from the database and thread messages%>
<%
'MySql="SELECT messages.* FROM threads INNER JOIN messages ON threads.ThreadID = messages.threadID ORDER BY messages.threadID DESC, messages.MessageID;"
MySql="SELECT messages.* FROM messages ORDER BY messages.threadID DESC, messages.MessageID;"
RS.cursorlocation=aduseclient
RS.Open MySql, my_Conn, adOpenStatic, adLockReadOnly, adCmdText
If Request.QueryString("page") = "" Then
iCurrentPage = 1
Else
iCurrentPage = CInt(Request.QueryString("page"))
End If
RS.PageSize = postsperpage
If RS.PageCount > 0 then
RS.AbsolutePage = iCurrentPage
Else
iCurrentPage = 0
End If
Session("CurrentPage") = iCurrentPage
indents=0
do while RS.AbsolutePage = iCurrentPage And Not RS.EOF
dim tt
tt = rs("messageID")
For n = 1 to len(tt)
if mid(tt, n, 1) = "." Then
indents = indents + 1
End If
next
Response.write ""
For n= 1 to indents
Response.write " "
Next
lpDate=RS("Posted")
If DateDiff("d",lpDate , DATE) < DAYflag then
lastpostday=weekday(lpDate)
pTime = formatdatetime(lpDate, 4)
lpDate =pweekday(lastpostday) & " " & pTime
End If
Response.write " " & rs("Subject") & " inviato da " & RS("Poster") & " il " & lpDate & ""
snow1 = Now
If DateDiff("d", snow1, DATE) < NEWflag then
Response.write " - Nuovo!"
End If
if Session("admin")="Yes" Then
response.write " - Cancella"
if rs("MessageNo")=1 Then
Response.write " (thread)"
End If
End If
Response.write "
<%
If RS.PageCount > 1 then
'Print Previous Page if required
If iCurrentPage <> 1 then
Response.Write "Pagina precedente"
Else
Response.Write "Pagina precedente"
End If
'Print direct access page numbers.
For intCount = 1 to RS.PageCount
If intCount = 1 then
Response.Write " | "
End If
If intCount = iCurrentPage then
Response.Write "" & intCount & " | "
Else
Response.Write "" & intCount & " | "
End If
Next
'Print Next Page if required
If iCurrentPage <> RS.PageCount then
Response.Write "Prossima pagina"
Else
Response.Write "Prossima pagina"
End If
End If
Response.Write " Scrivi un nuovo messaggio | Contatta il moderatore Torna all'elenco dei messaggi |
|||