Browse Source

Mise à jour du Phone View

master
heuzef 9 years ago
parent
commit
23e21a8c30
4 changed files with 80 additions and 36 deletions
  1. +1
    -1
      css/bootstrap.css
  2. +11
    -11
      medias/c0f08ae603e364cb554fe71c9fc94ffd/derpy.xml
  3. +37
    -22
      medias/c0f08ae603e364cb554fe71c9fc94ffd/index.php
  4. +31
    -2
      play/action_phone.php

+ 1
- 1
css/bootstrap.css View File

@@ -4335,7 +4335,7 @@ select[multiple].input-group-sm > .input-group-btn > .btn {
vertical-align: baseline;
white-space: nowrap;
text-align: center;
background-color: #158cba;
background-color: #999999;
border-radius: 10px;
}
.badge:empty {


+ 11
- 11
medias/c0f08ae603e364cb554fe71c9fc94ffd/derpy.xml View File

@@ -2,8 +2,8 @@
<response>
<entry>
<nom>derpy</nom>
<level>0</level>
<hp>10</hp>
<level>2</level>
<hp>22</hp>
<xp>50</xp>
<money>5</money>
<attack>0</attack>
@@ -18,19 +18,19 @@
</ecos>
<stuff>
<stuff_1>
<info>Vide</info>
<enchant>default</enchant>
<spec>0</spec>
<info>Épée de mort</info>
<enchant>rouge</enchant>
<spec>2</spec>
</stuff_1>
<stuff_2>
<info>Vide</info>
<enchant>default</enchant>
<spec>0</spec>
<info>Armure métalique</info>
<enchant>bleue</enchant>
<spec>1</spec>
</stuff_2>
<stuff_3>
<info>Vide</info>
<enchant>default</enchant>
<spec>Emplacement vide</spec>
<info>Pot. soin</info>
<enchant>verte</enchant>
<spec>Une potion de soin rétablissant 2 PV</spec>
</stuff_3>
<stuff_4>
<info>Vide</info>


+ 37
- 22
medias/c0f08ae603e364cb554fe71c9fc94ffd/index.php View File

@@ -1,31 +1,31 @@
<?php
function button_modif_level($nom_parametre, $nom_perso, $texte_bouton)
{
echo '<form action="../../play/action_phone.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>';
echo '<form action="../../play/action_phone.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_hp($nom_parametre, $nom_perso, $texte_bouton)
{
echo '<form action="../../play/action_phone.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>';
echo '<form action="../../play/action_phone.php?'.$nom_parametre.'&amp;entry='.$nom_perso.'" method="post"><button type="submit" class="btn btn-default btn-sm" style="float:left">'.$texte_bouton.'</button></form>';
}
function button_modif_xp($nom_parametre, $nom_perso, $texte_bouton)
{
echo '<form action="../../play/action_phone.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>';
echo '<form action="../../play/action_phone.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_money($nom_parametre, $nom_perso, $texte_bouton)
{
echo '<form action="../../play/action_phone.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>';
echo '<form action="../../play/action_phone.php?'.$nom_parametre.'&amp;entry='.$nom_perso.'" method="post"><button type="submit" class="btn btn-default btn-xs">'.$texte_bouton.'</button></form>';
}
function trans($nom_parametre, $nom_perso, $couleur)
{
echo '<form action="../../play/action_phone.php?'.$nom_parametre.'&amp;entry='.$nom_perso.'" method="post"><button type="submit" class="btn btn-default btn-xs" style="float:right;"><i class="ionicons ion-fireball" style="color:'.$couleur.'";></i></button></form>';
echo '<form action="../../play/action_phone.php?'.$nom_parametre.'&amp;entry='.$nom_perso.'" method="post"><button type="submit" class="btn btn-default btn-xs"><i class="ionicons ion-fireball" style="color:'.$couleur.'";></i></button></form>';
}
function button_modif_attack($nom_parametre, $nom_perso, $texte_bouton)
{
echo '<form action="../../play/action_phone.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>';
echo '<form action="../../play/action_phone.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_defense($nom_parametre, $nom_perso, $texte_bouton)
{
echo '<form action="../../play/action_phone.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>';
echo '<form action="../../play/action_phone.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_ecos($nom_parametre, $nom_perso, $texte_bouton)
{
@@ -33,7 +33,7 @@
}
function button_modif_gift($nom_parametre, $nom_perso, $texte_bouton)
{
echo '<form action="../../play/action_phone.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>';
echo '<form action="../../play/action_phone.php?'.$nom_parametre.'&amp;entry='.$nom_perso.'" method="post"><button type="submit" class="btn btn-default btn-xs">'.$texte_bouton.'</button></form>';
}
?>

@@ -59,17 +59,19 @@ if(!empty($_GET["view"]))

<!-- phoneview -->
<div class="well">
<a href="index.php" class="btn btn-default btn-lg"><i class="ionicons ion-arrow-left-a"></i></a>
<a href="index.php?view=<?php echo $entry->nom; ?>" class="btn btn-info btn-lg"><i class="ionicons ion-refresh"></i>&nbsp;Recharger</a>
<a href="http://wiki.ecomonde.land/doku.php?id=wiki:equipements" class="btn btn-default btn-lg" target="_blank"><i class="ionicons ion-android-book"></i>&nbsp;&nbsp;Wiki:Equipements</a>
<a href="index.php" class="btn btn-default"><i class="ionicons ion-arrow-left-a"></i></a>
<a href="index.php?view=<?php echo $entry->nom; ?>" class="btn btn-info"><i class="ionicons ion-refresh"></i></a>
<a href="http://wiki.ecomonde.land/doku.php?id=wiki:equipements" class="btn btn-default" target="_blank"><i class="ionicons ion-android-book"></i>&nbsp;&nbsp;&Eacute;quipements</a>
<a href="http://wiki.ecomonde.land/doku.php?id=wiki:enchantements" class="btn btn-default" target="_blank"><i class="ionicons ion-android-book"></i>&nbsp;&nbsp;Enchantements</a>
</div>
<hr />
<div class="panel panel-<?php echo $entry->trans; ?>">
<div class="panel-heading">
<div class="container-fluid">
<span class="level_phone"><?php echo $entry->level; ?></span>&nbsp;&nbsp;&nbsp;
<span class="player_name_phone"><?php echo $entry->nom; ?></span>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
<span class="player_name_phone"><?php echo $entry->nom; ?></span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
<strong>Attaque</strong> <span class="skill_phone">+ <?php echo $entry->attack+$entry->level+$entry->stuff->stuff_1->spec; ?></span>&nbsp;&nbsp;&nbsp;
<strong>D&eacute;fense</strong> <span class="skill_phone">+ <?php echo $entry->defense+$entry->level+$entry->stuff->stuff_2->spec; ?></span>
<?php
$hp_max="10";
switch ($entry->level)
@@ -90,10 +92,12 @@ if(!empty($_GET["view"]))
echo "?";
}
?>
<i class="ionicons ion-heart" style="color:red;";></i>&nbsp;<strong><?php echo $entry->hp; ?></strong><sub>/<?php echo $hp_max; ?></sub>&nbsp;&nbsp;&nbsp;
<i class="ionicons ion-egg" style="color:brown;";></i>&nbsp;<strong><?php echo $entry->money; ?></strong>&nbsp;&nbsp;&nbsp;
<i class="ionicons ion-flash" style="color:#FFD700;";></i>&nbsp;<strong><?php echo $entry->xp; ?></strong>&nbsp;&nbsp;&nbsp;
<i class="glyphicon glyphicon-gift" style="color:blue;";></i>&nbsp;<strong><?php echo $entry->gift; ?></strong>&nbsp;&nbsp;&nbsp;
<h3>
<?php button_modif_hp("heal", $entry->nom, "<strong style='color:green;'>-1</strong>&nbsp;<i class='ionicons ion-fireball' style='color:green;'></i>"); ?>&nbsp;&nbsp;&nbsp;
<i class="ionicons ion-heart" style="color:red;";></i>&nbsp;<strong><?php echo $entry->hp; ?></strong><sub>/<?php echo $hp_max; ?></sub>&nbsp;&nbsp;&nbsp;
<i class="ionicons ion-egg" style="color:brown;";></i>&nbsp;<strong><?php echo $entry->money; ?></strong>&nbsp;&nbsp;&nbsp;
<i class="ionicons ion-flash" style="color:#FFD700;";></i>&nbsp;<strong><?php echo $entry->xp; ?></strong>&nbsp;&nbsp;&nbsp;
</h3>
</div>
<hr />
<div class="panel-body">
@@ -186,12 +190,23 @@ if(!empty($_GET["view"]))

</div>
<hr />
<h3>Prise de note</h3>
<h3>&Eacute;quipements</h3>
<div class="col-lg-9">
<form action="../../play/action_phone.php?edit_notes&amp;entry=<?php echo $entry->nom; ?>" method="post">
<textarea class="form-control" name="notes" id="notes<?php echo $itemnb; ?>" rows="6"><?php echo $entry->notes;?></textarea>
<input type="submit" class="btn-lg btn-info" style="float:right;" value="OK" />
</form>
<h4><img src="../../img/item/offensif.png" class="img-rounded">
&nbsp;Offensif&nbsp;<strong>➤</strong>
<span class="label enchant-<?php echo $entry->stuff->stuff_1->enchant;?>"><?php echo $entry->stuff->stuff_1->info;?></span>&nbsp;<span class="badge">Attaque +<?php echo $entry->stuff->stuff_1->spec;?></span>
</h4>
<h4><img src="../../img/item/defensif.png" class="img-rounded">
&nbsp;D&eacute;fensif&nbsp;<strong>➤</strong>
<span class="label enchant-<?php echo $entry->stuff->stuff_2->enchant;?>"><?php echo $entry->stuff->stuff_2->info;?></span>&nbsp;<span class="badge">D&eacute;fense +<?php echo $entry->stuff->stuff_2->spec;?></span>
</h4>
<h4><img src="../../img/item/objets.png" class="img-rounded">
&nbsp;Objets
<br /><br /><strong>➤</strong>&nbsp;<span class="label enchant-<?php echo $entry->stuff->stuff_3->enchant;?>"><?php echo $entry->stuff->stuff_3->info;?></span>&nbsp;<span class="badge"><?php echo $entry->stuff->stuff_3->spec;?></span>
<br /><br /><strong>➤</strong>&nbsp;<span class="label enchant-<?php echo $entry->stuff->stuff_4->enchant;?>"><?php echo $entry->stuff->stuff_4->info;?></span>&nbsp;<span class="badge"><?php echo $entry->stuff->stuff_4->spec;?></span>
<br /><br /><strong>➤</strong>&nbsp;<span class="label enchant-<?php echo $entry->stuff->stuff_5->enchant;?>"><?php echo $entry->stuff->stuff_5->info;?></span>&nbsp;<span class="badge"><?php echo $entry->stuff->stuff_5->spec;?></span>
<br /><br /><strong>➤</strong>&nbsp;<span class="label enchant-<?php echo $entry->stuff->stuff_6->enchant;?>"><?php echo $entry->stuff->stuff_6->info;?></span>&nbsp;<span class="badge"><?php echo $entry->stuff->stuff_6->spec;?></span>
</h4>
</div>

</div>


+ 31
- 2
play/action_phone.php View File

@@ -19,6 +19,13 @@ 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++;
}
@@ -130,8 +137,30 @@ 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->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) {


Loading…
Cancel
Save