Tema: Agenda asp
Ver Mensaje Individual
  #5 (permalink)  
Antiguo 31/01/2005, 18:04
Avatar de lexus
lexus
 
Fecha de Ingreso: enero-2002
Ubicación: Cali - Colombia
Mensajes: 2.234
Antigüedad: 23 años, 4 meses
Puntos: 4
bueno aprovecho para colocar el calendario aqui por si alguien mas le sirve,
a mi por ejemplo me sirve para un calendario de eventos, es muy facil de personalizar... espero les sirva a todos.

Código:
<%
Dim giorno,mese,anno,tmese,day1,primog, mese2, anno2, dayoff,ultimog,x,giorno1
   
   giorno = request("giorno")
   If giorno = "" then
   giorno = day(now())
   End If
   
   mese = request("mese")
   If mese = "" then
   mese = month(now())
   End If
   anno = request("anno")
   If anno = "" then
   anno = year(now())
   End If
   If mese = 12 then
	  mese2 = 1
   anno2 = anno+1
   else 
   mese2 = mese+1
   anno2 = anno
   End If
   
   day1 = Cdate("1"+"/"+Cstr(mese)+"/"+Cstr(anno))
	  dayoff = Cdate("1"+"/"+Cstr(mese2)+"/"+Cstr(anno2))-1
	  primog = Weekday(Cdate("1"+"/"+Cstr(mese)+"/"+Cstr(anno)))-1
   ultimog = Weekday(dayoff)-1
   
   If ultimog = 0 then
   ultimog = 7
   End If
   
   If primog = 0 then
   primog = 7
   End If
   Select Case mese
   case 1
   tmese = "Ene"
   case 2
	tmese = "Feb"
   case 3
   tmese = "Mar"
   case 4
   tmese = "Abr"
   case 5
   tmese = "May"
   case 6
   tmese = "Jun"
   case 7
   tmese = "Jul"
   case 8
   tmese = "Ago"
   case 9
   tmese = "Sep"
   case 10
   tmese = "Oct"
   case 11
   tmese = "Nov"
   case 12
   tmese = "Dic"
   End Select
x=1
   %>
			  <table width="190" border="0" cellspacing="1" cellpadding="1">
				<tr bgcolor="#3399CC">
				  <td><a href="estapagina.asp?mese=<%if mese > 1 then response.write mese-1 else response.write 12 End If%>&anno=<%if mese > 1 then response.write anno else response.write anno-1 End If%>"><img src="../img/botones/ant.gif" border="0"></a></td>
				  <td width="50%" bordercolor="#666666" bgcolor="#3399CC"><strong><%=tmese%></strong></td>
				  <td width="50%" align="center" bordercolor="#666666"><strong><%=anno%></strong></td>
				  <td><a href="estapagina.asp?mese=<%if mese < 12 then response.write mese+1 else response.write 1 End If%>&anno=<%if mese < 12 then response.write anno else response.write anno+1 End If%>"><img src="../img/botones/sig.gif" border="0"></a></td>
				</tr>
				<tr>
				  <td colspan="4">
					<table width="100%" border="1" cellpadding="1" cellspacing="1" bordercolor="#666666">
					  <tr align="center" bgcolor="#CCCCCC">
						<td><strong>L</strong></td>
						<td><strong>M</strong></td>
						<td><strong>M</strong></td>
						<td><strong>J</strong></td>
						<td><strong>V</strong></td>
						<td><strong> S</strong></td>
						<td><strong> D </strong></td>
					  </tr>
					  <tr>
						<%
giorno1 = (day1-primog+x)
Do While giorno1 <= (dayoff+7-ultimog)
%>
						<td <%If day(day1-primog+x)=day(now()) and month(day1-primog+x)=month(now()) then response.write "bgcolor=""#FFF7D5""" End If%>>
						  <div align="center"> <font color ="<%if giorno1 >= day1 and giorno1 <= dayoff then
	 response.write "#000000"
	 Else
	 response.write "#CCCCCC"
	 End If%>">
							<%if giorno1 >= day1 and giorno1 <= dayoff then%>
							<a href="javascript:jumpto('dondeiranloseventos.asp?dia=<%=day(day1-primog+x)%>&mes=<%=month(day1-primog+x)%>&ano=<%=year(day1-primog+x)%>')"><%=day(day1-primog+x)%></a>
							<%else%>
							<%=day(day1-primog+x)%>
							<%End If%>
						</font></div></td>
						<%If weekday(day1 - primog + x - 1) = 7 Then
response.write "</tr>"
End If%>
						<%
giorno1 = giorno1 + 1
x=x+1
loop%>
					</table></td>
				</tr>
			  </table>
__________________
Control de Visitantes, Control de Accesos, Minutas digitales, Manejo de Correspondencia
http://www.controldevisitantes.com