All pastes #184431 Raw Edit

Sans nom

public text v1 · immutable
#184431 ·published 2006-09-27 21:57 UTC
rendered paste body
<html>
<head>
<title>Calendrier TP Php</title>
</head>

<body bgcolor='#FFFFFF' text='#000000' background="img/fond.jpg">

<div align="center"> 
<? 
function tableau()
{
		echo "<table>".chr(13);
		echo "<tr>".chr(13);
		echo "<td><img src=''></td>".chr(13);
		echo "<td>".chr(13);
		echo "<table>".chr(13);
		$fichier = file("calendrier.txt");
		$couleur; $couleur2;
		foreach($fichier as $lignejour);
			{
			$data = explod('#',$lignejour);
			if(($lignejour==1)||($lignejour==8)||($lignejour==15)||($lignejour==22)||($lignejour==29))
				{
				echo"<tr>".chr(13);			
				}
				else
					{
						if($data[1]==v)
						{$couleur='green'; $couleur2='green'
						elseif($data[1]==r)
						{$couleur='red' $couleur2='red';}
						elseif($data[1]==j)
						{$couleur='yellow' $couleur2='white';}
					echo "<td>".chr(13);
					echo "<table>".chr(13);
					echo "<tr>".chr(13);
					echo "<td bgcolor=$couleur>$data[0]</td>".chr(13);
					echo "<td bgcolor=$couleur>&nbs</td>".chr(13);
					echo "</tr><tr>".chr(13);
					echo "<td bgcolor=$couleur>&nbs</td>".chr(13);
					echo "<td bgcolor=$couleur2>$data[2]</td>".chr(13);
					echo "</tr>".chr(13);
					echo "</table>".chr(13);
					echo "</td>".chr(13);
					}
			if(($lignejour==1)||($lignejour==8)||($lignejour==15)||($lignejour==22)||($lignejour==29))
				{
				echo"</tr>".chr(13);
				echo "</table>".chr(13);			
				}
			}
		echo "</td></tr>".chr(13);
		echo "</table>".chr(13);
}
// Gestion des images aléatoires...
$dir=opendir("/img");
// Creation de la liste des images...


// Fin de la gestion des images aleatoires. On a maintenant un tableau "imgs" contenant toutes
// les images du repertoire "img/calendrier"
tableau();
?>
</div>
</body>
</html>