Ви не можете вибрати більше 25 тем Теми мають розпочинатися з літери або цифри, можуть містити дефіси (-) і не повинні перевищувати 35 символів.
 
 
 
 

338 рядки
14 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. $message[5]='
  24. <div class="col-lg-6 alert alert-dismissable alert-success">
  25. <button type="button" class="close" data-dismiss="alert">X</button>
  26. <h4>OK !</h4>
  27. <p>Votre carte est à jour !</p>';
  28. $message[6]='
  29. <div class="col-lg-6 alert alert-dismissable alert-danger">
  30. <button type="button" class="close" data-dismiss="alert">X</button>
  31. <h4>ERREUR !</h4>
  32. <p>Echec de mise à jour de votre carte. Seul les fichiers <strong>.jpg</strong> (10 Mo max) sont autorisés.</p>';
  33. ?>
  34. <!DOCTYPE html>
  35. <html lang="fr">
  36. <head>
  37. <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
  38. <title>EcoMonde</title>
  39. <meta name="viewport" content="width=device-width, initial-scale=1">
  40. <link rel="stylesheet" href="./css/bootstrap.css" media="screen">
  41. <link rel="stylesheet" href="./css/bootswatch.min.css">
  42. <link rel="stylesheet" href="./css/ionicons.min.css">
  43. <link rel="stylesheet" href="./css/ecomonde.css">
  44. </head>
  45. <body>
  46. <div class="container-fluid">
  47. <div class="col-lg-1"></div>
  48. <div class="col-lg-3">
  49. <a href="#"><img class="img-responsive" src="./img/logo_<?php echo rand(1, 6); ?>.png" alt="logo" /></a>
  50. </div>
  51. <div class="col-lg-6">
  52. <div class="navbar navbar-default">
  53. <div class="navbar-header">
  54. <button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".navbar-responsive-collapse">
  55. <span class="icon-bar"></span>
  56. <span class="icon-bar"></span>
  57. <span class="icon-bar"></span>
  58. </button>
  59. </div>
  60. <div class="navbar-collapse collapse navbar-responsive-collapse">
  61. <ul class="nav navbar-nav">
  62. <li><a href="http://wiki.ecomonde.land" target="_blank"><i class="ionicons ion-android-book"></i>&nbsp;&nbsp;WIKI</a></li>
  63. <li><a href="https://github.com/heuzef/ecomonde" target="_blank"><i class="ionicons ion-social-github"></i>&nbsp;&nbsp;GITHUB</a></li>
  64. <li><a href="http://wiki.ecomonde.land/doku.php?id=wiki:a_propos" target="_blank"><i class="ionicons ion-information-circled"></i>&nbsp;&nbsp;A PROPOS</a></li>
  65. </ul>
  66. <ul class="nav navbar-nav navbar-right">
  67. <?php if($status != 0): ?>
  68. <a href="http://fr.gravatar.com" target="_blank"><?php echo '<img class="img-circle" src="http://gravatar.com/avatar/'.$hash.'?s=50" alt="gravatar" />'; ?></a>&nbsp;&nbsp;<strong><?php echo strtoupper($pseudo); ?></strong>
  69. &nbsp;&nbsp;
  70. <a href="logout.php" class="btn btn-danger btn-xs"><i class="ionicons ion-power"></i></a>&nbsp;&nbsp;
  71. <?php elseif($status == 0): ?>
  72. <a class="btn btn-info btn-xs" data-toggle="modal" data-target="#modal_login"><i class="ionicons ion-power"></i>&nbsp;&nbsp;CONNEXION</a>
  73. <?php endif; ?>
  74. </ul>
  75. </div>
  76. </div>
  77. </div>
  78. <div class="col-lg-1"></div>
  79. </div>
  80. <hr />
  81. <?php if(isset($_GET["msg"])){?>
  82. <div class="container-fluid">
  83. <div class="col-lg-3"></div>
  84. <?php echo $message[$_GET["msg"]]; ?>
  85. </div>
  86. <div class="col-lg-3"></div>
  87. </div>
  88. <?php } else {} ?>
  89. <?php if($status != 0):?>
  90. <div class="container-fluid">
  91. <div class="col-lg-1"></div>
  92. <div class="col-lg-3">
  93. <div class="panel panel-default">
  94. <div class="panel-heading"><i class="ionicons ion-gear-a"></i>&nbsp;&nbsp;<strong>Configurer votre partie</strong></div>
  95. <div class="panel-body">
  96. <p>
  97. <a href="play" class="btn btn-info btn-lg" target="_blank"><i class="ionicons ion-play"></i>&nbsp;&nbsp;Lancer votre partie</a>
  98. <p>
  99. <hr />
  100. <p>
  101. <a data-toggle="modal" data-target="#modal_new_player" class="btn btn-default btn-lg"><i class="ionicons ion-person-add"></i>&nbsp;&nbsp;Créer un joueur</a>
  102. </p>
  103. <hr />
  104. <p>
  105. <a href="#" class="btn btn-default btn-lg disabled"><i class="glyphicon glyphicon-import"></i>&nbsp;&nbsp;Importer un joueur (.XML)</a>
  106. </p>
  107. <hr />
  108. <p>
  109. <div class="btn-group">
  110. <a href="#" class="btn btn-default btn-lg dropdown-toggle disabled" data-toggle="dropdown">
  111. <i class="ionicons ion-music-note"></i>&nbsp;&nbsp;Changer les musiques
  112. <span class="caret"></span>
  113. </a>
  114. <ul class="dropdown-menu">
  115. <li><a href="#" style="color:#CCC;"><i class="ionicons ion-music-note"></i>&nbsp;&nbsp;SOFT</a></li>
  116. <li class="divider"></li>
  117. <li><a href="#" style="color:#AAA;"><i class="ionicons ion-music-note"></i>&nbsp;&nbsp;TONIC</a></li>
  118. <li class="divider"></li>
  119. <li><a href="#" style="color:#000;"><i class="ionicons ion-music-note"></i>&nbsp;&nbsp;HARD</a></li>
  120. <li class="divider"></li>
  121. <li><a href="#" style="color:#ADDFFF;"><i class="ionicons ion-music-note"></i>&nbsp;&nbsp;LIGHT</a></li>
  122. <li class="divider"></li>
  123. <li><a href="#" style="color:#8128B5;"><i class="ionicons ion-music-note"></i>&nbsp;&nbsp;DARK</a></li>
  124. </ul>
  125. </div>
  126. </p>
  127. <hr />
  128. <p>
  129. <a data-toggle="modal" data-target="#modal_change_map" class="btn btn-default btn-lg"><i class="ionicons ion-map"></i>&nbsp;&nbsp;Changer la carte</a>
  130. </p>
  131. </div>
  132. </div>
  133. </div>
  134. <div class="col-lg-7">
  135. <div class="panel panel-default">
  136. <div class="panel-heading"><i class="ionicons ion-person"></i>&nbsp;&nbsp;<strong>Joueurs présents dans votre partie :</strong></div>
  137. <div class="panel-body">
  138. <table class="table table-striped table-hover ">
  139. <thead>
  140. <tr>
  141. <th></th>
  142. <th>Nom</th>
  143. <th><i class="ionicons ion-heart" style="color:red;"></i></th>
  144. <th><i class="ionicons ion-flash" style="color:#FFD700;"></i></th>
  145. <th><i class="ionicons ion-fireball" style="color:#28b62c"></i></th>
  146. <th><i class="ionicons ion-fireball" style="color:#158cba"></i></th>
  147. <th><i class="ionicons ion-fireball" style="color:#ffd000"></i></th>
  148. <th><i class="ionicons ion-fireball" style="color:#ff4136"></i></th>
  149. <th><i class="ionicons ion-fireball" style="color:#ADDFFF"></i></th>
  150. <th><i class="ionicons ion-fireball" style="color:#8128B5"></i></th>
  151. </tr>
  152. </thead>
  153. <tbody>
  154. <?php
  155. // nombre de gamers
  156. $f = 0;
  157. foreach(glob('*.xml') as $f) {$f+=1;}
  158. $nb_membres = count(glob('./medias/'.$hash.'/*.xml'));
  159. // liste des gamers
  160. $folder = "./medias/".$hash."/";
  161. $dossier = opendir($folder);
  162. while ($fichier = readdir($dossier))
  163. {
  164. if ($fichier != "." && $fichier != ".." && $fichier != "map.jpg" && $fichier != "soft.mp3" && $fichier != "tonic.mp3" && $fichier != "hard.mp3" && $fichier != "light.mp3" && $fichier != "dark.mp3")
  165. {
  166. $gamers = explode(".xml", $fichier);
  167. $xml = simplexml_load_file('./medias/'.$hash.'/'.$fichier);
  168. if (!isset($itemnb)) {
  169. $itemnb=0;
  170. } else {
  171. $itemnb++;
  172. }
  173. foreach($xml->entry as $entry) {
  174. echo '<tr class="active">
  175. <td><a href="del.php?player='.$fichier.'" class="btn btn-danger btn-xs"><i class="ionicons ion-trash-b"></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>
  176. <td>'.$entry->nom.'</td>
  177. <td>'.$entry->hp.'</td>
  178. <td>'.$entry->xp.'</td>
  179. <td>'.$entry->ecos->verte.'</td>
  180. <td>'.$entry->ecos->bleue.'</td>
  181. <td>'.$entry->ecos->jaune.'</td>
  182. <td>'.$entry->ecos->rouge.'</td>
  183. <td>'.$entry->ecos->blanche.'</td>
  184. <td>'.$entry->ecos->noire.'</td>
  185. </tr>';
  186. }
  187. }
  188. }
  189. closedir($dossier);
  190. ?>
  191. </tbody>
  192. </table>
  193. </div>
  194. </div>
  195. </div>
  196. <div class="col-lg-1"></div>
  197. </div>
  198. <div class="modal fade" id="modal_new_player">
  199. <div class="modal-dialog">
  200. <div class="modal-content">
  201. <form class="form-horizontal well" role="form" method="post" action="new_player.php" enctype="multipart/form-data">
  202. <div class="modal-header">
  203. <a type="button" class="close" data-dismiss="modal" aria-hidden="true" style="color:black;">X</a>
  204. <h4 class="modal-title"><i class="ionicons ion-person-add"></i>&nbsp;&nbsp;NOUVEAU JOUEUR</h4>
  205. </div>
  206. <div class="modal-body">
  207. <div class="form-group">
  208. <label class="control-label" for="focusedInput">Nom :</label>
  209. <input class="form-control" id="focusedInput" type="text" name="player_name" maxlength="12" value="Derpy">
  210. </div>
  211. <div class="form-group">
  212. <label class="control-label" for="focusedInput">Nombre d'XP</label>
  213. <div class="input-group">
  214. <span class="input-group-addon"><i class="ionicons ion-flash" style="color:#FFD700;";></i></span>
  215. <select class="form-control" id="focusedInput" name="player_xp">
  216. <option>0</option>
  217. <option>10</option>
  218. <option>50</option>
  219. <option>100</option>
  220. <option>999</option>
  221. </select>
  222. </div>
  223. </div>
  224. </div>
  225. <div class="modal-footer">
  226. <button type="submit" class="btn btn-info">Création du joueur</button>
  227. </div>
  228. </form>
  229. </div>
  230. </div>
  231. </div>
  232. <div class="modal fade" id="modal_change_map">
  233. <div class="modal-dialog">
  234. <div class="modal-content">
  235. <form class="form-horizontal well" role="form" method="post" action="change_map.php" enctype="multipart/form-data">
  236. <div class="modal-header">
  237. <a type="button" class="close" data-dismiss="modal" aria-hidden="true" style="color:black;">X</a>
  238. <h4 class="modal-title"><i class="ionicons ion-map"></i>&nbsp;&nbsp;CHANGER LA CARTE</h4>
  239. </div>
  240. <div class="modal-body">
  241. <input type="hidden" name="MAX_FILE_SIZE" value="10048576" />
  242. <label class="control-label" for="focusedInput">Seul les fichiers <strong>.jpg</strong> (10 Mo max) sont autorisés.</label>
  243. <input class="form-control" id="focusedInput" type="file" name="userfile">
  244. </div>
  245. <div class="modal-footer">
  246. <button type="submit" class="btn btn-info">Mise à jour de la carte</button>
  247. </div>
  248. </form>
  249. </div>
  250. </div>
  251. </div>
  252. <?php elseif($status == 0): ?>
  253. <div class="container-fluid">
  254. <div class="col-lg-1"></div>
  255. <div class="col-lg-5">
  256. <h2>Présentation</h2>
  257. <p><strong>EcoMonde est un Jeu de Rôle d'aventure interactif.</strong></p>
  258. <p class="text-success">Celui-ci dispose d'une interface de jeu permettant au Maître du Jeu de contrôler la partie directement sans avoir besoin de matériel.</p>
  259. <p class="text-primary">Le jeu ne requiert qu'un PC relié à internet et de quelques dés. Tout est automatisé.</p>
  260. <p class="text-warning">Le Maître du Jeu peut ensuite créer sa partie en s'appuyant sur tous les outils existants.</p>
  261. <p class="text-danger">Un&nbsp;&nbsp;<a href="http://wiki.ecomonde.land" target="_blank"><i class="ionicons ion-android-book"></i>&nbsp;&nbsp;WIKI</a>&nbsp;&nbsp;est à disposition pour un plus grand partage des ressources.</p>
  262. </div>
  263. <div class="col-lg-5">
  264. <h2>Créer un compte</h2>
  265. <form class="form-horizontal well" role="form" method="post" action="register.php" enctype="multipart/form-data">
  266. <fieldset>
  267. <div class="form-group">
  268. <label for="pseudo" class="col-lg-3 control-label">Pseudo</label>
  269. <div class="col-lg-9">
  270. <input type="text" class="form-control" name="pseudo" placeholder="Pseudo">
  271. </div>
  272. </div>
  273. <div class="form-group">
  274. <label for="Email" class="col-lg-3 control-label">E-mail</label>
  275. <div class="col-lg-9">
  276. <input type="text" class="form-control" name="email" placeholder="E-mail">
  277. </div>
  278. </div>
  279. <div class="form-group">
  280. <label for="password" class="col-lg-3 control-label">Mot de passe</label>
  281. <div class="col-lg-9">
  282. <input type="password" class="form-control" name="pass" placeholder="Mot de passe">
  283. </div>
  284. </div>
  285. <div class="form-group">
  286. <div class="col-lg-9 col-lg-offset-3">
  287. <button type="submit" class="btn btn-primary"><i class="ionicons ion-checkmark"></i>&nbsp;&nbsp;OK</button>
  288. </div>
  289. </div>
  290. </fieldset>
  291. </form>
  292. </div>
  293. <div class="col-lg-1"></div>
  294. </div>
  295. <div class="modal fade" id="modal_login">
  296. <div class="modal-dialog">
  297. <div class="modal-content">
  298. <form class="form-horizontal well" role="form" method="post" action="session.php" enctype="multipart/form-data">
  299. <div class="modal-header">
  300. <a type="button" class="close" data-dismiss="modal" aria-hidden="true" style="color:black;">X</a>
  301. <h4 class="modal-title"><i class="ionicons ion-power"></i>&nbsp;&nbsp;CONNEXION</h4>
  302. </div>
  303. <div class="modal-body">
  304. <div class="form-group">
  305. <label class="control-label" for="focusedInput">Email :</label>
  306. <input class="form-control" id="focusedInput" type="text" name="email">
  307. </div>
  308. <div class="form-group">
  309. <label class="control-label" for="focusedInput">Mot de passe :</label>
  310. <input class="form-control" id="focusedInput" type="password" name="password">
  311. </div>
  312. </div>
  313. <div class="modal-footer">
  314. <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>
  315. &nbsp;&nbsp;<button type="submit" class="btn btn-info">Connexion</button>
  316. </div>
  317. </form>
  318. </div>
  319. </div>
  320. </div>
  321. <?php endif; ?>
  322. <script src="./js/jquery-1.10.2.min.js"></script>
  323. <script src="./js/bootstrap.min.js"></script>
  324. <script src="./js/bootswatch.js"></script>
  325. </body>
  326. </html>