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.
 
 
 
 

301 lines
13 KiB

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