ソースを参照

MAJ interface

master
heuzef 9年前
コミット
e5dd48aeb9
4個のファイルの変更297行の追加25行の削除
  1. +5
    -5
      medias/c0f08ae603e364cb554fe71c9fc94ffd/derpy.xml
  2. +121
    -13
      medias/c0f08ae603e364cb554fe71c9fc94ffd/index.php
  3. +151
    -0
      play/action_phone.php
  4. +20
    -7
      play/index.php

+ 5
- 5
medias/c0f08ae603e364cb554fe71c9fc94ffd/derpy.xml ファイルの表示

@@ -9,12 +9,12 @@
<attack>0</attack>
<defense>0</defense>
<ecos>
<verte>0</verte>
<verte>1</verte>
<bleue>0</bleue>
<jaune>0</jaune>
<rouge>0</rouge>
<blanche>0</blanche>
<noire>0</noire>
<jaune>1</jaune>
<rouge>3</rouge>
<blanche>1</blanche>
<noire>2</noire>
</ecos>
<trans>default</trans>
<notes>...</notes>


+ 121
- 13
medias/c0f08ae603e364cb554fe71c9fc94ffd/index.php ファイルの表示

@@ -1,3 +1,42 @@
<?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>';
}
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>';
}
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>';
}
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>';
}
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>';
}
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>';
}
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>';
}
function button_modif_ecos($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-sm">'.$texte_bouton.'</button></form>';
}
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>';
}
?>

<!DOCTYPE html>
<html lang="fr">
<head>
@@ -30,7 +69,7 @@ if(!empty($_GET["view"]))
<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>
<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
<?php
$hp_max="10";
switch ($entry->level)
@@ -56,26 +95,95 @@ if(!empty($_GET["view"]))
<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;
</div>
<hr />
<div class="panel-body">
<div class="container-fluid">
<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="row">
<div class="col-xs-2">
<?php button_modif_ecos("eco_verte_moins", $entry->nom, "<span style='color:green'>-</span>"); ?>
</div>
<div class="col-xs-8">
<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>
</div>
<div class="col-xs-2">
<?php button_modif_ecos("eco_verte_plus", $entry->nom, "<span style='color:green'>+</span>"); ?>
</div>
</div>
<div class="progress progress-striped active">
<div class="progress-bar-eco bleue glow"><span style="width: <?php echo ($entry->ecos->bleue)*20; ?>%"><?php echo $entry->ecos->bleue; ?></span></div>
<br />
<div class="row">
<div class="col-xs-2">
<?php button_modif_ecos("eco_bleue_moins", $entry->nom, "<span style='color:blue'>-</span>"); ?>
</div>
<div class="col-xs-8">
<div class="progress progress-striped active">
<div class="progress-bar-eco bleue glow"><span style="width: <?php echo ($entry->ecos->bleue)*20; ?>%"><?php echo $entry->ecos->bleue; ?></span></div>
</div>
</div>
<div class="col-xs-2">
<?php button_modif_ecos("eco_bleue_plus", $entry->nom, "<span style='color:blue'>+</span>"); ?>
</div>
</div>
<div class="progress progress-striped active">
<div class="progress-bar-eco jaune glow"><span style="width: <?php echo ($entry->ecos->jaune)*20; ?>%"><?php echo $entry->ecos->jaune; ?></span></div>
<br />
<div class="row">
<div class="col-xs-2">
<?php button_modif_ecos("eco_jaune_moins", $entry->nom, "<span style='color:#FFD700'>-</span>"); ?>
</div>
<div class="col-xs-8">
<div class="progress progress-striped active">
<div class="progress-bar-eco jaune glow"><span style="width: <?php echo ($entry->ecos->jaune)*20; ?>%"><?php echo $entry->ecos->jaune; ?></span></div>
</div>
</div>
<div class="col-xs-2">
<?php button_modif_ecos("eco_jaune_plus", $entry->nom, "<span style='color:yellow'>+</span>"); ?>
</div>
</div>
<div class="progress progress-striped active">
<div class="progress-bar-eco rouge glow"><span style="width: <?php echo ($entry->ecos->rouge)*20; ?>%"><?php echo $entry->ecos->rouge; ?></span></div>
<br />
<div class="row">
<div class="col-xs-2">
<?php button_modif_ecos("eco_rouge_moins", $entry->nom, "<span style='color:red'>-</span>"); ?>
</div>
<div class="col-xs-8">
<div class="progress progress-striped active">
<div class="progress-bar-eco rouge glow"><span style="width: <?php echo ($entry->ecos->rouge)*20; ?>%"><?php echo $entry->ecos->rouge; ?></span></div>
</div>
</div>
<div class="col-xs-2">
<?php button_modif_ecos("eco_rouge_plus", $entry->nom, "<span style='color:red'>+</span>"); ?>
</div>
</div>
<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>
<br />
<div class="row">
<div class="col-xs-2">
<?php button_modif_ecos("eco_blanche_moins", $entry->nom, "<span style='color:#ADDFFF'>-</span>"); ?>
</div>
<div class="col-xs-8">
<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-xs-2">
<?php button_modif_ecos("eco_blanche_plus", $entry->nom, "<span style='color:#ADDFFF'>+</span>"); ?>
</div>
</div>
<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>
<br />
<div class="row">
<div class="col-xs-2">
<?php button_modif_ecos("eco_noire_moins", $entry->nom, "<span style='color:#8128B5'>-</span>"); ?>
</div>
<div class="col-xs-8">
<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-xs-2">
<?php button_modif_ecos("eco_noire_plus", $entry->nom, "<span style='color:#8128B5'>+</span>"); ?>
</div>
</div>
<br />

