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

action.php 2.3 KiB

10 년 전
10 년 전
10 년 전
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101
  1. <?php $hash=md5("contact@heuzef.com"); ?>
  2. <?php
  3. $nom_modif="";
  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['hp_plus']) && $xml->entry->hp<10) {
  12. $xml->entry->hp++;
  13. }
  14. if (isset($_GET['hp_moins']) && $xml->entry->hp>0) {
  15. $xml->entry->hp--;
  16. }
  17. if (isset($_GET['xp_plus']) && $xml->entry->xp<99999) {
  18. $xml->entry->xp++;
  19. }
  20. if (isset($_GET['xp_moins']) && $xml->entry->xp>0) {
  21. $xml->entry->xp--;
  22. }
  23. if (isset($_GET['xp_plusplus']) && $xml->entry->xp<99989) {
  24. $xml->entry->xp+=10;
  25. }
  26. if (isset($_GET['xp_moinsmoins']) && $xml->entry->xp>9) {
  27. $xml->entry->xp-=10;
  28. }
  29. if (isset($_GET['eco_verte_plus']) && $xml->entry->ecos->verte<5) {
  30. $xml->entry->ecos->verte++;
  31. }
  32. if (isset($_GET['eco_verte_moins']) && $xml->entry->ecos->verte>0) {
  33. $xml->entry->ecos->verte--;
  34. }
  35. if (isset($_GET['eco_bleue_plus']) && $xml->entry->ecos->bleue<5) {
  36. $xml->entry->ecos->bleue++;
  37. }
  38. if (isset($_GET['eco_bleue_moins']) && $xml->entry->ecos->bleue>0) {
  39. $xml->entry->ecos->bleue--;
  40. }
  41. if (isset($_GET['eco_jaune_plus']) && $xml->entry->ecos->jaune<5) {
  42. $xml->entry->ecos->jaune++;
  43. }
  44. if (isset($_GET['eco_jaune_moins']) && $xml->entry->ecos->jaune>0) {
  45. $xml->entry->ecos->jaune--;
  46. }
  47. if (isset($_GET['eco_rouge_plus']) && $xml->entry->ecos->rouge<5) {
  48. $xml->entry->ecos->rouge++;
  49. }
  50. if (isset($_GET['eco_rouge_moins']) && $xml->entry->ecos->rouge>0) {
  51. $xml->entry->ecos->rouge--;
  52. }
  53. if (isset($_GET['eco_blanche_plus']) && $xml->entry->ecos->blanche<5) {
  54. $xml->entry->ecos->blanche++;
  55. }
  56. if (isset($_GET['eco_blanche_moins']) && $xml->entry->ecos->blanche>0) {
  57. $xml->entry->ecos->blanche--;
  58. }
  59. if (isset($_GET['eco_noire_plus']) && $xml->entry->ecos->noire<5) {
  60. $xml->entry->ecos->noire++;
  61. }
  62. if (isset($_GET['eco_noire_moins']) && $xml->entry->ecos->noire>0) {
  63. $xml->entry->ecos->noire--;
  64. }
  65. if (isset($_GET['trans_default'])) {
  66. $xml->entry->trans="default";
  67. }
  68. if (isset($_GET['trans_light'])) {
  69. $xml->entry->trans="light";
  70. }
  71. if (isset($_GET['trans_dark'])) {
  72. $xml->entry->trans="dark";
  73. }
  74. if (isset($_GET['edit_notes'])) {
  75. $xml->entry->notes = $_POST["notes"];
  76. }
  77. $xml->asXml('../medias/'.$hash.'/'.$nom_modif.'.xml');
  78. header("location: index.php");
  79. ?>