Bläddra i källkod

modification interface

master
heuzef 9 år sedan
förälder
incheckning
32882cc4a7
6 ändrade filer med 86 tillägg och 73 borttagningar
  1. +11
    -0
      css/ecomonde.css
  2. +0
    -21
      medias/c0f08ae603e364cb554fe71c9fc94ffd/player.xml
  3. +2
    -0
      medias/default/player.xml
  4. +15
    -0
      play/action.php
  5. +50
    -52
      play/gamers.php
  6. +8
    -0
      play/index.php

+ 11
- 0
css/ecomonde.css Visa fil

@@ -228,6 +228,17 @@
font-weight: bold;
font-size: 18px;
text-align:center;
color: #FFD700;
background: #000;
}

.skill {
float: left;
width: 26px;
height: 24px;
font-weight: bold;
font-size: 18px;
text-align:center;
background: #000;
color: white;
}


+ 0
- 21
medias/c0f08ae603e364cb554fe71c9fc94ffd/player.xml Visa fil

@@ -1,21 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<response>
<entry>
<nom>player</nom>
<level>0</level>
<hp>10</hp>
<xp>0</xp>
<money>0</money>
<ecos>
<verte>5</verte>
<bleue>5</bleue>
<jaune>5</jaune>
<rouge>5</rouge>
<blanche>5</blanche>
<noire>5</noire>
</ecos>
<trans>default</trans>
<notes>...</notes>
<gift>0</gift>
</entry>
</response>

+ 2
- 0
medias/default/player.xml Visa fil

@@ -6,6 +6,8 @@
<hp>10</hp>
<xp>0</xp>
<money>0</money>
<attack>0</attack>
<defense>0</defense>
<ecos>
<verte>0</verte>
<bleue>0</bleue>


+ 15
- 0
play/action.php Visa fil

@@ -60,6 +60,21 @@ if (isset($_GET['money_reset'])) {
$xml->entry->money=0;
}
if (isset($_GET['attack_up'])) {
$xml->entry->attack++;
}
if (isset($_GET['attack_down'])) {
$xml->entry->attack--;
}
if (isset($_GET['defense_up'])) {
$xml->entry->defense++;
}
if (isset($_GET['defense_down'])) {
$xml->entry->defense--;
}
if (isset($_GET['eco_verte_plus']) && $xml->entry->ecos->verte<5) {
$xml->entry->ecos->verte++;
}


+ 50
- 52
play/gamers.php Visa fil

