1 | 1 |
new file mode 100755 |
... | ... |
@@ -0,0 +1,66 @@ |
1 |
+<?php |
|
2 |
+session_start(); |
|
3 |
+include('fonctions.php'); |
|
4 |
+//test pour savoir si le sorcier a deja �t� cr��.. |
|
5 |
+ connectionBDD(); |
|
6 |
+ $resultat = mysql_query("SELECT * FROM sorcier WHERE id = '".$_SESSION['id']."'")or exit('Erreur ' . mysql_errno() . ' : ' . mysql_error()); |
|
7 |
+ $tableauReponse=mysql_fetch_assoc($resultat); |
|
8 |
+ //mise en m�moire du nom et du Prenom du Sorcier et des autres valeurs propre au jeu |
|
9 |
+ $_SESSION['Prenom']=$tableauReponse['Prenom']; |
|
10 |
+ $_SESSION['Nom']=$tableauReponse['Nom']; |
|
11 |
+ $_SESSION['Vit']=$tableauReponse['Vitalite']; |
|
12 |
+ $_SESSION['Int']=$tableauReponse['Intelligence']; |
|
13 |
+ $_SESSION['For']=$tableauReponse['Forc']; |
|
14 |
+ $_SESSION['Dex']=$tableauReponse['Dexterite']; |
|
15 |
+ $_SESSION['Cha']=$tableauReponse['Charisme']; |
|
16 |
+ $_SESSION['Sag']=$tableauReponse['Sagesse']; |
|
17 |
+ $_SESSION['VitActuelle']=$tableauReponse['VitActuelle']; |
|
18 |
+ $_SESSION['FatigueMax']=$tableauReponse['FatigueMax']; |
|
19 |
+ $_SESSION['FatigueActuelle']=$tableauReponse['FatigueActuelle']; |
|
20 |
+ $_SESSION['Or']=$tableauReponse['PiecesOr']; |
|
21 |
+ $_SESSION['Niveau']=$tableauReponse['Niveau']; |
|
22 |
+ $_SESSION['Sexe']=$tableauReponse['Sexe']; |
|
23 |
+ $_SESSION['Age']=$tableauReponse['Age']; |
|
24 |
+ $_SESSION['biereBu']=0; |
|
25 |
+ $_SESSION['enCas']=0; |
|
26 |
+ $_SESSION['repas']=$tableauReponse['Heure']; |
|
27 |
+ $_SESSION['Poids']=$tableauReponse['Poids']; |
|
28 |
+ $_SESSION['xp'] = $tableauReponse['experience']; |
|
29 |
+ $_SESSION['xpMax'] = $tableauReponse['experienceMax']; |
|
30 |
+ //variables pour la nourriture pr�f�r�e |
|
31 |
+ $_SESSION['N_pomme'] = $tableauReponse['N_pomme']; |
|
32 |
+ $_SESSION['N_viandeSeche'] = $tableauReponse['N_viandeSeche']; |
|
33 |
+ $_SESSION['N_orange'] = $tableauReponse['N_orange']; |
|
34 |
+ $_SESSION['N_pain'] = $tableauReponse['N_pain']; |
|
35 |
+ $_SESSION['N_chocolat'] = $tableauReponse['N_chocolat']; |
|
36 |
+ $_SESSION['N_lait'] = $tableauReponse['N_lait']; |
|
37 |
+ |
|
38 |
+ CalculAugmentationCarac(); |
|
39 |
+ CalculCaractAugmentee(TRUE); |
|
40 |
+ |
|
41 |
+ $resultat = mysql_query("SELECT * FROM histoire WHERE id = '".$_SESSION['id']."'")or exit('Erreur ' . mysql_errno() . ' : ' . mysql_error()); |
|
42 |
+ $tableauReponse=mysql_fetch_assoc($resultat); |
|
43 |
+ //mise en m�moire des variables pour l'histoire du jeu |
|
44 |
+ $_SESSION['taverne']=$tableauReponse['taverne']; |
|
45 |
+ $_SESSION['taverneRumeur']=$tableauReponse['taverneRumeur']; |
|
46 |
+ $_SESSION['taverneRat']=$tableauReponse['taverneRat']; |
|
47 |
+ $_SESSION['arrivee']=$tableauReponse['arrivee']; |
|
48 |
+ $_SESSION['erudit']=$tableauReponse['erudit']; |
|
49 |
+ $_SESSION['joueurs']=$tableauReponse['joueurs']; |
|
50 |
+ $_SESSION['nains']=$tableauReponse['nains']; |
|
51 |
+ $_SESSION['tavernier']=$tableauReponse['tavernier']; |
|
52 |
+ $_SESSION['Sauvegarde']=$tableauReponse['Sauvegarde']; |
|
53 |
+ |
|
54 |
+ //chargement de la page de la derni�re sauvegarde |
|
55 |
+ switch($_SESSION['Sauvegarde']){ |
|
56 |
+ case 0: |
|
57 |
+ header("location: arrivee.php"); |
|
58 |
+ break; |
|
59 |
+ case 1: |
|
60 |
+ header("location: Taverne_Chambre.php"); |
|
61 |
+ break; |
|
62 |
+ case 2: |
|
63 |
+ header("location: Eglise.php") |
|
64 |
+ } |
|
65 |
+ mysql_close(); |
|
66 |
+?> |