Taverne_Tableau.php
4a503405
 <?php
 //creation de la session ... inclusion du code ... verification de la session connect�e...
 session_start();
 include ('fonctions.php');
 check_session();
 include ('fonctionsDenTete.php');
 ?>
 <html>
 <head>
 <title>Ville de Dragons</title>
 <link rel='stylesheet' href='Style.css' type='text/css'>
 </head>
 <body>
 <?php
 	AfficheBarreDEtat(0);
 ?>
 <table border="0" height="100%" width="100%">
 	<tr>
 	<td valign="center">
 	<table border="0" cellspacing="0" cellpadding="0" align="center">
 		<tr>
 			<td width="700" height="500">
 			<table border="0" cellspacing="0" cellpadding="0" align="center">
 				<tr>
 					<td background="images/bordure_01.gif" width="14" height="19">
 					</td>
 					<td background="images/bordure_02.gif" width="541" height="19">
 					</td>
 					<td background="images/bordure_03.gif" width="14" height="19">
 					</td>
 				</tr>
 				<tr>
 					<td background="images/bordure_04.gif" width="14" height="400">
 					</td>
 					<td width="541" height="400" align="center" valign="center">
 						<?php
 						echo "<table background='images/dessins/T_tableau.jpg' border='0' height='400' width='541' bgcolor='#FFFFFF'>"
 							."<tr>"
 							."<td valign ='top' align='center'>"
 							."<table border='0' height='100%' width='350'>"
 							."<tr>"
 							."<td class='tableau' valign ='top' align='left'>";
 							if($_SESSION['tableauEcrit']==0){
 								//commande pour pouvoir �crire dans le tableau
 								echo "<br><br><form method='get' action='TraitementTableau.php'>"
 									."<span class='tableauTitre'>Tu veux inscrire quelquechose?</span>"
 									.":<input type='text' name='corps' size='25'>:"
 									."<input type='submit' value='Ecrire!'><br>"
 									."</form>";
 							}
 							//commande pour afficher les 30 dernier messages du gueuloir
 							$sql = 'SELECT * FROM tableau ORDER BY id DESC'; 
 							$req = mysql_query($sql) or die('Erreur SQL !<br>'.$sql.'<br>'.mysql_error()); 
 							$i=0;
 							 if($_SESSION['tableauEcrit']!=0){
 							 echo "<br><br>";
 							 }	
 							 //boucle d'affichage des messages du tableau
 							 while($data = mysql_fetch_assoc($req)){ 
 							 $i++;
 							 //commande pour transformer les chaines de caract�res en chaine html affichable
 							 $data['pseudo'] = HTML_ChaineDeCaracteres($data['pseudo']);
 							 $data['text'] = HTML_ChaineDeCaracteres ($data['text']);
 							 echo $data['pseudo']."&nbsp";
 							 echo "<span class='tableauHoraire'>".$data['heure'].":&nbsp</span>";
 							 echo $data['text']."<br>"; 
 							if($i==30){
 							 echo "<align='left'>.....";
 							 break;
 							 }
 							 }
 						echo "</td></tr>"
 							."</table>"
 							."</td></tr>"
 							."</table>";
 						?>
 					</td>
 					<td background="images/bordure_06.gif" width="14" height="400">
 					</td>
 				</tr>
 				<tr>
 					<td background="images/bordure_07.gif" width="14" height="18">
 					</td>
 					<td background="images/bordure_08.gif" width="541" height="18">
 					</td>
 					<td background="images/bordure_09.gif" width="14" height="18">
 					</td>
 				</tr>
 				<tr>
 					<td align ='right' colspan='3'>
 					<a href='taverne.php?DejaEntre=1'>Retour</a>
 					</td>
 				</tr>
 			</table>
 			</td>
 		</tr>
 	</table>
 	</td>
 	</tr>
 </table>
 </body>
 </html>
 <?php
 	mysql_close();
 ?>