Sistema de notícias...
E aí pessoal beleza...
Pessoal o código abaixo é o código do meu sistema de notícias, que pode ser visualziado no endereço: Aldo
CODE
<!--#include file="config.asp"-->
<%
'***********************************************************************
' Sistema de Notícias desenvolvido pela TemisNet
' Contatos: Temístocles Sota - ICQ 104458476
'***********************************************************************
%>
<html>
<head>
<title><%=TS%></title>
<link rel="stylesheet" type="text/css" href="estilo.css">
</head>
<body bgcolor="#FFFFFF" text="#000000" background="#FFFFFF">
<table border="0" cellpadding="0" cellspacing="0" width="472" bordercolor="#FFFFFF" align="center">
<tr>
<td bgcolor="#006699" align="center">
<table width="50%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td align="center"><strong><font color="yellow" size="1" face="Arial">Últimas Notícias</font>
</strong></td>
</tr>
</table>
</td>
</tr>
<tr>
<td bgcolor="#FFFFFF">
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td><a name= "scrollingCode"></a>
<marquee behavior= "scroll" align= "center" direction= "up" height="60" scrollamount= "2" scrolldelay= "90" onMouseOver='this.stop()' onMouseOut='this.start()'>
<table width="98%" cellpadding="0" cellspacing="0" align="center">
<% sqlstmt = "SELECT * FROM noticias ORDER BY data, id DESC"
Set rs = Server.CreateObject("ADODB.Recordset")
rs.Open sqlstmt, Dados, 3, 3
TotalRecs = rs.recordcount
x = 0
For x = 1 to 9999
If rs.eof then
Exit For
Else
date1 = rs("data")
id = rs("ID")
name1 = rs("titulo")
link = "<a href='news/view.asp?id=" & id & "'>" & date1 & "</a>"
description = name1
%>
<tr>
<td height="2" valign="top"><font face="Geneva, Arial, Helvetica, san-serif" size="1" class="home">
<span class="home">
<% =link %>
--
<% =description%>
</span></font>
</tr>
<tr>
<td height='5' valign='bottom'><img src="imagens/pixel.gif" width="1" height="1">
</tr>
<%
rs.MoveNext
End If
Next%>
</table></td>
</tr>
</table>
</td>
</tr>
<tr>
<td bgcolor="#006699">
<table width="50%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td align="center"> </td>
</tr>
</table>
</td>
</tr>
</table>
</body>
</html>
Se observarem verá que ele não tem uma limitação de notícias exibidas, se cadastrar 1.000, as 1.000 serão exibidas, e além do mais as notícias não estão sendo exibidas das datas mais recentes as mais antigas...
Recebi esse código para alterar o acima, mas não deu certo, aí não aparece nada, dá um erro no bd, veja o CODE
sqlstmt = "SELECT top 7 * FROM noticias where id =" & id & " ORDER BY id DESC"
Como posso resolver isso...
Discussão (3)
Carregando comentários...