Explorar el Código

refonte tableau joueur

master
heuzef hace 9 años
padre
commit
77d18e0e5c
Se han modificado 5 ficheros con 73 adiciones y 11 borrados
  1. +20
    -8
      index.php
  2. +3
    -3
      medias/c0f08ae603e364cb554fe71c9fc94ffd/Derpy.xml
  3. +27
    -0
      medias/c0f08ae603e364cb554fe71c9fc94ffd/Meganomtrolo.xml
  4. +20
    -0
      medias/c0f08ae603e364cb554fe71c9fc94ffd/zycheron.xml
  5. +3
    -0
      new_player.php

+ 20
- 8
index.php Ver fichero

@@ -144,12 +144,11 @@ $message[6]='
<th>Nom</th>
<th><i class="ionicons ion-heart" style="color:red;"></i></th>
<th><i class="ionicons ion-flash" style="color:#FFD700;"></i></th>
<th><i class="ionicons ion-fireball" style="color:#28b62c"></i></th>
<th><i class="ionicons ion-fireball" style="color:#158cba"></i></th>
<th><i class="ionicons ion-fireball" style="color:#ffd000"></i></th>
<th><i class="ionicons ion-fireball" style="color:#ff4136"></i></th>
<th><i class="ionicons ion-egg" style="color:brown"></i></th>
<th><i class="ionicons ion-fireball" style="color:grey"></i></th>
<th><i class="ionicons ion-fireball" style="color:#ADDFFF"></i></th>
<th><i class="ionicons ion-fireball" style="color:#8128B5"></i></th>
<th><i class="ionicons ion-android-note" style="color:#000"></i></th>
</tr>
</thead>
<tbody>
@@ -176,17 +175,17 @@ $message[6]='
$itemnb++;
}
foreach($xml->entry as $entry) {
$somme_ecos=$entry->ecos->verte+$entry->ecos->bleue+$entry->ecos->jaune+$entry->ecos->rouge;
echo '<tr class="active">
<td><a href="del.php?player='.$fichier.'" class="btn btn-danger btn-xs"><i class="ionicons ion-trash-b"></i></a>&nbsp;&nbsp;<a href="./medias/'.$hash.'/'.$fichier.'" target="_blank" class="btn btn-success btn-xs"><i class="glyphicon glyphicon-export"></i></a></td>
<td>'.$entry->nom.'</td>
<td>'.$entry->hp.'</td>
<td>'.$entry->xp.'</td>
<td>'.$entry->ecos->verte.'</td>
<td>'.$entry->ecos->bleue.'</td>
<td>'.$entry->ecos->jaune.'</td>
<td>'.$entry->ecos->rouge.'</td>
<td>'.$entry->money.'</td>
<td>'.$somme_ecos.'</td>
<td>'.$entry->ecos->blanche.'</td>
<td>'.$entry->ecos->noire.'</td>
<td>'.substr($entry->notes, 0, 40).'...</td>
</tr>';
}
}
@@ -227,6 +226,19 @@ $message[6]='
</select>
</div>
</div>
<div class="form-group">
<label class="control-label" for="focusedInput">Nombre d'Orbes</label>
<div class="input-group">
<span class="input-group-addon"><i class="ionicons ion-egg" style="color:brown;";></i></span>
<select class="form-control" id="focusedInput" name="player_money">
<option>0</option>
<option>10</option>
<option>50</option>
<option>100</option>
<option>999</option>
</select>
</div>
</div>
</div>
<div class="modal-footer">
<button type="submit" class="btn btn-info">Création du joueur</button>


+ 3
- 3
medias/c0f08ae603e364cb554fe71c9fc94ffd/Derpy.xml Ver fichero

@@ -4,14 +4,14 @@
<nom>Derpy</nom>
<level>0</level>
<hp>10</hp>
<xp>0</xp>
<money>0</money>
<xp>50</xp>
<money>999</money>
<ecos>
<verte>0</verte>
<bleue>0</bleue>
<jaune>0</jaune>
<rouge>0</rouge>
<blanche>0</blanche>
<blanche>5</blanche>
<noire>0</noire>
</ecos>
<trans>default</trans>


+ 27
- 0
medias/c0f08ae603e364cb554fe71c9fc94ffd/Meganomtrolo.xml Ver fichero

@@ -0,0 +1,27 @@
<?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>

+ 20
- 0
medias/c0f08ae603e364cb554fe71c9fc94ffd/zycheron.xml Ver fichero

@@ -0,0 +1,20 @@
<?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>

+ 3
- 0
new_player.php Ver fichero

@@ -2,6 +2,7 @@
include "header.php";
$player_name=$_POST['player_name'];
$player_xp=$_POST['player_xp'];
$player_money=$_POST['player_money'];
copy("medias/default/player.xml", "medias/".$hash."/".$player_name.".xml");

$xml = simplexml_load_file('./medias/'.$hash.'/'.$player_name.'.xml');
@@ -10,6 +11,8 @@ $xml->entry->nom = $player_name;

$xml->entry->xp = $player_xp;

$xml->entry->money = $player_money;

$xml->asXml('./medias/'.$hash.'/'.$player_name.'.xml');

header("location: index.php");

Cargando…
Cancelar
Guardar