%
'dBlog 2.0 CMS Open Source
'Versione file 2.0.0
'FUNZIONE: questo script si occupa di visualizzare i commenti relativi ad una fotografia
%>
<%
Sub Contenuto()
%>
<%
Dim SQLCommenti, RSCommenti, FID, I
'Se i commenti sono abilitati
If Abilita_Commenti Then
'Effettuo il controllo sul parametro id
If Request.QueryString("fotografia") <> "" AND Request.QueryString("fotografia") <> "0" AND IsNumeric(Request.QueryString("fotografia")) = True Then
FID = Request.QueryString("fotografia")
Else
FID = 0
End If
If FID > 0 Then
SQLTitolo = " SELECT Descrizione FROM [Fotografie] WHERE Fotografie.ID = "& FID &" "
Set RSTitolo = Server.CreateObject("ADODB.Recordset")
RSTitolo.Open SQLTitolo, Conn, 1, 3
If NOT RSTitolo.EOF Then
RSTitolo.MoveFirst
%>
<%=RSTitolo("Descrizione")%> <%=Link_Fotografie%>
<%
End If
RSTitolo.Close
Set RSTitolo = Nothing
End If
'Cerco i commenti relativi alla fotografia richiesta
SQLCommenti = " SELECT * FROM [Commenti] WHERE Commenti.IDFotografia = "& FID &" ORDER BY [Data] ASC, [Ora] ASC "
Set RSCommenti = Server.CreateObject("ADODB.Recordset")
RSCommenti.Open SQLCommenti, Conn, 1, 3
'E visualizzo gli eventuali risultati
If NOT RSCommenti.EOF Then
I = 0
Do While NOT RSCommenti.EOF
I = I + 1
%>
<%=RSCommenti("Testo")%>
<%=Contributo_Di%>
<%
If RSCommenti("Link") <> "" Then
If Abilita_NoFollow Then
Response.Write "
"& RSCommenti("Autore") &""
Else
Response.Write "
"& RSCommenti("Autore") &""
End If
Else
Response.Write "
"& RSCommenti("Autore") &""
End If
%>
<%=Inviato_il%> <%=StrToData(RSCommenti("Data"))%> <%=Inviato_alle%> <%=StrToOra(RSCommenti("Ora"))%><%=Inviato_chiudi%>
<%
RSCommenti.MoveNext
Loop
Else
%>
<%=Errore_Commento_NonTrovato%>
<%
End If
Set RSCommenti = Nothing
%>
<%=Testo_Disclaimer_Commenti%>
<%
Else
%>
<%=Errore_Commenti_NonAbilitati%>
<%
End If
%>
<%
End Sub
Call GeneraPagina(Server.MapPath(Path_Template & "popup.htm"), "", "", "")
Conn.Close
Set Conn = Nothing
%>