%
Set reg = Server.CreateObject("ADODB.Recordset")
Set reg.ActiveConnection = objconexao
Set regI = Server.CreateObject("ADODB.Recordset")
Set regI.ActiveConnection = objconexao
codigonoticia = Request("codigonoticia")
if codigonoticia <> "" then
query = "SELECT * FROM noticia WHERE codigonoticia=" & codigonoticia
else
query = "SELECT * FROM noticia WHERE assunto='true' ORDER BY codigonoticia DESC"
end if
objreg.Open query
if objreg.EOF then
Response.Redirect "index.asp"
End if
while objreg("assunto") <> "true"
objreg.movenext
wend
sql = "SELECT * FROM user_site WHERE id=" & cint(objreg("fonte"))
reg.open sql
sqlI = "SELECT * FROM imagem WHERE codigonoticia=" & objreg("codigonoticia")
regI.open sqlI
if Not regI.Eof then
img = regI("imagem")
else
img = "semimagem.jpg"
end if
%>
.: SUPERVALE SUPERMERCADOS :.
<% =objreg("titulo") %>
-Receita enviada por
<% =reg("nome") %>
<%
if codigonoticia <> "" then
Set objreg = Server.CreateObject("ADODB.Recordset")
Set objreg.ActiveConnection = objconexao
query = "SELECT * FROM noticia WHERE not codigonoticia=" & codigonoticia & "AND assunto='true' ORDER BY codigonoticia DESC"
objreg.open query
else
objreg.movenext
end if
for i = 0 to 5
while objreg("assunto") <> "true"
reg.movenext
if objreg.EoF then exit for
i = i - 1
if i < 0 then
i = 0
end if
wend
%>