1 | 1 |
new file mode 100755 |
... | ... |
@@ -0,0 +1,274 @@ |
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 objets du sac: |
|
26 |
+ //sac |
|
27 |
+ $sac = $_SESSION['sac']; |
|
28 |
+ //les objets a charger |
|
29 |
+ $objets1 = $_SESSION['objets1']; |
|
30 |
+ $objets2 = $_SESSION['objets2']; |
|
31 |
+ $objets3 = $_SESSION['objets3']; |
|
32 |
+ $objets4 = $_SESSION['objets4']; |
|
33 |
+ if($sac>0){ |
|
34 |
+ //objet1 |
|
35 |
+ $req = "SELECT * FROM objets WHERE objets.id_objets='".$objets1."'"; |
|
36 |
+ $resultat = mysql_query($req)or exit('Erreur ' . mysql_errno() . ' : ' . mysql_error()); |
|
37 |
+ $tableauReponse=mysql_fetch_assoc($resultat); |
|
38 |
+ $imageObjet1 = $tableauReponse['image']; |
|
39 |
+ $nomObjet1 = $tableauReponse['nom']; |
|
40 |
+ $descriptionObjet1 = $tableauReponse['description']; |
|
41 |
+ $nourritureObjet1 = $tableauReponse['typeObjet']; |
|
42 |
+ $aug_ForObjet1 = $tableauReponse['aug_For']; |
|
43 |
+ $aug_DexObjet1 = $tableauReponse['aug_Dex']; |
|
44 |
+ $aug_IntObjet1 = $tableauReponse['aug_Int']; |
|
45 |
+ $aug_SagObjet1 = $tableauReponse['aug_Sag']; |
|
46 |
+ $aug_ChaObjet1 = $tableauReponse['aug_Cha']; |
|
47 |
+ $aug_VitObjet1 = $tableauReponse['aug_Vit']; |
|
48 |
+ $aug_FatObjet1 = $tableauReponse['aug_Fat']; |
|
49 |
+ if($sac>1){ |
|
50 |
+ //objet2 |
|
51 |
+ $req = "SELECT * FROM objets WHERE objets.id_objets='".$objets2."'"; |
|
52 |
+ $resultat = mysql_query($req)or exit('Erreur ' . mysql_errno() . ' : ' . mysql_error()); |
|
53 |
+ $tableauReponse=mysql_fetch_assoc($resultat); |
|
54 |
+ $imageObjet2 = $tableauReponse['image']; |
|
55 |
+ $nomObjet2 = $tableauReponse['nom']; |
|
56 |
+ $descriptionObjet2 = $tableauReponse['description']; |
|
57 |
+ $nourritureObjet2 = $tableauReponse['typeObjet']; |
|
58 |
+ $aug_ForObjet2 = $tableauReponse['aug_For']; |
|
59 |
+ $aug_DexObjet2 = $tableauReponse['aug_Dex']; |
|
60 |
+ $aug_IntObjet2 = $tableauReponse['aug_Int']; |
|
61 |
+ $aug_SagObjet2 = $tableauReponse['aug_Sag']; |
|
62 |
+ $aug_ChaObjet2 = $tableauReponse['aug_Cha']; |
|
63 |
+ $aug_VitObjet2 = $tableauReponse['aug_Vit']; |
|
64 |
+ $aug_FatObjet2 = $tableauReponse['aug_Fat']; |
|
65 |
+ if($sac>2){ |
|
66 |
+ //objet3 |
|
67 |
+ $req = "SELECT * FROM objets WHERE objets.id_objets='".$objets3."'"; |
|
68 |
+ $resultat = mysql_query($req)or exit('Erreur ' . mysql_errno() . ' : ' . mysql_error()); |
|
69 |
+ $tableauReponse=mysql_fetch_assoc($resultat); |
|
70 |
+ $imageObjet3 = $tableauReponse['image']; |
|
71 |
+ $nomObjet3 = $tableauReponse['nom']; |
|
72 |
+ $descriptionObjet3 = $tableauReponse['description']; |
|
73 |
+ $nourritureObjet3 = $tableauReponse['typeObjet']; |
|
74 |
+ $aug_ForObjet3 = $tableauReponse['aug_For']; |
|
75 |
+ $aug_DexObjet3 = $tableauReponse['aug_Dex']; |
|
76 |
+ $aug_IntObjet3 = $tableauReponse['aug_Int']; |
|
77 |
+ $aug_SagObjet3 = $tableauReponse['aug_Sag']; |
|
78 |
+ $aug_ChaObjet3 = $tableauReponse['aug_Cha']; |
|
79 |
+ $aug_VitObjet3 = $tableauReponse['aug_Vit']; |
|
80 |
+ $aug_FatObjet3 = $tableauReponse['aug_Fat']; |
|
81 |
+ if($sac>3){ |
|
82 |
+ //objet4 |
|
83 |
+ $req = "SELECT * FROM objets WHERE objets.id_objets='".$objets4."'"; |
|
84 |
+ $resultat = mysql_query($req)or exit('Erreur ' . mysql_errno() . ' : ' . mysql_error()); |
|
85 |
+ $tableauReponse=mysql_fetch_assoc($resultat); |
|
86 |
+ $imageObjet4 = $tableauReponse['image']; |
|
87 |
+ $nomObjet4 = $tableauReponse['nom']; |
|
88 |
+ $descriptionObjet4 = $tableauReponse['description']; |
|
89 |
+ $nourritureObjet4 = $tableauReponse['typeObjet']; |
|
90 |
+ $aug_ForObjet4 = $tableauReponse['aug_For']; |
|
91 |
+ $aug_DexObjet4 = $tableauReponse['aug_Dex']; |
|
92 |
+ $aug_IntObjet4 = $tableauReponse['aug_Int']; |
|
93 |
+ $aug_SagObjet4 = $tableauReponse['aug_Sag']; |
|
94 |
+ $aug_ChaObjet4 = $tableauReponse['aug_Cha']; |
|
95 |
+ $aug_VitObjet4 = $tableauReponse['aug_Vit']; |
|
96 |
+ $aug_FatObjet4 = $tableauReponse['aug_Fat']; |
|
97 |
+ } |
|
98 |
+ } |
|
99 |
+ } |
|
100 |
+ } |
|
101 |
+?> |
|
102 |
+<html> |
|
103 |
+<head> |
|
104 |
+<title>Ville de Dragons</title> |
|
105 |
+<link rel='stylesheet' href='Style.css' type='text/css'> |
|
106 |
+</head> |
|
107 |
+<body> |
|
108 |
+<?php |
|
109 |
+ AfficheBarreDEtat(1); |
|
110 |
+?> |
|
111 |
+<table border="0" height="100%" width="100%"> |
|
112 |
+ <tr> |
|
113 |
+ <td valign="center"> |
|
114 |
+ |
|
115 |
+ <table border="0" cellspacing="0" cellpadding="0" align="left"> |
|
116 |
+ <tr> |
|
117 |
+ <td width="400"> |
|
118 |
+ <center><h2><b><u>Sac D'Objets</b></u></h2></center> |
|
119 |
+ <?php |
|
120 |
+ //affichage des objets |
|
121 |
+ echo " <table border='0' cellspacing = '0' width='700' height='250'>" |
|
122 |
+ ."<tr>"; |
|
123 |
+ if($sac>0){ |
|
124 |
+ echo "<td>" |
|
125 |
+ ."<table border='0' cellspacing='0' cellpadding='0' align='center'>" |
|
126 |
+ ."<tr>" |
|
127 |
+ ."<td background='images/bordure_02.gif' width='50' height='19'>" |
|
128 |
+ ."</td>" |
|
129 |
+ ."</tr>" |
|
130 |
+ ."<tr>" |
|
131 |
+ ."<td width='50' height='50' align='center' valign='center'>" |
|
132 |
+ //image objet1 |
|
133 |
+ ."<img src=images/dessins/".$imageObjet1.".jpg>" |
|
134 |
+ ."</td>" |
|
135 |
+ ."</tr>" |
|
136 |
+ ."<tr>" |
|
137 |
+ ."<td background='images/bordure_08.gif' width='50' height='18'>" |
|
138 |
+ ."</td>" |
|
139 |
+ ."</tr>" |
|
140 |
+ ."</table>" |
|
141 |
+ ."</td>" |
|
142 |
+ ."<td width='300'>" |
|
143 |
+ ."<table border='0' width='300'><tr><td><b>Nom:</b></td><td>".$nomObjet1."</td></tr><tr><td colspan='4' align='center'><i>".$descriptionObjet1."</i></td></tr>"; |
|
144 |
+ if($objets1!=0){ |
|
145 |
+ if($nourritureObjet1==0){ |
|
146 |
+ echo "<tr><td colspan='4' align='center'><b>Bonus/Malus</b></td></tr><tr><td><b>For:</b></td><td>".$aug_ForObjet1."</td><td><b>Dex:</b></td><td>".$aug_DexObjet1."</td></tr><tr><td><b>Vit:</b></td><td>".$aug_VitObjet1."</td><td><b>Int:</b></td><td>".$aug_IntObjet1."</td></tr><tr><td><b>Sag:</b></td><td>".$aug_SagObjet1."</td><td><b>Cha:</b></td><td>".$aug_ChaObjet1."</td></tr><tr><td colspan='2'><b>Fatigue:</b></td><td>".$aug_FatObjet1."</td></tr>"; |
|
147 |
+ }else{ |
|
148 |
+ echo "<tr><td><b>Type:</b></td><td colspan='4' align='center'>".typeAliment($nourritureObjet1)."</td></tr>"; |
|
149 |
+ } |
|
150 |
+ echo "<tr><td colspan='5'><a href='TraitementAliment.php?Retour=0&ObjetNum=1&augFor=".$aug_ForObjet1."&augDex=".$aug_DexObjet1."&augVit=".$aug_VitObjet1."&augInt=".$aug_IntObjet1."&augSag=".$aug_SagObjet1."&augCha=".$aug_ChaObjet1."&augFat=".$aug_FatObjet1."&typeObjet=".$nourritureObjet1."&pageprecedente=".$pageprecedente'>Consommer</a></td></tr>"; |
|
151 |
+ } |
|
152 |
+ echo "</table>"; |
|
153 |
+ if($sac>1){ |
|
154 |
+ echo "</td>" |
|
155 |
+ ."<td>" |
|
156 |
+ ."<table border='0' cellspacing='0' cellpadding='0' align='center'>" |
|
157 |
+ ."<tr>" |
|
158 |
+ ."<td background='images/bordure_02.gif' width='50' height='19'>" |
|
159 |
+ ."</td>" |
|
160 |
+ ."</tr>" |
|
161 |
+ ."<tr>" |
|
162 |
+ ."<td width='50' height='50' align='center' valign='center'>" |
|
163 |
+ //image objet2 |
|
164 |
+ ."<img src=images/dessins/".$imageObjet2.".jpg>" |
|
165 |
+ ."</td>" |
|
166 |
+ ."</tr>" |
|
167 |
+ ."<tr>" |
|
168 |
+ ."<td background='images/bordure_08.gif' width='50' height='18'>" |
|
169 |
+ ."</td>" |
|
170 |
+ ."</tr>" |
|
171 |
+ ."</table>" |
|
172 |
+ ."</td>" |
|
173 |
+ ."<td width='300'>" |
|
174 |
+ ."<table border='0' width='300'><tr><td><b>Nom:</b></td><td>".$nomObjet2."</td></tr><tr><td colspan='4' align='center'><i>".$descriptionObjet2."</i></td></tr>"; |
|
175 |
+ if($objets2!=0){ |
|
176 |
+ if($nourritureObjet2==0){ |
|
177 |
+ echo "<tr><td colspan='4' align='center'><b>Bonus/Malus</b></td></tr><tr><td><b>For:</b></td><td>".$aug_ForObjet2."</td><td><b>Dex:</b></td><td>".$aug_DexObjet2."</td></tr><tr><td><b>Vit:</b></td><td>".$aug_VitObjet2."</td><td><b>Int:</b></td><td>".$aug_IntObjet2."</td></tr><tr><td><b>Sag:</b></td><td>".$aug_SagObjet2."</td><td><b>Cha:</b></td><td>".$aug_ChaObjet2."</td></tr><tr><td colspan='2'><b>Fatigue:</b></td><td>".$aug_FatObjet2."</td></tr>"; |
|
178 |
+ }else{ |
|
179 |
+ echo "<tr><td><b>Type:</b></td><td colspan='4' align='center'>".typeAliment($nourritureObjet2)."</td></tr>"; |
|
180 |
+ } |
|
181 |
+ echo "<tr><td colspan='5'><a href='TraitementAliment.php?Retour=0&ObjetNum=2&augFor=".$aug_ForObjet2."&augDex=".$aug_DexObjet2."&augVit=".$aug_VitObjet2."&augInt=".$aug_IntObjet2."&augSag=".$aug_SagObjet2."&augCha=".$aug_ChaObjet2."&augFat=".$aug_FatObjet2."&typeObjet=".$nourritureObjet2."&pageprecedente=".$pageprecedente'>Consommer</a></td></tr>"; |
|
182 |
+ } |
|
183 |
+ echo "</table>"; |
|
184 |
+ } |
|
185 |
+ } |
|
186 |
+ if($sac>2){ |
|
187 |
+ echo "</td>" |
|
188 |
+ ."</tr>"; |
|
189 |
+ echo "<tr>" |
|
190 |
+ ."<td>" |
|
191 |
+ ."<table border='0' cellspacing='0' cellpadding='0' align='center'>" |
|
192 |
+ ."<tr>" |
|
193 |
+ ."<td background='images/bordure_02.gif' width='50' height='19'>" |
|
194 |
+ ."</td>" |
|
195 |
+ ."</tr>" |
|
196 |
+ ."<tr>" |
|
197 |
+ ."<td width='50' height='50' align='center' valign='center'>" |
|
198 |
+ //image objet3 |
|
199 |
+ ."<img src=images/dessins/".$imageObjet3.".jpg>" |
|
200 |
+ ."</td>" |
|
201 |
+ ."</tr>" |
|
202 |
+ ."<tr>" |
|
203 |
+ ."<td background='images/bordure_08.gif' width='50' height='18'>" |
|
204 |
+ ."</td>" |
|
205 |
+ ."</tr>" |
|
206 |
+ ."</table>" |
|
207 |
+ ."</td>" |
|
208 |
+ ."<td width='300'>" |
|
209 |
+ ."<table border='0' width='300'><tr><td><b>Nom:</b></td><td>".$nomObjet3."</td></tr><tr><td colspan='4' align='center'><i>".$descriptionObjet3."</i></td></tr>"; |
|
210 |
+ if($objets3!=0){ |
|
211 |
+ if($nourritureObjet3==0){ |
|
212 |
+ echo "<tr><td colspan='4' align='center'><b>Bonus/Malus</b></td></tr><tr><td><b>For:</b></td><td>".$aug_ForObjet3."</td><td><b>Dex:</b></td><td>".$aug_DexObjet3."</td></tr><tr><td><b>Vit:</b></td><td>".$aug_VitObjet3."</td><td><b>Int:</b></td><td>".$aug_IntObjet3."</td></tr><tr><td><b>Sag:</b></td><td>".$aug_SagObjet3."</td><td><b>Cha:</b></td><td>".$aug_ChaObjet3."</td></tr><tr><td colspan='2'><b>Fatigue:</b></td><td>".$aug_FatObjet3."</td></tr>"; |
|
213 |
+ }else{ |
|
214 |
+ echo "<tr><td><b>Type:</b></td><td colspan='4' align='center'>".typeAliment($nourritureObjet3)."</td></tr>"; |
|
215 |
+ } |
|
216 |
+ echo "<tr><td colspan='5'><a href='TraitementAliment.php?Retour=0&ObjetNum=3&augFor=".$aug_ForObjet3."&augDex=".$aug_DexObjet3."&augVit=".$aug_VitObjet3."&augInt=".$aug_IntObjet3."&augSag=".$aug_SagObjet3."&augCha=".$aug_ChaObjet3."&augFat=".$aug_FatObjet3."&typeObjet=".$nourritureObjet3."&pageprecedente=".$pageprecedente'>Consommer</a></td></tr>"; |
|
217 |
+ } |
|
218 |
+ echo "</table>"; |
|
219 |
+ if($sac>3){ |
|
220 |
+ echo "</td>" |
|
221 |
+ ."<td>" |
|
222 |
+ ."<table border='0' cellspacing='0' cellpadding='0' align='center'>" |
|
223 |
+ ."<tr>" |
|
224 |
+ ."<td background='images/bordure_02.gif' width='50' height='19'>" |
|
225 |
+ ."</td>" |
|
226 |
+ ."</tr>" |
|
227 |
+ ."<tr>" |
|
228 |
+ ."<td width='50' height='50' align='center' valign='center'>" |
|
229 |
+ //image objet4 |
|
230 |
+ ."<img src=images/dessins/".$imageObjet4.".jpg>" |
|
231 |
+ ."</td>" |
|
232 |
+ ."</tr>" |
|
233 |
+ ."<tr>" |
|
234 |
+ ."<td background='images/bordure_08.gif' width='50' height='18'>" |
|
235 |
+ ."</td>" |
|
236 |
+ ."</tr>" |
|
237 |
+ ."</table>" |
|
238 |
+ ."</td>" |
|
239 |
+ ."<td width='300'>" |
|
240 |
+ ."<table border='0' width='300'><tr><td><b>Nom:</b></td><td>".$nomObjet4."</td></tr><tr><td colspan='4' align='center'><i>".$descriptionObjet4."</i></td></tr>"; |
|
241 |
+ if($objets4!=0){ |
|
242 |
+ if($nourritureObjet4==0){ |
|
243 |
+ echo "<tr><td colspan='4' align='center'><b>Bonus/Malus</b></td></tr><tr><td><b>For:</b></td><td>".$aug_ForObjet4."</td><td><b>Dex:</b></td><td>".$aug_DexObjet4."</td></tr><tr><td><b>Vit:</b></td><td>".$aug_VitObjet4."</td><td><b>Int:</b></td><td>".$aug_IntObjet4."</td></tr><tr><td><b>Sag:</b></td><td>".$aug_SagObjet4."</td><td><b>Cha:</b></td><td>".$aug_ChaObjet4."</td></tr><tr><td colspan='2'><b>Fatigue:</b></td><td>".$aug_FatObjet4."</td></tr>"; |
|
244 |
+ }else{ |
|
245 |
+ echo "<tr><td><b>Type:</b></td><td colspan='4' align='center'>".typeAliment($nourritureObjet4)."</td></tr>"; |
|
246 |
+ } |
|
247 |
+ echo "<tr><td colspan='5'><a href='TraitementAliment.php?Retour=0&ObjetNum=4&augFor=".$aug_ForObjet4."&augDex=".$aug_DexObjet4."&augVit=".$aug_VitObjet4."&augInt=".$aug_IntObjet4."&augSag=".$aug_SagObjet4."&augCha=".$aug_ChaObjet4."&augFat=".$aug_FatObjet4."&typeObjet=".$nourritureObjet4."&pageprecedente=".$pageprecedente'>Consommer</a></td></tr>"; |
|
248 |
+ } |
|
249 |
+ echo "</table>"; |
|
250 |
+ } |
|
251 |
+ } |
|
252 |
+ echo "</td>" |
|
253 |
+ ."</tr>" |
|
254 |
+ ."</table>"; |
|
255 |
+ |
|
256 |
+ echo "<br><br><table border='0'><tr><td width='500px'><a href='FicheDEtat.php?pageprecedente=".$pageprecedente."'>Etat de ".$_SESSION['Prenom']."</a>" |
|
257 |
+ ."<br><a href='FicheDHistoire.php?pageprecedente=".$pageprecedente."'>Histoire de ".$_SESSION['Prenom']."</a>" |
|
258 |
+ ."<br><a href='FicheDEquipement.php?pageprecedente=".$pageprecedente."'>Equipement de " |
|
259 |
+ .$_SESSION['Prenom']."</a>" |
|
260 |
+ ."<br><a href='FicheDPreference.php?pageprecedente=".$pageprecedente."'>Pr�f�rence de ".$_SESSION['Prenom']."</a>" |
|
261 |
+ ."</td><td><a href='".$pageprecedente."'>Retour</a></td></tr></table>"; |
|
262 |
+ |
|
263 |
+ ?> |
|
264 |
+ </td> |
|
265 |
+ </tr> |
|
266 |
+ </table> |
|
267 |
+ </td> |
|
268 |
+ </tr> |
|
269 |
+</table> |
|
270 |
+</body> |
|
271 |
+</html> |
|
272 |
+<?php |
|
273 |
+ mysql_close(); |
|
274 |
+?> |