Преглед на файлове

MAJ du phone View

master
heuzef преди 9 години
родител
ревизия
c886d6ddc0
променени са 1 файла, в които са добавени 252 реда и са изтрити 129 реда
  1. +252
    -129
      medias/default/index.php

+ 252
- 129
medias/default/index.php Целия файл

@@ -1,162 +1,285 @@
<?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">'.$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-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">'.$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">'.$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"><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">'.$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">'.$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">'.$texte_bouton.'</button></form>';
}
?>

<!DOCTYPE html>
<html lang="fr">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>EcoMonde</title>
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="shortcut icon" href="../../img/favicon.png" type="image/x-icon" />
<link rel="stylesheet" href="../../css/bootstrap.css" media="screen">
<link rel="stylesheet" href="../../css/bootswatch.min.css">
<link rel="stylesheet" href="../../css/ionicons.min.css">
<link rel="stylesheet" href="../../css/ecomonde.css">
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>EcoMonde</title>
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="shortcut icon" href="../../img/favicon.png" type="image/x-icon" />
<link rel="stylesheet" href="../../css/bootstrap.css" media="screen">
<link rel="stylesheet" href="../../css/bootswatch.min.css">
<link rel="stylesheet" href="../../css/ionicons.min.css">
<link rel="stylesheet" href="../../css/ecomonde.css">
</head>
<body>
<?php
if(!empty($_GET["view"]))
{
$xml = simplexml_load_file($_GET["view"].'.xml');
foreach($xml->entry as $entry)
<body>
<?php
if(!empty($_GET["view"]))
{
$xml = simplexml_load_file($_GET["view"].'.xml');
foreach($xml->entry as $entry)
{ ?>

<!-- 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="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;
<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)
{
case 0:
$hp_max+=0;
break;
case 1:
$hp_max+=2;
break;
case 2:
$hp_max+=5;
break;
case 3:
$hp_max+=10;
break;
default:
echo "?";
}
?>
<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">
<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;
<span class="skill_phone">Att : <?php echo ($entry->attack+$entry->level); ?></span>&nbsp;&nbsp;&nbsp;
<span class="skill_phone">Def : <?php echo ($entry->defense+$entry->level); ?></span>&nbsp;&nbsp;&nbsp;

<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>
<br />
<?php
$hp_max="10";
switch ($entry->level)
{
case 0:
$hp_max+=0;
break;
case 1:
$hp_max+=2;
break;
case 2:
$hp_max+=5;
break;
case 3:
$hp_max+=10;
break;
default:
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;
</div>
<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_bleue_moins", $entry->nom, "<span style='color:blue'>-</span>"); ?>
</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>
<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="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 class="col-xs-2">
<?php button_modif_ecos("eco_bleue_plus", $entry->nom, "<span style='color:blue'>+</span>"); ?>
</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>
</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="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 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="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 class="col-xs-2">
<?php button_modif_ecos("eco_jaune_plus", $entry->nom, "<span style='color:yellow'>+</span>"); ?>
</div>
</div>
<hr />
<div class="list-group col-lg-9">
<a class="list-group-item">
<h4>Notes :</h4>
<p class="list-group-item-text"><?php echo $entry->notes ?></p>
</a>
<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>
<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>
<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 />
<h3>&Eacute;quipements</h3>
<div class="col-lg-9">
<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>
</div>
<!-- /phoneview -->
<!-- /phoneview -->

<?php }
}
else { ?>
<div class="container-fluid">
<img class="img-responsive" src="../../img/logo_0.png" alt="logo" />
<hr />
<div class="panel panel-default">
<div class="panel-heading"><i class="ionicons ion-person"></i>&nbsp;&nbsp;<strong>Joueurs :</strong></div>
<div class="panel-body">
<table class="table table-striped table-hover ">
<tbody>
<?php
// liste des gamers
$folder = ".";
$dossier = opendir($folder);
while ($fichier = readdir($dossier))
{
if ($fichier != "." && $fichier != ".." && $fichier != "map.jpg" && $fichier != "soft.mp3" && $fichier != "tonic.mp3" && $fichier != "hard.mp3" && $fichier != "light.mp3" && $fichier != "dark.mp3" && $fichier != "enemy")
<?php }
}
else { ?>
<div class="container-fluid">
<img class="img-responsive" src="../../img/logo_0.png" alt="logo" />
<hr />
<div class="panel panel-default">
<div class="panel-heading"><i class="ionicons ion-person"></i>&nbsp;&nbsp;<strong>Joueurs :</strong></div>
<div class="panel-body">
<table class="table table-striped table-hover ">
<tbody>
<?php
// liste des gamers
$folder = ".";
$dossier = opendir($folder);
while ($fichier = readdir($dossier))
{
$gamers = explode(".xml", $fichier);
$xml = simplexml_load_file($fichier);
if (!isset($itemnb))
{
$itemnb=0;
}
else
if ($fichier != "." && $fichier != ".." && $fichier != "map.jpg" && $fichier != "soft.mp3" && $fichier != "tonic.mp3" && $fichier != "hard.mp3" && $fichier != "light.mp3" && $fichier != "dark.mp3" && $fichier != "enemy")
{
$itemnb++;
}
$gamers = explode(".xml", $fichier);
$xml = simplexml_load_file($fichier);
if (!isset($itemnb))
{
$itemnb=0;
}
else
{
$itemnb++;
}

foreach($xml->entry as $entry)
{
$hp_max="10";
switch ($entry->level)
foreach($xml->entry as $entry)
{
case 0:
$hp_max+=0;
break;
case 1:
$hp_max+=2;
break;
case 2:
$hp_max+=5;
break;
case 3:
$hp_max+=10;
break;
default:
echo "?";
$hp_max="10";
switch ($entry->level)
{
case 0:
$hp_max+=0;
break;
case 1:
$hp_max+=2;
break;
case 2:
$hp_max+=5;
break;
case 3:
$hp_max+=10;
break;
default:
echo "?";
}
$somme_ecos=$entry->ecos->verte+$entry->ecos->bleue+$entry->ecos->jaune+$entry->ecos->rouge;
echo '<tr class="active">
<td><strong>['.$entry->level.']</strong>&nbsp;'.$entry->nom.'</td>
<td><i class="ionicons ion-heart" style="color:red;"></i>&nbsp;'.$entry->hp.'/'.$hp_max.'</td>
<td><a href="index.php?view='.$entry->nom.'" class="btn btn-info btn-sm"><i class="ionicons ion-eye">&nbsp;VOIR</i></a></td>
</tr>';
}
$somme_ecos=$entry->ecos->verte+$entry->ecos->bleue+$entry->ecos->jaune+$entry->ecos->rouge;
echo '<tr class="active">
<td><strong>['.$entry->level.']</strong>&nbsp;'.$entry->nom.'</td>
<td><i class="ionicons ion-heart" style="color:red;"></i>&nbsp;'.$entry->hp.'/'.$hp_max.'</td>
<td><a href="index.php?view='.$entry->nom.'" class="btn btn-info btn-sm"><i class="ionicons ion-eye">&nbsp;VOIR</i></a></td>
</tr>';
}
}
}
closedir($dossier);
?>
</tbody>
</table>
closedir($dossier);
?>
</tbody>
</table>
</div>
</div>
</div>
</div>
</div>
<?php } ?>
</body>
</html>
<?php } ?>
</body>
</html>

Зареждане…
Отказ
Запис