Browse code

Version initiale du programme sous forme de boucle conditionnelle

Emmanuel ROY authored on 01/05/2022 12:54:29
Showing 1 changed files
1 1
new file mode 100755
... ...
@@ -0,0 +1,305 @@
1
+<?php
2
+//creation de la session ... inclusion du code ... verification de la session connect�e...
3
+session_start();
4
+include ('fonctions.php');
5
+check_session();
6
+include ('fonctionsDenTete.php');
7
+
8
+//creation de la variable contenant l'image a afficher
9
+	$poids = $_SESSION['Poids'];
10
+	$sexe = $_SESSION['Sexe'];
11
+	if($sexe==1){
12
+		$image = $poids;
13
+	}else{
14
+		$image = 5+$poids;
15
+	}
16
+//la page prec�dente..
17
+	$pageprecedente = $_GET['pageprecedente'];
18
+	if(strpos($_GET['pageprecedente'],'?') === FALSE){
19
+		$pageprecedente .= "?etat=1";
20
+	}else{
21
+		if(strpos($_GET['pageprecedente'],'etat=1') === FALSE){
22
+			$pageprecedente .= "&etat=1";
23
+		}
24
+	}
25
+//recherche des images des equipements:
26
+			//sur le corps
27
+	$req = "SELECT * FROM corps WHERE id_corps='".$_SESSION['corps']."'";
28
+	$resultat = mysql_query($req)or exit('Erreur ' . mysql_errno() . ' : ' . mysql_error());
29
+	$tableauReponse=mysql_fetch_assoc($resultat);
30
+	$imageCorps = $tableauReponse['image'];
31
+	$nomCorps = $tableauReponse['nom'];
32
+	$descriptionCorps = $tableauReponse['description'];
33
+	$aug_ForCorps = $tableauReponse['aug_For'];
34
+	$aug_DexCorps = $tableauReponse['aug_Dex'];
35
+	$aug_IntCorps = $tableauReponse['aug_Int'];
36
+	$aug_SagCorps = $tableauReponse['aug_Sag'];
37
+	$aug_ChaCorps = $tableauReponse['aug_Cha'];
38
+	$aug_VitCorps = $tableauReponse['aug_Vit'];
39
+
40
+			//sur les jambes
41
+	$req = "SELECT * FROM jambes WHERE id_jambes='".$_SESSION['jambes']."'";
42
+	$resultat = mysql_query($req)or exit('Erreur ' . mysql_errno() . ' : ' . mysql_error());
43
+	$tableauReponse=mysql_fetch_assoc($resultat);
44
+	$imageJambes = $tableauReponse['image'];
45
+	$nomJambes = $tableauReponse['nom'];
46
+	$descriptionJambes = $tableauReponse['description'];
47
+	$aug_ForJambes = $tableauReponse['aug_For'];
48
+	$aug_DexJambes = $tableauReponse['aug_Dex'];
49
+	$aug_IntJambes = $tableauReponse['aug_Int'];
50
+	$aug_SagJambes = $tableauReponse['aug_Sag'];
51
+	$aug_ChaJambes = $tableauReponse['aug_Cha'];
52
+	$aug_VitJambes = $tableauReponse['aug_Vit'];
53
+
54
+			//sur la main Droite
55
+	$req = "SELECT * FROM maindroite WHERE id_mainDroite='".$_SESSION['mainDroite']."'";
56
+	$resultat = mysql_query($req)or exit('Erreur ' . mysql_errno() . ' : ' . mysql_error());
57
+
58
+	$tableauReponse=mysql_fetch_assoc($resultat);
59
+	$imageArme = $tableauReponse['image'];
60
+	$nomArme = $tableauReponse['nom'];
61
+	$descriptionArme = $tableauReponse['description'];
62
+	$aug_ForArme = $tableauReponse['aug_For'];
63
+	$aug_DexArme = $tableauReponse['aug_Dex'];
64
+	$aug_IntArme = $tableauReponse['aug_Int'];
65
+	$aug_SagArme = $tableauReponse['aug_Sag'];
66
+	$aug_ChaArme = $tableauReponse['aug_Cha'];
67
+	$aug_VitArme = $tableauReponse['aug_Vit'];
68
+
69
+			//sur la main gauche
70
+	$req = "SELECT * FROM maingauche WHERE id_mainGauche='".$_SESSION['mainGauche']."'";
71
+	$resultat = mysql_query($req)or exit('Erreur ' . mysql_errno() . ' : ' . mysql_error());
72
+
73
+	$tableauReponse=mysql_fetch_assoc($resultat);
74
+	$imageBouclier = $tableauReponse['image'];
75
+	$nomBouclier = $tableauReponse['nom'];
76
+	$descriptionBouclier = $tableauReponse['description'];
77
+	$aug_ForBouclier = $tableauReponse['aug_For'];
78
+	$aug_DexBouclier = $tableauReponse['aug_Dex'];
79
+	$aug_IntBouclier = $tableauReponse['aug_Int'];
80
+	$aug_SagBouclier = $tableauReponse['aug_Sag'];
81
+	$aug_ChaBouclier = $tableauReponse['aug_Cha'];
82
+	$aug_VitBouclier = $tableauReponse['aug_Vit'];
83
+
84
+		//sur les mains
85
+	$req = "SELECT * FROM mains WHERE id_mains='".$_SESSION['mains']."'";
86
+	$resultat = mysql_query($req)or exit('Erreur ' . mysql_errno() . ' : ' . mysql_error());
87
+
88
+	$tableauReponse=mysql_fetch_assoc($resultat);
89
+	$imageMains = $tableauReponse['image'];
90
+	$nomMains = $tableauReponse['nom'];
91
+	$descriptionMains = $tableauReponse['description'];
92
+	$aug_ForMains = $tableauReponse['aug_For'];
93
+	$aug_DexMains = $tableauReponse['aug_Dex'];
94
+	$aug_IntMains = $tableauReponse['aug_Int'];
95
+	$aug_SagMains = $tableauReponse['aug_Sag'];
96
+	$aug_ChaMains = $tableauReponse['aug_Cha'];
97
+	$aug_VitMains = $tableauReponse['aug_Vit'];
98
+
99
+			//sur les pieds
100
+	$req = "SELECT * FROM pieds WHERE id_pieds='".$_SESSION['pieds']."'";
101
+	$resultat = mysql_query($req)or exit('Erreur ' . mysql_errno() . ' : ' . mysql_error());
102
+
103
+	$tableauReponse=mysql_fetch_assoc($resultat);
104
+	$imagePieds = $tableauReponse['image'];
105
+	$nomPieds = $tableauReponse['nom'];
106
+	$descriptionPieds = $tableauReponse['description'];
107
+	$aug_ForPieds = $tableauReponse['aug_For'];
108
+	$aug_DexPieds = $tableauReponse['aug_Dex'];
109
+	$aug_IntPieds = $tableauReponse['aug_Int'];
110
+	$aug_SagPieds = $tableauReponse['aug_Sag'];
111
+	$aug_ChaPieds = $tableauReponse['aug_Cha'];
112
+	$aug_VitPieds = $tableauReponse['aug_Vit'];
113
+
114
+			//sur la tete
115
+	$req = "SELECT * FROM tete WHERE id_tete='".$_SESSION['tete']."'";
116
+	$resultat = mysql_query($req)or exit('Erreur ' . mysql_errno() . ' : ' . mysql_error());
117
+
118
+	$tableauReponse=mysql_fetch_assoc($resultat);
119
+	$imageTete = $tableauReponse['image'];
120
+	$nomTete = $tableauReponse['nom'];
121
+	$descriptionTete = $tableauReponse['description'];
122
+	$aug_ForTete = $tableauReponse['aug_For'];
123
+	$aug_DexTete = $tableauReponse['aug_Dex'];
124
+	$aug_IntTete = $tableauReponse['aug_Int'];
125
+	$aug_SagTete = $tableauReponse['aug_Sag'];
126
+	$aug_ChaTete = $tableauReponse['aug_Cha'];
127
+	$aug_VitTete = $tableauReponse['aug_Vit'];
128
+
129
+				//sur le doigt de la main gauche
130
+	$req = "SELECT * FROM doigt WHERE id_doigt='".$_SESSION['doigt1']."'";
131
+	$resultat = mysql_query($req)or exit('Erreur ' . mysql_errno() . ' : ' . mysql_error());
132
+
133
+	$tableauReponse=mysql_fetch_assoc($resultat);
134
+	$nomdoigt1 = $tableauReponse['nom'];
135
+	$descriptiondoigt1 = $tableauReponse['description'];
136
+	$aug_Fordoigt1 = $tableauReponse['aug_For'];
137
+	$aug_Dexdoigt1 = $tableauReponse['aug_Dex'];
138
+	$aug_Intdoigt1 = $tableauReponse['aug_Int'];
139
+	$aug_Sagdoigt1 = $tableauReponse['aug_Sag'];
140
+	$aug_Chadoigt1 = $tableauReponse['aug_Cha'];
141
+	$aug_Vitdoigt1 = $tableauReponse['aug_Vit'];
142
+
143
+				//sur le doigt de la main droite
144
+	$req = "SELECT * FROM doigt WHERE id_doigt='".$_SESSION['doigt2']."'";
145
+	$resultat = mysql_query($req)or exit('Erreur ' . mysql_errno() . ' : ' . mysql_error());
146
+
147
+	$tableauReponse=mysql_fetch_assoc($resultat);
148
+	$nomdoigt2 = $tableauReponse['nom'];
149
+	$descriptiondoigt2 = $tableauReponse['description'];
150
+	$aug_Fordoigt2 = $tableauReponse['aug_For'];
151
+	$aug_Dexdoigt2 = $tableauReponse['aug_Dex'];
152
+	$aug_Intdoigt2 = $tableauReponse['aug_Int'];
153
+	$aug_Sagdoigt2 = $tableauReponse['aug_Sag'];
154
+	$aug_Chadoigt2 = $tableauReponse['aug_Cha'];
155
+	$aug_Vitdoigt2 = $tableauReponse['aug_Vit'];
156
+
157
+			//sac
158
+	$sac = $_SESSION['sac'];
159
+
160
+?>
161
+<html>
162
+<head>
163
+<title>Ville de Dragons</title>
164
+<link rel='stylesheet' href='Style.css' type='text/css'>
165
+</head>
166
+<body>
167
+<?php
168
+	AfficheBarreDEtat(1);
169
+?>
170
+<table border="0" height="100%" width="100%">
171
+	<tr>
172
+	<td valign="center">
173
+	<table border="0" cellspacing="0" cellpadding="0" align="center">
174
+		<tr>
175
+		<td width="400">
176
+		<center><h2><b><u>Fiche D'Equipement</b></u></h2></center>
177
+
178
+	<?php
179
+	//affichage des caracteristiques
180
+		echo "	<table border = '0' cellspacing = '1'>"
181
+				."<tr>"
182
+				."<td>&nbsp</td><td>&nbsp</td><td colspan=6 align='center'><b>Bonus / Malus</b></td>"
183
+				."</tr>"
184
+				."<tr>"
185
+				."<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>"
186
+				."</tr>"
187
+				."<tr>"
188
+				."<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>"
189
+				."</tr>"
190
+				."<tr>"
191
+				."<td colspan=8 align='center'><i>".$descriptionTete."</i></td>"
192
+				."</tr>"
193
+				."<tr>"
194
+				."<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>"
195
+				."</tr>"
196
+				."<tr>"
197
+				."<td colspan=8 align='center'><i>".$descriptionCorps."</i></td>"
198
+				."</tr>"
199
+				."<tr>"
200
+				."<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>"
201
+				."</tr>"
202
+				."<tr>"
203
+				."<td colspan=8 align='center'><i>".$descriptionArme."</i></td>"
204
+				."</tr>"
205
+				."<tr>"
206
+				."<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>"
207
+				."</tr>"
208
+				."<tr>"
209
+				."<td colspan=8 align='center'><i>".$descriptionBouclier."</i></td>"
210
+				."</tr>"
211
+				."<tr>"
212
+				."<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>"
213
+				."</tr>"
214
+				."<tr>"
215
+				."<td colspan=8 align='center'><i>".$descriptionMains."</i></td>"
216
+				."</tr>"
217
+				."<tr>"
218
+				."<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>"
219
+				."</tr>"
220
+				."<tr>"
221
+				."<td colspan=8 align='center'><i>".$descriptionJambes."</i></td>"
222
+				."</tr>"
223
+				."<tr>"
224
+				."<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>"
225
+				."</tr>"
226
+				."<tr>"
227
+				."<td colspan=8 align='center'><i>".$descriptionPieds."</i></td>"
228
+				."</tr>"
229
+				."<tr>"
230
+				."<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>"
231
+				."</tr>"
232
+				."<tr>"
233
+				."<td colspan=8 align='center'><i>".$descriptiondoigt1."</i></td>"
234
+				."</tr>"
235
+				."<tr>"
236
+				."<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>"
237
+				."</tr>"
238
+				."<tr>"
239
+				."<td colspan=8 align='center'><i>".$descriptiondoigt2."</i></td>"
240
+				."</tr>"
241
+				."<tr>"
242
+				."<td><b>Sac: </b><td colspan=7 align='right'><i>".$sac." emplacements.</i></td>"
243
+				."</tr>"
244
+
245
+			."</table>";
246
+
247
+			echo "<br><br><table border='0'><tr><td width='350px'><a href='FicheDEtat.php?pageprecedente=".$pageprecedente."'>Etat de ".$_SESSION['Prenom']."</a>"
248
+				."<br><a href='FicheDHistoire.php?pageprecedente=".$pageprecedente."'>Histoire de ".$_SESSION['Prenom']."</a>"
249
+				."<br><a href='FicheDPreference.php?pageprecedente=".$pageprecedente."'>Pr�f�rence de "
250
+				.$_SESSION['Prenom']."</a>";
251
+			if($sac>0){
252
+				echo "<br><a href='FicheDSac.php?pageprecedente=".$pageprecedente."'>Sac de ".$_SESSION['Prenom']."</a>";
253
+			}
254
+			echo "</td><td><a href='".$pageprecedente."'>Retour</a></td></tr></table>";
255
+	?>
256
+			</td>
257
+			<td width="300">
258
+			<table border="0" cellspacing="0" cellpadding="0" align="center">
259
+				<tr>
260
+					<td background="images/bordure_01.gif" width="14" height="19">
261
+					</td>
262
+					<td background="images/bordure_02.gif" width="209" height="19">
263
+					</td>
264
+					<td background="images/bordure_03.gif" width="14" height="19">
265
+					</td>
266
+				</tr>
267
+				<tr>
268
+					<td background="images/bordure_04.gif" width="14" height="310">
269
+					</td>
270
+					<td width="209" height="310" align="center" valign="center">
271
+						<?php
272
+							echo "<div style='position:relative;top:0;left:0'><img src='images/dessins/Perso".$image.".jpg' border ='0' width='209' height='310'></div>";
273
+							echo "<div style='position:absolute;top:200;left:450'><img src='images/dessins/".$imageTete.$sexe.".png' border ='0' width='209' height='310'></div>";
274
+							echo "<div style='position:absolute;top:200;left:450'><img src='images/dessins/".$imageCorps.$sexe.".png' border ='0' width='209' height='310'></div>";
275
+							echo "<div style='position:absolute;top:200;left:450'><img src='images/dessins/".$imageJambes.$sexe.".png' border ='0' width='209' height='310'></div>";
276
+							echo "<div style='position:absolute;top:200;left:450'><img src='images/dessins/".$imagePieds.$sexe.".png' border ='0' width='209' height='310'></div>";
277
+							echo "<div style='position:absolute;top:200;left:450'><img src='images/dessins/".$imageArme.$sexe.".png' border ='0' width='209' height='310'></div>";
278
+							echo "<div style='position:absolute;top:200;left:450'><img src='images/dessins/sac".$sac.".png' border ='0' width='209' height='310'></div>";
279
+							echo "<div style='position:absolute;top:200;left:450'><img src='images/dessins/".$imageMains.$sexe.".png' border ='0' width='209' height='310'></div>";
280
+							echo "<div style='position:absolute;top:200;left:450'><img src='images/dessins/".$imageBouclier.$sexe.".png' border ='0' width='209' height='310'></div>";
281
+						?>
282
+					</td>
283
+					<td background="images/bordure_06.gif" width="14" height="310">
284
+					</td>
285
+				</tr>
286
+				<tr>
287
+					<td background="images/bordure_07.gif" width="14" height="18">
288
+					</td>
289
+					<td background="images/bordure_08.gif" width="209" height="18">
290
+					</td>
291
+					<td background="images/bordure_09.gif" width="14" height="18">
292
+					</td>
293
+				</tr>
294
+			</table>
295
+			</td>
296
+		</tr>
297
+	</table>
298
+	</td>
299
+	</tr>
300
+</table>
301
+</body>
302
+</html>
303
+<?php
304
+	mysql_close()
305
+?>