|
- <?php include "header.php";
- $message[0]='';
- $message[1]='
- <div class="col-lg-6 alert alert-dismissable alert-success">
- <button type="button" class="close" data-dismiss="alert">X</button>
- <h4>C\'est bon !</h4>
- <p>Vous pouvez à présent vous connecter pour commencer à configurer votre partie.</p>';
- $message[2]='
- <div class="col-lg-6 alert alert-dismissable alert-warning">
- <button type="button" class="close" data-dismiss="alert">X</button>
- <h4>Hey !</h4>
- <p>Vous avez déjà un compte !</p>';
- $message[3]='
- <div class="col-lg-6 alert alert-dismissable alert-danger">
- <button type="button" class="close" data-dismiss="alert">X</button>
- <h4>Erreur !</h4>
- <p>Votre email/mot de passe est invalide !</p>';
- $message[4]='
- <div class="col-lg-6 alert alert-dismissable alert-info">
- <button type="button" class="close" data-dismiss="alert">X</button>
- <h4>Oups !</h4>
- <p>Vous devez vous connecter pour pouvoir jouer ;)</p>';
- ?>
- <!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="stylesheet" href="./css/bootstrap.css" media="screen">
- <link rel="stylesheet" href="./css/bootswatch.min.css">
- <link rel="stylesheet" href="./css/ecomonde.css">
- </head>
- <body>
- <div class="container-fluid">
- <div class="col-lg-1"></div>
- <div class="col-lg-3">
- <a href="#"><img class="img-responsive" src="./img/logo_<?php echo rand(1, 6); ?>.png" alt="logo" /></a>
- </div>
- <div class="col-lg-6">
- <div class="navbar navbar-default">
- <div class="navbar-header">
- <button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".navbar-responsive-collapse">
- <span class="icon-bar"></span>
- <span class="icon-bar"></span>
- <span class="icon-bar"></span>
- </button>
- </div>
- <div class="navbar-collapse collapse navbar-responsive-collapse">
- <ul class="nav navbar-nav">
- <li><a href="http://wiki.ecomonde.land"><i class="glyphicon glyphicon-book"></i> WIKI</a></li>
- <li><a href="https://github.com/heuzef/ecomonde"><i class="glyphicon glyphicon-new-window"></i> GITHUB</a></li>
- </ul>
- <ul class="nav navbar-nav navbar-right">
- <?php if($status != 0): ?>
- <li><?php echo '<img class="img-circle" src="http://gravatar.com/avatar/'.$hash.'?s=50" alt="gravatar" />'; ?> <strong><?php echo strtoupper($pseudo); ?></strong></li>
- <li><a href="logout.php"><i class="glyphicon glyphicon-log-out"></i> DECONNEXION</a></li>
- <?php elseif($status == 0): ?>
- <li><a data-toggle="modal" data-target="#modal_login"><i class="glyphicon glyphicon-log-in"></i> CONNEXION</a></li>
- <?php endif; ?>
- </ul>
- </div>
- </div>
- </div>
- <div class="col-lg-1"></div>
- </div>
- <hr />
-
- <?php if(isset($_GET["msg"])){?>
- <div class="container-fluid">
- <div class="col-lg-3"></div>
- <?php echo $message[$_GET["msg"]]; ?>
- </div>
- <div class="col-lg-3"></div>
- </div>
- <?php } else {} ?>
-
- <?php if($status != 0):?>
-
- <div class="container-fluid">
- <div class="col-lg-3"></div>
- <div class="col-lg-6 alert alert-dismissable alert-info">
- <button type="button" class="close" data-dismiss="alert">X</button>
- <p><i class="glyphicon glyphicon-wrench"></i> EcoMonde est encore en Beta, certaines fonctions ne sont pas encore disponibles.</p>
- </div>
- <div class="col-lg-3"></div>
- </div>
-
- <div class="container-fluid">
- <div class="col-lg-1"></div>
- <div class="col-lg-3">
- <div class="panel panel-default">
- <div class="panel-heading"><i class="glyphicon glyphicon-cog"></i> <strong>Configurer votre partie</strong></div>
- <div class="panel-body">
- <p>
- <a href="play" class="btn btn-info btn-lg" target="_blank"><i class="glyphicon glyphicon-play"></i> Lancer votre partie</a>
- <p>
- <hr />
- <p>
- <a data-toggle="modal" data-target="#modal_new_player" class="btn btn-default btn-lg"><i class="glyphicon glyphicon-plus"></i> Créer un joueur</a>
- </p>
- <hr />
- <p>
- <a href="#" class="btn btn-default btn-lg disabled"><i class="glyphicon glyphicon-import"></i> Importer un joueur (.XML)</a>
- </p>
- <hr />
- <p>
- <div class="btn-group">
- <a href="#" class="btn btn-default btn-lg dropdown-toggle disabled" data-toggle="dropdown">
- <i class="glyphicon glyphicon-music"></i> Changer les musiques
- <span class="caret"></span>
- </a>
- <ul class="dropdown-menu">
- <li><a href="#" style="color:#CCC;"><i class="glyphicon glyphicon-music"></i> SOFT</a></li>
- <li class="divider"></li>
- <li><a href="#" style="color:#AAA;"><i class="glyphicon glyphicon-music"></i> TONIC</a></li>
- <li class="divider"></li>
- <li><a href="#" style="color:#000;"><i class="glyphicon glyphicon-music"></i> HARD</a></li>
- <li class="divider"></li>
- <li><a href="#" style="color:#ADDFFF;"><i class="glyphicon glyphicon-music"></i> LIGHT</a></li>
- <li class="divider"></li>
- <li><a href="#" style="color:#8128B5;"><i class="glyphicon glyphicon-music"></i> DARK</a></li>
- </ul>
- </div>
- </p>
- <hr />
- <p>
- <a href="#" class="btn btn-default btn-lg disabled"><i class="glyphicon glyphicon-map-marker"></i> Changer la carte</a>
- </p>
- </div>
- </div>
- </div>
- <div class="col-lg-7">
- <div class="panel panel-default">
- <div class="panel-heading"><i class="glyphicon glyphicon-user"></i> <strong>Joueurs présents dans votre partie :</strong></div>
- <div class="panel-body">
- <table class="table table-striped table-hover ">
- <thead>
- <tr>
- <th></th>
- <th>Nom</th>
- <th><i class="glyphicon glyphicon-heart" style="color:red;"></i></th>
- <th><i class="glyphicon glyphicon-flash" style="color:#FFD700;"></i></th>
- <th><i class="glyphicon glyphicon-fire" style="color:#28b62c"></i></th>
- <th><i class="glyphicon glyphicon-fire" style="color:#158cba"></i></th>
- <th><i class="glyphicon glyphicon-fire" style="color:#ffd000"></i></th>
- <th><i class="glyphicon glyphicon-fire" style="color:#ff4136"></i></th>
- <th><i class="glyphicon glyphicon-fire" style="color:#ADDFFF"></i></th>
- <th><i class="glyphicon glyphicon-fire" style="color:#8128B5"></i></th>
- </tr>
- </thead>
- <tbody>
- <?php
- // nombre de gamers
- $f = 0;
- foreach(glob('*.xml') as $f) {$f+=1;}
- $nb_membres = count(glob('./medias/'.$hash.'/*.xml'));
-
- // liste des gamers
- $folder = "./medias/".$hash."/";
- $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")
- {
- $gamers = explode(".xml", $fichier);
-
- $xml = simplexml_load_file('./medias/'.$hash.'/'.$fichier);
- if (!isset($itemnb)) {
- $itemnb=0;
- } else {
- $itemnb++;
- }
- foreach($xml->entry as $entry) {
- echo '<tr class="active">
- <td><a href="del.php?player='.$fichier.'" class="btn btn-danger btn-xs"><i class="glyphicon glyphicon-trash"></i></a> <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>
- <td>'.$entry->ecos->verte.'</td>
- <td>'.$entry->ecos->bleue.'</td>
- <td>'.$entry->ecos->jaune.'</td>
- <td>'.$entry->ecos->rouge.'</td>
- <td>'.$entry->ecos->blanche.'</td>
- <td>'.$entry->ecos->noire.'</td>
- </tr>';
- }
- }
- }
- closedir($dossier);
- ?>
- </tbody>
- </table>
- </div>
- </div>
- </div>
- <div class="col-lg-1"></div>
- </div>
-
- <div class="modal fade" id="modal_new_player">
- <div class="modal-dialog">
- <div class="modal-content">
- <form class="form-horizontal well" role="form" method="post" action="new_player.php" enctype="multipart/form-data">
- <div class="modal-header">
- <a type="button" class="close" data-dismiss="modal" aria-hidden="true" style="color:black;">X</a>
- <h4 class="modal-title"><i class="glyphicon glyphicon-log-in"></i> NOUVEAU JOUEUR</h4>
- </div>
- <div class="modal-body">
- <div class="form-group">
- <label class="control-label" for="focusedInput">Nom :</label>
- <input class="form-control" id="focusedInput" type="text" name="player_name">
- </div>
- </div>
- <div class="modal-footer">
- <button type="submit" class="btn btn-info">Création du joueur</button>
- </div>
- </form>
- </div>
- </div>
- </div>
-
- <?php elseif($status == 0): ?>
-
- <div class="container-fluid">
- <div class="col-lg-1"></div>
- <div class="col-lg-5">
- <h2>Présentation</h2>
- <p><strong>EcoMonde est un jeux de rôle d'aventure interactif.</strong></p>
- <p class="text-success">Celui-ci dispose d'une interface de jeu permetant aux Maître de Jeux de contrôler la partie directement sans avoir besoin de matériel.</p>
- <p class="text-primary">Pas besoin de feuille, de dés, de stylo ou autre. Mais uniquement d'un écran. Tous est automatisé.</p>
- <p class="text-warning">Le Maître de Jeux peut ensuite créer sa partie en s'appuyant sur tous les outils existants.</p>
- <p class="text-danger">Un <a href="http://wiki.ecomonde.land"><i class="glyphicon glyphicon-book"></i> WIKI</a> est à disposition pour un plus grand partages de ressources.</p>
- </div>
- <div class="col-lg-5">
- <h2>Créer un compte</h2>
- <form class="form-horizontal well" role="form" method="post" action="register.php" enctype="multipart/form-data">
- <fieldset>
- <div class="form-group">
- <label for="pseudo" class="col-lg-3 control-label">Pseudo</label>
- <div class="col-lg-9">
- <input type="text" class="form-control" name="pseudo" placeholder="Pseudo">
- </div>
- </div>
- <div class="form-group">
- <label for="Email" class="col-lg-3 control-label">E-mail</label>
- <div class="col-lg-9">
- <input type="text" class="form-control" name="email" placeholder="E-mail">
- </div>
- </div>
- <div class="form-group">
- <label for="password" class="col-lg-3 control-label">Mot de passe</label>
- <div class="col-lg-9">
- <input type="password" class="form-control" name="pass" placeholder="Mot de passe">
- </div>
- </div>
- <div class="form-group">
- <div class="col-lg-9 col-lg-offset-3">
- <button type="submit" class="btn btn-primary"><i class="glyphicon glyphicon-ok"></i> OK</button>
- </div>
- </div>
- </fieldset>
- </form>
- </div>
- <div class="col-lg-1"></div>
- </div>
-
- <div class="modal fade" id="modal_login">
- <div class="modal-dialog">
- <div class="modal-content">
- <form class="form-horizontal well" role="form" method="post" action="session.php" enctype="multipart/form-data">
- <div class="modal-header">
- <a type="button" class="close" data-dismiss="modal" aria-hidden="true" style="color:black;">X</a>
- <h4 class="modal-title"><i class="glyphicon glyphicon-log-in"></i> CONNEXION</h4>
- </div>
- <div class="modal-body">
- <div class="form-group">
- <label class="control-label" for="focusedInput">Email :</label>
- <input class="form-control" id="focusedInput" type="text" name="email">
- </div>
- <div class="form-group">
- <label class="control-label" for="focusedInput">Mot de passe :</label>
- <input class="form-control" id="focusedInput" type="password" name="password">
- </div>
- </div>
- <div class="modal-footer">
- <a href="mailto:contact@heuzef.com?subject=Contact%20depuis%20heuzef.com" onclick="window.open('https://mail.google.com/mail/?view=cm&tf=1&to=contact@heuzef.com&cc=&bcc=&su=[EcoMonde]%20Probleme%20avec%20mon%20compte&body=Bonjour,','_blank');return false;">Un problème avec votre compte ?</a>
- <button type="submit" class="btn btn-info">Connexion</button>
- </div>
- </form>
- </div>
- </div>
- </div>
-
- <?php endif; ?>
-
- <script src="./js/jquery-1.10.2.min.js"></script>
- <script src="./js/bootstrap.min.js"></script>
- <script src="./js/bootswatch.js"></script>
- </body>
- </html>
|