%@LANGUAGE="VBSCRIPT"%>
<% Option Explicit %>
<%Response.Expires = 0
response.buffer=false
dim Recmt, rsnews, connnews, cnpath, vlogin, vsenha, objRS, varSQL, vele
'----- Conexão com o Banco, Sem ODBC
set connnews=server.createobject("adodb.connection")
cnpath="DBQ=" & server.mappath("cry444me2u.mdb")
connnews.Open "DRIVER={Microsoft Access Driver (*.mdb)}; " & cnpath
'----- Montar clusula SQL para consulta
varSQL = "SELECT codigo, data, datapres, categoria, titulo from news where 1=1 order by data DESC"
if trim(request("codigo"))<>"" then
varSQL = varSQL & " and codigo = " & trim(request("codigo"))
end if
if trim(request("titulo"))<>"" then
varSQL = varSQL & " and titulo like '%" & trim(request("titulo")) & "%'"
end if
if trim(request("categoria"))<>"" then
varSQL = varSQL & " and categoria = " & trim(request("categoria"))
end if
if (request("dia")<>"") and (request("mes")<>"") and (request("ano")<>"") then
varSQL = varSQL & " and data = #" & request("mes") & "-" & request("dia") & "-" & request("ano") & "# "
end if
set rsnews=connnews.execute(varSQL)
%>
<< w w w . f a z e n d a e c o l o g i c a . c o m . b r >>
|
|
|
ÍNDICE
DE NOTÍCIAS
|
| Data
|
Título
|
Categoria
|
<%
if not(rsnews.eof) then
rsnews.movefirst
do until rsnews.eof
%>
| <%= rsnews("data")%>
|
"><%=rsnews("titulo")%>
|
<%
Select Case trim(rsnews("categoria"))
Case 1 response.write "Agricultura Orgânica"
Case 2 response.write "Pecuária Ecológica"
Case 3 response.write "Fazenda Ecológica"
Case 4 response.write "Diversos"
End Select
%>
|
<%
rsnews.movenext
loop
else
%>
| Não
foi encontrada nenhuma notícia. |
<%
end if
%>
|
|
|
|
DESTAQUE
|
Conheça
o LIVRO:
Manejo de Pastagem Ecológica, um conceiro
para o terceiro milênio.
Faça seu
pedido.
|
|
| ::
Copyright © 1999 - 2001 - Fazenda Ecológica :: desenvolvimento
: SITEMAP :: |
|