|
|
<%
Set objFileSys = Server.CreateObject("scripting.FileSystemObject")
Set Thefolder = objFileSys.GetFolder(strCaminho_titleimg)
Set Thefiles = TheFolder.files
For Each Thefiles in TheFiles
if TheFiles.Name = "title"&strTipContent&".gif" then
TipContent = TheFiles.Name
exit for
end if
next
Set objFileSys = nothing
Set Thefolder = nothing
Set Thefiles = nothing
%>
<%
'Set objFileSys = Server.CreateObject("scripting.FileSystemObject")
'Set Thefolder = objFileSys.GetFolder(strCaminho_icoImg)
'Set Thefiles = TheFolder.files
'For Each Thefiles in TheFiles
'if TheFiles.Name = strTipContent&".jpg" then
'TipContent = TheFiles.Name
'exit for
'end if
'next
'Set objFileSys = nothing
'Set Thefolder = nothing
'Set Thefiles = nothing
%>
<%if isEmpty(TipContent) then%><%else%> <%end if%> |
 |
<%
strTipContent = request("link")
strImprensaID = request("ID")
if strImprensaID <> "" then
Set Rs = Server.CreateObject("ADODB.Connection")
Rs.Mode = 3
strSQL = "UPDATE Imprensa SET Visitas = Visitas + 1 WHERE imprensaID = " & strImprensaID
Set RS = objConexao.Execute(strSQL)
'rs.close
'RS = nothing
Set objrs = Server.CreateObject("ADODB.Recordset")
strSQL = "SELECT imagem, titulo"&session("lang")&" as aliasTitulo, noticia"&session("lang")&" as aliasNoticia FROM Imprensa WHERE imprensaId = " & strImprensaId
objRS.open strSQL, objConexao
%>
<%if objRs.EOF then%>
Aguade, em breve, novos conteúdos.
<%else%>
<%IF objRS("Imagem") <> "" THEN%>
" align="left" border="1">
<%end if%>
<%=objRS("aliasTitulo")%>
<%=objRS("aliasNoticia")%>
<%
strSQL = null
objRs.Close
set objRs = nothing
%>
<%end if%>
|
<%
Set objRs = Server.CreateObject("ADODB.Recordset")
strSQL = "SELECT ImprensaID, Titulo"&session("lang")&" as aliasTitulo FROM Imprensa where ImprensaID <> " & strImprensaId
objRs.open strSQL, objConexao
%>
OUTRAS NOTÍCIAS
<%
if objRs.EOF then
%>
Não há outras notícias.
<%
else
Do while not objRs.eof%>" class="link"><%=objRs("aliasTitulo")%>
<%
objRs.MoveNext
LOOP
end if
%>
<%
ObjRs.Close
strSQL = null
set ObjRs = nothing
%>
|
<%else%>
<%
strTipContent = "imprensa"
Set objRS = Server.CreateObject("ADODB.Recordset")
strSQL = "SELECT tipoId FROM tipContent WHERE tipo = '"&strTipContent&"'"
objRS.open strSQL, objConexao
if objRs.EOF then
'response.redirect ("message.asp?msg=Em breve, novos conteúdos")
else
strTipoId = objRS("tipoId")
set objRS = nothing
Set objRS = Server.CreateObject("ADODB.Recordset")
strSQL = "SELECT TOP 1 contentId, imagem, titulo"&session("lang")&" as aliasTitulo, content"&session("lang")&" as aliasContent FROM Content WHERE default = true and tipoId = " & strTipoId
objRS.open strSQL, objConexao
End If
%>
<%if objRs.EOF then%>
Aguade, em breve, novos conteúdos.
<%else%>
<%=objRS("aliasTitulo")%>
<%=objRS("aliasContent")%>
<%
strSQL = null
objRs.Close
set objRs = nothing
%>
<%end if%>
<%
Set objRs = Server.CreateObject("ADODB.Recordset")
strSQL = "SELECT ImprensaId, Titulo"&session("lang")&" as aliasTitulo FROM Imprensa order by imprensaId desc"
objRs.open strSQL, objConexao
%>
TODAS AS NOTÍCIAS
<%
if objRs.EOF then
%>
Não há outras notícias.
<%
else
Do while not objRs.eof%>" class="link"><%=objRs("aliasTitulo")%>
<%
objRs.MoveNext
LOOP
end if
%>
<%
strSQL = null
ObjRs.Close
set ObjRs = nothing
%>
|
<%end if%>
|
|
 |
|
|
|
|
|