FicheDPreference.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');
 
 //creation de la variable contenant l'image a afficher
 	$poids = $_SESSION['Poids'];
 	$sexe = $_SESSION['Sexe'];
 	if($sexe==1){
 		$image = $poids;
 	}else{
 		$image = 5+$poids;
 	}
 //la page prec�dente..
 	$pageprecedente=$_GET['pageprecedente'];
 	if(strpos($_GET['pageprecedente'],'?') === FALSE){
 		$pageprecedente .= "?etat=1";
 	}else{
 		if(strpos($_GET['pageprecedente'],'etat=1') === FALSE){
 			$pageprecedente .= "&etat=1";
 		}
 	}
 //recherche des images des equipements:
 			//sur le corps
 	$req = "SELECT image FROM corps WHERE id_corps='".$_SESSION['corps']."'";
 	$resultat = mysql_query($req)or exit('Erreur ' . mysql_errno() . ' : ' . mysql_error());
 	$tableauReponse=mysql_fetch_assoc($resultat);
 	$imageCorps = $tableauReponse['image'];
 			//sur les jambes
 	$req = "SELECT image FROM jambes WHERE id_jambes='".$_SESSION['jambes']."'";
 	$resultat = mysql_query($req)or exit('Erreur ' . mysql_errno() . ' : ' . mysql_error());
 
 	$tableauReponse=mysql_fetch_assoc($resultat);
 	$imageJambes = $tableauReponse['image'];
 			//sur la main Droite
 	$req = "SELECT image FROM maindroite WHERE id_maindroite='".$_SESSION['mainDroite']."'";
 	$resultat = mysql_query($req)or exit('Erreur ' . mysql_errno() . ' : ' . mysql_error());
 
 	$tableauReponse=mysql_fetch_assoc($resultat);
 	$imageArme = $tableauReponse['image'];
 			//sur la main gauche
 	$req = "SELECT image FROM maingauche WHERE id_maingauche='".$_SESSION['mainGauche']."'";
 	$resultat = mysql_query($req)or exit('Erreur ' . mysql_errno() . ' : ' . mysql_error());
 
 	$tableauReponse=mysql_fetch_assoc($resultat);
 	$imageBouclier = $tableauReponse['image'];
 		//sur les mains
 	$req = "SELECT image FROM mains WHERE id_mains='".$_SESSION['mains']."'";
 	$resultat = mysql_query($req)or exit('Erreur ' . mysql_errno() . ' : ' . mysql_error());
 
 	$tableauReponse=mysql_fetch_assoc($resultat);
 	$imageMains = $tableauReponse['image'];
 			//sur les pieds
 	$req = "SELECT image FROM pieds WHERE id_pieds='".$_SESSION['pieds']."'";
 	$resultat = mysql_query($req)or exit('Erreur ' . mysql_errno() . ' : ' . mysql_error());
 
 	$tableauReponse=mysql_fetch_assoc($resultat);
 	$imagePieds = $tableauReponse['image'];
 			//sur la tete
 	$req = "SELECT image FROM tete WHERE id_tete='".$_SESSION['tete']."'";
 	$resultat = mysql_query($req)or exit('Erreur ' . mysql_errno() . ' : ' . mysql_error());
 
 	$tableauReponse=mysql_fetch_assoc($resultat);
 	$imageTete = $tableauReponse['image'];
 			//sac
 	$sac = $_SESSION['sac'];
 
 ?>
 <html>
 <head>
 <title>Ville de Dragons</title>
 <link rel='stylesheet' href='Style.css' type='text/css'>
 </head>
 <body>
 <?php
 	AfficheBarreDEtat(1);
 ?>
 <table border="0" height="100%" width="100%">
 	<tr>
 	<td valign="center">
 
 	<table border="0" cellspacing="0" cellpadding="0" align="left">
 		<tr>
 		<td width="400">
 		<center><h2><b><u>Fiche De Pr�f�rence Gastronomique</b></u></h2></center>
 	<?php
 	//affichage des objets
 		echo "<table border='0' cellspacing='0' align='center'>"
 			."<tr>"
 			."<td width='300' align='center'><b>Fruits: </b>".$_SESSION['N_pomme']."/100";
 			AfficheImgBarre(2,$_SESSION['N_pomme'],100);
 			echo "</td>"
 			."</tr>"
 			."<tr>"
 			."<td width='300' align='center'><b>Prot�ines: </b>".$_SESSION['N_viandeSeche']."/100";
 			AfficheImgBarre(2,$_SESSION['N_viandeSeche'],100);
 			echo "</td>"
 			."</tr>"
 			."<tr>"
 			."<td width='300' align='center'><b>Agrumes: </b>".$_SESSION['N_orange']."/100";
 			AfficheImgBarre(2,$_SESSION['N_orange'],100);
 			echo "</td>"
 			."</tr>"
 			."<tr>"
 			."<td width='300' align='center'><b>F�culents: </b>".$_SESSION['N_pain']."/100";
 			AfficheImgBarre(2,$_SESSION['N_pain'],100);
 			echo "</td>"
 			."</tr>"
 			."<tr>"
 			."<td width='300' align='center'><b>Gourmandises: </b>".$_SESSION['N_chocolat']."/100";
 			AfficheImgBarre(2,$_SESSION['N_chocolat'],100);
 			echo "</td>"
 			."</tr>"
 			."<tr>"
 			."<td width='300' align='center'><b>Laitages: </b>".$_SESSION['N_lait']."/100";
 			AfficheImgBarre(2,$_SESSION['N_lait'],100)."</td>";
 			echo "</tr>"
 			."</table>";
 
 			echo "<br><br><table border='0'><tr><td width='350px'><a href='FicheDEtat.php?pageprecedente=".$pageprecedente."'>Etat de ".$_SESSION['Prenom']."</a>"
 				."<br><a href='FicheDHistoire.php?pageprecedente=".$pageprecedente."'>Histoire de ".$_SESSION['Prenom']."</a>"
 				."<br><a href='FicheDEquipement.php?pageprecedente=".$pageprecedente."'>Equipement de "
 				.$_SESSION['Prenom']."</a>";
 			if($sac>0){
 				echo "<br><a href='FicheDSac.php?pageprecedente=".$pageprecedente."'>Sac de ".$_SESSION['Prenom']."</a>";
 			}
 			echo "</td><td><a href='".$pageprecedente."'>Retour</a></td></tr></table>";
 	?>
 			</td>
 			<td width="300">
 			<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="209" 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="310">
 					</td>
 					<td width="209" height="310" align="center" valign="center">
 						<?php
 							echo "<div style='position:relative;top:0;left:0'><img src='images/dessins/Perso".$image.".jpg' border ='0' width='209' height='310'></div>";
 							echo "<div style='position:absolute;top:200;left:450'><img src='images/dessins/".$imageTete.$sexe.".png' border ='0' width='209' height='310'></div>";
 							echo "<div style='position:absolute;top:200;left:450'><img src='images/dessins/".$imageCorps.$sexe.".png' border ='0' width='209' height='310'></div>";
 							echo "<div style='position:absolute;top:200;left:450'><img src='images/dessins/".$imageJambes.$sexe.".png' border ='0' width='209' height='310'></div>";
 							echo "<div style='position:absolute;top:200;left:450'><img src='images/dessins/".$imagePieds.$sexe.".png' border ='0' width='209' height='310'></div>";
 							echo "<div style='position:absolute;top:200;left:450'><img src='images/dessins/".$imageArme.$sexe.".png' border ='0' width='209' height='310'></div>";
 							echo "<div style='position:absolute;top:200;left:450'><img src='images/dessins/sac".$sac.".png' border ='0' width='209' height='310'></div>";
 							echo "<div style='position:absolute;top:200;left:450'><img src='images/dessins/".$imageMains.$sexe.".png' border ='0' width='209' height='310'></div>";
 							echo "<div style='position:absolute;top:200;left:450'><img src='images/dessins/".$imageBouclier.$sexe.".png' border ='0' width='209' height='310'></div>";
 						?>
 					</td>
 					<td background="images/bordure_06.gif" width="14" height="310">
 					</td>
 				</tr>
 				<tr>
 					<td background="images/bordure_07.gif" width="14" height="18">
 					</td>
 					<td background="images/bordure_08.gif" width="209" height="18">
 					</td>
 					<td background="images/bordure_09.gif" width="14" height="18">
 					</td>
 				</tr>
 			</table>
 			</td>
 		</tr>
 	</table>
 	</td>
 	</tr>
 </table>
 </body>
 </html>
 <?php
 	mysql_close();
 ?>