if($img!="")
{
$previous.="<img src=mois_prec.jpg alt=\"".$alt."\" />";
}
else
et sa if($img!="")
{
$next.="<img src=mois_suiv.jpg alt=\"".$alt."\" />";
}else{
$next.= ">";
Je ne pense pas etre aussi calé que toi pour obtenir se que tu en a fait.
Code : Tout sélectionner
class="infobulles"$lien .= ($link ? '<a class="infobulles" title="" href="'.htmlspecialchars($link)...
ou encore, voici ma fonction affec_next modifiée:
function affec_next($mois, $annee, $img='', $alt='Mois suivant', $class='')
{
$suivantmois = $mois+1;
$suivantannee = $annee;
if($suivantmois==13)
{
$suivantmois = 1;
$suivantannee = $annee+1;
}
$next = "<a href=\"index.php\" onClick=\"go(".$suivantmois.", ".$suivantannee."); return false;\">";
if($img!="")
{
$next.="<img class=\"".$class."\" src=\"".$img."\" alt=\"".$alt."\" />";
}else{
$next.= ">";
}
$next.="</a>";
$this->next = $next;
}
elle peut prendre ainsi un attribut title et le nom de la classe que je souhaite, je l'appel comme ceci:
$calendrier->affec_next($mois, $annee,"../css/img/mois_suiv.gif","Mois précédent","prenext");
et pour que tu vois un peu à quoi ça sert, voici la partie css de l'affaire:
Code : Tout sélectionner
div#calendrier {
padding: 0px;
margin: 0px;
width: 100%;
text-align: center;
font-size: 0.8em;
}
div#calendrier table#tabcalendrier {
width: 100%;
}
div#calendrier td {
margin: 0px;
padding: 0px;
}
div#calendrier td.eventday{
background-color: orange;
}
div#calendrier img.prenext {
border: none;
padding: 0px 8px;
margin: 0px;
}
a.infobulles {
position: relative;
color: black;
text-decoration: none;
border-bottom: 1px dotted black;
}
a.infobulles span {
display: none;
}
a.infobulles:hover {
background: none;
z-index: 500
}
a.infobulles:hover span {
display: block;
position: absolute;
white-space: nowrap;
top: 30px;
left: -50px;
background-color: #FFFF99;
color: black;
padding: 3px;
border: 1px solid red;
border-left: 3px solid red;
opacity: 0.80;
-moz-opacity: 0.80;
FILTER: Alpha(Opacity=80);
}require_once('mysql.classe.php');
include('../config/config.php');
$connec_calendrier=new mysqlConcertation();
$sql='SELECT * FROM `dates` WHERE `poubelle`=\'non\'';
$connec_calendrier->query($sql);
$donnees=array();
while($value=$connec_calendrier->fetchNextRow(MYSQL_ASSOC)) array_push($donnees,$value);
foreach($donnees as $donnee){
$date=explode(' ',$donnee['date_concert']);
$jour=explode('-',$date[0]);
$jour = mktime(0,0,0,$jour[1],$jour[2],$jour[0]);
$calendrier->affec_day(
$jour,
'dates.php?tri='.$date[0],
'eventday',
$donnee['nom_groupe'],
"Nom du groupe: ".$donnee['nom_groupe']."\nSalle: ".
$donnee['salle']."\nHoraire: ".$date[1]);
}
voilà, je t'ai donné un aperçu de la manière selon laquelle j'ai procédé, mais tu n'auras certainement pas à faire la même chose, c'est à toi de voir selon ton design, selon tes bases de données... bref c'est un exemple, à toi de reconstruire ce dont tu as besoin.Code : Tout sélectionner
div#calendrier {
padding: 0px;
margin: 0px;
width: 100%;
text-align: center;
font-size: 0.8em;
}
div#calendrier table#tabcalendrier {
width: 100%;
}
div#calendrier td {
margin: 0px;
padding: 0px;
}
div#calendrier td.eventday{
background-color: orange;
}
div#calendrier img.prenext {
border: none;
padding: 0px 8px;
margin: 0px;
}
a.infobulles {
position: relative;
color: black;
text-decoration: none;
border-bottom: 1px dotted black;
}
a.infobulles span {
display: none;
}
a.infobulles:hover {
background: none;
z-index: 500
}
a.infobulles:hover span {
display: block;
position: absolute;
white-space: nowrap;
top: 30px;
left: -50px;
background-color: #FFFF99;
color: black;
padding: 3px;
border: 1px solid red;
border-left: 3px solid red;
opacity: 0.80;
-moz-opacity: 0.80;
FILTER: Alpha(Opacity=80);
}
Si tu y avais fait un tour plus approfondi, tu n'aurais pas posé la question suivante à jojolapine pour la simple raison que ce code, c'est une feuille de style CSS.Merci pour vos reponse, cyrano je suis allé sur le site et c'est tres bien fait....
Code : Tout sélectionner
.Coulpoljours {
color: #0000FF;
font-weight: bold;
}
Code : Tout sélectionner
class="Coulpoljours"
Code : Tout sélectionner
<table id="tabcalendrier" summary="Calendrier des évènements">
<caption class="calendar-month"><span class=""><a href=admin//%22index.php/%22 onClick="go(10,2006); return false;"><img src=mois_prec.jpg alt="Mois précédent" /></a></span> Novembre 2006 <span class=""><a href=admin//%22index.php/%22 onClick="go(12, 2006); return false;"><img src=mois_suiv.jpg alt="Mois suivant" /></a></span>
<br /><span style='color: black' id="event"> </span></caption><thead><tr><th abbr="Dimanche">Dim</th><th abbr="Lundi">Lun</th><th abbr="Mardi">Mar</th><th abbr="Mercredi">Mer</th><th abbr="Jeudi">Jeu</th><th abbr="Vendredi">Ven</th><th abbr="Samedi">Sam</th></tr></thead>