Jours importants invisible dans calendrier
pierandclai
Messages postés
2
Statut
Membre
-
pierandclai Messages postés 2 Statut Membre -
pierandclai Messages postés 2 Statut Membre -
Bonjour,
Je veux colorer des jours importants dans mon calendrier. Je n'y arrive pas. J'ai seulement la date du jour qui est identifiable ( http://ppzx.net )
Voici mon code :
[code]<?php
// Ecriture de la 1ere ligne
echo '<tr>';
// Ecriture de colones vides tant que le mois ne demarre pas
for($i = 0 ; $i < $numero_jour1er ; $i++) { echo '<td></td>'; }
for($i = 1 ; $i <= 7 - $numero_jour1er; $i++) {
echo '<td class="';
if(isset($coloreNum) && $coloreNum == $i) echo 'd_jour">';
else if(in_array($i . "_" . $numero_mois . "_" . $annee, $d_important)) echo 'td" bgcolor="#EE3300">';
else echo 'td">';
echo $i.'</td>';
}
echo '</tr>';
$nbLignes = ceil((date('t', $timestamp) - ($i-1))/ 7); // Calcul du nombre de lignes � afficher en fonction de la 1�re (surtout pour les mois a 31 jours)
for($ligne = 0 ; $ligne < $nbLignes ; $ligne++) {
echo '<tr>';
for($colone = 0 ; $colone < 7 ; $colone++) {
if($i <= date('t', $timestamp)) {
echo '<td class="';
if(isset($coloreNum) && $coloreNum == $i) echo 'd_jour">';
else if(in_array($i . "_" . $numero_mois . "_" . $annee, $d_important)) echo 'td" bgcolor="#EE3300">';
else echo 'td">';
echo $i.'</td>';
}
else // On a fini d'ecrire le mois on termine le tableau par des cellules vides
{
echo '<td></td>';
}
$i = $i +1;
}
echo '</tr>';
}
?>/code merci d'avance pierandclai
Je veux colorer des jours importants dans mon calendrier. Je n'y arrive pas. J'ai seulement la date du jour qui est identifiable ( http://ppzx.net )
Voici mon code :
[code]<?php
// Ecriture de la 1ere ligne
echo '<tr>';
// Ecriture de colones vides tant que le mois ne demarre pas
for($i = 0 ; $i < $numero_jour1er ; $i++) { echo '<td></td>'; }
for($i = 1 ; $i <= 7 - $numero_jour1er; $i++) {
echo '<td class="';
if(isset($coloreNum) && $coloreNum == $i) echo 'd_jour">';
else if(in_array($i . "_" . $numero_mois . "_" . $annee, $d_important)) echo 'td" bgcolor="#EE3300">';
else echo 'td">';
echo $i.'</td>';
}
echo '</tr>';
$nbLignes = ceil((date('t', $timestamp) - ($i-1))/ 7); // Calcul du nombre de lignes � afficher en fonction de la 1�re (surtout pour les mois a 31 jours)
for($ligne = 0 ; $ligne < $nbLignes ; $ligne++) {
echo '<tr>';
for($colone = 0 ; $colone < 7 ; $colone++) {
if($i <= date('t', $timestamp)) {
echo '<td class="';
if(isset($coloreNum) && $coloreNum == $i) echo 'd_jour">';
else if(in_array($i . "_" . $numero_mois . "_" . $annee, $d_important)) echo 'td" bgcolor="#EE3300">';
else echo 'td">';
echo $i.'</td>';
}
else // On a fini d'ecrire le mois on termine le tableau par des cellules vides
{
echo '<td></td>';
}
$i = $i +1;
}
echo '</tr>';
}
?>/code merci d'avance pierandclai
A voir également:
- Jours importants invisible dans calendrier
- Votre appareil ne dispose pas des correctifs de qualité et de sécurité importants - Guide
- Clé usb invisible - Guide
- Mon calendrier - Télécharger - Santé & Bien-être
- Compte instagram suspendu 180 jours - Guide
- Compte facebook suspendu 180 jours - Guide
2 réponses
Bonjour à tous,
Maintenant le calendrier est fonctionnel sur un serveure en php, pas sur un en php5.
J'ai essayé beaucoup de combinaisons :
Sur mon serveur php5 :
En changeant le Doctype 1.0 strict pour Doctype transitional et en codant :
[code]if(isset($coloreNum) && $coloreNum == $i) echo 'd_jour">';
else if(in_array($i . "_" . $numero_mois . "_" . $annee, $d_important)) echo 'd_important">';[/code]
Je vois les jours importants ( http://ppzx.net/calendrier_test.php5 ) (toujours la même CSS pour tous ces essais : css.css)
Même codage, mais avec Doctype strict, pas de jours importants ( http://ppzx.net/calendrier_test2.php5 ).
Avec ( http://ppzx.net/ )
[code]if(isset($coloreNum) && $coloreNum == $i) echo 'd_jour">';
else if(in_array($i . "_" . $numero_mois . "_" . $annee, $d_important)) echo 'td" bgcolor="#EE3300">';[/code]
Pas de jours importants visibles. Pas de problème de la même csss !
Quand je le passe au W3C
[code]Line 72, Column 548: there is no attribute "bgcolor".
â¦s="td">23</td><td class="td" bgcolor="#EE3300">24</td><td class="td">25</td><
â
You have used the attribute named above in your document, but the document type you are using does not support that attribute for this element. This error is often caused by incorrect use of the "Strict" document type with a document that uses frames (e.g. you must use the "Transitional" document type to get the "target" attribute), or by using vendor proprietary extensions such as "marginheight" (this is usually fixed by using CSS to achieve the desired effect instead).
This error may also result if the element itself is not supported in the document type you are using, as an undefined element will have no supported attributes; in this case, see the element-undefined error message for further information.
How to fix: check the spelling and case of the element and attribute, (Remember XHTML is all lower-case) and/or check that they are both allowed in the chosen document type, and/or use CSS instead of this attribute. If you received this error when using the <embed> element to incorporate flash media in a Web page, see the FAQ item on valid flash.[/code]
J'aurais bien besoin de vos lumières ! pierandclai
voici le calendrier et sa CSS : http://ppzx.net/calendrier.txt
Maintenant le calendrier est fonctionnel sur un serveure en php, pas sur un en php5.
J'ai essayé beaucoup de combinaisons :
Sur mon serveur php5 :
En changeant le Doctype 1.0 strict pour Doctype transitional et en codant :
[code]if(isset($coloreNum) && $coloreNum == $i) echo 'd_jour">';
else if(in_array($i . "_" . $numero_mois . "_" . $annee, $d_important)) echo 'd_important">';[/code]
Je vois les jours importants ( http://ppzx.net/calendrier_test.php5 ) (toujours la même CSS pour tous ces essais : css.css)
Même codage, mais avec Doctype strict, pas de jours importants ( http://ppzx.net/calendrier_test2.php5 ).
Avec ( http://ppzx.net/ )
[code]if(isset($coloreNum) && $coloreNum == $i) echo 'd_jour">';
else if(in_array($i . "_" . $numero_mois . "_" . $annee, $d_important)) echo 'td" bgcolor="#EE3300">';[/code]
Pas de jours importants visibles. Pas de problème de la même csss !
Quand je le passe au W3C
[code]Line 72, Column 548: there is no attribute "bgcolor".
â¦s="td">23</td><td class="td" bgcolor="#EE3300">24</td><td class="td">25</td><
â
You have used the attribute named above in your document, but the document type you are using does not support that attribute for this element. This error is often caused by incorrect use of the "Strict" document type with a document that uses frames (e.g. you must use the "Transitional" document type to get the "target" attribute), or by using vendor proprietary extensions such as "marginheight" (this is usually fixed by using CSS to achieve the desired effect instead).
This error may also result if the element itself is not supported in the document type you are using, as an undefined element will have no supported attributes; in this case, see the element-undefined error message for further information.
How to fix: check the spelling and case of the element and attribute, (Remember XHTML is all lower-case) and/or check that they are both allowed in the chosen document type, and/or use CSS instead of this attribute. If you received this error when using the <embed> element to incorporate flash media in a Web page, see the FAQ item on valid flash.[/code]
J'aurais bien besoin de vos lumières ! pierandclai
voici le calendrier et sa CSS : http://ppzx.net/calendrier.txt
Je lis H seulement !
Sans t'offenser, je crois que cela ne m'avance pas beaucoup.
Merci quanf même,
Amitiés, andpierclai