You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 

250 lines
10 KiB

  1. <?php
  2. session_start();
  3. $status=$_SESSION['status'];
  4. $hash=md5("contact@heuzef.com");
  5. ?>
  6. <!DOCTYPE html>
  7. <html lang="fr">
  8. <head>
  9. <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
  10. <title>EcoMonde</title>
  11. <meta name="viewport" content="width=device-width, initial-scale=1">
  12. <link rel="stylesheet" href="./css/bootstrap.css" media="screen">
  13. <link rel="stylesheet" href="./css/bootswatch.min.css">
  14. <link rel="stylesheet" href="./css/ecomonde.css">
  15. </head>
  16. <body>
  17. <div class="container-fluid">
  18. <div class="col-lg-1"></div>
  19. <div class="col-lg-3">
  20. <a href="#"><img class="img-responsive" src="./img/logo_<?php echo rand(1, 6); ?>.png" alt="logo" /></a>
  21. </div>
  22. <div class="col-lg-6">
  23. <div class="navbar navbar-default">
  24. <div class="navbar-header">
  25. <button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".navbar-responsive-collapse">
  26. <span class="icon-bar"></span>
  27. <span class="icon-bar"></span>
  28. <span class="icon-bar"></span>
  29. </button>
  30. </div>
  31. <div class="navbar-collapse collapse navbar-responsive-collapse">
  32. <ul class="nav navbar-nav">
  33. <li><a href="http://wiki.ecomonde.land"><i class="glyphicon glyphicon-book"></i>&nbsp;&nbsp;WIKI</a></li>
  34. <li><a href="https://github.com/heuzef/ecomonde"><i class="glyphicon glyphicon-new-window"></i>&nbsp;&nbsp;GITHUB</a></li>
  35. </ul>
  36. <ul class="nav navbar-nav navbar-right">
  37. <?php if($status == 1): ?>
  38. <li><?php echo '<img src="http://gravatar.com/avatar/'.$hash.'?s=50" alt="gravatar" />'; ?> <strong>HEUZEF</strong></li>
  39. <li><a href="logout.php"><i class="glyphicon glyphicon-log-out"></i>&nbsp;&nbsp;DECONNEXION</a></li>
  40. <?php elseif($status == 0): ?>
  41. <li><a data-toggle="modal" data-target="#modal_login"><i class="glyphicon glyphicon-log-in"></i>&nbsp;&nbsp;CONNEXION</a></li>
  42. <?php endif; ?>
  43. </ul>
  44. </div>
  45. </div>
  46. </div>
  47. <div class="col-lg-1"></div>
  48. </div>
  49. <hr />
  50. <?php if($status == 1): ?>
  51. <div class="container-fluid">
  52. <div class="col-lg-1"></div>
  53. <div class="col-lg-3">
  54. <div class="panel panel-default">
  55. <div class="panel-heading"><i class="glyphicon glyphicon-cog"></i>&nbsp;&nbsp;<strong>Configurer votre partie</strong></div>
  56. <div class="panel-body">
  57. <p>
  58. <a href="play" class="btn btn-info btn-lg" target="_blank"><i class="glyphicon glyphicon-play"></i>&nbsp;&nbsp;Lancer votre partie</a>
  59. <p>
  60. <hr />
  61. <p>
  62. <a href="#" class="btn btn-default btn-lg"><i class="glyphicon glyphicon-plus"></i>&nbsp;&nbsp;Créer un joueur</a>
  63. </p>
  64. <hr />
  65. <p>
  66. <a href="#" class="btn btn-default btn-lg"><i class="glyphicon glyphicon-import"></i>&nbsp;&nbsp;Importer un joueur (.XML)</a>
  67. </p>
  68. <hr />
  69. <p>
  70. <div class="btn-group">
  71. <a href="#" class="btn btn-default btn-lg dropdown-toggle" data-toggle="dropdown">
  72. <i class="glyphicon glyphicon-music"></i>&nbsp;&nbsp;Changer les musiques
  73. <span class="caret"></span>
  74. </a>
  75. <ul class="dropdown-menu">
  76. <li><a href="#" style="color:#CCC;"><i class="glyphicon glyphicon-music"></i>&nbsp;&nbsp;SOFT</a></li>
  77. <li class="divider"></li>
  78. <li><a href="#" style="color:#AAA;"><i class="glyphicon glyphicon-music"></i>&nbsp;&nbsp;TONIC</a></li>
  79. <li class="divider"></li>
  80. <li><a href="#" style="color:#000;"><i class="glyphicon glyphicon-music"></i>&nbsp;&nbsp;HARD</a></li>
  81. <li class="divider"></li>
  82. <li><a href="#" style="color:#ADDFFF;"><i class="glyphicon glyphicon-music"></i>&nbsp;&nbsp;LIGHT</a></li>
  83. <li class="divider"></li>
  84. <li><a href="#" style="color:#8128B5;"><i class="glyphicon glyphicon-music"></i>&nbsp;&nbsp;DARK</a></li>
  85. </ul>
  86. </div>
  87. </p>
  88. <hr />
  89. <p>
  90. <a href="#" class="btn btn-default btn-lg"><i class="glyphicon glyphicon-map-marker"></i>&nbsp;&nbsp;Changer la carte</a>
  91. </p>
  92. <hr />
  93. <p>
  94. <a href="play" class="btn btn-danger btn-lg"><i class="glyphicon glyphicon-remove"></i>&nbsp;&nbsp;Supprimer votre partie</a>
  95. </p>
  96. </div>
  97. </div>
  98. </div>
  99. <div class="col-lg-7">
  100. <div class="panel panel-default">
  101. <div class="panel-heading"><i class="glyphicon glyphicon-user"></i>&nbsp;&nbsp;<strong>Joueurs présents dans votre partie :</strong></div>
  102. <div class="panel-body">
  103. <table class="table table-striped table-hover ">
  104. <thead>
  105. <tr>
  106. <th></th>
  107. <th>Nom</th>
  108. <th><i class="glyphicon glyphicon-heart" style="color:red;"></i></th>
  109. <th><i class="glyphicon glyphicon-flash" style="color:#FFD700;"></i></th>
  110. <th><i class="glyphicon glyphicon-fire" style="color:#28b62c"></i></th>
  111. <th><i class="glyphicon glyphicon-fire" style="color:#158cba"></i></th>
  112. <th><i class="glyphicon glyphicon-fire" style="color:#ffd000"></i></th>
  113. <th><i class="glyphicon glyphicon-fire" style="color:#ff4136"></i></th>
  114. <th><i class="glyphicon glyphicon-fire" style="color:#ADDFFF"></i></th>
  115. <th><i class="glyphicon glyphicon-fire" style="color:#8128B5"></i></th>
  116. </tr>
  117. </thead>
  118. <tbody>
  119. <?php
  120. // nombre de gamers
  121. $f = 0;
  122. foreach(glob('*.xml') as $f) {$f+=1;}
  123. $nb_membres = count(glob('./medias/'.$hash.'/*.xml'));
  124. // liste des gamers
  125. $folder = "./medias/".$hash."/";
  126. $dossier = opendir($folder);
  127. while ($fichier = readdir($dossier))
  128. {
  129. if ($fichier != "." && $fichier != ".." && $fichier != "map.jpg" && $fichier != "soft.mp3" && $fichier != "tonic.mp3" && $fichier != "hard.mp3" && $fichier != "light.mp3" && $fichier != "dark.mp3")
  130. {
  131. $gamers = explode(".xml", $fichier);
  132. $xml = simplexml_load_file('./medias/'.$hash.'/'.$fichier);
  133. if (!isset($itemnb)) {
  134. $itemnb=0;
  135. } else {
  136. $itemnb++;
  137. }
  138. foreach($xml->entry as $entry) {
  139. echo '<tr class="active">
  140. <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>
  141. <td>'.$entry->nom.'</td>
  142. <td>'.$entry->hp.'</td>
  143. <td>'.$entry->xp.'</td>
  144. <td>'.$entry->ecos->verte.'</td>
  145. <td>'.$entry->ecos->bleue.'</td>
  146. <td>'.$entry->ecos->jaune.'</td>
  147. <td>'.$entry->ecos->rouge.'</td>
  148. <td>'.$entry->ecos->blanche.'</td>
  149. <td>'.$entry->ecos->noire.'</td>
  150. </tr>';
  151. }
  152. }
  153. }
  154. closedir($dossier);
  155. ?>
  156. </tbody>
  157. </table>
  158. </div>
  159. </div>
  160. </div>
  161. <div class="col-lg-1"></div>
  162. </div>
  163. <?php elseif($status == 0): ?>
  164. <div class="container-fluid">
  165. <div class="col-lg-1"></div>
  166. <div class="col-lg-5">
  167. <h2>Présentation</h2>
  168. <p><strong>EcoMonde est un jeux de rôle d'aventure interactif.</strong></p>
  169. <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>
  170. <p class="text-primary">Pas besoin de feuille, de dés, de stylo ou autre. Mais uniquement d'un écran. Tous est automatisé.</p>
  171. <p class="text-warning">Le Maître de Jeux peut ensuite créer sa partie en s'appuyant sur tous les outils existants.</p>
  172. <p class="text-danger">Un <a href="http://wiki.ecomonde.land"><i class="glyphicon glyphicon-book"></i>&nbsp;&nbsp;WIKI</a> est à disposition pour un plus grand partages de ressources.</p>
  173. </div>
  174. <div class="col-lg-5">
  175. <h2>Créer un compte</h2>
  176. <form class="form-horizontal well" role="form" method="post" action="register.php" enctype="multipart/form-data">
  177. <fieldset>
  178. <div class="form-group">
  179. <label for="pseudo" class="col-lg-3 control-label">Pseudo</label>
  180. <div class="col-lg-9">
  181. <input type="text" class="form-control" name="pseudo" placeholder="Pseudo">
  182. </div>
  183. </div>
  184. <div class="form-group">
  185. <label for="Email" class="col-lg-3 control-label">E-mail</label>
  186. <div class="col-lg-9">
  187. <input type="text" class="form-control" name="email" placeholder="E-mail">
  188. </div>
  189. </div>
  190. <div class="form-group">
  191. <label for="password" class="col-lg-3 control-label">Mot de passe</label>
  192. <div class="col-lg-9">
  193. <input type="password" class="form-control" name="pass" placeholder="Mot de passe">
  194. </div>
  195. </div>
  196. <div class="form-group">
  197. <div class="col-lg-9 col-lg-offset-3">
  198. <button type="submit" class="btn btn-primary"><i class="glyphicon glyphicon-ok"></i>&nbsp;&nbsp;OK</button>
  199. </div>
  200. </div>
  201. </fieldset>
  202. </form>
  203. </div>
  204. <div class="col-lg-1"></div>
  205. </div>
  206. <div class="modal fade" id="modal_login">
  207. <div class="modal-dialog">
  208. <div class="modal-content">
  209. <form class="form-horizontal well" role="form" method="post" action="session.php" enctype="multipart/form-data">
  210. <div class="modal-header">
  211. <a type="button" class="close" data-dismiss="modal" aria-hidden="true" style="color:black;">X</a>
  212. <h4 class="modal-title"><i class="glyphicon glyphicon-log-in"></i>&nbsp;&nbsp;CONNEXION</h4>
  213. </div>
  214. <div class="modal-body">
  215. <div class="form-group">
  216. <label class="control-label" for="focusedInput">Email :</label>
  217. <input class="form-control" id="focusedInput" type="text" name="email">
  218. </div>
  219. <div class="form-group">
  220. <label class="control-label" for="focusedInput">Mot de passe :</label>
  221. <input class="form-control" id="focusedInput" type="password" name="password">
  222. </div>
  223. </div>
  224. <div class="modal-footer">
  225. <button type="submit" class="btn btn-info">Connexion</button>
  226. </div>
  227. </form>
  228. </div>
  229. </div>
  230. </div>
  231. <?php endif; ?>
  232. <script src="./js/jquery-1.10.2.min.js"></script>
  233. <script src="./js/bootstrap.min.js"></script>
  234. <script src="./js/bootswatch.js"></script>
  235. </body>
  236. </html>