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.
 
 
 
 

422 lines
18 KiB

  1. <?php include "header.php";
  2. $message[0]='
  3. <div class="col-lg-6 alert alert-dismissable alert-danger">
  4. <button type="button" class="close" data-dismiss="alert">X</button>
  5. <h4>Erreur !</h4>
  6. <p>Erreur !</p>';
  7. $message[1]='
  8. <div class="col-lg-6 alert alert-dismissable alert-success">
  9. <button type="button" class="close" data-dismiss="alert">X</button>
  10. <h4>C\'est bon !</h4>
  11. <p>Vous pouvez à présent vous connecter pour commencer à configurer votre partie.</p>';
  12. $message[2]='
  13. <div class="col-lg-6 alert alert-dismissable alert-warning">
  14. <button type="button" class="close" data-dismiss="alert">X</button>
  15. <h4>Hey !</h4>
  16. <p>Vous avez déjà un compte !</p>';
  17. $message[3]='
  18. <div class="col-lg-6 alert alert-dismissable alert-danger">
  19. <button type="button" class="close" data-dismiss="alert">X</button>
  20. <h4>Erreur !</h4>
  21. <p>Votre email/mot de passe est invalide !</p>';
  22. $message[4]='
  23. <div class="col-lg-6 alert alert-dismissable alert-info">
  24. <button type="button" class="close" data-dismiss="alert">X</button>
  25. <h4>Oups !</h4>
  26. <p>Vous devez vous connecter pour pouvoir jouer ;)</p>';
  27. $message[5]='
  28. <div class="col-lg-6 alert alert-dismissable alert-success">
  29. <button type="button" class="close" data-dismiss="alert">X</button>
  30. <h4>OK !</h4>
  31. <p>Votre carte est à jour !</p>';
  32. $message[6]='
  33. <div class="col-lg-6 alert alert-dismissable alert-danger">
  34. <button type="button" class="close" data-dismiss="alert">X</button>
  35. <h4>ERREUR !</h4>
  36. <p>Echec de mise à jour de votre carte. Seul les fichiers <strong>.jpg</strong> (10 Mo max) sont autorisés.</p>';
  37. $message[7]='
  38. <div class="col-lg-6 alert alert-dismissable alert-success">
  39. <button type="button" class="close" data-dismiss="alert">X</button>
  40. <h4>OK !</h4>
  41. <p>Joueur importé !</p>';
  42. $message[8]='
  43. <div class="col-lg-6 alert alert-dismissable alert-danger">
  44. <button type="button" class="close" data-dismiss="alert">X</button>
  45. <h4>ERREUR !</h4>
  46. <p>Echec à l\'importation du joueur. Seul les fichiers <strong>.xml</strong> (10 M max) sont autorisés.</p>';
  47. $message[9]='
  48. <div class="col-lg-6 alert alert-dismissable alert-success">
  49. <button type="button" class="close" data-dismiss="alert">X</button>
  50. <h4>OK !</h4>
  51. <p>Musique importé !</p>';
  52. $message[10]='
  53. <div class="col-lg-6 alert alert-dismissable alert-danger">
  54. <button type="button" class="close" data-dismiss="alert">X</button>
  55. <h4>ERREUR !</h4>
  56. <p>Echec à l\'importation de la musique. Seul les fichiers <strong>.mp3</strong> (10 M max) sont autorisés.</p>';
  57. ?>
  58. <!DOCTYPE html>
  59. <html lang="fr">
  60. <head>
  61. <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
  62. <title>EcoMonde</title>
  63. <meta name="viewport" content="width=device-width, initial-scale=1">
  64. <link rel="shortcut icon" href="./img/favicon.png" type="image/x-icon" />
  65. <link rel="stylesheet" href="./css/bootstrap.css" media="screen">
  66. <link rel="stylesheet" href="./css/bootswatch.min.css">
  67. <link rel="stylesheet" href="./css/ionicons.min.css">
  68. <link rel="stylesheet" href="./css/ecomonde.css">
  69. </head>
  70. <body>
  71. <div class="container-fluid">
  72. <div class="col-lg-1"></div>
  73. <div class="col-lg-3">
  74. <a href="index.php"><img class="img-responsive" src="./img/logo_0.png" alt="logo" /></a>
  75. </div>
  76. <div class="col-lg-6">
  77. <div class="navbar navbar-default">
  78. <div class="navbar-header">
  79. <button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".navbar-responsive-collapse">
  80. <span class="icon-bar"></span>
  81. <span class="icon-bar"></span>
  82. <span class="icon-bar"></span>
  83. </button>
  84. </div>
  85. <div class="navbar-collapse collapse navbar-responsive-collapse">
  86. <ul class="nav navbar-nav">
  87. <li><a href="http://wiki.ecomonde.land" target="_blank"><i class="ionicons ion-android-book"></i>&nbsp;&nbsp;WIKI</a></li>
  88. <li><a href="https://github.com/heuzef/ecomonde" target="_blank"><i class="ionicons ion-social-github"></i>&nbsp;&nbsp;GITHUB</a></li>
  89. <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>
  90. </ul>
  91. <ul class="nav navbar-nav navbar-right">
  92. <?php if($status != 0): ?>
  93. <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>
  94. &nbsp;&nbsp;
  95. <a href="logout.php" class="btn btn-danger btn-xs"><i class="ionicons ion-power"></i></a>&nbsp;&nbsp;
  96. <?php elseif($status == 0): ?>
  97. <a class="btn btn-success btn-xs" data-toggle="modal" data-target="#register"><i class="ionicons ion-plus"></i>&nbsp;&nbsp;INSCRIPTION</a>
  98. <a class="btn btn-info btn-xs" data-toggle="modal" data-target="#modal_login"><i class="ionicons ion-power"></i>&nbsp;&nbsp;CONNEXION</a>
  99. <?php endif; ?>
  100. </ul>
  101. </div>
  102. </div>
  103. </div>
  104. <div class="col-lg-1"></div>
  105. </div>
  106. <hr />
  107. <?php if(isset($_GET["msg"])){?>
  108. <div class="container-fluid">
  109. <div class="col-lg-3"></div>
  110. <?php echo $message[$_GET["msg"]]; ?>
  111. </div>
  112. <div class="col-lg-3"></div>
  113. </div>
  114. <?php } else {} ?>
  115. <?php if($status != 0):?>
  116. <div class="container-fluid">
  117. <div class="col-lg-1"></div>
  118. <div class="col-lg-3">
  119. <div class="panel panel-default">
  120. <div class="panel-heading"><i class="ionicons ion-gear-a"></i>&nbsp;&nbsp;<strong>Configurer votre partie</strong></div>
  121. <div class="panel-body">
  122. <p>
  123. <a href="play" class="btn btn-info btn-lg" target="_blank"><i class="ionicons ion-play"></i>&nbsp;&nbsp;Lancer votre partie</a>
  124. <p>
  125. <hr />
  126. <p>
  127. <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>
  128. </p>
  129. <hr />
  130. <p>
  131. <a data-toggle="modal" data-target="#modal_import_player" class="btn btn-default btn-lg"><i class="glyphicon glyphicon-import"></i>&nbsp;&nbsp;Importer un joueur (.XML)</a>
  132. </p>
  133. <hr />
  134. <p>
  135. <div class="btn-group">
  136. <a href="#" class="btn btn-default btn-lg dropdown-toggle" data-toggle="dropdown">
  137. <i class="ionicons ion-music-note"></i>&nbsp;&nbsp;Changer les musiques
  138. <span class="caret"></span>
  139. </a>
  140. <ul class="dropdown-menu">
  141. <li><a data-toggle="modal" data-target="#modal_change_music_soft" style="color:#CCC;"><i class="ionicons ion-music-note"></i>&nbsp;&nbsp;SOFT</a></li>
  142. <li class="divider"></li>
  143. <li><a href="#" style="color:#AAA;"><i class="ionicons ion-music-note"></i>&nbsp;&nbsp;TONIC</a></li>
  144. <li class="divider"></li>
  145. <li><a href="#" style="color:#000;"><i class="ionicons ion-music-note"></i>&nbsp;&nbsp;HARD</a></li>
  146. <li class="divider"></li>
  147. <li><a href="#" style="color:#ADDFFF;"><i class="ionicons ion-music-note"></i>&nbsp;&nbsp;LIGHT</a></li>
  148. <li class="divider"></li>
  149. <li><a href="#" style="color:#8128B5;"><i class="ionicons ion-music-note"></i>&nbsp;&nbsp;DARK</a></li>
  150. </ul>
  151. </div>
  152. </p>
  153. <hr />
  154. <p>
  155. <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>
  156. </p>
  157. </div>
  158. </div>
  159. </div>
  160. <div class="col-lg-7">
  161. <div class="panel panel-default">
  162. <div class="panel-heading"><i class="ionicons ion-person"></i>&nbsp;&nbsp;<strong>Joueurs présents dans votre partie :</strong></div>
  163. <div class="panel-body">
  164. <table class="table table-striped table-hover ">
  165. <thead>
  166. <tr>
  167. <th></th>
  168. <th>Nom</th>
  169. <th><i class="ionicons ion-heart" style="color:red;"></i></th>
  170. <th><i class="ionicons ion-flash" style="color:#FFD700;"></i></th>
  171. <th><i class="ionicons ion-egg" style="color:brown"></i></th>
  172. <th><i class="ionicons ion-fireball" style="color:grey"></i></th>
  173. <th><i class="ionicons ion-fireball" style="color:#ADDFFF"></i></th>
  174. <th><i class="ionicons ion-fireball" style="color:#8128B5"></i></th>
  175. <th><i class="ionicons ion-android-note" style="color:#000"></i></th>
  176. </tr>
  177. </thead>
  178. <tbody>
  179. <?php
  180. // nombre de gamers
  181. $f = 0;
  182. foreach(glob('*.xml') as $f) {$f+=1;}
  183. $nb_membres = count(glob('./medias/'.$hash.'/*.xml'));
  184. // liste des gamers
  185. $folder = "./medias/".$hash."/";
  186. $dossier = opendir($folder);
  187. while ($fichier = readdir($dossier))
  188. {
  189. if ($fichier != "." && $fichier != ".." && $fichier != "map.jpg" && $fichier != "soft.mp3" && $fichier != "tonic.mp3" && $fichier != "hard.mp3" && $fichier != "light.mp3" && $fichier != "dark.mp3")
  190. {
  191. $gamers = explode(".xml", $fichier);
  192. $xml = simplexml_load_file('./medias/'.$hash.'/'.$fichier);
  193. if (!isset($itemnb)) {
  194. $itemnb=0;
  195. } else {
  196. $itemnb++;
  197. }
  198. foreach($xml->entry as $entry) {
  199. $somme_ecos=$entry->ecos->verte+$entry->ecos->bleue+$entry->ecos->jaune+$entry->ecos->rouge;
  200. echo '<tr class="active">
  201. <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>
  202. <td><strong>['.$entry->level.']</strong>&nbsp;'.$entry->nom.'</td>
  203. <td>'.$entry->hp.'</td>
  204. <td>'.$entry->xp.'</td>
  205. <td>'.$entry->money.'</td>
  206. <td>'.$somme_ecos.'</td>
  207. <td>'.$entry->ecos->blanche.'</td>
  208. <td>'.$entry->ecos->noire.'</td>
  209. <td>'.substr($entry->notes, 0, 40).'...</td>
  210. </tr>';
  211. }
  212. }
  213. }
  214. closedir($dossier);
  215. ?>
  216. </tbody>
  217. </table>
  218. </div>
  219. </div>
  220. </div>
  221. <div class="col-lg-1"></div>
  222. </div>
  223. <div class="modal fade" id="modal_new_player">
  224. <div class="modal-dialog">
  225. <div class="modal-content">
  226. <form class="form-horizontal well" role="form" method="post" action="new_player.php" enctype="multipart/form-data">
  227. <div class="modal-header">
  228. <a type="button" class="close" data-dismiss="modal" aria-hidden="true" style="color:black;">X</a>
  229. <h4 class="modal-title"><i class="ionicons ion-person-add"></i>&nbsp;&nbsp;NOUVEAU JOUEUR</h4>
  230. </div>
  231. <div class="modal-body">
  232. <div class="form-group">
  233. <label class="control-label" for="focusedInput">Nom :</label>
  234. <input class="form-control" id="focusedInput" type="text" name="player_name" maxlength="12" value="Derpy">
  235. </div>
  236. <div class="form-group">
  237. <label class="control-label" for="focusedInput">Nombre d'XP</label>
  238. <div class="input-group">
  239. <span class="input-group-addon"><i class="ionicons ion-flash" style="color:#FFD700;";></i></span>
  240. <select class="form-control" id="focusedInput" name="player_xp">
  241. <option>0</option>
  242. <option>10</option>
  243. <option>50</option>
  244. <option>100</option>
  245. <option>999</option>
  246. </select>
  247. </div>
  248. </div>
  249. <div class="form-group">
  250. <label class="control-label" for="focusedInput">Nombre d'Orbes</label>
  251. <div class="input-group">
  252. <span class="input-group-addon"><i class="ionicons ion-egg" style="color:brown;";></i></span>
  253. <select class="form-control" id="focusedInput" name="player_money">
  254. <option>0</option>
  255. <option>10</option>
  256. <option>50</option>
  257. <option>100</option>
  258. <option>999</option>
  259. </select>
  260. </div>
  261. </div>
  262. </div>
  263. <div class="modal-footer">
  264. <button type="submit" class="btn btn-info">Création du joueur</button>
  265. </div>
  266. </form>
  267. </div>
  268. </div>
  269. </div>
  270. <div class="modal fade" id="modal_change_map">
  271. <div class="modal-dialog">
  272. <div class="modal-content">
  273. <form class="form-horizontal well" role="form" method="post" action="change_map.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="ionicons ion-map"></i>&nbsp;&nbsp;CHANGER LA CARTE</h4>
  277. </div>
  278. <div class="modal-body">
  279. <input type="hidden" name="MAX_FILE_SIZE" value="10048576" />
  280. <label class="control-label" for="focusedInput">Seul les fichiers <strong>.jpg</strong> (10 Mo max) sont autorisés.</label>
  281. <input class="form-control" id="focusedInput" type="file" name="userfile">
  282. </div>
  283. <div class="modal-footer">
  284. <button type="submit" class="btn btn-info">Mise à jour de la carte</button>
  285. </div>
  286. </form>
  287. </div>
  288. </div>
  289. </div>
  290. <div class="modal fade" id="modal_import_player">
  291. <div class="modal-dialog">
  292. <div class="modal-content">
  293. <form class="form-horizontal well" role="form" method="post" action="import_player.php" enctype="multipart/form-data">
  294. <div class="modal-header">
  295. <a type="button" class="close" data-dismiss="modal" aria-hidden="true" style="color:black;">X</a>
  296. <h4 class="modal-title"><i class="ionicons ion-map"></i>&nbsp;&nbsp;IMPORTER UN JOUEUR</h4>
  297. </div>
  298. <div class="modal-body">
  299. <input type="hidden" name="MAX_FILE_SIZE" value="1004857" />
  300. <label class="control-label" for="focusedInput">Seul les fichiers <strong>.xml</strong> (1 Mo max) sont autorisés.</label>
  301. <input class="form-control" id="focusedInput" type="file" name="userfile">
  302. </div>
  303. <div class="modal-footer">
  304. <button type="submit" class="btn btn-info">Importer le joueur</button>
  305. </div>
  306. </form>
  307. </div>
  308. </div>
  309. </div>
  310. <div class="modal fade" id="modal_change_music_soft">
  311. <div class="modal-dialog">
  312. <div class="modal-content">
  313. <form class="form-horizontal well" role="form" method="post" action="change_music_soft.php" enctype="multipart/form-data">
  314. <div class="modal-header">
  315. <a type="button" class="close" data-dismiss="modal" aria-hidden="true" style="color:black;">X</a>
  316. <h4 class="modal-title"><i class="ionicons ion-map"></i>&nbsp;&nbsp;Changer la musique SOFT</h4>
  317. </div>
  318. <div class="modal-body">
  319. <input type="hidden" name="MAX_FILE_SIZE" value="10048576" />
  320. <label class="control-label" for="focusedInput">Seul les fichiers <strong>.mp3</strong> (10 Mo max) sont autorisés.</label>
  321. <input class="form-control" id="focusedInput" type="file" name="userfile">
  322. </div>
  323. <div class="modal-footer">
  324. <button type="submit" class="btn btn-info">Changer la musique SOFT</button>
  325. </div>
  326. </form>
  327. </div>
  328. </div>
  329. </div>
  330. <?php elseif($status == 0): ?>
  331. <div class="container-fluid">
  332. <div class="col-lg-1"></div>
  333. <div class="col-lg-5">
  334. <h2>Présentation</h2>
  335. <p><strong>EcoMonde est un Jeu de Rôle d'aventure interactif.</strong></p>
  336. <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>
  337. <p class="text-primary">Le jeu ne requiert qu'un PC relié à internet et de quelques dés. Tout est automatisé.</p>
  338. <p class="text-warning">Le Maître du Jeu peut ensuite créer sa partie en s'appuyant sur tous les outils existants.</p>
  339. <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>
  340. </div>
  341. <div class="col-lg-5">
  342. <iframe width="560" height="315" src="//www.youtube-nocookie.com/embed/yYkinIyzkww?rel=0&amp;showinfo=0" frameborder="0" allowfullscreen></iframe>
  343. </div>
  344. <div class="col-lg-1"></div>
  345. </div>
  346. <div class="modal fade" id="modal_login">
  347. <div class="modal-dialog">
  348. <div class="modal-content">
  349. <form class="form-horizontal well" role="form" method="post" action="session.php" enctype="multipart/form-data">
  350. <div class="modal-header">
  351. <a type="button" class="close" data-dismiss="modal" aria-hidden="true" style="color:black;">X</a>
  352. <h4 class="modal-title"><i class="ionicons ion-power"></i>&nbsp;&nbsp;CONNEXION</h4>
  353. </div>
  354. <div class="modal-body">
  355. <div class="form-group">
  356. <label class="control-label" for="focusedInput">Email :</label>
  357. <input class="form-control" id="focusedInput" type="text" name="email">
  358. </div>
  359. <div class="form-group">
  360. <label class="control-label" for="focusedInput">Mot de passe :</label>
  361. <input class="form-control" id="focusedInput" type="password" name="password">
  362. </div>
  363. </div>
  364. <div class="modal-footer">
  365. <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>
  366. &nbsp;&nbsp;<button type="submit" class="btn btn-info">Connexion</button>
  367. </div>
  368. </form>
  369. </div>
  370. </div>
  371. </div>
  372. <div class="modal fade" id="register">
  373. <div class="modal-dialog">
  374. <div class="modal-content">
  375. <form class="form-horizontal well" role="form" method="post" action="register.php" enctype="multipart/form-data">
  376. <div class="modal-header">
  377. <a type="button" class="close" data-dismiss="modal" aria-hidden="true" style="color:black;">X</a>
  378. <h4 class="modal-title"><i class="ionicons ion-plus"></i>&nbsp;&nbsp;INSCRIPTION</h4>
  379. </div>
  380. <div class="modal-body">
  381. <div class="form-group">
  382. <label class="control-label" for="focusedInput">Pseudo :</label>
  383. <input class="form-control" id="focusedInput" type="text" name="pseudo">
  384. </div>
  385. <div class="form-group">
  386. <label class="control-label" for="focusedInput">E-mail :</label>
  387. <input class="form-control" id="focusedInput" type="text" name="email">
  388. </div>
  389. <div class="form-group">
  390. <label class="control-label" for="focusedInput">Mot de passe :</label>
  391. <input class="form-control" id="focusedInput" type="password" name="password">
  392. </div>
  393. </div>
  394. <div class="modal-footer">
  395. &nbsp;&nbsp;<button type="submit" class="btn btn-primary"><i class="ionicons ion-checkmark"></i>&nbsp;&nbsp;OK</button>
  396. </div>
  397. </form>
  398. </div>
  399. </div>
  400. </div>
  401. <?php endif; ?>
  402. <script src="./js/jquery-1.10.2.min.js"></script>
  403. <script src="./js/bootstrap.min.js"></script>
  404. <script src="./js/bootswatch.js"></script>
  405. </body>
  406. </html>