Browse Source

Adaptation des fiches perso pour nouvelle gestion

master
heuzef 9 years ago
parent
commit
2ad403dfe6
3 changed files with 47 additions and 17 deletions
  1. +35
    -5
      medias/c0f08ae603e364cb554fe71c9fc94ffd/derpy.xml
  2. +2
    -2
      play/action.php
  3. +10
    -10
      play/gamers.php

+ 35
- 5
medias/c0f08ae603e364cb554fe71c9fc94ffd/derpy.xml View File

@@ -2,22 +2,52 @@
<response>
<entry>
<nom>derpy</nom>
<level>2</level>
<hp>13</hp>
<level>0</level>
<hp>18</hp>
<xp>0</xp>
<money>0</money>
<attack>0</attack>
<defense>0</defense>
<ecos>
<verte>0</verte>
<verte>2</verte>
<bleue>0</bleue>
<jaune>1</jaune>
<rouge>3</rouge>
<blanche>1</blanche>
<noire>2</noire>
</ecos>
<stuff>
<stuff_1>
<info>Épée simple</info>
<enchant>default</enchant>
<spec>0</spec>
</stuff_1>
<stuff_2>
<info>Dague</info>
<enchant>default</enchant>
<spec>0</spec>
</stuff_2>
<stuff_3>
<info>Bouclier bois</info>
<enchant>default</enchant>
<spec>0</spec>
</stuff_3>
<stuff_4>
<info>Armure métal</info>
<enchant>default</enchant>
<spec>0</spec>
</stuff_4>
<stuff_5>
<info>Potion soin</info>
<enchant>default</enchant>
<spec>Soigne 2 points de vie</spec>
</stuff_5>
<stuff_6>
<info>Livre Rouge</info>
<enchant>default</enchant>
<spec>Livre d'enchantement Rouge</spec>
</stuff_6>
</stuff>
<trans>default</trans>
<notes>Notes sur la fiche de Derpy</notes>
<gift>0</gift>
</entry>
</response>

+ 2
- 2
play/action.php View File

@@ -137,8 +137,8 @@ if (isset($_GET['trans_dark'])) {
$xml->entry->trans="dark";
}
if (isset($_GET['edit_notes'])) {
$xml->entry->notes = $_POST["notes"];
if (isset($_GET['edit_stuff'])) {
$xml->entry->stuff = $_POST["stuff"];
}
if (isset($_GET['gift_plus']) && $xml->entry->gift<99999) {


+ 10
- 10
play/gamers.php View File

@@ -172,42 +172,42 @@ foreach($xml->entry as $entry) {
<hr />
<div>
<button class="btn btn-default btn-sm" data-toggle="modal" data-target="#notes<?php echo $itemnb; ?>" style="float:right;"><i class="ionicons ion-edit"></i></button>
<button class="btn btn-default btn-sm" data-toggle="modal" data-target="#stuff<?php echo $itemnb; ?>" style="float:right;"><i class="ionicons ion-edit"></i></button>
<h3>&Eacute;quipements</h3>
</div>
<div class="row">
<div class="col-lg-4">
<h4><img src="../img/item/offensif.png" class="img-rounded">&nbsp;Offensif</h4>
<div class="bs-component">
<span class="label label-default" data-toggle="tooltip" data-placement="top" data-original-title="Place libre">Armure métal</span>
<span class="label label-default" data-toggle="tooltip" data-placement="top" data-original-title="Place libre">Armure métal</span>
<span class="label label-<?php echo $entry->stuff->stuff_1->enchant;?>" data-toggle="tooltip" data-placement="top" data-original-title="Attaque +<?php echo $entry->stuff->stuff_1->spec;?>"><?php echo $entry->stuff->stuff_1->info;?></span>
<span class="label label-<?php echo $entry->stuff->stuff_2->enchant;?>" data-toggle="tooltip" data-placement="top" data-original-title="Attaque +<?php echo $entry->stuff->stuff_2->spec;?>"><?php echo $entry->stuff->stuff_2->info;?></span>
</div>
</div>
<div class="col-lg-4">
<h4><img src="../img/item/defensif.png" class="img-rounded">&nbsp;D&eacute;fensif</h4>
<div class="bs-component">
<span class="label label-default" data-toggle="tooltip" data-placement="top" data-original-title="Place libre">Place libre ...</span>
<span class="label label-default" data-toggle="tooltip" data-placement="top" data-original-title="Place libre">Place libre ...</span>
<span class="label label-<?php echo $entry->stuff->stuff_3->enchant;?>" data-toggle="tooltip" data-placement="top" data-original-title="D&eacute;fense +<?php echo $entry->stuff->stuff_3->spec;?>"><?php echo $entry->stuff->stuff_3->info;?></span>
<span class="label label-<?php echo $entry->stuff->stuff_4->enchant;?>" data-toggle="tooltip" data-placement="top" data-original-title="D&eacute;fense +<?php echo $entry->stuff->stuff_4->spec;?>"><?php echo $entry->stuff->stuff_4->info;?></span>
</div>
</div>
<div class="col-lg-4">
<h4><img src="../img/item/objets.png" class="img-rounded">&nbsp;Objets</h4>
<div class="bs-component">
<span class="label label-default" data-toggle="tooltip" data-placement="top" data-original-title="Place libre">Armure métal</span>
<span class="label label-default" data-toggle="tooltip" data-placement="top" data-original-title="Place libre">Armure métal</span>
<span class="label label-<?php echo $entry->stuff->stuff_5->enchant;?>" data-toggle="tooltip" data-placement="top" data-original-title="<?php echo $entry->stuff->stuff_5->spec;?>"><?php echo $entry->stuff->stuff_5->info;?></span>
<span class="label label-<?php echo $entry->stuff->stuff_6->enchant;?>" data-toggle="tooltip" data-placement="top" data-original-title="<?php echo $entry->stuff->stuff_6->spec;?>"><?php echo $entry->stuff->stuff_6->info;?></span>
</div>
</div>
</div>
<!-- notes -->
<div class="modal fade" id="notes<?php echo $itemnb;?>" tabindex="-1" role="dialog" aria-labelledby="notes<?php echo $itemnb;?>" aria-hidden="true">
<div class="modal fade" id="stuff<?php echo $itemnb;?>" tabindex="-1" role="dialog" aria-labelledby="stuff<?php echo $itemnb;?>" aria-hidden="true">
<div class="modal-dialog">
<div class="modal-content">
<div class="modal-body">
<div class="container-fluid">
<div class="col-lg-12">
<form action="action.php?edit_notes&amp;entry=<?php echo $entry->nom; ?>" method="post">
<textarea name="notes" id="notes<?php echo $itemnb; ?>" cols="80" rows="10"><?php echo $entry->notes;?></textarea>
<form action="action.php?edit_stuff&amp;entry=<?php echo $entry->nom; ?>" method="post">
<textarea name="notes" id="stuff<?php echo $itemnb; ?>" cols="80" rows="10"><?php echo $entry->stuff;?></textarea>
<div class="modal-footer">
<button type="button" class="btn btn-default" data-dismiss="modal" style="float:left;">Fermer</button>
<input type="submit" class="btn btn-primary" value="Editer" />


Loading…
Cancel
Save