|
<%
'Cria o objeto RS_news de recordset
Set RS_news = CreateObject("ADODB.Recordset")
Set RS_news.ActiveConnection = Conexao
RS_news.CursorLocation = 3
RS_news.CursorType = 0
RS_news.LockType = 1
Dim lista_noticias
Dim contador_not
contador_not = 0
'Executa da Query de consulta
RS_news.Open "select cod_novidade, tit_novidade, data_novidade From _novidades where status = 'A' ORDER BY data_novidade DESC"
If Not RS_news.EOF then
Do Until RS_news.EOF
If contador_not = 0 Then
v_noticia = RS_news("cod_novidade")
End if
lista_noticias = lista_noticias & " " & RS_news("data_novidade") & " " & RS_news("tit_novidade") & " "
contador_not = contador_not + 1
RS_news.MoveNext
Loop
End If
If request("_news") <> "" then
v_noticia = request("_news")
End If
If v_noticia <> "" then
'Cria o objeto RS_Ver de recordset
Set RS_Ver = CreateObject("ADODB.Recordset")
Set RS_Ver.ActiveConnection = Conexao
RS_Ver.CursorLocation = 3
RS_Ver.CursorType = 0
RS_Ver.LockType = 1
'Executa da Query de consulta
RS_Ver.Open "select cod_novidade, tit_novidade, txt_novidade, img_01, img_02, img_03, img_04, img_05, img_06, img_07, img_08, img_09, img_10, data_novidade From _novidades where cod_novidade = " & v_noticia & " AND status = 'A'"
If Not RS_Ver.EOF Then
txt_novidade = RS_Ver("txt_novidade")
%>
<% If RS_Ver("img_01") <> "" Then %>  " border="0" alt=""><% End If %> |
<% If RS_Ver("img_02") <> "" Then %>  " border="0" alt=""><% End If %> |
<% If RS_Ver("img_03") <> "" Then %>  " border="0" alt=""><% End If %> |
<% If RS_Ver("img_04") <> "" Then %>  " border="0" alt=""><% End If %> |
<% If RS_Ver("img_05") <> "" Then %>  " border="0" alt=""><% End If %> |
<% If RS_Ver("img_06") <> "" Then %>  " border="0" alt=""><% End If %> |
<% If RS_Ver("img_07") <> "" Then %>  " border="0" alt=""><% End If %> |
<% If RS_Ver("img_08") <> "" Then %>  " border="0" alt=""><% End If %> |
<% If RS_Ver("img_09") <> "" Then %>  " border="0" alt=""><% End If %> |
<% If RS_Ver("img_10") <> "" Then %>  " border="0" alt=""><% End If %> |
<%
End If
Else
%>
<%
End If
%>
|
<%
If txt_novidade <> "" Then
response.write txt_novidade
Else
response.write " "
End If
%>
|
<%
If lista_noticias <> "" then
response.write lista_noticias
End If
%>
|
|