Buongiorno,
sto cercando di modificare un'applicazione per la gestione delle notizie sul mio sito. L'applicazione prevede che l'amministratore decida se la notizia debba essere attiva o meno. Solo quelle attive verranno mostrate nella pagine pubblica >>>http://www.gemonahomepage.it/newscms/ . Io tuttavia vorrei realizzare una pagina, oltre a quella d'archivio, in cui mi venissero mostrate solo per esempio le prime 5 o 10 notizie . Come posso modificare il codice che di seguito incollo?
Grazie.
-----------------------------
<table width="100%" cellpadding="3" cellspacing="0" border="0">
<tr>
<td>
<%if pageView="" THEN
' We display the news article list
%>
Archivio delle NEWS.
Per visualizzarle clicca sul titolo.
<%
' Set the SQL Statement to get the information from the database
strSQL="SELECT * FROM TBLNews WHERE newsStatus=1 ORDER BY newsDate DESC"
' Open the Database
objRS.Open strSQL, objConn, adOpenKeyset, adLockPessimistic, adCmdText
IF NOT objRS.EOF THEN
'objRS.Filter=objRS("newsStatus")=1
%>
<table width="100%" cellspacing="0" cellpadding="3" class="mainTable">
<tr><td width="20%">Data</td><td>Località</td><td>Titolo</td></tr>
<%
' Write out the list of articles but it will
' only show the ones that have a status of
' 1 which shows they are online
DO WHILE NOT objRS.EOF%>
<%if intRowColor = 0 Then
Response.Write "<TR bgcolor=""#F6EFF9"" onMouseOver=""this.bgColor = '#565656'"" onMouseOut =""this.bgColor = '#F6EFF9'"">"
intRowColor = 1
Else
Response.Write "<TR bgcolor=""#ffffff"" onMouseOver=""this.bgColor = '#565656'"" onMouseOut =""this.bgColor = '#FFFFFF'"">"
intRowColor = 0
End if%>
<td width="20%"><%=FormatDateTime(objRS("newsDate"),2) %></td>
<td width="20%">[<%=objRS("newsPlace")%>]</td>
<td>" title="Display The Article" onmouseover="window.status='Display the article'; return true" onmouseout="window.status=''; return true"><%=objRS("newsHeadline")%></td>
</tr>
<%
objRS.MoveNext
Loop
objRS.Close
%>
</table>
--------------------------

Rispondi quotando