J'ai un calendrier au quelle je voudrais rajoutée les jours travaillées et les congées, mais je ne vois pas comment fair.C'est pour quoi je demande votre aide.Merci a tous.
<?php
/**
* calendrier.php
*
* @version $FINAL$
* @copyright AYTAC Güntaç for SERI@COM.
*/
$mois_chiffre=array(1=>"01","02","03","04","05","06","07","08","09","10","11","12");
$mois_full=array(1=>"Janvier","Février","Mars","Avril","Mai","Juin","Juillet","Août","Septembre","Octobre","Novembre","Décembre");
//$mois_abrege=array(1=>"Jan","Fév","Mar","Avr","Mai","Jun","Jul","Aoû","Sep","Oct","Nov","Déc");
//$semaine_full=array(1=>"Lundi","Mardi","Mercredi","Jeudi","Venredi","Samedi","Dimanche");
$semaine_abrege=array(1=>"Lu","Ma","Me","Je","Ve","Sa","Di");
// Variables
// mois
if (isset($_POST["mois"])) {$mois_selectionne=$_POST["mois"];}
else{$mois_selectionne=date("n");}
// années
if (isset($_POST["annee"])) {$annee_selectionne=$_POST["annee"];}
else{$annee_selectionne=date("Y");}
?>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//FR">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta http-equiv="Content-Language" content="fr" />
<meta name="Description" content="SEARI@COM SSII PARIS" />
<meta name="author" content="AYTAC Güntaç" />
<meta name="Copyright" content="AYTAC Güntaç" />
<meta name="Distribution" content="Private" />
<link rel="shortcut icon" href="images/leocadie.ico" />
<link rel="stylesheet" type="text/css" href="css/<?php if (!isset($_SESSION["css"])) {echo "green.css";}else{echo $_SESSION["css"];} ?>" />
<title>Calendrier</title>
<script language="JavaScript" type="text/javascript" src="css/dates.js"></script>
<body>
<table class="calendar" align="center">
<tr>
<th width="50%">
<table border="0" align="center">
<tr>
<?php
if ($mois_selectionne==1)
{
?>
<td style="background-color: transparent;"><form action="calendrier.php" method="post"><input type="hidden" name="mois" value="12" /><input type="hidden" name="annee" value="<?php echo $annee_selectionne-1;?>" /><button type="submit" name="bt_month_less" title="-" class="im">«</button></form></td>
<?php
}
else
{
?>
<td style="background-color: transparent;"><form action="calendrier.php" method="post"><input type="hidden" name="mois" value="<?php echo ($mois_selectionne=="1") ? $mois_selectionne : $mois_selectionne-1;?>" /><input type="hidden" name="annee" value="<?php echo $annee_selectionne;?>" /><button type="submit" name="bt_month_less" title="-" class="im">«</button></form></td>
<?php
}
?>
<td style="background-color: transparent;">
<form name="form_mois" action="calendrier.php" method="post"><input type="hidden" name="annee" value="<?php echo $annee_selectionne;?>" />
<select name="mois" onchange="form_mois.submit()">
<?php
$i=0;
foreach ($mois_full as $value)
{
$i++;
?>
<option value="<?php echo $i;?>"<?php echo ($mois_selectionne==$i) ? (" selected=\"selected\""):("");?>><?php echo $value;?></option>
<?php
}
?>
</select>
</form>
</td>
<?php
if ($mois_selectionne==12)
{
// permettre d augmenter d une année vers année n+1 et mois==1
?>
<td style="background-color: transparent;"><form action="calendrier.php" method="post"><input type="hidden" name="mois" value="1" /><input type="hidden" name="annee" value="<?php echo $annee_selectionne+1;?>" /><button type="submit" name="bt_month_plus" title="+" class="im">»</button></form></td>
<?php
}
else
{
?>
<td style="background-color: transparent;"><form action="calendrier.php" method="post"><input type="hidden" name="mois" value="<?php echo ($mois_selectionne==12) ? $mois_selectionne : $mois_selectionne+1;?>" /><input type="hidden" name="annee" value="<?php echo $annee_selectionne;?>" /><button type="submit" name="bt_month_plus" title="+" class="im">»</button></form></td>
<?php
}
?>
</tr>
</table>
</th>
<th width="50%">
<table border="0" align="center">
<tr>
<td style="background-color: transparent;"><form action="calendrier.php" method="post"><input type="hidden" name="mois" value="<?php echo $mois_selectionne;?>" /><input type="hidden" name="annee" value="<?php echo ($annee_selectionne>1920) ? $annee_selectionne-1 : $annee_selectionne;?>" /><button type="submit" name="bt_year_less" title="-" class="im">«</button></form></td>
<td style="background-color: transparent;">
<form name="form_annee" action="calendrier.php" method="post">
<input type="hidden" name="mois" value="<?php echo $mois_selectionne;?>" />
<select name="annee" onchange="form_annee.submit()">
<?php
$annee_depart = 1920;
$annee_max = date("Y")+1;
$j=0;
for($j=$annee_depart;$j<=$annee_max;$j++)
{
?>
<option value="<?php echo $j;?>"<?php echo ($annee_selectionne==$j) ? (" selected=\"selected\""):("");?>><?php echo $j;?></option>
<?php
}
?>
</select>
</form>
</td>
<td style="background-color: transparent;"><form action="calendrier.php" method="post"><input type="hidden" name="mois" value="<?php echo $mois_selectionne;?>" /><input type="hidden" name="annee" value="<?php echo ($annee_selectionne<(date("Y")+1)) ? $annee_selectionne+1 : $annee_selectionne;?>" /><button type="submit" name="bt_year_plus" title="+" class="im">»</button></form></td>
</tr>
</table>
</th>
</tr>
</table>
<table class="calendar" align="center">
<tr>
<?php
$nombre_jours_mois = cal_days_in_month(CAL_GREGORIAN,$mois_selectionne,$annee_selectionne);
$premier_jour_mois=jddayofweek(cal_to_jd(CAL_GREGORIAN,$mois_selectionne,1,$annee_selectionne),0);
//echo $premier_jour_mois;
$premier_jour_mois = ($premier_jour_mois==0)? 7 : ($premier_jour_mois);
foreach ($semaine_abrege as $value)
{
?>
<th><?php echo $value; ?></th>
<?php
}
?>
</tr>
<?php
$num_col=0;
$bg=0;
for($k=-$premier_jour_mois+2;$k<=$nombre_jours_mois;$k++)
{
if ($num_col==0)
{
$tdbg=(($bg%2)==0)?"two":"one";
echo "\t<tr>\n\t\t";
}
if ($mois_selectionne<10)
{
$mois_aff=$mois_chiffre[$mois_selectionne];
}
else
{
$mois_aff=$mois_selectionne;
}
if ($k<10)
{
$jour_aff="0".$k;
}
else
{
$jour_aff=$k;
}
if (($k>=$premier_jour_mois) AND ($k<=$nombre_jours_mois))
{
echo ($k==date("j"))?("<td class=\"selected\"><a href=\"javascript:returnDate('$annee_selectionne-$mois_aff-$jour_aff')\">$jour_aff</a></td>"):("<td class=\"$tdbg\"><a href=\"javascript:returnDate('$annee_selectionne-$mois_aff-$jour_aff')\">$jour_aff</a></td>");
}
else
{
if ($k<$premier_jour_mois AND $k>0)
{
echo "<td class=\"$tdbg\"><a href=\"javascript:returnDate('$annee_selectionne-$mois_aff-$jour_aff')\">$jour_aff</a></td>";
}
else
{
echo "<td class=\"$tdbg\"> </td>";
}
}
if ($num_col==6) {echo "\t</tr>\n\t\t";}
$num_col=($num_col+1)%7;
$bg++;
}
?>
<tr>
</tr>
</table>
<br />
</body>
</html>

SSDS