Agenda

Petit nouveau ! | 2 Messages

01 avr. 2005, 15:13

Salut,

Voila, j'essaye de mettre en place un agenda pour une application.

J'aimerais quand l'utilisateur a enregistrer un rendez vous dans la journée que les heures du rendez vous dans le calendrier change de couleur.

J'ai essayé mais ça ne marche pas.
Voici mon code:


<?php
$couleur = "";
$c=0;
do {


$c = $row_agenda['heure_debut'];

$couleur.$c = "#CC0000";

$c++;
?>
<?php } while ($row_agenda = mysql_fetch_assoc($agenda)); ?>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<title>Document sans titre</title>
<script language="JavaScript" type="text/JavaScript">
<!--
function MM_reloadPage(init) { //reloads the window if Nav4 resized
if (init==true) with (navigator) {if ((appName=="Netscape")&&(parseInt(appVersion)==4)) {
document.MM_pgW=innerWidth; document.MM_pgH=innerHeight; onresize=MM_reloadPage; }}
else if (innerWidth!=document.MM_pgW || innerHeight!=document.MM_pgH) location.reload();
}
MM_reloadPage(true);
//-->
</script>
<style type="text/css">
<!--
.Style1 {
color: #FFFFFF;
font-weight: bold;
}
-->
</style>
</head>

<body>

<div id="Layer1" style="position:absolute; left:92px; top:71px; width:595px; height:558px; z-index:1"> &nbsp;
<table width="587" border="1">
<tr bgcolor="#0000FF">
<td colspan="2"><div align="center" class="Style1"><?php echo $_GET['click']; ?> </div></td>
</tr>
<tr>
<td bgcolor=<?php echo $couleur5 ?>><p><a href="nouvelle_tache.php?date=<?php echo $date ?>&heure=5" target="mainFrame" class="tableau_bas">5h</a></p></td>
<td>14h</td>
</tr>
<tr>
<td>6h</td>
<td bgcolor="#CCCCCC">15h</td>
</tr>
<tr>
<td bgcolor=<?php echo $couleur7 ?>><p><a href="nouvelle_tache.php?date=<?php echo $date ?>&heure=7" target="mainFrame" class="tableau_bas">7h</a></p></td>
<td>16h</td>
</tr>
<tr>
<td>8h</td>
<td bgcolor="#CCCCCC">17h</td>
</tr>
<tr>
<td bgcolor=<?php echo $couleur9 ?>><p><a href="nouvelle_tache.php?date=<?php echo $date ?>&heure=9" target="mainFrame" class="tableau_bas">9h</a></p></td>
<td>18h</td>
</tr>
<tr>
<td>10h</td>
<td bgcolor="#CCCCCC">19h</td>
</tr>
<tr>
<td bgcolor="#CCCCCC">11h</td>
<td>20h</td>
</tr>
<tr>
<td>12h</td>
<td bgcolor="#CCCCCC">21h</td>
</tr>
<tr>
<td bgcolor="#CCCCCC">13h</td>
<td>22h</td>
</tr>
</table>


Pouvez vous m'aider.
Merci

Mammouth du PHP | 859 Messages

01 avr. 2005, 16:10

<?php
$couleur = "";
$c=0;
do {


$c = $row_agenda['heure_debut'];

$couleur.$c = "#CC0000";

$c++;
?>
<?php } while ($row_agenda = mysql_fetch_assoc($agenda)); ?> 
A quel moment tu te connectes à la base de données?

Aussi, tu écris ça : ?><?php. Supprime ça, ça ne sert à rien de fermer la balise pour la réouvrir juste après.

Code : Tout sélectionner

<script language="JavaScript" type="text/JavaScript"> <!-- function MM_reloadPage(init) { //reloads the window if Nav4 resized if (init==true) with (navigator) {if ((appName=="Netscape")&&(parseInt(appVersion)==4)) { document.MM_pgW=innerWidth; document.MM_pgH=innerHeight; onresize=MM_reloadPage; }} else if (innerWidth!=document.MM_pgW || innerHeight!=document.MM_pgH) location.reload(); } MM_reloadPage(true); //--> </script>
Code généré par Dreamweaver qui ne sert à rien.