|
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180 |
- <?php
- $nom_modif="";
- $hash=$_GET['hash'];
-
- if (isset($_GET['entry'])) {
- $nom_modif = $_GET['entry'];
- } else {
- header("location: ./index.php");
- end;
- }
-
- $xml = simplexml_load_file('../medias/'.$hash.'/'.$nom_modif.'.xml');
-
- if (isset($_GET['level_up']) && $xml->entry->level<3) {
- $xml->entry->level++;
- }
-
- if (isset($_GET['level_down']) && $xml->entry->level>0) {
- $xml->entry->level--;
- }
-
- if (isset($_GET['heal']) && $xml->entry->hp<20 && $xml->entry->ecos->verte>0) {
- $lvl=$xml->entry->level;
- $hp=$xml->entry->hp;
- $xml->entry->hp=$hp+2+$lvl;
- $xml->entry->ecos->verte--;
- }
-
- if (isset($_GET['hp_plus']) && $xml->entry->hp<20) {
- $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['xp_reset'])) {
- $xml->entry->xp=0;
- }
-
-
- if (isset($_GET['money_plus']) && $xml->entry->money<99999) {
- $xml->entry->money+=1;
- }
-
- if (isset($_GET['money_moins']) && $xml->entry->money>0) {
- $xml->entry->money--;
- }
-
- if (isset($_GET['money_reset'])) {
- $xml->entry->money=0;
- }
-
- if (isset($_GET['attack_up'])) {
- $xml->entry->attack++;
- }
-
- if (isset($_GET['attack_down'])) {
- $xml->entry->attack--;
- }
- if (isset($_GET['defense_up'])) {
- $xml->entry->defense++;
- }
-
- if (isset($_GET['defense_down'])) {
- $xml->entry->defense--;
- }
-
- 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_stuff'])) {
- $xml->entry->stuff->stuff_1->info = $_POST["stuff_1_info"];
- $xml->entry->stuff->stuff_1->enchant = $_POST["stuff_1_enchant"];
- $xml->entry->stuff->stuff_1->spec = $_POST["stuff_1_spec"];
-
- $xml->entry->stuff->stuff_2->info = $_POST["stuff_2_info"];
- $xml->entry->stuff->stuff_2->enchant = $_POST["stuff_2_enchant"];
- $xml->entry->stuff->stuff_2->spec = $_POST["stuff_2_spec"];
-
- $xml->entry->stuff->stuff_3->info = $_POST["stuff_3_info"];
- $xml->entry->stuff->stuff_3->enchant = $_POST["stuff_3_enchant"];
- $xml->entry->stuff->stuff_3->spec = $_POST["stuff_3_spec"];
-
- $xml->entry->stuff->stuff_4->info = $_POST["stuff_4_info"];
- $xml->entry->stuff->stuff_4->enchant = $_POST["stuff_4_enchant"];
- $xml->entry->stuff->stuff_4->spec = $_POST["stuff_4_spec"];
-
- $xml->entry->stuff->stuff_5->info = $_POST["stuff_5_info"];
- $xml->entry->stuff->stuff_5->enchant = $_POST["stuff_5_enchant"];
- $xml->entry->stuff->stuff_5->spec = $_POST["stuff_5_spec"];
-
- $xml->entry->stuff->stuff_6->info = $_POST["stuff_6_info"];
- $xml->entry->stuff->stuff_6->enchant = $_POST["stuff_6_enchant"];
- $xml->entry->stuff->stuff_6->spec = $_POST["stuff_6_spec"];
- }
-
- if (isset($_GET['gift_plus']) && $xml->entry->gift<99999) {
- $xml->entry->gift++;
- }
-
- if (isset($_GET['gift_moins']) && $xml->entry->gift>0) {
- $xml->entry->gift--;
- }
-
- if (isset($_GET['gift_reset'])) {
- $xml->entry->gift=0;
- }
-
- $xml->asXml('../medias/'.$hash.'/'.$nom_modif.'.xml');
- header("location: ../medias/".$hash."/index.php?view=".$_GET['entry']);
- ?>
|