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.
 
 
 
 

181 lines
4.7 KiB

  1. <?php include "../header.php";
  2. $nom_modif="";
  3. if (isset($_GET['entry'])) {
  4. $nom_modif = $_GET['entry'];
  5. } else {
  6. header("location: ./index.php");
  7. end;
  8. }
  9. $xml = simplexml_load_file('../medias/'.$hash.'/'.$nom_modif.'.xml');
  10. if (isset($_GET['level_up']) && $xml->entry->level<3) {
  11. $xml->entry->level++;
  12. }
  13. if (isset($_GET['level_down']) && $xml->entry->level>0) {
  14. $xml->entry->level--;
  15. }
  16. if (isset($_GET['heal']) && $xml->entry->hp<20 && $xml->entry->ecos->verte>0) {
  17. $lvl=$xml->entry->level;
  18. $hp=$xml->entry->hp;
  19. $xml->entry->hp=$hp+2+$lvl;
  20. $xml->entry->ecos->verte--;
  21. }
  22. if (isset($_GET['hp_plus']) && $xml->entry->hp<20) {
  23. $xml->entry->hp++;
  24. }
  25. if (isset($_GET['hp_moins']) && $xml->entry->hp>0) {
  26. $xml->entry->hp--;
  27. }
  28. if (isset($_GET['xp_plus']) && $xml->entry->xp<99999) {
  29. $xml->entry->xp++;
  30. }
  31. if (isset($_GET['xp_moins']) && $xml->entry->xp>0) {
  32. $xml->entry->xp--;
  33. }
  34. if (isset($_GET['xp_plusplus']) && $xml->entry->xp<99989) {
  35. $xml->entry->xp+=10;
  36. }
  37. if (isset($_GET['xp_moinsmoins']) && $xml->entry->xp>9) {
  38. $xml->entry->xp-=10;
  39. }
  40. if (isset($_GET['xp_reset'])) {
  41. $xml->entry->xp=0;
  42. }
  43. if (isset($_GET['money_plus']) && $xml->entry->money<99999) {
  44. $xml->entry->money+=1;
  45. }
  46. if (isset($_GET['money_moins']) && $xml->entry->money>0) {
  47. $xml->entry->money--;
  48. }
  49. if (isset($_GET['money_reset'])) {
  50. $xml->entry->money=0;
  51. }
  52. if (isset($_GET['attack_up'])) {
  53. $xml->entry->attack++;
  54. }
  55. if (isset($_GET['attack_down'])) {
  56. $xml->entry->attack--;
  57. }
  58. if (isset($_GET['defense_up'])) {
  59. $xml->entry->defense++;
  60. }
  61. if (isset($_GET['defense_down'])) {
  62. $xml->entry->defense--;
  63. }
  64. if (isset($_GET['eco_verte_plus']) && $xml->entry->ecos->verte<5) {
  65. $xml->entry->ecos->verte++;
  66. }
  67. if (isset($_GET['eco_verte_moins']) && $xml->entry->ecos->verte>0) {
  68. $xml->entry->ecos->verte--;
  69. }
  70. if (isset($_GET['eco_bleue_plus']) && $xml->entry->ecos->bleue<5) {
  71. $xml->entry->ecos->bleue++;
  72. }
  73. if (isset($_GET['eco_bleue_moins']) && $xml->entry->ecos->bleue>0) {
  74. $xml->entry->ecos->bleue--;
  75. }
  76. if (isset($_GET['eco_jaune_plus']) && $xml->entry->ecos->jaune<5) {
  77. $xml->entry->ecos->jaune++;
  78. }
  79. if (isset($_GET['eco_jaune_moins']) && $xml->entry->ecos->jaune>0) {
  80. $xml->entry->ecos->jaune--;
  81. }
  82. if (isset($_GET['eco_rouge_plus']) && $xml->entry->ecos->rouge<5) {
  83. $xml->entry->ecos->rouge++;
  84. }
  85. if (isset($_GET['eco_rouge_moins']) && $xml->entry->ecos->rouge>0) {
  86. $xml->entry->ecos->rouge--;
  87. }
  88. if (isset($_GET['eco_blanche_plus']) && $xml->entry->ecos->blanche<5) {
  89. $xml->entry->ecos->blanche++;
  90. }
  91. if (isset($_GET['eco_blanche_moins']) && $xml->entry->ecos->blanche>0) {
  92. $xml->entry->ecos->blanche--;
  93. }
  94. if (isset($_GET['eco_noire_plus']) && $xml->entry->ecos->noire<5) {
  95. $xml->entry->ecos->noire++;
  96. }
  97. if (isset($_GET['eco_noire_moins']) && $xml->entry->ecos->noire>0) {
  98. $xml->entry->ecos->noire--;
  99. }
  100. if (isset($_GET['trans_default'])) {
  101. $xml->entry->trans="default";
  102. }
  103. if (isset($_GET['trans_light'])) {
  104. $xml->entry->trans="light";
  105. }
  106. if (isset($_GET['trans_dark'])) {
  107. $xml->entry->trans="dark";
  108. }
  109. if (isset($_GET['edit_stuff'])) {
  110. $xml->entry->stuff->stuff_1->info = $_POST["stuff_1_info"];
  111. $xml->entry->stuff->stuff_1->enchant = $_POST["stuff_1_enchant"];
  112. $xml->entry->stuff->stuff_1->spec = $_POST["stuff_1_spec"];
  113. $xml->entry->stuff->stuff_2->info = $_POST["stuff_2_info"];
  114. $xml->entry->stuff->stuff_2->enchant = $_POST["stuff_2_enchant"];
  115. $xml->entry->stuff->stuff_2->spec = $_POST["stuff_2_spec"];
  116. $xml->entry->stuff->stuff_3->info = $_POST["stuff_3_info"];
  117. $xml->entry->stuff->stuff_3->enchant = $_POST["stuff_3_enchant"];
  118. $xml->entry->stuff->stuff_3->spec = $_POST["stuff_3_spec"];
  119. $xml->entry->stuff->stuff_4->info = $_POST["stuff_4_info"];
  120. $xml->entry->stuff->stuff_4->enchant = $_POST["stuff_4_enchant"];
  121. $xml->entry->stuff->stuff_4->spec = $_POST["stuff_4_spec"];
  122. $xml->entry->stuff->stuff_5->info = $_POST["stuff_5_info"];
  123. $xml->entry->stuff->stuff_5->enchant = $_POST["stuff_5_enchant"];
  124. $xml->entry->stuff->stuff_5->spec = $_POST["stuff_5_spec"];
  125. $xml->entry->stuff->stuff_6->info = $_POST["stuff_6_info"];
  126. $xml->entry->stuff->stuff_6->enchant = $_POST["stuff_6_enchant"];
  127. $xml->entry->stuff->stuff_6->spec = $_POST["stuff_6_spec"];
  128. }
  129. if (isset($_GET['gift_plus']) && $xml->entry->gift<99999) {
  130. $xml->entry->gift++;
  131. }
  132. if (isset($_GET['gift_moins']) && $xml->entry->gift>0) {
  133. $xml->entry->gift--;
  134. }
  135. if (isset($_GET['gift_reset'])) {
  136. $xml->entry->gift=0;
  137. }
  138. $xml->asXml('../medias/'.$hash.'/'.$nom_modif.'.xml');
  139. header("location: ../medias/".$hash."/index.php?view=".$_GET['entry']);
  140. ?>