Nelze vybrat více než 25 témat Téma musí začínat písmenem nebo číslem, může obsahovat pomlčky („-“) a může být dlouhé až 35 znaků.
 
 
 
 

271 řádky
13 KiB

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