@@ -23,7 +23,11 @@ foreach($xml->entry as $entry) {
<?php echo $entry->nom; ?>
</div>
<div class="col-lg-4">
<?php trans("trans_dark", $entry->nom, "#8128B5"); ?><?php trans("trans_light", $entry->nom, "#ADDFFF"); ?><?php trans("trans_default", $entry->nom, "#AAA"); ?>
<?php
if ($entry->level !=0) {
trans("trans_dark", $entry->nom, "#8128B5"); ?><?php trans("trans_light", $entry->nom, "#ADDFFF"); ?><?php trans("trans_default", $entry->nom, "#AAA");
}
?>
</div>
</div>
<div class="row">
@@ -59,48 +63,68 @@ foreach($xml->entry as $entry) {
</div>
<div class="row">
<div class="col-lg-4">
<?php button_modif_money("money_reset", $entry->nom, '<i class="ionicons ion-arrow-return-left"></i>'); ?><?php button_modif_money("money_moins", $entry->nom, "-"); ?><?php button_modif_money("money_plus", $entry->nom, "+"); ?>
<?php button_modif_money("money_reset", $entry->nom, "0"); ?><?php button_modif_money("money_moins", $entry->nom, "-"); ?><?php button_modif_money("money_plus", $entry->nom, "+"); ?>
</div>
<div class="col-lg-4">
<?php button_modif_hp("hp_moins", $entry->nom, "-"); ?><?php button_modif_hp("hp_plus", $entry->nom, "+"); ?>
<?php button_modif_hp("hp_moins", $entry->nom, '<i class="ionicons ion-heart-broken"></i>'); ?><?php button_modif_hp("hp_plus", $entry->nom, '<i class="ionicons ion-heart"></i>'); ?>
</div>
<div class="col-lg-4">
<?php button_modif_xp("xp_reset", $entry->nom, '<i class="ionicons ion-arrow-return-left"></i>'); ?><?php button_modif_xp("xp_moinsmoins", $entry->nom, "--"); ?><?php button_modif_xp("xp_moins", $entry->nom, "-"); ?><?php button_modif_xp("xp_plus", $entry->nom, "+"); ?><?php button_modif_xp("xp_plusplus", $entry->nom, "++"); ?>
<?php button_modif_xp("xp_reset", $entry->nom, '<i class="ionicons ion-flash-off"></i>'); ?><?php button_modif_xp("xp_moinsmoins", $entry->nom, "--"); ?><?php button_modif_xp("xp_moins", $entry->nom, "-"); ?><?php button_modif_xp("xp_plus", $entry->nom, "+"); ?><?php button_modif_xp("xp_plusplus", $entry->nom, "++"); ?>
</div>
</div>
</div>
<div class="panel-body">
<div class="row">
<div class="col-lg-1">
<?php button_modif_ecos("eco_verte_moins", $entry->nom, "<span style='color:green'>-</span>"); ?>
</div>
<div class="col-lg-4">
<p>Lorem ipsum dolor sit amet</p>
</div>
<div class="col-lg-1">
<?php button_modif_ecos("eco_verte_plus", $entry->nom, "<span style='color:green'>+</span>"); ?>
</div>
<div class="row">
<div class="col-lg-1">
<?php button_modif_ecos("eco_bleue_moins", $entry->nom, "<span style='color:blue'>-</span>"); ?>
</div>
<div class="col-lg-4">
<p>Lorem ipsum dolor sit amet</p>
</div>
<div class="col-lg-1">
<?php button_modif_ecos("eco_bleue_plus", $entry->nom, "<span style='color:green'>+</span>"); ?>
</div>
</div>
<div class="col-lg-3">
<h4><strong>Attaque</strong></h4>
<?php button_modif_attack("attack_down", $entry->nom, "<i class='ionicons ion-arrow-down-c'></i>"); ?>
<span class="skill"><?php echo ($entry->attack+$entry->level); ?></span>
<?php button_modif_attack("attack_up", $entry->nom, "<i class='ionicons ion-arrow-up-c'></i>"); ?>
</div>
<div class="col-lg-3">
<h4><strong>Défense</strong></h4>
<?php button_modif_defense("defense_down", $entry->nom, "<i class='ionicons ion-arrow-down-c'></i>"); ?>
<span class="skill"><?php echo ($entry->defense+$entry->level); ?></span>
<?php button_modif_defense("defense_up", $entry->nom, "<i class='ionicons ion-arrow-up-c'></i>"); ?>
</div>
<div class="col-lg-1">
<?php button_modif_ecos("eco_blanche_moins", $entry->nom, "<span style='color:#ADDFFF'>-</span>"); ?>
</div>
<div class="col-lg-4">
<div class="progress progress-striped active">
<div class="progress-bar-eco blanche glow"><span style="width: <?php echo ($entry->ecos->blanche)*20; ?>%"><?php echo $entry->ecos->blanche; ?></span></div>
</div>
</div>
<div class="col-lg-1">
<?php button_modif_ecos("eco_blanche_plus", $entry->nom, "<span style='color:#ADDFFF'>+</span>"); ?>
</div>
<br /><br />
<div class="col-lg-1">
<?php button_modif_ecos("eco_noire_moins", $entry->nom, "<span style='color:#8128B5'>-</span>"); ?>
</div>
<div class="col-lg-4">
<div class="progress progress-striped active">
<div class="progress-bar-eco noire glow"><span style="width: <?php echo ($entry->ecos->noire)*20; ?>%"><?php echo $entry->ecos->noire; ?></span></div>
</div>
</div>
<div class="col-lg-1">
<?php button_modif_ecos("eco_noire_plus", $entry->nom, "<span style='color:#8128B5'>+</span>"); ?>
</div>
</div>
<hr />
<div class="row">
<div class="col-lg-1">
<?php button_modif_ecos("eco_verte_moins", $entry->nom, "<span style='color:green'>-</span>"); ?>
</div>
<div class="col-lg-4">
<div class="progress progress-striped active">
<div class="progress-bar-eco verte glow"><span style="width: <?php echo ($entry->ecos->verte)*20; ?>%"><?php echo $entry->ecos->verte; ?></span></div>
<div class="progress-bar-eco verte glow"><span style="width: <?php echo ($entry->ecos->verte)*20; ?>%""><?php echo $entry->ecos->verte; ?></span></div>
</div>
</div>
<div class="col-lg-1">
@@ -145,32 +169,6 @@ foreach($xml->entry as $entry) {
<?php button_modif_ecos("eco_rouge_plus", $entry->nom, "<span style='color:red'>+</span>"); ?>
</div>
</div>
<div class="row">
<div class="col-lg-1">
<?php button_modif_ecos("eco_blanche_moins", $entry->nom, "<span style='color:#ADDFFF'>-</span>"); ?>
</div>
<div class="col-lg-4">
<div class="progress progress-striped active">
<div class="progress-bar-eco blanche glow"><span style="width: <?php echo ($entry->ecos->blanche)*20; ?>%"><?php echo $entry->ecos->blanche; ?></span></div>
</div>
</div>
<div class="col-lg-1">
<?php button_modif_ecos("eco_blanche_plus", $entry->nom, "<span style='color:#ADDFFF'>+</span>"); ?>
</div>
<div class="col-lg-1">
<?php button_modif_ecos("eco_noire_moins", $entry->nom, "<span style='color:#8128B5'>-</span>"); ?>
</div>
<div class="col-lg-4">
<div class="progress progress-striped active">
<div class="progress-bar-eco noire glow"><span style="width: <?php echo ($entry->ecos->noire)*20; ?>%"><?php echo $entry->ecos->noire; ?></span></div>
</div>
</div>
<div class="col-lg-1">
<?php button_modif_ecos("eco_noire_plus", $entry->nom, "<span style='color:#8128B5'>+</span>"); ?>
</div>
</div>
<hr />
<div class="list-group col-lg-9">
<a class="list-group-item">
@@ -181,7 +179,7 @@ foreach($xml->entry as $entry) {
</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_reset", $entry->nom, "<i class='ionicons ion-arrow-return-left'></i>"); ?><?php button_modif_gift("gift_moins", $entry->nom, "-"); ?><?php button_modif_gift("gift_plus", $entry->nom, "+"); ?>
<?php button_modif_gift("gift_reset", $entry->nom, "0"); ?><?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">


+ 8
- 0
play/index.php Visa fil

@@ -139,6 +139,14 @@
{
echo '<form action="action.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>';
}
function button_modif_attack($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>';
}
function button_modif_defense($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>';
}
function button_modif_ecos($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">'.$texte_bouton.'</button></form>';


Laddar…
Avbryt
Spara