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.

action.php 2.8 KiB

10 vuotta sitten
10 vuotta sitten
10 vuotta sitten
10 vuotta sitten
10 vuotta sitten
10 vuotta sitten
10 vuotta sitten
10 vuotta sitten
10 vuotta sitten
10 vuotta sitten
10 vuotta sitten
10 vuotta sitten
10 vuotta sitten
10 vuotta sitten
10 vuotta sitten
10 vuotta sitten
10 vuotta sitten
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123
  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['money_moins']) && $xml->entry->money>0) {
  32. $xml->entry->money--;
  33. }
  34. if (isset($_GET['money_plus']) && $xml->entry->money<99999) {
  35. $xml->entry->money+=1;
  36. }
  37. if (isset($_GET['xp_moinsmoins']) && $xml->entry->xp>9) {
  38. $xml->entry->xp-=10;
  39. }
  40. if (isset($_GET['eco_verte_plus']) && $xml->entry->ecos->verte<5) {
  41. $xml->entry->ecos->verte++;
  42. }
  43. if (isset($_GET['eco_verte_moins']) && $xml->entry->ecos->verte>0) {
  44. $xml->entry->ecos->verte--;
  45. }
  46. if (isset($_GET['eco_bleue_plus']) && $xml->entry->ecos->bleue<5) {
  47. $xml->entry->ecos->bleue++;
  48. }
  49. if (isset($_GET['eco_bleue_moins']) && $xml->entry->ecos->bleue>0) {
  50. $xml->entry->ecos->bleue--;
  51. }
  52. if (isset($_GET['eco_jaune_plus']) && $xml->entry->ecos->jaune<5) {
  53. $xml->entry->ecos->jaune++;
  54. }
  55. if (isset($_GET['eco_jaune_moins']) && $xml->entry->ecos->jaune>0) {
  56. $xml->entry->ecos->jaune--;
  57. }
  58. if (isset($_GET['eco_rouge_plus']) && $xml->entry->ecos->rouge<5) {
  59. $xml->entry->ecos->rouge++;
  60. }
  61. if (isset($_GET['eco_rouge_moins']) && $xml->entry->ecos->rouge>0) {
  62. $xml->entry->ecos->rouge--;
  63. }
  64. if (isset($_GET['eco_blanche_plus']) && $xml->entry->ecos->blanche<5) {
  65. $xml->entry->ecos->blanche++;
  66. }
  67. if (isset($_GET['eco_blanche_moins']) && $xml->entry->ecos->blanche>0) {
  68. $xml->entry->ecos->blanche--;
  69. }
  70. if (isset($_GET['eco_noire_plus']) && $xml->entry->ecos->noire<5) {
  71. $xml->entry->ecos->noire++;
  72. }
  73. if (isset($_GET['eco_noire_moins']) && $xml->entry->ecos->noire>0) {
  74. $xml->entry->ecos->noire--;
  75. }
  76. if (isset($_GET['trans_default'])) {
  77. $xml->entry->trans="default";
  78. }
  79. if (isset($_GET['trans_light'])) {
  80. $xml->entry->trans="light";
  81. }
  82. if (isset($_GET['trans_dark'])) {
  83. $xml->entry->trans="dark";
  84. }
  85. if (isset($_GET['edit_notes'])) {
  86. $xml->entry->notes = $_POST["notes"];
  87. }
  88. if (isset($_GET['gift_plus']) && $xml->entry->gift<99999) ) {
  89. $xml->entry->gift++;
  90. }
  91. if (isset($_GET['gift_moins']) && $xml->entry->gift>0) {
  92. $xml->entry->gift--;
  93. }
  94. $xml->asXml('../medias/'.$hash.'/'.$nom_modif.'.xml');
  95. header("location: index.php");
  96. ?>