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