CCalendar, planning mannaging |
| Back to applet |
Purpose of this example |
- Multilangage support ( Here, the french ).
- Change the color the days. In this example, an hotel shows the free days for congress organisation.
For more information about the usage, look at the end of the page.
|
Exemple |
AIGLON HOTEL |
Planning of congress reservations |
|
|
|
|
Click in a case to reserve your day
|
Don't forget to add the keyword MAYSCRIPT if you want the applet to update your field.
<applet
code=ccalendar.class
name=ccalendar MAYSCRIPT
width=260
height=260
id = "cal">
<param name="color_fond" value="AAAAAA">
<param name="color_full" value = "FF0000">
<param name="color_case" value="AAFFAA">
<param name="color_Comment" value="C0C0C0">
<param name="color_empty" value=" AAAADD">
<param name="field" value="DateField">
<param name="form" value="DateForm">
<param name="day1" value="Dimanche">
<param name="day2" value="Lundi">
<param name="day3" value="Mardi">
<param name="day4" value="Mercredi">
<param name="day5" value="Jeudi">
<param name="day6" value="Vendredi">
<param name="day7" value="Samedi">
<param name="month1" value="Janvier">
<param name="month2" value="Février">
<param name="month3" value="Mars">
<param name="month4" value="Avril">
<param name="month5" value="Mai">
<param name="month6" value="Juin">
<param name="month7" value="Juillet">
<param name="month8" value="Aout">
<param name="month9" value="Septembre">
<param name="month10" value="Octobre">
<param name="month11" value="Novembre">
<param name="month12" value="Décembre">
</applet>
For each year, the applet looks for a file called 'year'.txt in the current directory ( for example 1999.txt or 2000.txt ).
This file text contains lines. Each line equals a month.
Each line is done with 0 and 1. 0 for a free day. 1 for an used day.
If the line is empty, all the month is empty.
If the file does not exist, all the year is considered as free.
For the example the file for years 1999.txt and 2000.txt ( they are the same ) are like this :
0101010101010101010101010101010
1010101010101010101010101010101
1111111
00000001111111
0000000111111100000001111111
000000000000001111111
00000001111111
1111111111111111111111111111
1111111000000011111111111111
000000000000001111111
1111111
0101010101010101010101010101010