Browse Source

nettoyage

master
heuzef 10 years ago
parent
commit
24de89f895
16 changed files with 53 additions and 34 deletions
  1. +35
    -22
      index.php
  2. +0
    -0
      medias/c0f08ae603e364cb554fe71c9fc94ffd/dark.mp3
  3. +0
    -0
      medias/c0f08ae603e364cb554fe71c9fc94ffd/hard.mp3
  4. +0
    -0
      medias/c0f08ae603e364cb554fe71c9fc94ffd/light.mp3
  5. BIN
      medias/c0f08ae603e364cb554fe71c9fc94ffd/map.jpg
  6. +0
    -0
      medias/c0f08ae603e364cb554fe71c9fc94ffd/player1.xml
  7. +0
    -0
      medias/c0f08ae603e364cb554fe71c9fc94ffd/player2.xml
  8. +0
    -0
      medias/c0f08ae603e364cb554fe71c9fc94ffd/player3.xml
  9. +0
    -0
      medias/c0f08ae603e364cb554fe71c9fc94ffd/soft.mp3
  10. +0
    -0
      medias/c0f08ae603e364cb554fe71c9fc94ffd/tonic.mp3
  11. BIN
      music/final.mp3
  12. +4
    -2
      play/action.php
  13. +1
    -1
      play/gamers.php
  14. +6
    -4
      play/index.php
  15. +7
    -5
      play/music.php
  16. BIN
      scenarios/scenario_1.odt

+ 35
- 22
index.php View File

@@ -1,3 +1,5 @@
<?php $hash=md5("contact@heuzef.com"); ?>

<!DOCTYPE html>
<html lang="fr">
<head>
@@ -30,7 +32,7 @@
<li><a href="https://github.com/heuzef/ecomonde"><i class="glyphicon glyphicon-new-window"></i>&nbsp;&nbsp;GITHUB</a></li>
</ul>
<ul class="nav navbar-nav navbar-right">
<li><?php echo '<img src="http://gravatar.com/avatar/'.md5("contact@heuzef.com").'?s=50" alt="gravatar" />'; ?> <strong>HEUZEF</strong></li>
<li><?php echo '<img src="http://gravatar.com/avatar/'.$hash.'?s=50" alt="gravatar" />'; ?> <strong>HEUZEF</strong></li>
<li><a href="#"><i class="glyphicon glyphicon-log-out"></i>&nbsp;&nbsp;DECONNEXION</a></li>
</ul>
</div>
@@ -85,7 +87,7 @@

<div class="container-fluid">
<div class="col-lg-1"></div>
<div class="col-lg-4">
<div class="col-lg-3">
<div class="panel panel-default">
<div class="panel-heading"><i class="glyphicon glyphicon-cog"></i>&nbsp;&nbsp;<strong>Configurer votre partie</strong></div>
<div class="panel-body">
@@ -102,12 +104,36 @@
</p>
<hr />
<p>
<div class="btn-group">
<a href="#" class="btn btn-default btn-lg dropdown-toggle" data-toggle="dropdown">
<i class="glyphicon glyphicon-music"></i>&nbsp;&nbsp;Changer les musiques
<span class="caret"></span>
</a>
<ul class="dropdown-menu">
<li><a href="#" style="color:#CCC;"><i class="glyphicon glyphicon-music"></i>&nbsp;&nbsp;SOFT</a></li>
<li class="divider"></li>
<li><a href="#" style="color:#AAA;"><i class="glyphicon glyphicon-music"></i>&nbsp;&nbsp;TONIC</a></li>
<li class="divider"></li>
<li><a href="#" style="color:#000;"><i class="glyphicon glyphicon-music"></i>&nbsp;&nbsp;HARD</a></li>
<li class="divider"></li>
<li><a href="#" style="color:#ADDFFF;"><i class="glyphicon glyphicon-music"></i>&nbsp;&nbsp;LIGHT</a></li>
<li class="divider"></li>
<li><a href="#" style="color:#8128B5;"><i class="glyphicon glyphicon-music"></i>&nbsp;&nbsp;DARK</a></li>
</ul>
</div>
</p>
<hr />
<p>
<a href="#" class="btn btn-default btn-lg"><i class="glyphicon glyphicon-map-marker"></i>&nbsp;&nbsp;Changer la carte</a>
</p>
<hr />
<p>
<a href="play" class="btn btn-danger btn-lg"><i class="glyphicon glyphicon-remove"></i>&nbsp;&nbsp;Supprimer votre partie</a>
</p>
</div>
</div>
</div>
<div class="col-lg-6">
<div class="col-lg-7">
<div class="panel panel-default">
<div class="panel-heading"><i class="glyphicon glyphicon-user"></i>&nbsp;&nbsp;<strong>Joueurs présents dans votre partie :</strong></div>
<div class="panel-body">
@@ -131,18 +157,19 @@
// nombre de gamers
$f = 0;
foreach(glob('*.xml') as $f) {$f+=1;}
$nb_membres = count(glob('./gamers/*.xml'));
$nb_membres = count(glob('./medias/'.$hash.'/*.xml'));