</div>
<hr />
<div class="list-group col-lg-9">


+ 151
- 0
play/action_phone.php ファイルの表示

@@ -0,0 +1,151 @@
<?php include "../header.php";
$nom_modif="";
if (isset($_GET['entry'])) {
$nom_modif = $_GET['entry'];
} else {
header("location: ./index.php");
end;
}
$xml = simplexml_load_file('../medias/'.$hash.'/'.$nom_modif.'.xml');
if (isset($_GET['level_up']) && $xml->entry->level<3) {
$xml->entry->level++;
}
if (isset($_GET['level_down']) && $xml->entry->level>0) {
$xml->entry->level--;
}
if (isset($_GET['hp_plus']) && $xml->entry->hp<20) {
$xml->entry->hp++;
}
if (isset($_GET['hp_moins']) && $xml->entry->hp>0) {
$xml->entry->hp--;
}
if (isset($_GET['xp_plus']) && $xml->entry->xp<99999) {
$xml->entry->xp++;
}
if (isset($_GET['xp_moins']) && $xml->entry->xp>0) {
$xml->entry->xp--;
}
if (isset($_GET['xp_plusplus']) && $xml->entry->xp<99989) {
$xml->entry->xp+=10;
}
if (isset($_GET['xp_moinsmoins']) && $xml->entry->xp>9) {
$xml->entry->xp-=10;
}
if (isset($_GET['xp_reset'])) {
$xml->entry->xp=0;
}
if (isset($_GET['money_plus']) && $xml->entry->money<99999) {
$xml->entry->money+=1;
}
if (isset($_GET['money_moins']) && $xml->entry->money>0) {
$xml->entry->money--;
}
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++;
}
if (isset($_GET['eco_verte_moins']) && $xml->entry->ecos->verte>0) {
$xml->entry->ecos->verte--;
}
if (isset($_GET['eco_bleue_plus']) && $xml->entry->ecos->bleue<5) {
$xml->entry->ecos->bleue++;
}
if (isset($_GET['eco_bleue_moins']) && $xml->entry->ecos->bleue>0) {
$xml->entry->ecos->bleue--;
}
if (isset($_GET['eco_jaune_plus']) && $xml->entry->ecos->jaune<5) {
$xml->entry->ecos->jaune++;
}
if (isset($_GET['eco_jaune_moins']) && $xml->entry->ecos->jaune>0) {
$xml->entry->ecos->jaune--;
}
if (isset($_GET['eco_rouge_plus']) && $xml->entry->ecos->rouge<5) {
$xml->entry->ecos->rouge++;
}
if (isset($_GET['eco_rouge_moins']) && $xml->entry->ecos->rouge>0) {
$xml->entry->ecos->rouge--;
}
if (isset($_GET['eco_blanche_plus']) && $xml->entry->ecos->blanche<5) {
$xml->entry->ecos->blanche++;
}
if (isset($_GET['eco_blanche_moins']) && $xml->entry->ecos->blanche>0) {
$xml->entry->ecos->blanche--;
}
if (isset($_GET['eco_noire_plus']) && $xml->entry->ecos->noire<5) {
$xml->entry->ecos->noire++;
}
if (isset($_GET['eco_noire_moins']) && $xml->entry->ecos->noire>0) {
$xml->entry->ecos->noire--;
}
if (isset($_GET['trans_default'])) {
$xml->entry->trans="default";
}
if (isset($_GET['trans_light'])) {
$xml->entry->trans="light";
}
if (isset($_GET['trans_dark'])) {
$xml->entry->trans="dark";
}
if (isset($_GET['edit_notes'])) {
$xml->entry->notes = $_POST["notes"];
}
if (isset($_GET['gift_plus']) && $xml->entry->gift<99999) {
$xml->entry->gift++;
}
if (isset($_GET['gift_moins']) && $xml->entry->gift>0) {
$xml->entry->gift--;
}
if (isset($_GET['gift_reset'])) {
$xml->entry->gift=0;
}
$xml->asXml('../medias/'.$hash.'/'.$nom_modif.'.xml');
header("location: ../medias/".$hash."/index.php?view=".$_GET['entry']);
?>

