25'ten fazla konu seçemezsiniz Konular bir harf veya rakamla başlamalı, kısa çizgiler ('-') içerebilir ve en fazla 35 karakter uzunluğunda olabilir.
 
 
 
 

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