Vous n’avez pas trouvé la réponse que vous recherchez ?
Posez votre question<cfset title="-[ Calendar ]-"><!--- Texte du titre ---> <cfset BgColor="64aaDC"><!--- Couleur de fond de page ---> <cfset bgcarac="aaa4DC"><!--- Couleur de fond de page ---> <cfset BgMenu="64aaDC"><!--- Couleur de fond pour la selection du mois et de l annee ---> <cfset BgDayAlpha="0066aa"><!--- Couleur de fond des jours en lettre ---> <cfset BgDayNumb="CCCCCC"><!--- Couleur de fond des jours en chiffre ---> <cfset WCase="30"><!--- Largeur de la case ---> <cfset HCase="30"><!--- Hauteur de la case ---> <cfparam name="dateOnClick" default="#Now()#"><!--- Date du jour, elle sera utiliser pour faire des calculs ---> <cfparam name="Currentdate" default="#Now()#"><!--- Date du jour ---> <cfset Jour=0> <!--- <cfset Mois=#Month(Currentdate)#><!--- Le mois de la date du jour ---> <cfset Annee=#Year(Currentdate)#><!--- Le annee de la date du jour ---> <cfset J1=DayofWeek("#Month(dateOnClick)#/01/#Year(dateOnClick)#")> <cfset NBJ=DaysInMonth(dateOnClick)> <!--- Nombre de Jour ---> ---> <cfoutput> <html> <head> <title>#title#</title> <style> A:visited { color: FFFFFF; font-size: 9pt; font-family: Verdana; font-weight : bold; text-decoration: none } A:hover { color: 33AA55; font-size: 9pt; font-family: Verdana; font-weight : bold; text-decoration: none } A:link { color: FFFFFF; font-size: 9pt; font-family: Verdana; font-weight : bold; text-decoration: none } A:active { color: 33AA55; font-size: 9pt; font-family: Verdana; font-weight : bold; text-decoration: none } .currentday { color: FF0000; font-size: 9pt; font-family: Verdana; font-weight : bold; text-decoration: none } .currentday:visited { color: FF0000; font-size: 9pt; font-family: Verdana; font-weight : bold; text-decoration: none } .currentday:hover { color: 33AA55; font-size: 9pt; font-family: Verdana; font-weight : bold; text-decoration: none } .currentday:link { color: FF0000; font-size: 9pt; font-family: Verdana; font-weight : bold; text-decoration: none } .currentday:active { color: 33AA55; font-size: 9pt; font-family: Verdana; font-weight : bold; text-decoration: none } .content { color: FFFFFF; font-size: 9pt; font-family: Verdana; font-weight : bold; text-decoration: none } </style> <script> function dayClick() { alert('#month(dateOnClick)#-#Jour#-#year(dateOnClick)#'); } </script> </head> ---- <cfloop from=\"1\" to=\"12\" index=\"imois\"> <cfset dateOnClick=createdate(year(dateOnClick),imois,1)> <cfset Jour=0> <cfset Mois=#Month(Currentdate)#><!--- Le mois de la date du jour ---> <cfset Annee=#Year(Currentdate)#><!--- Le annee de la date du jour ---> <cfset J1=DayofWeek(\"#Month(dateOnClick)#/01/#Year(dateOnClick)#\")> <cfset NBJ=DaysInMonth(dateOnClick)> <!--- Nombre de Jour ---> <table border="0" cellspacing="0" cellpadding="0" align="center" > ---- , <table width=\"100%\" border=\"0\" cellpadding=\"0\" cellspacing=\"0\" class=\"content\" bgcolor=\"#BgMenu#\"> ---- &lt;&lt;, #MonthasString(Month(dateOnClick))#, &gt;&gt;, &nbsp;, &lt;&lt;, #Year(dateOnClick)#, &gt;&gt;, </td> </tr> <tr> <td> ---- Su, Mo, Tu, We, Th, Fr, Sa, <cfloop index=\"j\" from=\"1\" to=\"6\" step=\"1\"> ---- <cfloop index=\"i\" from=\"1\" to=\"7\" step=\"1\"> <cfif (i eq J1) and (j eq 1) or (Jour GTE 1) and (Jour LT NbJ)> <cfset Jour=Jour+1> <cfif (Jour EQ Day(dateOnClick)) and (Mois EQ month(dateOnClick)) and (Annee EQ year(dateOnClick))> #Jour# <cfelse> #Jour# </cfif> <cfelse> &nbsp; </cfif> , </cfloop> </cfloop> </td> </tr> </table> </td> <cfif not imois mod 4></tr><tr></cfif> </cfloop> </tr> </table> </html> </cfoutput>
<cfset title="-[ Calendar ]-"><!--- Texte du titre ---> <cfset BgColor="64aaDC"><!--- Couleur de fond de page ---> <cfset bgcarac="aaa4DC"><!--- Couleur de fond de page ---> <cfset BgMenu="64aaDC"><!--- Couleur de fond pour la selection du mois et de l annee ---> <cfset BgDayAlpha="0066aa"><!--- Couleur de fond des jours en lettre ---> <cfset BgDayNumb="CCCCCC"><!--- Couleur de fond des jours en chiffre ---> <cfset WCase="30"><!--- Largeur de la case ---> <cfset HCase="30"><!--- Hauteur de la case ---> <cfloop index="ind" from="1" to="12" step="1"> <cfparam name="dateOnClick" default="#Now()#"><!--- Date du jour, elle sera utiliser pour faire des calculs ---> <cfparam name="Currentdate" default="#Now()#"><!--- Date du jour ---> <cfset Jour=0> <cfset dateOnClick=#Dateadd('m',-#Month(dateOnClick)#+#ind#, dateOnClick)#> <cfset Mois=#Month(Currentdate)#><!--- Le mois de la date du jour ---> <cfset Annee=#Year(Currentdate)#><!--- Le annee de la date du jour ---> <cfset J1=DayofWeek("#Month(dateOnClick)#/01/#Year(dateOnClick)#")> <cfset NBJ=DaysInMonth(dateOnClick)> <!--- Nombre de Jour ---> <cfoutput> <html> <head> <title>#title#</title> <style> A:visited { color: FFFFFF; font-size: 9pt; font-family: Verdana; font-weight : bold; text-decoration: none } A:hover { color: 33AA55; font-size: 9pt; font-family: Verdana; font-weight : bold; text-decoration: none } A:link { color: FFFFFF; font-size: 9pt; font-family: Verdana; font-weight : bold; text-decoration: none } A:active { color: 33AA55; font-size: 9pt; font-family: Verdana; font-weight : bold; text-decoration: none } .currentday { color: FF0000; font-size: 9pt; font-family: Verdana; font-weight : bold; text-decoration: none } .currentday:visited { color: FF0000; font-size: 9pt; font-family: Verdana; font-weight : bold; text-decoration: none } .currentday:hover { color: 33AA55; font-size: 9pt; font-family: Verdana; font-weight : bold; text-decoration: none } .currentday:link { color: FF0000; font-size: 9pt; font-family: Verdana; font-weight : bold; text-decoration: none } .currentday:active { color: 33AA55; font-size: 9pt; font-family: Verdana; font-weight : bold; text-decoration: none } .content { color: FFFFFF; font-size: 9pt; font-family: Verdana; font-weight : bold; text-decoration: none } </style> <script> function dayClick() { alert('#month(dateOnClick)#-#Jour#-#year(dateOnClick)#'); } </script> </head> <table width="100%" border="0" cellpadding="0" cellspacing="0" class="content" bgcolor="#BgMenu#"> ---- , &lt;&lt;</td> #MonthasString(Month(dateOnClick))#, &gt;&gt;, &nbsp;, &lt;&lt;, #Year(dateOnClick)#, &gt;&gt;, </td> </tr> <tr> <td> ---- Di, Lu, Ma, Me, Je, Ve, Sa, <cfloop index=\"j\" from=\"1\" to=\"6\" step=\"1\"> ---- <cfset BgDayNumb=\"aaaaaa\"> <cfloop index=\"i\" from=\"1\" to=\"7\" step=\"1\"> <cfif (i eq J1) and (j eq 1) or (Jour GTE 1) and (Jour LT NbJ)> <cfset Jour=Jour+1> <cfif (Jour EQ Day(dateOnClick)) and (Mois EQ month(dateOnClick)) and (Annee EQ year(dateOnClick))> #Jour# <cfelse> #Jour# </cfif> <cfelse> &nbsp; </cfif> , <cfset BgDayNumb=\"cccccc\"> </cfloop> </cfloop> </td> </tr> </table> </html> </cfoutput> </cfloop>