+ 20
- 7
play/index.php ファイルの表示

@@ -51,18 +51,31 @@
</div>
</div>
</div>
<div class="col-lg-4">
<div class="col-lg-3">
<div class="well sponsor">
<h2>Ecos</h2>
<h4>10 <i class="ionicons ion-flash" style="color:#FFD700;"></i> = 1 <i class="ionicons ion-fireball" style="color:#AAA;"></i>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 1 <i class="ionicons ion-fireball" style="color:#28b62c;"></i> = (2+LVL) <i class="ionicons ion-heart" style="color:red;"></i></h4>
<h4><i class="ionicons ion-fireball" style="color:#28b62c;"></i> + <i class="ionicons ion-fireball" style="color:#158cba;"></i> + <i class="ionicons ion-fireball" style="color:#ffd000;"></i> + <i class="ionicons ion-fireball" style="color:#ff4136;"></i> = <i class="ionicons ion-fireball" style="color:#ADDFFF;"></i> ou <i class="ionicons ion-fireball" style="color:#8128B5;"></i></h4>
<h4>
10 <i class="ionicons ion-flash" style="color:#FFD700;"></i> = 1 <i class="ionicons ion-fireball" style="color:#AAA;"></i>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
&nbsp;
40 <i class="ionicons ion-flash" style="color:#FFD700;"></i> =
<button class="btn btn-default btn-xs" data-toggle="modal" data-target="#infos"><i class="ionicons ion-fireball" style="color:#ADDFFF;"></i> ou <i class="ionicons ion-fireball" style="color:#8128B5;"></i></button>
</h4>
<h4>
<i class="ionicons ion-fireball" style="color:#28b62c;"></i> +
<i class="ionicons ion-fireball" style="color:#158cba;"></i> +
<i class="ionicons ion-fireball" style="color:#ffd000;"></i> +
<i class="ionicons ion-fireball" style="color:#ff4136;"></i> =
<button class="btn btn-default btn-xs" data-toggle="modal" data-target="#infos"><i class="ionicons ion-fireball" style="color:#ADDFFF;"></i> ou <i class="ionicons ion-fireball" style="color:#8128B5;"></i></button>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
1 <i class="ionicons ion-fireball" style="color:#28b62c;"></i> = (2+LVL) <i class="ionicons ion-heart" style="color:red;"></i>
</h4>
</div>
</div>
<div class="col-lg-4">
<div class="col-lg-5">
<div class="well sponsor">
<h2>Action</h2>
<h4>Transfert d'ecos : 1 <i class="ionicons ion-fireball" style="color:#AAA;"></i>&nbsp;<i class="ionicons ion-arrow-swap";></i>&nbsp; 1 <i class="ionicons ion-fireball" style="color:#AAA;"></i> = 1 <i class="ionicons ion-flash" style="color:#FFD700;"></i>&nbsp;<i class="ionicons ion-arrow-swap";></i>&nbsp; 1 <i class="ionicons ion-flash" style="color:#FFD700;"></i>
<h4>Transformation Light ou Dark = 1 <button class="btn btn-default btn-xs" data-toggle="modal" data-target="#infos"><i class="ionicons ion-fireball" style="color:#ADDFFF;"></i> ou <i class="ionicons ion-fireball" style="color:#8128B5;"></i></button></h4>
</div>
</div>
</div>


読み込み中…
キャンセル
保存