<% Function NameFromMonth(iMonth) select case cint(iMonth) case 1 s = "Enero" case 2 s = "Febrero" case 3 s = "Marzo" case 4 s = "Abril" case 5 s = "Mayo" case 6 s = "Junio" case 7 s = "Julio" case 8 s = "Agosto" case 9 s = "Septiembre" case 10 s = "Octubre" case 11 s = "Noviembre" case 12 s = "Diciembre" end select NameFromMonth = s End Function Function LastDay(testYear, testMonth) LastDay = Day(DateSerial(testYear, testMonth + 1, 0)) End Function Function GetPrevMonth(iThisMonth,iThisYear) GetPrevMonth=month(dateserial(iThisYear,iThisMonth,1)-1) End Function Function GetPrevMonthYear(iThisMonth,iThisYear) GetPrevMonthYear=Year(dateserial(iThisYear,iThisMonth,1)-1) End Function Function GetNextMonth(iThisMonth,iThisYear) GetNextMonth=month(dateserial(iThisYear,iThisMonth+1,1)) End Function Function GetNextMonthYear(iThisMonth,iThisYear) GetNextMonthYear=year(dateserial(iThisYear,iThisMonth+1,1)) End Function Sub DisplaysmallCalendar(sMonth, iYear) ' AQUI CREO LA PARTE SUPERIOR. Response.write ("
") Response.Write ("  ") ' aqui el mes Response.Write ( sMonth & " " & iYear & "  " ) Response.Write ("
") Response.write ("") Response.write ("") Response.write ("") Response.write ("") Response.write ("") Response.write ("") Response.write ("") Response.write ("") i = 0 dDay = DateSerial(iYear,iMonth,1) iMonth = Month(dDay) iYear = Year(dDay) iLastDay = LastDay(iYear, iMonth) iFirstDay= Weekday(dDay) iLastDay = iFirstDay + iLastDay -1 do while i<= iLastDay if i <> iLastDay then Response.Write ("") else exit do end if for j=1 to 7 if (j < iFirstDay and i = 0) or (i + j > iLastDay) then Response.Write ("") else k = k + 1 sDate = "#" & iMonth & "/" & k & "/" & iYear & "#" Set rs_calendario = Server.CreateObject("ADODB.Recordset") strSQL = "SELECT blog.* FROM blog WHERE data = '" & sDate & "'" rs_calendario.Open strSQL, adoCon if rs_calendario.eof then if (k = Day(now)) and (iMonth = Month(now)) and (iYear = Year(now)) then sEvent = "
" & k & "
" else sEvent = k end if else if (k = Day(now)) and (iMonth = Month(now)) and (iYear = Year(now)) then sEvent = "
" & k & "
" else sEvent = "
" & k & "
" end if End If Response.Write ("") end if next i=i+7 loop Response.Write ("") if rs_calendario.state <> 0 then rs_calendario.close set rs_calendario = nothing Response.Write ("
" & strLangSun & "" & strLangMon & "" & strLangTue & "" & strLangWed & "" & strLangThu & "" & strLangFri & "" & strLangSat & "
") Response.write sEvent Response.Write ("

") end sub %>