// liste des gamers
$folder = "./gamers";
$folder = "./medias/".$hash."/";
$dossier = opendir($folder);
while ($fichier = readdir($dossier))
{
if ($fichier != "." && $fichier != ".." )

if ($fichier != "." && $fichier != ".." && $fichier != "map.jpg" && $fichier != "soft.mp3" && $fichier != "tonic.mp3" && $fichier != "hard.mp3" && $fichier != "light.mp3" && $fichier != "dark.mp3")
{
$gamers = explode(".xml", $fichier);

$xml = simplexml_load_file('./gamers/'.$fichier);
$xml = simplexml_load_file('./medias/'.$hash.'/'.$fichier);
if (!isset($itemnb)) {
$itemnb=0;
} else {
@@ -150,7 +177,7 @@
}
foreach($xml->entry as $entry) {
echo '<tr class="active">
<td><a href="#" class="btn btn-danger btn-xs"><i class="glyphicon glyphicon-trash"></i></a>&nbsp;&nbsp;<a href="#" class="btn btn-success btn-xs"><i class="glyphicon glyphicon-export"></i></a></td>
<td><a href="#" class="btn btn-danger btn-xs"><i class="glyphicon glyphicon-trash"></i></a>&nbsp;&nbsp;<a href="./medias/'.$hash.'/'.$fichier.'" target="_blank" class="btn btn-success btn-xs"><i class="glyphicon glyphicon-export"></i></a></td>
<td>'.$entry->nom.'</td>
<td>'.$entry->hp.'</td>
<td>'.$entry->xp.'</td>
@@ -174,20 +201,6 @@
<div class="col-lg-1"></div>
</div>

<div class="container-fluid">
<div class="col-lg-1"></div>
<div class="col-lg-10">
<div class="panel panel-default">
<div class="panel-heading"><i class="glyphicon glyphicon-headphones"></i>&nbsp;&nbsp;<strong>Medias</strong></div>
<div class="panel-body">
<p>Lorem ipsum dolor sit amet.</p>
</div>
</div>
</div>
<div class="col-lg-1"></div>
</div>


<script src="./js/jquery-1.10.2.min.js"></script>
<script src="./js/bootstrap.min.js"></script>
<script src="./js/bootswatch.js"></script>


music/dark.mp3 → medias/c0f08ae603e364cb554fe71c9fc94ffd/dark.mp3 View File


music/hard.mp3 → medias/c0f08ae603e364cb554fe71c9fc94ffd/hard.mp3 View File


music/light.mp3 → medias/c0f08ae603e364cb554fe71c9fc94ffd/light.mp3 View File


BIN
medias/c0f08ae603e364cb554fe71c9fc94ffd/map.jpg View File

Before After
Width: 2000  |  Height: 1400  |  Size: 1.0 MiB

gamers/player1.xml → medias/c0f08ae603e364cb554fe71c9fc94ffd/player1.xml View File


gamers/player2.xml → medias/c0f08ae603e364cb554fe71c9fc94ffd/player2.xml View File


gamers/player3.xml → medias/c0f08ae603e364cb554fe71c9fc94ffd/player3.xml View File


music/soft.mp3 → medias/c0f08ae603e364cb554fe71c9fc94ffd/soft.mp3 View File


music/tonic.mp3 → medias/c0f08ae603e364cb554fe71c9fc94ffd/tonic.mp3 View File


BIN
music/final.mp3 View File


+ 4
- 2
play/action.php View File

@@ -1,3 +1,5 @@
<?php $hash=md5("contact@heuzef.com"); ?>
<?php
$nom_modif="";
@@ -9,7 +11,7 @@ if (isset($_GET['entry'])) {
end;
}
$xml = simplexml_load_file('../gamers/'.$nom_modif.'.xml');
$xml = simplexml_load_file('../medias/'.$hash.'/'.$nom_modif.'.xml');
if (isset($_GET['hp_plus']) && $xml->entry->hp<10) {
$xml->entry->hp++;
@@ -94,6 +96,6 @@ if (isset($_GET['edit_notes'])) {
$xml->entry->notes = $_POST["notes"];
}
$xml->asXml('../gamers/'.$nom_modif.'.xml');
$xml->asXml('../medias/'.$hash.'/'.$nom_modif.'.xml');
header("location: index.php");
?>

+ 1
- 1
play/gamers.php View File

@@ -1,6 +1,6 @@
<?php
$xml = simplexml_load_file('../gamers/'.$fichier);
$xml = simplexml_load_file('../medias/'.$hash.'/'.$fichier);
if (!isset($itemnb)) {
$itemnb=0;
} else {


+ 6
- 4
play/index.php View File

@@ -1,3 +1,5 @@
<?php $hash=md5("contact@heuzef.com"); ?>

<!DOCTYPE html>
<html lang="fr">
<head>
@@ -53,7 +55,7 @@
<div class="panel panel-default">
<div id="collapseOne" class="panel-collapse collapse">
<div class="panel-body">
<img class="img-responsive" src="../img/map.jpg" alt="map" />
<img class="img-responsive" src="../medias/<?php echo $hash ?>/map.jpg" alt="map" />
</div>
</div>
</div>
@@ -63,7 +65,7 @@
// nombre de gamers
$f = 0;
foreach(glob('*.xml') as $f) {$f+=1;}
$nb_membres = count(glob('../gamers/*.xml'));
$nb_membres = count(glob('../medias/'.$hash.'/*.xml'));
?>

<?php
@@ -86,11 +88,11 @@
}

// liste des gamers
$folder = "../gamers";
$folder = "../medias/".$hash."/";
$dossier = opendir($folder);
while ($fichier = readdir($dossier))
{
if ($fichier != "." && $fichier != ".." )
if ($fichier != "." && $fichier != ".." && $fichier != "map.jpg" && $fichier != "soft.mp3" && $fichier != "tonic.mp3" && $fichier != "hard.mp3" && $fichier != "light.mp3" && $fichier != "dark.mp3")
{
$gamers = explode(".xml", $fichier);
include ("gamers.php");


+ 7
- 5
play/music.php View File

@@ -1,20 +1,22 @@
<?php $hash=md5("contact@heuzef.com"); ?>

<?php
$sample=$_GET["sample"];

if ($sample=="soft.mp3") {
echo '<audio src="../music/'.$sample.'" controls autoplay loop>Format non supporté.</audio>';
echo '<audio src="../medias/'.$hash.'/'.$sample.'" controls autoplay loop>Format non supporté.</audio>';
}
if ($sample=="tonic.mp3") {
echo '<audio src="../music/'.$sample.'" controls autoplay loop>Format non supporté.</audio>';
echo '<audio src="../medias/'.$hash.'/'.$sample.'" controls autoplay loop>Format non supporté.</audio>';
}
if ($sample=="hard.mp3") {
echo '<audio src="../music/'.$sample.'" controls autoplay loop>Format non supporté.</audio>';
echo '<audio src="../medias/'.$hash.'/'.$sample.'" controls autoplay loop>Format non supporté.</audio>';
}
if ($sample=="light.mp3") {
echo '<audio src="../music/'.$sample.'" controls autoplay loop>Format non supporté.</audio>';
echo '<audio src="../medias/'.$hash.'/'.$sample.'" controls autoplay loop>Format non supporté.</audio>';
}
if ($sample=="dark.mp3") {
echo '<audio src="../music/'.$sample.'" controls autoplay loop>Format non supporté.</audio>';
echo '<audio src="../medias/'.$hash.'/'.$sample.'" controls autoplay loop>Format non supporté.</audio>';
}

?>

BIN
scenarios/scenario_1.odt View File


Loading…
Cancel
Save