25개 이상의 토픽을 선택하실 수 없습니다. Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 

152 lines
3.4 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['hp_plus']) && $xml->entry->hp<20) {
  17. $xml->entry->hp++;
  18. }
  19. if (isset($_GET['hp_moins']) && $xml->entry->hp>0) {
  20. $xml->entry->hp--;
  21. }
  22. if (isset($_GET['xp_plus']) && $xml->entry->xp<99999) {
  23. $xml->entry->xp++;
  24. }
  25. if (isset($_GET['xp_moins']) && $xml->entry->xp>0) {
  26. $xml->entry->xp--;
  27. }
  28. if (isset($_GET['xp_plusplus']) && $xml->entry->xp<99989) {
  29. $xml->entry->xp+=10;
  30. }
  31. if (isset($_GET['xp_moinsmoins']) && $xml->entry->xp>9) {
  32. $xml->entry->xp-=10;
  33. }
  34. if (isset($_GET['xp_reset'])) {
  35. $xml->entry->xp=0;
  36. }
  37. if (isset($_GET['money_plus']) && $xml->entry->money<99999) {
  38. $xml->entry->money+=1;
  39. }
  40. if (isset($_GET['money_moins']) && $xml->entry->money>0) {
  41. $xml->entry->money--;
  42. }
  43. if (isset($_GET['money_reset'])) {
  44. $xml->entry->money=0;
  45. }
  46. if (isset($_GET['attack_up'])) {
  47. $xml->entry->attack++;
  48. }
  49. if (isset($_GET['attack_down'])) {
  50. $xml->entry->attack--;
  51. }
  52. if (isset($_GET['defense_up'])) {
  53. $xml->entry->defense++;
  54. }
  55. if (isset($_GET['defense_down'])) {
  56. $xml->entry->defense--;
  57. }
  58. if (isset($_GET['eco_verte_plus']) && $xml->entry->ecos->verte<5) {
  59. $xml->entry->ecos->verte++;
  60. }
  61. if (isset($_GET['eco_verte_moins']) && $xml->entry->ecos->verte>0) {
  62. $xml->entry->ecos->verte--;
  63. }
  64. if (isset($_GET['eco_bleue_plus']) && $xml->entry->ecos->bleue<5) {
  65. $xml->entry->ecos->bleue++;
  66. }
  67. if (isset($_GET['eco_bleue_moins']) && $xml->entry->ecos->bleue>0) {
  68. $xml->entry->ecos->bleue--;
  69. }
  70. if (isset($_GET['eco_jaune_plus']) && $xml->entry->ecos->jaune<5) {
  71. $xml->entry->ecos->jaune++;
  72. }
  73. if (isset($_GET['eco_jaune_moins']) && $xml->entry->ecos->jaune>0) {
  74. $xml->entry->ecos->jaune--;
  75. }
  76. if (isset($_GET['eco_rouge_plus']) && $xml->entry->ecos->rouge<5) {
  77. $xml->entry->ecos->rouge++;
  78. }
  79. if (isset($_GET['eco_rouge_moins']) && $xml->entry->ecos->rouge>0) {
  80. $xml->entry->ecos->rouge--;
  81. }
  82. if (isset($_GET['eco_blanche_plus']) && $xml->entry->ecos->blanche<5) {
  83. $xml->entry->ecos->blanche++;
  84. }
  85. if (isset($_GET['eco_blanche_moins']) && $xml->entry->ecos->blanche>0) {
  86. $xml->entry->ecos->blanche--;
  87. }
  88. if (isset($_GET['eco_noire_plus']) && $xml->entry->ecos->noire<5) {
  89. $xml->entry->ecos->noire++;
  90. }
  91. if (isset($_GET['eco_noire_moins']) && $xml->entry->ecos->noire>0) {
  92. $xml->entry->ecos->noire--;
  93. }
  94. if (isset($_GET['trans_default'])) {
  95. $xml->entry->trans="default";
  96. }
  97. if (isset($_GET['trans_light'])) {
  98. $xml->entry->trans="light";
  99. }
  100. if (isset($_GET['trans_dark'])) {
  101. $xml->entry->trans="dark";
  102. }
  103. if (isset($_GET['edit_notes'])) {
  104. $xml->entry->notes = $_POST["notes"];
  105. }
  106. if (isset($_GET['gift_plus']) && $xml->entry->gift<99999) {
  107. $xml->entry->gift++;
  108. }
  109. if (isset($_GET['gift_moins']) && $xml->entry->gift>0) {
  110. $xml->entry->gift--;
  111. }
  112. if (isset($_GET['gift_reset'])) {
  113. $xml->entry->gift=0;
  114. }
  115. $xml->asXml('../medias/'.$hash.'/'.$nom_modif.'.xml');
  116. header("location: ../medias/".$hash."/index.php?view=".$_GET['entry']);
  117. ?>