You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 

263 lines
13 KiB

  1. <?php
  2. function button_modif_hp($nom_parametre, $nom_perso, $texte_bouton)
  3. {
  4. $currentpath = explode("/", dirname(__FILE__));
  5. $hash=$currentpath[6];
  6. echo '<form action="../../play/action_phone.php?'.$nom_parametre.'&amp;entry='.$nom_perso.'&amp;hash='.$hash.'" method="post"><button type="submit" class="btn btn-default btn-sm" style="float:left">'.$texte_bouton.'</button></form>';
  7. }
  8. function button_modif_ecos($nom_parametre, $nom_perso, $texte_bouton)
  9. {
  10. $currentpath = explode("/", dirname(__FILE__));
  11. $hash=$currentpath[6];
  12. echo '<form action="../../play/action_phone.php?'.$nom_parametre.'&amp;entry='.$nom_perso.'&amp;hash='.$hash.'" method="post"><button type="submit" class="btn btn-default btn-sm">'.$texte_bouton.'</button></form>';
  13. }
  14. ?>
  15. <!DOCTYPE html>
  16. <html lang="fr">
  17. <head>
  18. <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
  19. <title>EcoMonde</title>
  20. <meta name="viewport" content="width=device-width, initial-scale=1">
  21. <link rel="shortcut icon" href="../../img/favicon.png" type="image/x-icon" />
  22. <link rel="stylesheet" href="../../css/bootstrap.css" media="screen">
  23. <link rel="stylesheet" href="../../css/bootswatch.min.css">
  24. <link rel="stylesheet" href="../../css/ionicons.min.css">
  25. <link rel="stylesheet" href="../../css/ecomonde.css">
  26. </head>
  27. <body>
  28. <?php
  29. if(!empty($_GET["view"]))
  30. {
  31. $xml = simplexml_load_file($_GET["view"].'.xml');
  32. foreach($xml->entry as $entry)
  33. { ?>
  34. <!-- phoneview -->
  35. <div class="well">
  36. <a href="index.php" class="btn btn-default"><i class="ionicons ion-arrow-left-a"></i></a>
  37. <a href="index.php?view=<?php echo $entry->nom; ?>" class="btn btn-info"><i class="ionicons ion-refresh"></i></a>
  38. <a href="http://wiki.ecomonde.land/doku.php?id=wiki:equipements" class="btn btn-default" target="_blank"><i class="ionicons ion-android-book"></i>&nbsp;&nbsp;&Eacute;quipements</a>
  39. <a href="http://wiki.ecomonde.land/doku.php?id=wiki:enchantements" class="btn btn-default" target="_blank"><i class="ionicons ion-android-book"></i>&nbsp;&nbsp;Enchantements</a>
  40. </div>
  41. <hr />
  42. <div class="panel panel-<?php echo $entry->trans; ?>">
  43. <div class="panel-heading">
  44. <div class="container-fluid">
  45. <span class="level_phone"><?php echo $entry->level; ?></span>&nbsp;&nbsp;&nbsp;
  46. <span class="player_name_phone"><?php echo $entry->nom; ?></span>&nbsp;&nbsp;&nbsp;&nbsp;
  47. <strong>Attaque</strong> <span class="skill_phone">+ <?php echo $entry->attack+$entry->level+$entry->stuff->stuff_1->spec; ?></span>&nbsp;&nbsp;&nbsp;
  48. <strong>D&eacute;fense</strong> <span class="skill_phone">+ <?php echo $entry->defense+$entry->level+$entry->stuff->stuff_2->spec; ?></span>
  49. <?php
  50. $hp_max="10";
  51. switch ($entry->level)
  52. {
  53. case 0:
  54. $hp_max+=0;
  55. break;
  56. case 1:
  57. $hp_max+=2;
  58. break;
  59. case 2:
  60. $hp_max+=5;
  61. break;
  62. case 3:
  63. $hp_max+=10;
  64. break;
  65. default:
  66. echo "?";
  67. }
  68. ?>
  69. <h3>
  70. <?php button_modif_hp("heal", $entry->nom, "<strong style='color:green;'>-1</strong>&nbsp;<i class='ionicons ion-fireball' style='color:green;'></i>"); ?>&nbsp;&nbsp;&nbsp;
  71. <i class="ionicons ion-heart" style="color:red;";></i>&nbsp;<strong><?php echo $entry->hp; ?></strong><sub>/<?php echo $hp_max; ?></sub>&nbsp;&nbsp;&nbsp;
  72. <i class="ionicons ion-egg" style="color:brown;";></i>&nbsp;<strong><?php echo $entry->money; ?></strong>&nbsp;&nbsp;&nbsp;
  73. <i class="ionicons ion-flash" style="color:#FFD700;";></i>&nbsp;<strong><?php echo $entry->xp; ?></strong>&nbsp;&nbsp;&nbsp;
  74. </h3>
  75. </div>
  76. <hr />
  77. <div class="panel-body">
  78. <div class="container-fluid">
  79. <div class="row">
  80. <div class="col-xs-2">
  81. <?php button_modif_ecos("eco_verte_moins", $entry->nom, "<span style='color:green'>-</span>"); ?>
  82. </div>
  83. <div class="col-xs-8">
  84. <div class="progress progress-striped active">
  85. <div class="progress-bar-eco verte glow"><span style="width: <?php echo ($entry->ecos->verte)*20; ?>%"><?php echo $entry->ecos->verte; ?></span></div>
  86. </div>
  87. </div>
  88. <div class="col-xs-2">
  89. <?php button_modif_ecos("eco_verte_plus", $entry->nom, "<span style='color:green'>+</span>"); ?>
  90. </div>
  91. </div>
  92. <br />
  93. <div class="row">
  94. <div class="col-xs-2">
  95. <?php button_modif_ecos("eco_bleue_moins", $entry->nom, "<span style='color:blue'>-</span>"); ?>
  96. </div>
  97. <div class="col-xs-8">
  98. <div class="progress progress-striped active">
  99. <div class="progress-bar-eco bleue glow"><span style="width: <?php echo ($entry->ecos->bleue)*20; ?>%"><?php echo $entry->ecos->bleue; ?></span></div>
  100. </div>
  101. </div>
  102. <div class="col-xs-2">
  103. <?php button_modif_ecos("eco_bleue_plus", $entry->nom, "<span style='color:blue'>+</span>"); ?>
  104. </div>
  105. </div>
  106. <br />
  107. <div class="row">
  108. <div class="col-xs-2">
  109. <?php button_modif_ecos("eco_jaune_moins", $entry->nom, "<span style='color:#FFD700'>-</span>"); ?>
  110. </div>
  111. <div class="col-xs-8">
  112. <div class="progress progress-striped active">
  113. <div class="progress-bar-eco jaune glow"><span style="width: <?php echo ($entry->ecos->jaune)*20; ?>%"><?php echo $entry->ecos->jaune; ?></span></div>
  114. </div>
  115. </div>
  116. <div class="col-xs-2">
  117. <?php button_modif_ecos("eco_jaune_plus", $entry->nom, "<span style='color:yellow'>+</span>"); ?>
  118. </div>
  119. </div>
  120. <br />
  121. <div class="row">
  122. <div class="col-xs-2">
  123. <?php button_modif_ecos("eco_rouge_moins", $entry->nom, "<span style='color:red'>-</span>"); ?>
  124. </div>
  125. <div class="col-xs-8">
  126. <div class="progress progress-striped active">
  127. <div class="progress-bar-eco rouge glow"><span style="width: <?php echo ($entry->ecos->rouge)*20; ?>%"><?php echo $entry->ecos->rouge; ?></span></div>
  128. </div>
  129. </div>
  130. <div class="col-xs-2">
  131. <?php button_modif_ecos("eco_rouge_plus", $entry->nom, "<span style='color:red'>+</span>"); ?>
  132. </div>
  133. </div>
  134. <br />
  135. <div class="row">
  136. <div class="col-xs-2">
  137. <?php button_modif_ecos("eco_blanche_moins", $entry->nom, "<span style='color:#ADDFFF'>-</span>"); ?>
  138. </div>
  139. <div class="col-xs-8">
  140. <div class="progress progress-striped active">
  141. <div class="progress-bar-eco blanche glow"><span style="width: <?php echo ($entry->ecos->blanche)*20; ?>%"><?php echo $entry->ecos->blanche; ?></span></div>
  142. </div>
  143. </div>
  144. <div class="col-xs-2">
  145. <?php button_modif_ecos("eco_blanche_plus", $entry->nom, "<span style='color:#ADDFFF'>+</span>"); ?>
  146. </div>
  147. </div>
  148. <br />
  149. <div class="row">
  150. <div class="col-xs-2">
  151. <?php button_modif_ecos("eco_noire_moins", $entry->nom, "<span style='color:#8128B5'>-</span>"); ?>
  152. </div>
  153. <div class="col-xs-8">
  154. <div class="progress progress-striped active">
  155. <div class="progress-bar-eco noire glow"><span style="width: <?php echo ($entry->ecos->noire)*20; ?>%"><?php echo $entry->ecos->noire; ?></span></div>
  156. </div>
  157. </div>
  158. <div class="col-xs-2">
  159. <?php button_modif_ecos("eco_noire_plus", $entry->nom, "<span style='color:#8128B5'>+</span>"); ?>
  160. </div>
  161. </div>
  162. <br />
  163. </div>
  164. <hr />
  165. <h3>&Eacute;quipements</h3>
  166. <div class="col-lg-9">
  167. <h4><img src="../../img/item/offensif.png" class="img-rounded">
  168. &nbsp;Offensif&nbsp;<strong>➤</strong>
  169. <span class="label enchant-<?php echo $entry->stuff->stuff_1->enchant;?>"><?php echo $entry->stuff->stuff_1->info;?></span>&nbsp;<span class="badge">Attaque +<?php echo $entry->stuff->stuff_1->spec;?></span>
  170. </h4>
  171. <h4><img src="../../img/item/defensif.png" class="img-rounded">
  172. &nbsp;D&eacute;fensif&nbsp;<strong>➤</strong>
  173. <span class="label enchant-<?php echo $entry->stuff->stuff_2->enchant;?>"><?php echo $entry->stuff->stuff_2->info;?></span>&nbsp;<span class="badge">D&eacute;fense +<?php echo $entry->stuff->stuff_2->spec;?></span>
  174. </h4>
  175. <h4><img src="../../img/item/objets.png" class="img-rounded">
  176. &nbsp;Objets
  177. <br /><br /><strong>➤</strong>&nbsp;<span class="label enchant-<?php echo $entry->stuff->stuff_3->enchant;?>"><?php echo $entry->stuff->stuff_3->info;?></span>&nbsp;<span class="badge"><?php echo $entry->stuff->stuff_3->spec;?></span>
  178. <br /><br /><strong>➤</strong>&nbsp;<span class="label enchant-<?php echo $entry->stuff->stuff_4->enchant;?>"><?php echo $entry->stuff->stuff_4->info;?></span>&nbsp;<span class="badge"><?php echo $entry->stuff->stuff_4->spec;?></span>
  179. <br /><br /><strong>➤</strong>&nbsp;<span class="label enchant-<?php echo $entry->stuff->stuff_5->enchant;?>"><?php echo $entry->stuff->stuff_5->info;?></span>&nbsp;<span class="badge"><?php echo $entry->stuff->stuff_5->spec;?></span>
  180. <br /><br /><strong>➤</strong>&nbsp;<span class="label enchant-<?php echo $entry->stuff->stuff_6->enchant;?>"><?php echo $entry->stuff->stuff_6->info;?></span>&nbsp;<span class="badge"><?php echo $entry->stuff->stuff_6->spec;?></span>
  181. </h4>
  182. </div>
  183. </div>
  184. </div>
  185. <!-- /phoneview -->
  186. <?php }
  187. }
  188. else { ?>
  189. <div class="container-fluid">
  190. <img class="img-responsive" src="../../img/logo_0.png" alt="logo" />
  191. <hr />
  192. <div class="panel panel-default">
  193. <div class="panel-heading"><i class="ionicons ion-person"></i>&nbsp;&nbsp;<strong>Joueurs :</strong></div>
  194. <div class="panel-body">
  195. <table class="table table-striped table-hover ">
  196. <tbody>
  197. <?php
  198. // liste des gamers
  199. $folder = ".";
  200. $dossier = opendir($folder);
  201. while ($fichier = readdir($dossier))
  202. {
  203. if ($fichier != "." && $fichier != ".." && $fichier != "map.jpg" && $fichier != "soft.mp3" && $fichier != "tonic.mp3" && $fichier != "hard.mp3" && $fichier != "light.mp3" && $fichier != "dark.mp3" && $fichier != "enemy")
  204. {
  205. $gamers = explode(".xml", $fichier);
  206. $xml = simplexml_load_file($fichier);
  207. if (!isset($itemnb))
  208. {
  209. $itemnb=0;
  210. }
  211. else
  212. {
  213. $itemnb++;
  214. }
  215. foreach($xml->entry as $entry)
  216. {
  217. $hp_max="10";
  218. switch ($entry->level)
  219. {
  220. case 0:
  221. $hp_max+=0;
  222. break;
  223. case 1:
  224. $hp_max+=2;
  225. break;
  226. case 2:
  227. $hp_max+=5;
  228. break;
  229. case 3:
  230. $hp_max+=10;
  231. break;
  232. default:
  233. echo "?";
  234. }
  235. $somme_ecos=$entry->ecos->verte+$entry->ecos->bleue+$entry->ecos->jaune+$entry->ecos->rouge;
  236. echo '<tr class="active">
  237. <td><strong>['.$entry->level.']</strong>&nbsp;'.$entry->nom.'</td>
  238. <td><i class="ionicons ion-heart" style="color:red;"></i>&nbsp;'.$entry->hp.'/'.$hp_max.'</td>
  239. <td><a href="index.php?view='.$entry->nom.'" class="btn btn-info btn-sm"><i class="ionicons ion-eye">&nbsp;VOIR</i></a></td>
  240. </tr>';
  241. }
  242. }
  243. }
  244. closedir($dossier);
  245. ?>
  246. </tbody>
  247. </table>
  248. </div>
  249. </div>
  250. </div>
  251. </div>
  252. <?php } ?>
  253. </body>
  254. </html>