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

action_enemy.php 511 B

123456789101112131415161718192021222324
  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.'/enemy/'.$nom_modif.'.xml');
  10. if (isset($_GET['hp_plus']) && $xml->entry->hp<3) {
  11. $xml->entry->hp++;
  12. }
  13. if (isset($_GET['hp_moins']) && $xml->entry->hp>0) {
  14. $xml->entry->hp--;
  15. }
  16. $xml->asXml('../medias/'.$hash.'/enemy/'.$nom_modif.'.xml');
  17. header("location: index.php");
  18. ?>