Вы не можете выбрать более 25 тем Темы должны начинаться с буквы или цифры, могут содержать дефисы(-) и должны содержать не более 35 символов.
 
 
 
 

314 строки
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" value="Derpy">
  205. </div>
  206. <div class="form-group">
  207. <label class="control-label" for="focusedInput">Nombre d'XP</label>
  208. <div class="input-group">
  209. <span class="input-group-addon"><i class="glyphicon glyphicon-flash" style="color:#FFD700;";></i></span>
  210. <select class="form-control" id="focusedInput" name="player_xp">
  211. <option>0</option>
  212. <option>10</option>
  213. <option>50</option>
  214. <option>100</option>
  215. <option>999</option>
  216. </select>
  217. </div>
  218. </div>
  219. </div>
  220. <div class="modal-footer">
  221. <button type="submit" class="btn btn-info">Création du joueur</button>
  222. </div>
  223. </form>
  224. </div>
  225. </div>
  226. </div>
  227. <?php elseif($status == 0): ?>
  228. <div class="container-fluid">
  229. <div class="col-lg-1"></div>
  230. <div class="col-lg-5">
  231. <h2>Présentation</h2>
  232. <p><strong>EcoMonde est un jeux de rôle d'aventure interactif.</strong></p>
  233. <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>
  234. <p class="text-primary">Pas besoin de feuille, de dés, de stylo ou autre. Mais uniquement d'un écran. Tous est automatisé.</p>
  235. <p class="text-warning">Le Maître de Jeux peut ensuite créer sa partie en s'appuyant sur tous les outils existants.</p>
  236. <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>
  237. </div>
  238. <div class="col-lg-5">
  239. <h2>Créer un compte</h2>
  240. <form class="form-horizontal well" role="form" method="post" action="register.php" enctype="multipart/form-data">
  241. <fieldset>
  242. <div class="form-group">
  243. <label for="pseudo" class="col-lg-3 control-label">Pseudo</label>
  244. <div class="col-lg-9">
  245. <input type="text" class="form-control" name="pseudo" placeholder="Pseudo">
  246. </div>
  247. </div>
  248. <div class="form-group">
  249. <label for="Email" class="col-lg-3 control-label">E-mail</label>
  250. <div class="col-lg-9">
  251. <input type="text" class="form-control" name="email" placeholder="E-mail">
  252. </div>
  253. </div>
  254. <div class="form-group">
  255. <label for="password" class="col-lg-3 control-label">Mot de passe</label>
  256. <div class="col-lg-9">
  257. <input type="password" class="form-control" name="pass" placeholder="Mot de passe">
  258. </div>
  259. </div>
  260. <div class="form-group">
  261. <div class="col-lg-9 col-lg-offset-3">
  262. <button type="submit" class="btn btn-primary"><i class="glyphicon glyphicon-ok"></i>&nbsp;&nbsp;OK</button>
  263. </div>
  264. </div>
  265. </fieldset>
  266. </form>
  267. </div>
  268. <div class="col-lg-1"></div>
  269. </div>
  270. <div class="modal fade" id="modal_login">
  271. <div class="modal-dialog">
  272. <div class="modal-content">
  273. <form class="form-horizontal well" role="form" method="post" action="session.php" enctype="multipart/form-data">
  274. <div class="modal-header">
  275. <a type="button" class="close" data-dismiss="modal" aria-hidden="true" style="color:black;">X</a>
  276. <h4 class="modal-title"><i class="glyphicon glyphicon-log-in"></i>&nbsp;&nbsp;CONNEXION</h4>
  277. </div>
  278. <div class="modal-body">
  279. <div class="form-group">
  280. <label class="control-label" for="focusedInput">Email :</label>
  281. <input class="form-control" id="focusedInput" type="text" name="email">
  282. </div>
  283. <div class="form-group">
  284. <label class="control-label" for="focusedInput">Mot de passe :</label>
  285. <input class="form-control" id="focusedInput" type="password" name="password">
  286. </div>
  287. </div>
  288. <div class="modal-footer">
  289. <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>
  290. &nbsp;&nbsp;<button type="submit" class="btn btn-info">Connexion</button>
  291. </div>
  292. </form>
  293. </div>
  294. </div>
  295. </div>
  296. <?php endif; ?>
  297. <script src="./js/jquery-1.10.2.min.js"></script>
  298. <script src="./js/bootstrap.min.js"></script>
  299. <script src="./js/bootswatch.js"></script>
  300. </body>
  301. </html>