Código fuente de 'Calendario multianual.asp'

<html>
<head>
<title>Calendario multianual - Códigos asp, programacion asp, descargas asp, rutinas asp</title>

<p align="center"><font face="Arial"><b><font size="3">Calendario multianual

<%@ Language=VBScript%></font></b></font><font size="3"><font face="Arial">
<%If not Request.QueryString("PageView") = "Source" Then%>

</font>

<%
If Request.QueryString("Date") = "" Then
	iDate = Date()
	iDay = Day(iDate)
	iMonth = Month(iDate) 
	iYear = Year(iDate)
Else
	iDate = Request.QueryString("Date")
	iDay = Day(iDate)
	iMonth = Month(iDate)
	iYear = Year(iDate)
end If
%>

</font>

</p>

<center>
<%If iMonth = 1 Then%>
	<a href="Calendario multianual.asp?Date=<%=iDay & "/" &  12 & "/" & iYear - 1%>"><</a>
<%Else%>
	<a href="Calendario multianual.asp?Date=<%=iDay & "/" &  iMonth - 1 & "/" & iYear%>"><</a>
<%end If%>

<%=MonthName(iMonth)%>

<%If iMonth = 12 Then%>
	<a href="Calendario multianual.asp?Date=<%=iDay & "/" & 1 & "/" & iYear + 1%>">></a>
<%Else%>
	<a href="Calendario multianual.asp?Date=<%=iDay & "/" & iMonth +1 & "/" & iYear%>">></a>
<%end If%>
<%
ShowMonth iMonth & "/" & iDay & "/" & iYear, iMonth & "/" & iDay & "/" & iYear, "Calendario multianual.asp"
%>


<a href="Calendario multianual.asp?Date=<%=iDay & "/" & iMonth & "/" & iYear - 1%>">
(<%=iYear-1%>) Anterior</a> <a href="Calendario multianual.asp">Hoy</a>
<a href="Calendario multianual.asp?Date=<%=iDay & "/" & iMonth & "/" & iYear + 1%>">
Próximo_año (<%=iYear+1%>)</a>
</center>


<%
Function Days(iMonth, iYear)
	select case iMonth
		case 1, 3, 5, 7, 8, 10, 12
			Days = 31
		case 2
			If iYear/4 = Int(iYear/4) Then
				Days = 29
			Else
				Days = 28
			end If
		case 4, 6, 9, 11
			Days = 30
	end select
End Function
%>

<%
Function ShowMonth(iDate, iHighLightDate, strPage)
	Dim iDay
	Dim iMonth
	Dim iYear
	iDay = Day(iDate)
	iMonth = Month(iDate)
	iYear = Year(iDate)
	
	iStartDay=Weekday(iMonth & "/1/" & iYear)
%>

<table WIDTH="150" border="0" CELLSPACING="1" cellpadding="0">  
  <tbody>
	<tr align="right">
		<td><font size="1">D</font></td>
		<td><font size="1">L</font></td>
		<td><font size="1">M</font></td>
		<td><font size="1">Mi</font></td>
		<td><font size="1">J</font></td>
		<td><font size="1">V</font></td>
		<td><font size="1">S</font></td>
		
	</tr>
	<tr align="right">
<%
	For i = 1 to iStartDay - 1
		Response.Write "		<TD><FONT size=1>&nbsp;</FONT></TD>" & vbNewLine
	Next
	iDayOfWeek = iStartDay - 1
	For i = 1 to Days(iMonth,iYear)
		
		If "" & iMonth & "/" & i & "/" & iYear = iHighLightDate Then
			Response.Write "		<TD bgcolor=Silver><FONT size=1><A href=""" & strPage & "?Date=" & iMonth & "/" & i & "/" & iYear & """>" & i & "</a></FONT></TD>" & vbNewLine
		Else
			Response.Write "		<TD><FONT size=1><A href=""" & strPage & "?Date=" & iMonth & "/" & i & "/" & iYear & """>" & i & "</a>" & "</FONT></TD>" & vbNewLine
		end If			
		iDayOfWeek = iDayOfWeek + 1
		If iDayOfWeek = 7 Then
			Response.Write "	</TR>" & vbNewLine
			Response.Write "	<TR align=right>" & vbNewLine			
			iDayOfWeek = 0 
		end If
	Next
%></tr>

  </tbody>
</table>
<%

End Function

end If%>

</body>
</html>