%@Language=VBScript%>
<%Option Explicit
Response.Buffer=true%>
<%
If Session("CodigoUsuario") <=0 then
Response.Redirect("/cadastro/login.asp?origem=SalaImprensa")
end if
Dim rsDestaque
Dim ObjDestaque
Dim rsAutor
Dim ObjProduto
Dim Ok
Dim ListaDestaques
Dim Mes
Dim MesAux
Dim Ano
Dim Autor
Dim ListaAutores
Dim ListaOutrosTitulos
Dim Contador
set ObjDestaque = new TDestaque
set rsDestaque = server.CreateObject("adodb.recordset")
rsDestaque.CursorLocation = 3
' Busca os destaques de produtos
ObjDestaque.CodOrg=2 ' Sala de Imprensa
Ok = ObjDestaque.ObtemDestaqueProduto(rsDestaque)
if rsDestaque.state=0 then rsDestaque.Open
If Ok then
if not rsDestaque.EOF then
MesAux=""
Contador=0
while not rsDestaque.EOF
Contador=Contador+1
'monta os dois meses mais recentes abertos, os outros, coloca na combo
if Contador<=2 then
Ano = left(rsDestaque("DtaIni"),4)
Mes=FormataMesExtenso(left(right(rsDestaque("DtaIni"),4),2))
ListaDestaques = ListaDestaques &"
"
ListaDestaques = ListaDestaques &"
"& Mes &" "& Ano &"
"
ListaDestaques = ListaDestaques &"
"
while (Mes = MesAux) or (MesAux="")
ListaDestaques = ListaDestaques &"
"
rsDestaque.MoveNext
if not rsDestaque.EOF then
MesAux=FormataMesExtenso(left(right(rsDestaque("DtaIni"),4),2))
else
Mes="Fim"
MesAux=0
end if
wend
'MesAux=FormataMesExtenso(left(right(rsDestaque("DtaIni"),4),2))
ListaDestaques = ListaDestaques &"
"
else
'monta a como de outros títulos
ListaOutrosTitulos = ListaOutrosTitulos &""
rsDestaque.MoveNext
end if
wend
end if
set ObjDestaque=nothing
set rsDestaque=nothing
else
set ObjDestaque=nothing
set rsDestaque=nothing
Response.Redirect("/mensagem.asp?Erro=-28") ' Ocorreu um erro ao carregar os Produtos. Por favor, tente novamente
end if
Autor = Request.QueryString("Autor")
If Autor<>"" then
set ObjProduto = new TPessoa
set rsAutor = server.CreateObject("adodb.recordset")
rsAutor.CursorLocation = 3
'obtem as fotos dos autores cadastrados em t_foto
ObjProduto.Nome=Autor
ok = ObjProduto.ObtemFotoAutor(rsAutor)
if rsAutor.state=0 then rsAutor.Open
If Ok then
if not rsAutor.EOF then
ListaAutores = ListaAutores &"
"
ListaAutores = ListaAutores &"
"
ListaAutores = ListaAutores &"
"
ListaAutores = ListaAutores &"
"
ListaAutores = ListaAutores &"
"
ListaAutores = ListaAutores &"
"
ListaAutores = ListaAutores &"
"
ListaAutores = ListaAutores &"
"
ListaAutores = ListaAutores &"
"
while not rsAutor.EOF
ListaAutores = ListaAutores &"
"
end if
set ObjProduto=nothing
set rsAutor=nothing
else
set ObjProduto=nothing
set rsAutor=nothing
Response.Redirect("/mensagem.asp?Erro=-34") ' Ocorreu um erro ao carregar os autores. Por favor, tente novamente
end if
end if
%>
Nova Fronteira
_