@@ -2,19 +2,20 @@ | |||||
<response> | <response> | ||||
<entry> | <entry> | ||||
<nom>Derpy</nom> | <nom>Derpy</nom> | ||||
<level>2</level> | |||||
<level>0</level> | |||||
<hp>10</hp> | <hp>10</hp> | ||||
<xp>50</xp> | |||||
<money>999</money> | |||||
<xp>0</xp> | |||||
<money>0</money> | |||||
<ecos> | <ecos> | ||||
<verte>0</verte> | <verte>0</verte> | ||||
<bleue>0</bleue> | <bleue>0</bleue> | ||||
<jaune>0</jaune> | <jaune>0</jaune> | ||||
<rouge>0</rouge> | <rouge>0</rouge> | ||||
<blanche>5</blanche> | |||||
<blanche>0</blanche> | |||||
<noire>0</noire> | <noire>0</noire> | ||||
</ecos> | </ecos> | ||||
<trans>default</trans> | <trans>default</trans> | ||||
<notes>...</notes> | <notes>...</notes> | ||||
<gift>0</gift> | |||||
</entry> | </entry> | ||||
</response> | </response> |
@@ -1,27 +0,0 @@ | |||||
<?xml version="1.0" encoding="utf-8"?> | |||||
<response> | |||||
<entry> | |||||
<nom>Meganomtrolo</nom> | |||||
<level>3</level> | |||||
<hp>10</hp> | |||||
<xp>99999</xp> | |||||
<money>99999</money> | |||||
<ecos> | |||||
<verte>1</verte> | |||||
<bleue>1</bleue> | |||||
<jaune>1</jaune> | |||||
<rouge>1</rouge> | |||||
<blanche>0</blanche> | |||||
<noire>0</noire> | |||||
</ecos> | |||||
<trans>default</trans> | |||||
<notes>Ceci est une descrition bien trop longue ! | |||||
| |||||
Avec des saut de lignes et tous. | |||||
| |||||
<br /> | |||||
<br /> | |||||
| |||||
Lorem ipsum dolor sit amet...</notes> | |||||
</entry> | |||||
</response> |
@@ -1,20 +0,0 @@ | |||||
<?xml version="1.0" encoding="utf-8"?> | |||||
<response> | |||||
<entry> | |||||
<nom>zycheron</nom> | |||||
<level>0</level> | |||||
<hp>10</hp> | |||||
<xp>0</xp> | |||||
<money>0</money> | |||||
<ecos> | |||||
<verte>0</verte> | |||||
<bleue>0</bleue> | |||||
<jaune>0</jaune> | |||||
<rouge>0</rouge> | |||||
<blanche>0</blanche> | |||||
<noire>5</noire> | |||||
</ecos> | |||||
<trans>default</trans> | |||||
<notes>...</notes> | |||||
</entry> | |||||
</response> |
@@ -16,5 +16,6 @@ | |||||
</ecos> | </ecos> | ||||
<trans>default</trans> | <trans>default</trans> | ||||
<notes>...</notes> | <notes>...</notes> | ||||
<gift>0</gift> | |||||
</entry> | </entry> | ||||
</response> | </response> |
@@ -110,6 +110,14 @@ if (isset($_GET['edit_notes'])) { | |||||
$xml->entry->notes = $_POST["notes"]; | $xml->entry->notes = $_POST["notes"]; | ||||
} | } | ||||
if (isset($_GET['gift_plus']) && $xml->entry->ecos->noire<5) { | |||||
$xml->entry->gift++; | |||||
} | |||||
if (isset($_GET['gift_moins']) && $xml->entry->ecos->noire>0) { | |||||
$xml->entry->gift--; | |||||
} | |||||
$xml->asXml('../medias/'.$hash.'/'.$nom_modif.'.xml'); | $xml->asXml('../medias/'.$hash.'/'.$nom_modif.'.xml'); | ||||
header("location: index.php"); | header("location: index.php"); | ||||
?> | ?> |
@@ -155,13 +155,17 @@ foreach($xml->entry as $entry) { | |||||
</div> | </div> | ||||
</div> | </div> | ||||
<hr /> | <hr /> | ||||
<div class="list-group"> | |||||
<div class="list-group col-lg-9"> | |||||
<a class="list-group-item"> | <a class="list-group-item"> | ||||
<button class="btn btn-default btn-xs" 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-xs" data-toggle="modal" data-target="#notes<?php echo $itemnb; ?>" style="float:right;"><i class="ionicons ion-edit"></i></button> | ||||
<h4>Notes :</h4> | <h4>Notes :</h4> | ||||
<p class="list-group-item-text"><?php echo $entry->notes ?></p> | <p class="list-group-item-text"><?php echo $entry->notes ?></p> | ||||
</a> | </a> | ||||
</div> | </div> | ||||
<div class="col-lg-3"> | |||||
<h4><i class="glyphicon glyphicon-gift" style="color:blue;";></i> <strong><?php echo $entry->gift; ?></strong></h4> | |||||
<?php button_modif_gift("gift_moins", $entry->nom, "-"); ?><?php button_modif_gift("gift_plus", $entry->nom, "+"); ?> | |||||
</div> | |||||
<!-- notes --> | <!-- 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="notes<?php echo $itemnb;?>" tabindex="-1" role="dialog" aria-labelledby="notes<?php echo $itemnb;?>" aria-hidden="true"> | ||||
<div class="modal-dialog"> | <div class="modal-dialog"> | ||||
@@ -95,6 +95,10 @@ | |||||
{ | { | ||||
echo '<form action="action.php?'.$nom_parametre.'&entry='.$nom_perso.'" method="post"><button type="submit" class="btn btn-default btn-xs">'.$texte_bouton.'</button></form>'; | echo '<form action="action.php?'.$nom_parametre.'&entry='.$nom_perso.'" method="post"><button type="submit" class="btn btn-default btn-xs">'.$texte_bouton.'</button></form>'; | ||||
} | } | ||||
function button_modif_gift($nom_parametre, $nom_perso, $texte_bouton) | |||||
{ | |||||
echo '<form action="action.php?'.$nom_parametre.'&entry='.$nom_perso.'" method="post"><button type="submit" class="btn btn-default btn-xs" style="float:left;">'.$texte_bouton.'</button></form>'; | |||||
} | |||||
// liste des gamers | // liste des gamers | ||||
$folder = "../medias/".$hash."/"; | $folder = "../medias/".$hash."/"; | ||||