Sfoglia il codice sorgente

Phone View !

master
heuzef 10 anni fa
parent
commit
24b6e0847d
13 ha cambiato i file con 229 aggiunte e 2 eliminazioni
  1. +19
    -0
      css/ecomonde.css
  2. +6
    -0
      index.php
  3. +0
    -0
      medias/c0f08ae603e364cb554fe71c9fc94ffd/dark.mp3
  4. +21
    -0
      medias/c0f08ae603e364cb554fe71c9fc94ffd/derpy.xml
  5. +1
    -1
      medias/c0f08ae603e364cb554fe71c9fc94ffd/enemy/enemy.xml
  6. +0
    -0
      medias/c0f08ae603e364cb554fe71c9fc94ffd/hard.mp3
  7. +160
    -0
      medias/c0f08ae603e364cb554fe71c9fc94ffd/index.php
  8. +0
    -0
      medias/c0f08ae603e364cb554fe71c9fc94ffd/light.mp3
  9. +0
    -0
      medias/c0f08ae603e364cb554fe71c9fc94ffd/map.jpg
  10. +21
    -0
      medias/c0f08ae603e364cb554fe71c9fc94ffd/personomlong.xml
  11. +1
    -1
      medias/c0f08ae603e364cb554fe71c9fc94ffd/player.xml
  12. +0
    -0
      medias/c0f08ae603e364cb554fe71c9fc94ffd/soft.mp3
  13. +0
    -0
      medias/c0f08ae603e364cb554fe71c9fc94ffd/tonic.mp3

+ 19
- 0
css/ecomonde.css Vedi File

@@ -242,6 +242,25 @@
text-transform: uppercase;
}

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

.player_name_phone {
font-weight: bold;
font-size: 26px;
color: black;
text-transform: uppercase;
}

.enemy_name {
font-weight: bold;
font-size: 26px;


+ 6
- 0
index.php Vedi File

@@ -153,6 +153,12 @@ $message[10]='
<p>
<a data-toggle="modal" data-target="#modal_change_map" class="btn btn-default btn-lg"><i class="ionicons ion-map"></i>&nbsp;&nbsp;Changer la carte</a>
</p>
<hr />
<h1><i class="glyphicon glyphicon-phone"></i>Affichage téléphone</h1>
<img class="img-responsive" src="https://chart.googleapis.com/chart?chs=300x300&cht=qr&chl=http%3A%2F%2Fwww.ecomonde.land%2Fmedias/<?php echo $hash; ?>&choe=UTF-8" />
<a href="https://play.google.com/store/apps/details?id=com.google.zxing.client.android&hl=fr_FR" target="_blank">
<img alt="Barcode Scanner" src="https://lh6.ggpht.com/os72icmFlDtbxpYbZCP-v6kOereSLGDmlKsBl1ISTPdgbcpoc4rSIuXDuoDECvgcvoFJ=w300-rw" height="60px" /><img alt="Android app on Google Play" src="https://developer.android.com/images/brand/fr_app_rgb_wo_45.png" />
</a>
</div>
</div>
</div>


+ 0
- 0
medias/c0f08ae603e364cb554fe71c9fc94ffd/dark.mp3 Vedi File


+ 21
- 0
medias/c0f08ae603e364cb554fe71c9fc94ffd/derpy.xml Vedi File

@@ -0,0 +1,21 @@
<?xml version="1.0" encoding="utf-8"?>
<response>
<entry>
<nom>derpy</nom>
<level>2</level>
<hp>10</hp>
<xp>150</xp>
<money>16</money>
<ecos>
<verte>5</verte>
<bleue>0</bleue>
<jaune>0</jaune>
<rouge>1</rouge>
<blanche>2</blanche>
<noire>2</noire>
</ecos>
<trans>default</trans>
<notes>lorem ipsum dolor sit amet</notes>
<gift>0</gift>
</entry>
</response>

+ 1
- 1
medias/c0f08ae603e364cb554fe71c9fc94ffd/enemy/enemy.xml Vedi File

@@ -2,7 +2,7 @@
<response>
<entry>
<nom>enemy</nom>
<hp>3</hp>
<hp>2</hp>
<img>http://wiki.ecomonde.land/lib/exe/fetch.php?media=wiki:loup_garou.jpg</img>
<url>http://wiki.ecomonde.land/doku.php?id=wiki:ennemies</url>
</entry>


+ 0
- 0
medias/c0f08ae603e364cb554fe71c9fc94ffd/hard.mp3 Vedi File


+ 160
- 0
medias/c0f08ae603e364cb554fe71c9fc94ffd/index.php Vedi File

@@ -0,0 +1,160 @@
<!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">
</head>
<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>
</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>
<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>
<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 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 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 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 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>
<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>
</div>
</div>
</div>
<!-- /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")
{
$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)
{
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>';
}
}
}
closedir($dossier);
?>
</tbody>
</table>
</div>
</div>
</div>
</div>
<?php } ?>
</body>
</html>

+ 0
- 0
medias/c0f08ae603e364cb554fe71c9fc94ffd/light.mp3 Vedi File


+ 0
- 0
medias/c0f08ae603e364cb554fe71c9fc94ffd/map.jpg Vedi File

Prima Dopo
Larghezza: 2000  |  Altezza: 1400  |  Dimensione: 1.0 MiB Larghezza: 2000  |  Altezza: 1400  |  Dimensione: 1.0 MiB

+ 21
- 0
medias/c0f08ae603e364cb554fe71c9fc94ffd/personomlong.xml Vedi File

@@ -0,0 +1,21 @@
<?xml version="1.0" encoding="utf-8"?>
<response>
<entry>
<nom>personomlong</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>0</noire>
</ecos>
<trans>default</trans>
<notes>...</notes>
<gift>0</gift>
</entry>
</response>

+ 1
- 1
medias/c0f08ae603e364cb554fe71c9fc94ffd/player.xml Vedi File

@@ -3,7 +3,7 @@
<entry>
<nom>player</nom>
<level>0</level>
<hp>10</hp>
<hp>7</hp>
<xp>0</xp>
<money>0</money>
<ecos>


+ 0
- 0
medias/c0f08ae603e364cb554fe71c9fc94ffd/soft.mp3 Vedi File


+ 0
- 0
medias/c0f08ae603e364cb554fe71c9fc94ffd/tonic.mp3 Vedi File


Caricamento…
Annulla
Salva