FicheDEquipement.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 * 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'];
 	$nomCorps = $tableauReponse['nom'];
 	$descriptionCorps = $tableauReponse['description'];
 	$aug_ForCorps = $tableauReponse['aug_For'];
 	$aug_DexCorps = $tableauReponse['aug_Dex'];
 	$aug_IntCorps = $tableauReponse['aug_Int'];
 	$aug_SagCorps = $tableauReponse['aug_Sag'];
 	$aug_ChaCorps = $tableauReponse['aug_Cha'];
 	$aug_VitCorps = $tableauReponse['aug_Vit'];
 
 			//sur les jambes
 	$req = "SELECT * 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'];
 	$nomJambes = $tableauReponse['nom'];
 	$descriptionJambes = $tableauReponse['description'];
 	$aug_ForJambes = $tableauReponse['aug_For'];
 	$aug_DexJambes = $tableauReponse['aug_Dex'];
 	$aug_IntJambes = $tableauReponse['aug_Int'];
 	$aug_SagJambes = $tableauReponse['aug_Sag'];
 	$aug_ChaJambes = $tableauReponse['aug_Cha'];
 	$aug_VitJambes = $tableauReponse['aug_Vit'];
 
 			//sur la main Droite
 	$req = "SELECT * 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'];
 	$nomArme = $tableauReponse['nom'];
 	$descriptionArme = $tableauReponse['description'];
 	$aug_ForArme = $tableauReponse['aug_For'];
 	$aug_DexArme = $tableauReponse['aug_Dex'];
 	$aug_IntArme = $tableauReponse['aug_Int'];
 	$aug_SagArme = $tableauReponse['aug_Sag'];
 	$aug_ChaArme = $tableauReponse['aug_Cha'];
 	$aug_VitArme = $tableauReponse['aug_Vit'];
 
 			//sur la main gauche
 	$req = "SELECT * 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'];
 	$nomBouclier = $tableauReponse['nom'];
 	$descriptionBouclier = $tableauReponse['description'];
 	$aug_ForBouclier = $tableauReponse['aug_For'];
 	$aug_DexBouclier = $tableauReponse['aug_Dex'];
 	$aug_IntBouclier = $tableauReponse['aug_Int'];
 	$aug_SagBouclier = $tableauReponse['aug_Sag'];
 	$aug_ChaBouclier = $tableauReponse['aug_Cha'];
 	$aug_VitBouclier = $tableauReponse['aug_Vit'];
 
 		//sur les mains
 	$req = "SELECT * 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'];
 	$nomMains = $tableauReponse['nom'];
 	$descriptionMains = $tableauReponse['description'];
 	$aug_ForMains = $tableauReponse['aug_For'];
 	$aug_DexMains = $tableauReponse['aug_Dex'];
 	$aug_IntMains = $tableauReponse['aug_Int'];
 	$aug_SagMains = $tableauReponse['aug_Sag'];
 	$aug_ChaMains = $tableauReponse['aug_Cha'];
 	$aug_VitMains = $tableauReponse['aug_Vit'];
 
 			//sur les pieds
 	$req = "SELECT * 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'];
 	$nomPieds = $tableauReponse['nom'];
 	$descriptionPieds = $tableauReponse['description'];
 	$aug_ForPieds = $tableauReponse['aug_For'];
 	$aug_DexPieds = $tableauReponse['aug_Dex'];
 	$aug_IntPieds = $tableauReponse['aug_Int'];
 	$aug_SagPieds = $tableauReponse['aug_Sag'];
 	$aug_ChaPieds = $tableauReponse['aug_Cha'];
 	$aug_VitPieds = $tableauReponse['aug_Vit'];
 
 			//sur la tete
 	$req = "SELECT * 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'];
 	$nomTete = $tableauReponse['nom'];
 	$descriptionTete = $tableauReponse['description'];
 	$aug_ForTete = $tableauReponse['aug_For'];
 	$aug_DexTete = $tableauReponse['aug_Dex'];
 	$aug_IntTete = $tableauReponse['aug_Int'];
 	$aug_SagTete = $tableauReponse['aug_Sag'];
 	$aug_ChaTete = $tableauReponse['aug_Cha'];
 	$aug_VitTete = $tableauReponse['aug_Vit'];
 
 				//sur le doigt de la main gauche
 	$req = "SELECT * FROM doigt WHERE id_doigt='".$_SESSION['doigt1']."'";
 	$resultat = mysql_query($req)or exit('Erreur ' . mysql_errno() . ' : ' . mysql_error());
 
 	$tableauReponse=mysql_fetch_assoc($resultat);
 	$nomdoigt1 = $tableauReponse['nom'];
 	$descriptiondoigt1 = $tableauReponse['description'];
 	$aug_Fordoigt1 = $tableauReponse['aug_For'];
 	$aug_Dexdoigt1 = $tableauReponse['aug_Dex'];
 	$aug_Intdoigt1 = $tableauReponse['aug_Int'];
 	$aug_Sagdoigt1 = $tableauReponse['aug_Sag'];
 	$aug_Chadoigt1 = $tableauReponse['aug_Cha'];
 	$aug_Vitdoigt1 = $tableauReponse['aug_Vit'];
 
 				//sur le doigt de la main droite
 	$req = "SELECT * FROM doigt WHERE id_doigt='".$_SESSION['doigt2']."'";
 	$resultat = mysql_query($req)or exit('Erreur ' . mysql_errno() . ' : ' . mysql_error());
 
 	$tableauReponse=mysql_fetch_assoc($resultat);
 	$nomdoigt2 = $tableauReponse['nom'];
 	$descriptiondoigt2 = $tableauReponse['description'];
 	$aug_Fordoigt2 = $tableauReponse['aug_For'];
 	$aug_Dexdoigt2 = $tableauReponse['aug_Dex'];
 	$aug_Intdoigt2 = $tableauReponse['aug_Int'];
 	$aug_Sagdoigt2 = $tableauReponse['aug_Sag'];
 	$aug_Chadoigt2 = $tableauReponse['aug_Cha'];
 	$aug_Vitdoigt2 = $tableauReponse['aug_Vit'];
 
 			//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="center">
 		<tr>
 		<td width="400">
 		<center><h2><b><u>Fiche D'Equipement</b></u></h2></center>
 
 	<?php
 	//affichage des caracteristiques
 		echo "	<table border = '0' cellspacing = '1'>"
 				."<tr>"
 				."<td>&nbsp</td><td>&nbsp</td><td colspan=6 align='center'><b>Bonus / Malus</b></td>"
 				."</tr>"
 				."<tr>"
 				."<td></td><td widht='200'><b>Nom:</b></td><td><b>For:</b></td><td><b>Dex:</b></td><td><b>Vit:</b></td><td><b>Int:</b></td><td><b>Sag:</b></td><td><b>Cha:</b></td>"
 				."</tr>"
 				."<tr>"
 				."<td><b>Tete: </b></td><td width='200'>".$nomTete."</td><td align='center'>".$aug_ForTete."</td><td align='center'>".$aug_DexTete."</td><td align='center'>".$aug_VitTete."</td><td align='center'>".$aug_IntTete."</td><td align='center'>".$aug_SagTete."</td><td align='center'>".$aug_ChaTete."</td>"
 				."</tr>"
 				."<tr>"
 				."<td colspan=8 align='center'><i>".$descriptionTete."</i></td>"
 				."</tr>"
 				."<tr>"
 				."<td><b>Corps: </b></td><td width='200'>".$nomCorps."</td><td align='center'>".$aug_ForCorps."</td><td align='center'>".$aug_DexCorps."</td><td align='center'>".$aug_VitCorps."</td><td align='center'>".$aug_IntCorps."</td><td align='center'>".$aug_SagCorps."</td><td align='center'>".$aug_ChaCorps."</td>"
 				."</tr>"
 				."<tr>"
 				."<td colspan=8 align='center'><i>".$descriptionCorps."</i></td>"
 				."</tr>"
 				."<tr>"
 				."<td><b>Arme: </b></td><td width='200'>".$nomArme."</td><td align='center'>".$aug_ForArme."</td><td align='center'>".$aug_DexArme."</td><td align='center'>".$aug_VitArme."</td><td align='center'>".$aug_IntArme."</td><td align='center'>".$aug_SagArme."</td><td align='center'>".$aug_ChaArme."</td>"
 				."</tr>"
 				."<tr>"
 				."<td colspan=8 align='center'><i>".$descriptionArme."</i></td>"
 				."</tr>"
 				."<tr>"
 				."<td><b>Bouclier: </b></td><td width='200'>".$nomBouclier."</td><td align='center'>".$aug_ForBouclier."</td><td align='center'>".$aug_DexBouclier."</td><td align='center'>".$aug_VitBouclier."</td><td align='center'>".$aug_IntBouclier."</td><td align='center'>".$aug_SagBouclier."</td><td align='center'>".$aug_ChaBouclier."</td>"
 				."</tr>"
 				."<tr>"
 				."<td colspan=8 align='center'><i>".$descriptionBouclier."</i></td>"
 				."</tr>"
 				."<tr>"
 				."<td><b>Mains: </b></td><td width='200'>".$nomMains."</td><td align='center'>".$aug_ForMains."</td><td align='center'>".$aug_DexMains."</td><td align='center'>".$aug_VitMains."</td><td align='center'>".$aug_IntMains."</td><td align='center'>".$aug_SagMains."</td><td align='center'>".$aug_ChaMains."</td>"
 				."</tr>"
 				."<tr>"
 				."<td colspan=8 align='center'><i>".$descriptionMains."</i></td>"
 				."</tr>"
 				."<tr>"
 				."<td><b>Jambes: </b></td><td width='200'>".$nomJambes."</td><td align='center'>".$aug_ForJambes."</td><td align='center'>".$aug_DexJambes."</td><td align='center'>".$aug_VitJambes."</td><td align='center'>".$aug_IntJambes."</td><td align='center'>".$aug_SagJambes."</td><td align='center'>".$aug_ChaJambes."</td>"
 				."</tr>"
 				."<tr>"
 				."<td colspan=8 align='center'><i>".$descriptionJambes."</i></td>"
 				."</tr>"
 				."<tr>"
 				."<td><b>Pieds: </b></td><td width='200'>".$nomPieds."</td><td align='center'>".$aug_ForPieds."</td><td align='center'>".$aug_DexPieds."</td><td align='center'>".$aug_VitPieds."</td><td align='center'>".$aug_IntPieds."</td><td align='center'>".$aug_SagPieds."</td><td align='center'>".$aug_ChaPieds."</td>"
 				."</tr>"
 				."<tr>"
 				."<td colspan=8 align='center'><i>".$descriptionPieds."</i></td>"
 				."</tr>"
 				."<tr>"
 				."<td><b>Doigt G: </b></td><td width='200'>".$nomdoigt1."</td><td align='center'>".$aug_Fordoigt1."</td><td align='center'>".$aug_Dexdoigt1."</td><td align='center'>".$aug_Vitdoigt1."</td><td align='center'>".$aug_Intdoigt1."</td><td align='center'>".$aug_Sagdoigt1."</td><td align='center'>".$aug_Chadoigt1."</td>"
 				."</tr>"
 				."<tr>"
 				."<td colspan=8 align='center'><i>".$descriptiondoigt1."</i></td>"
 				."</tr>"
 				."<tr>"
 				."<td><b>Doigt D: </b></td><td width='200'>".$nomdoigt2."</td><td align='center'>".$aug_Fordoigt2."</td><td align='center'>".$aug_Dexdoigt2."</td><td align='center'>".$aug_Vitdoigt2."</td><td align='center'>".$aug_Intdoigt2."</td><td align='center'>".$aug_Sagdoigt2."</td><td align='center'>".$aug_Chadoigt2."</td>"
 				."</tr>"
 				."<tr>"
 				."<td colspan=8 align='center'><i>".$descriptiondoigt2."</i></td>"
 				."</tr>"
 				."<tr>"
 				."<td><b>Sac: </b><td colspan=7 align='right'><i>".$sac." emplacements.</i></td>"
 				."</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='FicheDPreference.php?pageprecedente=".$pageprecedente."'>Pr�f�rence 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()
 ?>