<%@ Language=VBScript %> <% ' definindo data no formato brasileiro(dd/mm/aaa) Session.LCID = 1046 'A função retornará o mês atual por extenso. function fnChangeMonth(strMonth, strDirection) if strDirection = "previous" then if strMonth = 1 then tempstrMonth = 12 else tempstrMonth = strMonth - 1 end if else if strMonth > 11 then tempstrMonth = 1 else tempstrMonth = strMonth + 1 end if end if fnChangeMonth = tempstrMonth end function 'função Horario como a Variavel data Function Horario ( Hoje ) ' Estamos criando uma Variavel Dia. Com o dia de Hoje Dia = Day(date) ' Estamos criando uma variável Mes. Com o mês de hoje %> <% if Request("dd") = "" then DisplayDate = Date() else DisplayDate = formatQstring(Request("dd")) end if DisplayMonth = Month(DisplayDate) If len(DisplayMonth) <> 2 then DisplayMonth = "0" & DisplayMonth end if %> <% mes = MonthName(month(DisplayDate), 0) ' Agora criamos uma variável como o ano atual. Ano = Year(date) ' Aqui ajuntamos o Dia, Mes e Ano, tudo na funcao Hoje. Hoje = Dia & " de " & Mes & " de " & Ano 'Agora iremos igualar a Variável da função Horario com a variavel hoje. Para obter a data completa. Horario = Hoje 'Vamos fechar agora a função Horario. End Function %> | RIO RUGBY F. C. | Rio de Janeiro - Brasil
<% 'Faço a conexão com o bd e recupero os dados cnpath="DBQ=" & Server.MapPath("DB/fotos.mdb") DataSource = "Driver={Microsoft Access Driver (*.mdb)}; " & cnpath Set Conn = Server.CreateObject("ADODB.Connection") Conn.Open DataSource set rs=conn.execute("SELECT TOP 12 * FROM Foto ORDER BY id DESC") %> <% n = 1 c = 4 'c, é aqui que vc controla o numero de colunas Do while not RS.Eof %> <% n = n + 1 RS.Movenext If n > c then response.write "" n = 1 End If Loop %>