40 <input type="hidden" name="[NOM_DATE]" value="[VALEUR_DATE]">
43 onChange="checkdate(this.form,this.form.[NOM_DATE],this.form.[NOM_DATE]_day,this.form.[NOM_DATE]_month,this.form.[NOM_DATE]_year, 1999, 2009 );"
44 name="[NOM_DATE]_day">
46 <option value="[jour]" [selected_jour]>[jour]</option>
50 onChange="checkdate(this.form,this.form.[NOM_DATE],this.form.[NOM_DATE]_day,this.form.[NOM_DATE]_month,this.form.[NOM_DATE]_year, 1999, 2009 );"
51 name="[NOM_DATE]_month">
53 <option value="[val_mois]" [selected_mois]>[mois]</option>
57 onChange="checkdate(this.form,this.form.[NOM_DATE],this.form.[NOM_DATE]_day,this.form.[NOM_DATE]_month,this.form.[NOM_DATE]_year, 1999, 2009 );"
58 name="[NOM_DATE]_year">
60 <option value="[annee]" [selected_annee]>[annee]</option>
69 $this->mois = strftime(
"%m", $time);
70 $this->jour = strftime(
"%d", $time);
71 $this->annee = strftime(
"%Y", $time);
76 $lay =
new Layout(
"",
"", $this->formdate);
77 $lay->Set(
"NOM_DATE", $this->
name);
78 $lay->Set(
"VALEUR_DATE", $this->date);
80 for (
$d = 1;
$d <= 31;
$d++) {
81 $tab_jour[
$d][
"jour"] =
$d;
82 if (
$d == $this->jour) {
83 $tab_jour[
$d][
"selected_jour"] =
"selected";
85 $tab_jour[
$d][
"selected_jour"] =
"";
88 $lay->SetBlockCorresp(
"JOUR",
"jour",
"jour");
89 $lay->SetBlockCorresp(
"JOUR",
"selected_jour",
"selected_jour");
90 $lay->SetBlockData(
"JOUR", $tab_jour);
92 for (
$d = 1;
$d <= 12;
$d++) {
93 $mois = mktime(0, 0, 0,
$d, 1, $this->annee);
94 $tab_mois[
$d][
"mois"] = strftime(
"%B", $mois);;
95 $tab_mois[
$d][
"val_mois"] =
$d;
96 if (
$d == $this->mois) {
97 $tab_mois[
$d][
"selected_mois"] =
"selected";
99 $tab_mois[
$d][
"selected_mois"] =
"";
102 $lay->SetBlockCorresp(
"MOIS",
"val_mois",
"val_mois");
103 $lay->SetBlockCorresp(
"MOIS",
"mois",
"mois");
104 $lay->SetBlockCorresp(
"MOIS",
"selected_mois",
"selected_mois");
105 $lay->SetBlockData(
"MOIS", $tab_mois);
107 $annee_deb = $this->annee - 10;
108 $annee_fin = $this->annee + 5;
109 for (
$d = $annee_deb;
$d <= $annee_fin;
$d++) {
110 $tab_annee[
$d][
"annee"] =
$d;
111 if (
$d == $this->annee) {
112 $tab_annee[
$d][
"selected_annee"] =
"selected";
114 $tab_annee[
$d][
"selected_annee"] =
"";
117 $lay->SetBlockCorresp(
"ANNEE",
"annee",
"annee");
118 $lay->SetBlockCorresp(
"ANNEE",
"selected_annee",
"selected_annee");
119 $lay->SetBlockData(
"ANNEE", $tab_annee);
145 return ($lay->gen());
Layout is a template generator.
print $fam getTitle() $fam name