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.
 
 
 
 

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