Sfoglia il codice sorgente

compteur gift pou DDR

master
heuzef 10 anni fa
parent
commit
58d5c17827
7 ha cambiato i file con 23 aggiunte e 52 eliminazioni
  1. +5
    -4
      medias/c0f08ae603e364cb554fe71c9fc94ffd/Derpy.xml
  2. +0
    -27
      medias/c0f08ae603e364cb554fe71c9fc94ffd/Meganomtrolo.xml
  3. +0
    -20
      medias/c0f08ae603e364cb554fe71c9fc94ffd/zycheron.xml
  4. +1
    -0
      medias/default/player.xml
  5. +8
    -0
      play/action.php
  6. +5
    -1
      play/gamers.php
  7. +4
    -0
      play/index.php

+ 5
- 4
medias/c0f08ae603e364cb554fe71c9fc94ffd/Derpy.xml Vedi File

@@ -2,19 +2,20 @@
<response>
<entry>
<nom>Derpy</nom>
<level>2</level>
<level>0</level>
<hp>10</hp>
<xp>50</xp>
<money>999</money>
<xp>0</xp>
<money>0</money>
<ecos>
<verte>0</verte>
<bleue>0</bleue>
<jaune>0</jaune>
<rouge>0</rouge>
<blanche>5</blanche>
<blanche>0</blanche>
<noire>0</noire>
</ecos>
<trans>default</trans>
<notes>...</notes>
<gift>0</gift>
</entry>
</response>

+ 0
- 27
medias/c0f08ae603e364cb554fe71c9fc94ffd/Meganomtrolo.xml Vedi File

@@ -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 !&#13;
&#13;
Avec des saut de lignes et tous.&#13;
&#13;
&lt;br /&gt;&#13;
&lt;br /&gt;&#13;
&#13;
Lorem ipsum dolor sit amet...</notes>
</entry>
</response>

+ 0
- 20
medias/c0f08ae603e364cb554fe71c9fc94ffd/zycheron.xml Vedi File

@@ -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>

+ 1
- 0
medias/default/player.xml Vedi File

@@ -16,5 +16,6 @@
</ecos>
<trans>default</trans>
<notes>...</notes>
<gift>0</gift>
</entry>
</response>

+ 8
- 0
play/action.php Vedi File

@@ -110,6 +110,14 @@ if (isset($_GET['edit_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');
header("location: index.php");
?>

+ 5
- 1
play/gamers.php Vedi File

@@ -155,13 +155,17 @@ foreach($xml->entry as $entry) {
</div>
</div>
<hr />
<div class="list-group">
<div class="list-group col-lg-9">
<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>
<h4>Notes :</h4>
<p class="list-group-item-text"><?php echo $entry->notes ?></p>
</a>
</div>
<div class="col-lg-3">
<h4><i class="glyphicon glyphicon-gift" style="color:blue;";></i>&nbsp;<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 -->
<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">


+ 4
- 0
play/index.php Vedi File

@@ -95,6 +95,10 @@
{
echo '<form action="action.php?'.$nom_parametre.'&amp;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.'&amp;entry='.$nom_perso.'" method="post"><button type="submit" class="btn btn-default btn-xs" style="float:left;">'.$texte_bouton.'</button></form>';
}

// liste des gamers
$folder = "../medias/".$hash."/";


Caricamento…
Annulla
Salva