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.

gamers.php 9.5 KiB

10 years ago
10 years ago
10 years ago
10 years ago
10 years ago
10 years ago
10 years ago
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211
  1. <?php
  2. $xml = simplexml_load_file('../medias/'.$hash.'/'.$fichier);
  3. if (!isset($itemnb)) {
  4. $itemnb=0;
  5. } else {
  6. $itemnb++;
  7. }
  8. foreach($xml->entry as $entry) {
  9. ?>
  10. <!-- gamers -->
  11. <div class="col-lg-4" id="content_<?php echo $entry->nom; ?>">
  12. <div class="panel panel-<?php echo $entry->trans; ?>">
  13. <div class="panel-heading">
  14. <div class="row">
  15. <div class="col-lg-3">
  16. <?php button_modif_level("level_down", $entry->nom, "<i class='ionicons ion-arrow-graph-down-left'></i>"); ?>
  17. <span class="level"><?php echo $entry->level; ?></span>
  18. <?php button_modif_level("level_up", $entry->nom, "<i class='ionicons ion-arrow-graph-up-right'></i>"); ?>
  19. </div>
  20. <div class="col-lg-5 player_name">
  21. <?php echo $entry->nom; ?>
  22. </div>
  23. <div class="col-lg-4">
  24. <?php trans("trans_dark", $entry->nom, "#8128B5"); ?><?php trans("trans_light", $entry->nom, "#ADDFFF"); ?><?php trans("trans_default", $entry->nom, "#AAA"); ?>
  25. </div>
  26. </div>
  27. <div class="row">
  28. <div class="col-lg-4">
  29. <h3><i class="ionicons ion-egg" style="color:brown;";></i>&nbsp;<strong><?php echo $entry->money; ?></strong></h3>
  30. </div>
  31. <div class="col-lg-4">
  32. <?php
  33. $hp_max="10";
  34. switch ($entry->level)
  35. {
  36. case 0:
  37. $hp_max+=0;
  38. break;
  39. case 1:
  40. $hp_max+=2;
  41. break;
  42. case 2:
  43. $hp_max+=5;
  44. break;
  45. case 3:
  46. $hp_max+=10;
  47. break;
  48. default:
  49. echo "?";
  50. }
  51. ?>
  52. <h3><i class="ionicons ion-heart" style="color:red;";></i>&nbsp;<strong><?php echo $entry->hp; ?></strong><sub>/<?php echo $hp_max; ?></sub></h3>
  53. </div>
  54. <div class="col-lg-4">
  55. <h3><i class="ionicons ion-flash" style="color:#FFD700;";></i>&nbsp;<strong><?php echo $entry->xp; ?></strong>&nbsp;</h3>
  56. </div>
  57. </div>
  58. <div class="row">
  59. <div class="col-lg-4">
  60. <?php button_modif_money("money_reset", $entry->nom, '<i class="ionicons ion-arrow-return-left"></i>'); ?><?php button_modif_money("money_moins", $entry->nom, "-"); ?><?php button_modif_money("money_plus", $entry->nom, "+"); ?>
  61. </div>
  62. <div class="col-lg-4">
  63. <?php button_modif_hp("hp_moins", $entry->nom, "-"); ?><?php button_modif_hp("hp_plus", $entry->nom, "+"); ?>
  64. </div>
  65. <div class="col-lg-4">
  66. <?php button_modif_xp("xp_reset", $entry->nom, '<i class="ionicons ion-arrow-return-left"></i>'); ?><?php button_modif_xp("xp_moinsmoins", $entry->nom, "--"); ?><?php button_modif_xp("xp_moins", $entry->nom, "-"); ?><?php button_modif_xp("xp_plus", $entry->nom, "+"); ?><?php button_modif_xp("xp_plusplus", $entry->nom, "++"); ?>
  67. </div>
  68. </div>
  69. </div>
  70. <div class="panel-body">
  71. <div class="row">
  72. <div class="col-lg-1">
  73. <?php button_modif_ecos("eco_verte_moins", $entry->nom, "<span style='color:green'>-</span>"); ?>
  74. </div>
  75. <div class="col-lg-4">
  76. <p>Lorem ipsum dolor sit amet</p>
  77. </div>
  78. <div class="col-lg-1">
  79. <?php button_modif_ecos("eco_verte_plus", $entry->nom, "<span style='color:green'>+</span>"); ?>
  80. </div>
  81. <div class="col-lg-1">
  82. <?php button_modif_ecos("eco_bleue_moins", $entry->nom, "<span style='color:blue'>-</span>"); ?>
  83. </div>
  84. <div class="col-lg-4">
  85. <p>Lorem ipsum dolor sit amet</p>
  86. </div>
  87. <div class="col-lg-1">
  88. <?php button_modif_ecos("eco_bleue_plus", $entry->nom, "<span style='color:green'>+</span>"); ?>
  89. </div>
  90. </div>
  91. <div class="row">
  92. <div class="col-lg-1">
  93. <?php button_modif_ecos("eco_verte_moins", $entry->nom, "<span style='color:green'>-</span>"); ?>
  94. </div>
  95. <div class="col-lg-4">
  96. <div class="progress progress-striped active">
  97. <div class="progress-bar-eco verte glow"><span style="width: <?php echo ($entry->ecos->verte)*20; ?>%"><?php echo $entry->ecos->verte; ?></span></div>
  98. </div>
  99. </div>
  100. <div class="col-lg-1">
  101. <?php button_modif_ecos("eco_verte_plus", $entry->nom, "<span style='color:green'>+</span>"); ?>
  102. </div>
  103. <div class="col-lg-1">
  104. <?php button_modif_ecos("eco_bleue_moins", $entry->nom, "<span style='color:blue'>-</span>"); ?>
  105. </div>
  106. <div class="col-lg-4">
  107. <div class="progress progress-striped active">
  108. <div class="progress-bar-eco bleue glow"><span style="width: <?php echo ($entry->ecos->bleue)*20; ?>%"><?php echo $entry->ecos->bleue; ?></span></div>
  109. </div>
  110. </div>
  111. <div class="col-lg-1">
  112. <?php button_modif_ecos("eco_bleue_plus", $entry->nom, "<span style='color:green'>+</span>"); ?>
  113. </div>
  114. </div>
  115. <div class="row">
  116. <div class="col-lg-1">
  117. <?php button_modif_ecos("eco_jaune_moins", $entry->nom, "<span style='color:#FFD700'>-</span>"); ?>
  118. </div>
  119. <div class="col-lg-4">
  120. <div class="progress progress-striped active">
  121. <div class="progress-bar-eco jaune glow"><span style="width: <?php echo ($entry->ecos->jaune)*20; ?>%"><?php echo $entry->ecos->jaune; ?></span></div>
  122. </div>
  123. </div>
  124. <div class="col-lg-1">
  125. <?php button_modif_ecos("eco_jaune_plus", $entry->nom, "<span style='color:#FFD700'>+</span>"); ?>
  126. </div>
  127. <div class="col-lg-1">
  128. <?php button_modif_ecos("eco_rouge_moins", $entry->nom, "<span style='color:red'>-</span>"); ?>
  129. </div>
  130. <div class="col-lg-4">
  131. <div class="progress progress-striped active">
  132. <div class="progress-bar-eco rouge glow"><span style="width: <?php echo ($entry->ecos->rouge)*20; ?>%"><?php echo $entry->ecos->rouge; ?></span></div>
  133. </div>
  134. </div>
  135. <div class="col-lg-1">
  136. <?php button_modif_ecos("eco_rouge_plus", $entry->nom, "<span style='color:red'>+</span>"); ?>
  137. </div>
  138. </div>
  139. <div class="row">
  140. <div class="col-lg-1">
  141. <?php button_modif_ecos("eco_blanche_moins", $entry->nom, "<span style='color:#ADDFFF'>-</span>"); ?>
  142. </div>
  143. <div class="col-lg-4">
  144. <div class="progress progress-striped active">
  145. <div class="progress-bar-eco blanche glow"><span style="width: <?php echo ($entry->ecos->blanche)*20; ?>%"><?php echo $entry->ecos->blanche; ?></span></div>
  146. </div>
  147. </div>
  148. <div class="col-lg-1">
  149. <?php button_modif_ecos("eco_blanche_plus", $entry->nom, "<span style='color:#ADDFFF'>+</span>"); ?>
  150. </div>
  151. <div class="col-lg-1">
  152. <?php button_modif_ecos("eco_noire_moins", $entry->nom, "<span style='color:#8128B5'>-</span>"); ?>
  153. </div>
  154. <div class="col-lg-4">
  155. <div class="progress progress-striped active">
  156. <div class="progress-bar-eco noire glow"><span style="width: <?php echo ($entry->ecos->noire)*20; ?>%"><?php echo $entry->ecos->noire; ?></span></div>
  157. </div>
  158. </div>
  159. <div class="col-lg-1">
  160. <?php button_modif_ecos("eco_noire_plus", $entry->nom, "<span style='color:#8128B5'>+</span>"); ?>
  161. </div>
  162. </div>
  163. <hr />
  164. <div class="list-group col-lg-9">
  165. <a class="list-group-item">
  166. <button class="btn btn-default btn-xs" data-toggle="modal" data-target="#notes<?php echo $itemnb; ?>" style="float:right;"><i class="ionicons ion-edit"></i></button>
  167. <h4>Notes :</h4>
  168. <p class="list-group-item-text"><?php echo $entry->notes ?></p>
  169. </a>
  170. </div>
  171. <div class="col-lg-3">
  172. <h4><i class="glyphicon glyphicon-gift" style="color:blue;";></i>&nbsp;<strong><?php echo $entry->gift; ?></strong></h4>
  173. <?php button_modif_gift("gift_reset", $entry->nom, "<i class='ionicons ion-arrow-return-left'></i>"); ?><?php button_modif_gift("gift_moins", $entry->nom, "-"); ?><?php button_modif_gift("gift_plus", $entry->nom, "+"); ?>
  174. </div>
  175. <!-- notes -->
  176. <div class="modal fade" id="notes<?php echo $itemnb;?>" tabindex="-1" role="dialog" aria-labelledby="notes<?php echo $itemnb;?>" aria-hidden="true">
  177. <div class="modal-dialog">
  178. <div class="modal-content">
  179. <div class="modal-body">
  180. <div class="container-fluid">
  181. <div class="col-lg-12">
  182. <form action="action.php?edit_notes&amp;entry=<?php echo $entry->nom; ?>" method="post">
  183. <textarea name="notes" id="notes<?php echo $itemnb; ?>" cols="80" rows="10"><?php echo $entry->notes;?></textarea>
  184. <div class="modal-footer">
  185. <button type="button" class="btn btn-default" data-dismiss="modal" style="float:left;">Fermer</button>
  186. <input type="submit" class="btn btn-primary" value="Editer" />
  187. </div>
  188. </form>
  189. </div>
  190. </div>
  191. </div>
  192. </div>
  193. </div>
  194. </div>
  195. </div>
  196. </div>
  197. </div>
  198. <!-- /gamers -->
  199. <?php } ?>