選択できるのは25トピックまでです。 トピックは、先頭が英数字で、英数字とダッシュ('-')を使用した35文字以内のものにしてください。

gamers.php 8.2 KiB

10年前
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194
  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">
  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></h3>
  56. </div>
  57. </div>
  58. <div class="row">
  59. <div class="col-lg-4">
  60. <?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_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, "-"); ?>
  74. </div>
  75. <div class="col-lg-9">
  76. <div class="progress progress-striped active">
  77. <div class="progress-bar-eco verte glow"><span style="width: <?php echo ($entry->ecos->verte)*20; ?>%"><?php echo $entry->ecos->verte; ?></span></div>
  78. </div>
  79. </div>
  80. <div class="col-lg-2">
  81. <?php button_modif_ecos("eco_verte_plus", $entry->nom, "+"); ?>
  82. </div>
  83. </div>
  84. <div class="row">
  85. <div class="col-lg-1">
  86. <?php button_modif_ecos("eco_bleue_moins", $entry->nom, "-"); ?>
  87. </div>
  88. <div class="col-lg-9">
  89. <div class="progress progress-striped active">
  90. <div class="progress-bar-eco bleue glow"><span style="width: <?php echo ($entry->ecos->bleue)*20; ?>%"><?php echo $entry->ecos->bleue; ?></span></div>
  91. </div>
  92. </div>
  93. <div class="col-lg-2">
  94. <?php button_modif_ecos("eco_bleue_plus", $entry->nom, "+"); ?>
  95. </div>
  96. </div>
  97. <div class="row">
  98. <div class="col-lg-1">
  99. <?php button_modif_ecos("eco_jaune_moins", $entry->nom, "-"); ?>
  100. </div>
  101. <div class="col-lg-9">
  102. <div class="progress progress-striped active">
  103. <div class="progress-bar-eco jaune glow"><span style="width: <?php echo ($entry->ecos->jaune)*20; ?>%"><?php echo $entry->ecos->jaune; ?></span></div>
  104. </div>
  105. </div>
  106. <div class="col-lg-2">
  107. <?php button_modif_ecos("eco_jaune_plus", $entry->nom, "+"); ?>
  108. </div>
  109. </div>
  110. <div class="row">
  111. <div class="col-lg-1">
  112. <?php button_modif_ecos("eco_rouge_moins", $entry->nom, "-"); ?>
  113. </div>
  114. <div class="col-lg-9">
  115. <div class="progress progress-striped active">
  116. <div class="progress-bar-eco rouge glow"><span style="width: <?php echo ($entry->ecos->rouge)*20; ?>%"><?php echo $entry->ecos->rouge; ?></span></div>
  117. </div>
  118. </div>
  119. <div class="col-lg-2">
  120. <?php button_modif_ecos("eco_rouge_plus", $entry->nom, "+"); ?>
  121. </div>
  122. </div>
  123. <hr />
  124. <div class="row">
  125. <div class="col-lg-1">
  126. <?php button_modif_ecos("eco_blanche_moins", $entry->nom, "-"); ?>
  127. </div>
  128. <div class="col-lg-9">
  129. <div class="progress progress-striped active">
  130. <div class="progress-bar-eco blanche glow"><span style="width: <?php echo ($entry->ecos->blanche)*20; ?>%"><?php echo $entry->ecos->blanche; ?></span></div>
  131. </div>
  132. </div>
  133. <div class="col-lg-2">
  134. <?php button_modif_ecos("eco_blanche_plus", $entry->nom, "+"); ?>
  135. </div>
  136. </div>
  137. <div class="row">
  138. <div class="col-lg-1">
  139. <?php button_modif_ecos("eco_noire_moins", $entry->nom, "-"); ?>
  140. </div>
  141. <div class="col-lg-9">
  142. <div class="progress progress-striped active">
  143. <div class="progress-bar-eco noire glow"><span style="width: <?php echo ($entry->ecos->noire)*20; ?>%"><?php echo $entry->ecos->noire; ?></span></div>
  144. </div>
  145. </div>
  146. <div class="col-lg-2">
  147. <?php button_modif_ecos("eco_noire_plus", $entry->nom, "+"); ?>
  148. </div>
  149. </div>
  150. <hr />
  151. <div class="list-group col-lg-9">
  152. <a class="list-group-item">
  153. <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>
  154. <h4>Notes :</h4>
  155. <p class="list-group-item-text"><?php echo $entry->notes ?></p>
  156. </a>
  157. </div>
  158. <div class="col-lg-3">
  159. <h4><i class="glyphicon glyphicon-gift" style="color:blue;";></i>&nbsp;<strong><?php echo $entry->gift; ?></strong></h4>
  160. <?php button_modif_gift("gift_moins", $entry->nom, "-"); ?><?php button_modif_gift("gift_plus", $entry->nom, "+"); ?>
  161. </div>
  162. <!-- notes -->
  163. <div class="modal fade" id="notes<?php echo $itemnb;?>" tabindex="-1" role="dialog" aria-labelledby="notes<?php echo $itemnb;?>" aria-hidden="true">
  164. <div class="modal-dialog">
  165. <div class="modal-content">
  166. <div class="modal-body">
  167. <div class="container-fluid">
  168. <div class="col-lg-12">
  169. <form action="action.php?edit_notes&amp;entry=<?php echo $entry->nom; ?>" method="post">
  170. <textarea name="notes" id="notes<?php echo $itemnb; ?>" cols="80" rows="10"><?php echo $entry->notes;?></textarea>
  171. <div class="modal-footer">
  172. <button type="button" class="btn btn-default" data-dismiss="modal" style="float:left;">Fermer</button>
  173. <input type="submit" class="btn btn-primary" value="Editer" />
  174. </div>
  175. </form>
  176. </div>
  177. </div>
  178. </div>
  179. </div>
  180. </div>
  181. </div>
  182. </div>
  183. </div>
  184. </div>
  185. <!-- /gamers -->
  186. <?php } ?>