From b4d054e36c38e890bf76a1892cb48264e7f2f7d0 Mon Sep 17 00:00:00 2001 From: heuzef Date: Tue, 24 Jun 2014 20:11:00 +0200 Subject: [PATCH] edit notes et players --- action.php | 194 ++++++++++++++++----------------- gamers.php | 313 +++++++++++++++++++++++++++-------------------------- gamers/Player.xml | 18 --- gamers/Prout.xml | 18 --- gamers/player1.xml | 18 +++ gamers/player2.xml | 18 +++ gamers/player3.xml | 18 +++ index.php | 8 -- 8 files changed, 310 insertions(+), 295 deletions(-) mode change 100755 => 100644 action.php mode change 100755 => 100644 gamers.php delete mode 100755 gamers/Player.xml delete mode 100755 gamers/Prout.xml create mode 100755 gamers/player1.xml create mode 100644 gamers/player2.xml create mode 100644 gamers/player3.xml diff --git a/action.php b/action.php old mode 100755 new mode 100644 index dcd12b1..3612131 --- a/action.php +++ b/action.php @@ -1,98 +1,98 @@ -entry->hp<10) { - $xml->entry->hp++; -} - -if (isset($_GET['hp_moins']) && $xml->entry->hp>0) { - $xml->entry->hp--; -} - -if (isset($_GET['xp_plus']) && $xml->entry->xp<99999) { - $xml->entry->xp++; -} - -if (isset($_GET['xp_moins']) && $xml->entry->xp>0) { - $xml->entry->xp--; -} - -if (isset($_GET['xp_plusplus']) && $xml->entry->xp<99989) { - $xml->entry->xp+=10; -} - -if (isset($_GET['xp_moinsmoins']) && $xml->entry->xp>9) { - $xml->entry->xp-=10; -} - -if (isset($_GET['eco_verte_plus']) && $xml->entry->ecos->verte<5) { - $xml->entry->ecos->verte++; -} -if (isset($_GET['eco_verte_moins']) && $xml->entry->ecos->verte>0) { - $xml->entry->ecos->verte--; -} - -if (isset($_GET['eco_bleue_plus']) && $xml->entry->ecos->bleue<5) { - $xml->entry->ecos->bleue++; -} -if (isset($_GET['eco_bleue_moins']) && $xml->entry->ecos->bleue>0) { - $xml->entry->ecos->bleue--; -} - -if (isset($_GET['eco_jaune_plus']) && $xml->entry->ecos->jaune<5) { - $xml->entry->ecos->jaune++; -} -if (isset($_GET['eco_jaune_moins']) && $xml->entry->ecos->jaune>0) { - $xml->entry->ecos->jaune--; -} - -if (isset($_GET['eco_rouge_plus']) && $xml->entry->ecos->rouge<5) { - $xml->entry->ecos->rouge++; -} -if (isset($_GET['eco_rouge_moins']) && $xml->entry->ecos->rouge>0) { - $xml->entry->ecos->rouge--; -} - -if (isset($_GET['eco_blanche_plus']) && $xml->entry->ecos->blanche<5) { - $xml->entry->ecos->blanche++; -} -if (isset($_GET['eco_blanche_moins']) && $xml->entry->ecos->blanche>0) { - $xml->entry->ecos->blanche--; -} - -if (isset($_GET['eco_noire_plus']) && $xml->entry->ecos->noire<5) { - $xml->entry->ecos->noire++; -} - -if (isset($_GET['eco_noire_moins']) && $xml->entry->ecos->noire>0) { - $xml->entry->ecos->noire--; -} - -if (isset($_GET['trans_default'])) { - $xml->entry->trans="default"; -} - -if (isset($_GET['trans_light'])) { - $xml->entry->trans="light"; -} - -if (isset($_GET['trans_dark'])) { - $xml->entry->trans="dark"; -} - -if (isset($_POST['edit_notes'])) { - $xml->entry->notes = $_POST["edit_notes"]; -} - -$xml->asXml('./gamers/'.$nom_modif.'.xml'); -header("location: index.php"); +entry->hp<10) { + $xml->entry->hp++; +} + +if (isset($_GET['hp_moins']) && $xml->entry->hp>0) { + $xml->entry->hp--; +} + +if (isset($_GET['xp_plus']) && $xml->entry->xp<99999) { + $xml->entry->xp++; +} + +if (isset($_GET['xp_moins']) && $xml->entry->xp>0) { + $xml->entry->xp--; +} + +if (isset($_GET['xp_plusplus']) && $xml->entry->xp<99989) { + $xml->entry->xp+=10; +} + +if (isset($_GET['xp_moinsmoins']) && $xml->entry->xp>9) { + $xml->entry->xp-=10; +} + +if (isset($_GET['eco_verte_plus']) && $xml->entry->ecos->verte<5) { + $xml->entry->ecos->verte++; +} +if (isset($_GET['eco_verte_moins']) && $xml->entry->ecos->verte>0) { + $xml->entry->ecos->verte--; +} + +if (isset($_GET['eco_bleue_plus']) && $xml->entry->ecos->bleue<5) { + $xml->entry->ecos->bleue++; +} +if (isset($_GET['eco_bleue_moins']) && $xml->entry->ecos->bleue>0) { + $xml->entry->ecos->bleue--; +} + +if (isset($_GET['eco_jaune_plus']) && $xml->entry->ecos->jaune<5) { + $xml->entry->ecos->jaune++; +} +if (isset($_GET['eco_jaune_moins']) && $xml->entry->ecos->jaune>0) { + $xml->entry->ecos->jaune--; +} + +if (isset($_GET['eco_rouge_plus']) && $xml->entry->ecos->rouge<5) { + $xml->entry->ecos->rouge++; +} +if (isset($_GET['eco_rouge_moins']) && $xml->entry->ecos->rouge>0) { + $xml->entry->ecos->rouge--; +} + +if (isset($_GET['eco_blanche_plus']) && $xml->entry->ecos->blanche<5) { + $xml->entry->ecos->blanche++; +} +if (isset($_GET['eco_blanche_moins']) && $xml->entry->ecos->blanche>0) { + $xml->entry->ecos->blanche--; +} + +if (isset($_GET['eco_noire_plus']) && $xml->entry->ecos->noire<5) { + $xml->entry->ecos->noire++; +} + +if (isset($_GET['eco_noire_moins']) && $xml->entry->ecos->noire>0) { + $xml->entry->ecos->noire--; +} + +if (isset($_GET['trans_default'])) { + $xml->entry->trans="default"; +} + +if (isset($_GET['trans_light'])) { + $xml->entry->trans="light"; +} + +if (isset($_GET['trans_dark'])) { + $xml->entry->trans="dark"; +} + +if (isset($_GET['edit_notes'])) { + $xml->entry->notes = $_POST["notes"]; +} + +$xml->asXml('./gamers/'.$nom_modif.'.xml'); +header("location: index.php"); ?> \ No newline at end of file diff --git a/gamers.php b/gamers.php old mode 100755 new mode 100644 index 2a80208..8953da2 --- a/gamers.php +++ b/gamers.php @@ -1,155 +1,160 @@ -entry as $entry) { -?> - - -
-
-
-
-
-

nom; ?>

-
-
-

 hp; ?>

-
-
-

 xp; ?>

-
-
-
-
-
- nom, "#8128B5"); ?> - nom, "#ADDFFF"); ?> - nom, "#AAA"); ?> -
-
- nom, "-"); ?>nom, "+"); ?> -
-
- nom, "--"); ?>nom, "-"); ?>nom, "+"); ?>nom, "++"); ?> -
-
-
- -
-
-
- nom, "-"); ?> -
-
-
-
ecos->verte; ?>
-
-
-
- nom, "+"); ?> -
-
- -
-
- nom, "-"); ?> -
-
-
-
ecos->bleue; ?>
-
-
-
- nom, "+"); ?> -
-
- -
-
- nom, "-"); ?> -
-
-
-
ecos->jaune; ?>
-
-
-
- nom, "+"); ?> -
-
- -
-
- nom, "-"); ?> -
-
-
-
ecos->rouge; ?>
-
-
-
- nom, "+"); ?> -
-
-
-
-
- nom, "-"); ?> -
-
-
-
ecos->blanche; ?>
-
-
-
- nom, "+"); ?> -
-
- -
-
- nom, "-"); ?> -
-
-
-
ecos->noire; ?>
-
-
-
- nom, "+"); ?> -
-
-
- - - -
-
-
- - +entry as $entry) { +?> + + +
+
+
+
+
+

nom; ?>

+
+
+

 hp; ?>

+
+
+

 xp; ?>

+
+
+
+
+
+ nom, "#8128B5"); ?> + nom, "#ADDFFF"); ?> + nom, "#AAA"); ?> +
+
+ nom, "-"); ?>nom, "+"); ?> +
+
+ nom, "--"); ?>nom, "-"); ?>nom, "+"); ?>nom, "++"); ?> +
+
+
+ +
+
+
+ nom, "-"); ?> +
+
+
+
ecos->verte; ?>
+
+
+
+ nom, "+"); ?> +
+
+ +
+
+ nom, "-"); ?> +
+
+
+
ecos->bleue; ?>
+
+
+
+ nom, "+"); ?> +
+
+ +
+
+ nom, "-"); ?> +
+
+
+
ecos->jaune; ?>
+
+
+
+ nom, "+"); ?> +
+
+ +
+
+ nom, "-"); ?> +
+
+
+
ecos->rouge; ?>
+
+
+
+ nom, "+"); ?> +
+
+
+
+
+ nom, "-"); ?> +
+
+
+
ecos->blanche; ?>
+
+
+
+ nom, "+"); ?> +
+
+ +
+
+ nom, "-"); ?> +
+
+
+
ecos->noire; ?>
+
+
+
+ nom, "+"); ?> +
+
+
+ + + +
+
+
+ + \ No newline at end of file diff --git a/gamers/Player.xml b/gamers/Player.xml deleted file mode 100755 index 282ba5c..0000000 --- a/gamers/Player.xml +++ /dev/null @@ -1,18 +0,0 @@ - - - - Player - 10 - 10 - - 0 - 0 - 0 - 0 - 0 - 0 - - default - Lorem ipsum dolor sit amet. - - diff --git a/gamers/Prout.xml b/gamers/Prout.xml deleted file mode 100755 index 00b9b41..0000000 --- a/gamers/Prout.xml +++ /dev/null @@ -1,18 +0,0 @@ - - - - Prout - 10 - 10 - - 1 - 1 - 0 - 0 - 1 - 0 - - default - Lorem ipsum dolor sit amet. - - diff --git a/gamers/player1.xml b/gamers/player1.xml new file mode 100755 index 0000000..76df5fb --- /dev/null +++ b/gamers/player1.xml @@ -0,0 +1,18 @@ + + + + player1 + 10 + 10 + + 0 + 0 + 0 + 0 + 0 + 0 + + default + + + diff --git a/gamers/player2.xml b/gamers/player2.xml new file mode 100644 index 0000000..0771b38 --- /dev/null +++ b/gamers/player2.xml @@ -0,0 +1,18 @@ + + + + player2 + 10 + 10 + + 0 + 0 + 0 + 0 + 0 + 0 + + default + + + diff --git a/gamers/player3.xml b/gamers/player3.xml new file mode 100644 index 0000000..a241989 --- /dev/null +++ b/gamers/player3.xml @@ -0,0 +1,18 @@ + + + + player3 + 10 + 10 + + 0 + 0 + 0 + 0 + 0 + 0 + + default + + + diff --git a/index.php b/index.php index d3664d1..e7ceab5 100755 --- a/index.php +++ b/index.php @@ -1,5 +1,4 @@ - @@ -8,7 +7,6 @@ - @@ -18,12 +16,6 @@
- - - - - -