Skip to content
Extraits de code Groupes Projets
Valider c9e35c97 rédigé par ARNO*'s avatar ARNO*
Parcourir les fichiers

Correction bug calendrier: le calendrier mensuel ne fait plus "perdre" le jour de navigation

parent 447e3c8e
Aucune branche associée trouvée
Aucune étiquette associée trouvée
Aucune requête de fusion associée trouvée
......@@ -157,10 +157,9 @@ function afficher_mois($jour_today,$mois_today,$annee_today,$nom_mois){
if ($activer_messagerie == "oui" AND $connect_activer_messagerie != "non"){
echo "<div style='float: $spip_lang_right; width: 120px;'>";
if (!$afficher_lien_aujourdhui) echo "<a href='calendrier_jour.php3'><img src='img_pack/cal-jour.gif' alt='jour' width='26' height='20' border='0' style='filter: alpha(opacity=50);'></a>";
else echo "<a href='calendrier_jour.php3?jour=1&mois=$mois_today&annee=$annee_today'><img src='img_pack/cal-jour.gif' alt='jour' width='26' height='20' border='0' style='filter: alpha(opacity=50);'></a>";
echo "<a href='calendrier_jour.php3?jour=$jour_today&mois=$mois_today&annee=$annee_today'><img src='img_pack/cal-jour.gif' alt='jour' width='26' height='20' border='0' style='filter: alpha(opacity=50);'></a>";
echo "&nbsp;";
echo "<a href='calendrier_semaine.php3?jour=1&mois=$mois_today&annee=$annee_today'><img src='img_pack/cal-semaine.gif' alt='semaine' width='26' height='20' border='0' style='filter: alpha(opacity=50);'></a>";
echo "<a href='calendrier_semaine.php3?jour=$jour_today&mois=$mois_today&annee=$annee_today'><img src='img_pack/cal-semaine.gif' alt='semaine' width='26' height='20' border='0' style='filter: alpha(opacity=50);'></a>";
echo "&nbsp;";
echo "<img src='img_pack/cal-mois.gif' alt='mois' width='26' height='20' border='0' style='border:1px solid black;'>";
echo aide ("messcalen");
......@@ -243,13 +242,16 @@ function afficher_mois($jour_today,$mois_today,$annee_today,$nom_mois){
// date du jour
$today=getdate(time());
$jour=$today["mday"];
// sans arguments => mois courant
if (!$mois){
$jour=$today["mday"];
$jour = $today["mday"];
$mois=$today["mon"];
$annee=$today["year"];
}
if (!$jour) $jour=$today["mday"];
$nom_mois = nom_mois('2000-'.sprintf("%02d", $mois).'-01');
......
......@@ -13,14 +13,14 @@ $today=getdate(time());
$annee_today = $today["year"];
// sans arguments => mois courant
if (!$mois){
$jour=$today["mday"];
$mois=$today["mon"];
$annee=$today["year"];
}
if (!$mois){
$jour=$today["mday"];
$mois=$today["mon"];
$annee=$today["year"];
}
$date = date("Y-m-d", mktime(0,0,0,$mois, $jour, $annee));
$jour = jour($date);
$jour = journum($date);
$mois = mois($date);
$annee = annee($date);
......@@ -59,7 +59,7 @@ debut_page(nom_jour("$annee-$mois-$jour")." ".affdate("$annee-$mois-$jour"), "r
echo "&nbsp;";
echo "<a href='calendrier_semaine.php3?mois=$mois&annee=$annee&jour=$jour'><img src='img_pack/cal-semaine.gif' alt='semaine' width='26' height='20' border='0' style='filter: alpha(opacity=50);'></a>";
echo "&nbsp;";
echo "<a href='calendrier.php3?mois=$mois&annee=$annee'><img src='img_pack/cal-mois.gif' alt='mois' width='26' height='20' border='0' style='filter: alpha(opacity=50);'></a>";
echo "<a href='calendrier.php3?mois=$mois&annee=$annee&jour=$jour'><img src='img_pack/cal-mois.gif' alt='mois' width='26' height='20' border='0' style='filter: alpha(opacity=50);'></a>";
echo aide ("messcalen");
echo "</div>";
......
......@@ -24,7 +24,7 @@ function afficher_semaine($jour_today,$mois_today,$annee_today){
if ($spip_ecran == "large") {
$largeur_table = 974;
$largeur_gauche = 130;
$largeur_gauche = 170;
} else {
$largeur_table = 750;
$largeur_gauche = 100;
......@@ -77,7 +77,7 @@ function afficher_semaine($jour_today,$mois_today,$annee_today){
echo "&nbsp;";
echo "<img src='img_pack/cal-semaine.gif' alt='semaine' width='26' height='20' border='0' style='border: 1px solid black'>";
echo "&nbsp;";
echo "<a href='calendrier.php3?mois=$mois_today&annee=$annee_today'><img src='img_pack/cal-mois.gif' alt='mois' width='26' height='20' border='0' style='filter: alpha(opacity=50);'></a>";
echo "<a href='calendrier.php3?mois=$mois_today&annee=$annee_today&jour=$jour_today'><img src='img_pack/cal-mois.gif' alt='mois' width='26' height='20' border='0' style='filter: alpha(opacity=50);'></a>";
echo aide ("messcalen");
echo "</div>";
......
0% Chargement en cours ou .
You are about to add 0 people to the discussion. Proceed with caution.
Terminez d'abord l'édition de ce message.
Veuillez vous inscrire ou vous pour commenter